Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAS 3.1 deprecated example field in the Schema Object. #3346

Open
1 task done
ashsummer opened this issue Mar 14, 2025 · 1 comment
Open
1 task done

OAS 3.1 deprecated example field in the Schema Object. #3346

ashsummer opened this issue Mar 14, 2025 · 1 comment
Labels

Comments

@ashsummer
Copy link

ashsummer commented Mar 14, 2025

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Starting from OAS 3.1, the example field inside the Schema Object has been deprecated. doc

Since #3031, the example field for ApiProperty has been moved inside the Schema Object as shown below.

          {
            "name": "isFault",
            "required": false,
            "in": "query",
            "schema": {
              "example": "true",
              "type": "boolean"
            }
          },

Describe the solution you'd like

I think that we need to make the example field go under the property, just like before.

          {
            "name": "isFault",
            "required": false,
            "in": "query",
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

I believe so compatibility will be maintained across OAS 3.0, OAS 3.1, and later versions.

@chloe-codes1
Copy link

I completely agree with this issue and would love to see it addressed. Maintaining compatibility across OAS 3.0, OAS 3.1, and future versions is crucial for ensuring a smooth transition and avoiding unnecessary breaking changes. Moving the example field back under the property, as it was before, seems like the best solution.

Looking forward to further discussions and potential updates on this. Thanks for bringing this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants