-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
defining exact response is cumbersome #1428
Comments
This is an issue for the spec, not swagger-editor. We just follow what the spec allows. If you'd like to try and see a change, you can file a ticket on the spec's repo. That said, considering we're using a subset of JSON Schema, it's very unlikely that we'd deviate from that in the spec. |
Thanks, I issued a feature request in order to get this way of specifying a constant value: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are some cases when the response JSON structure returned by an API endpoint is always the same. I mean, I would like to specify in the API specification that the result is
The best way I found to describe this, is a 1-element enum for each field. It is quite verbose so it would be nice to have a
value
member describing exact values like this:It would be even better to define constant responses with complete JSON description, similarly to this one:
The text was updated successfully, but these errors were encountered: