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

Changes in 'example', "examples" are not handled #666

Open
DrSatyr opened this issue Jun 1, 2024 · 2 comments
Open

Changes in 'example', "examples" are not handled #666

DrSatyr opened this issue Jun 1, 2024 · 2 comments

Comments

@DrSatyr
Copy link

DrSatyr commented Jun 1, 2024

'example' and "examples" fields in OpenAPI objects (eg Parameter, Schema, MediaType, Header) are not compared.

Old schema:

schema:
    type: string,
    example: old example

New schema:

schema:
    type: string,
    example: new example

Such fields are not valuable for API functionality, but they are important from an API documentation perspective. Descriptions are already handled, so my suggestion is to handle examples as well.

@mhiggins-SA
Copy link

mhiggins-SA commented Jun 1, 2024 via email

@DrSatyr
Copy link
Author

DrSatyr commented Jun 2, 2024

@mhiggins-SA Sorry, it's my bad, the provided schemas did not explain all the cases. For sure OAS 3.1 introduces "examples" in favor of deprecated "example". But openapi-diff works with all versions of specifications (Swagger 2.0, OAS 3.0, OAS 3.1).

Basically, I would say that openapi-diff does not handle "examples" and "example" in all versions of the specification. Currently, I am working on PR to solve this, so will cover all versions.

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

No branches or pull requests

2 participants