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

Don't document non-schema object examples #885

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spaceraccoon
Copy link
Contributor

As per #884, grape-swagger adds the example value even for non-schema object parameters, which leads to invalid OpenAPI during validation. I.e., the example keyword should not appear in any parameters object, only in any definitions schema objects i.e. body type parameters.

This error appears in Swagger editor/validators when a parameter object has an example key.

This adds a check such that example is only added then and fixes a previous spec.

@spaceraccoon spaceraccoon force-pushed the spaceraccoon-dont-document-non-schema-examples branch from 92e9ed8 to 7ac9bc9 Compare November 17, 2022 18:22
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

Successfully merging this pull request may close these issues.

2 participants