Skip to content

Default value from within schema is not showing in the documentation #1686

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

Closed
brazabr opened this issue Mar 5, 2018 · 1 comment
Closed

Comments

@brazabr
Copy link

brazabr commented Mar 5, 2018

Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 3.0.1
Which Swagger-Editor version? current on http://editor.swagger.io
How did you install Swagger-Editor? Using from browser
Which browser & version? Chrome x64 64.0.3282.186
Which operating system? Windows 10 x64 1709

Demonstration API definition

petstore-expanded-defaultinschema.yaml

Expected Behavior

image

Current Behavior

image

Context

You can achieve the expected behaviour by adding the default property in the Parameter Object instead of the Schema Object but then OpenAPI 3.0 validation complains that you cannot use schema and default together. Indeed in the OpenAPI 3.0 specs there is no default in the Parameter Object.

@shockey
Copy link
Contributor

shockey commented Apr 17, 2018

Pasted Image 1.png

This was fixed in swagger-api/swagger-ui#4191 😄

@shockey shockey closed this as completed Apr 17, 2018
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