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

Validate provided or generated examples with JSON schema #4389

Open
loganmzz opened this issue Aug 22, 2023 · 0 comments
Open

Validate provided or generated examples with JSON schema #4389

loganmzz opened this issue Aug 22, 2023 · 0 comments

Comments

@loganmzz
Copy link

loganmzz commented Aug 22, 2023

Content & configuration

Would be nice if Swagger Editor could report invalid examples (whatever they are hand-written or generated)

Is your feature request related to a problem?

Partially, Swagger editor may try to generate example. If not cautious, they can be invalid without notice. And same for hand-written ones.

Describe the solution you'd like

The same way specification and references are validated, also valid provided examples.

Describe alternatives you've considered

  1. Extract schemas
  2. Extract examples (and associated schema)
  3. Run validation of examples against associated schema

Additional context

N/A

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

1 participant