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

Color of "default" Response #197

Closed
dolmen opened this issue Feb 3, 2017 · 0 comments
Closed

Color of "default" Response #197

dolmen opened this issue Feb 3, 2017 · 0 comments

Comments

@dolmen
Copy link

dolmen commented Feb 3, 2017

In operations, the default response in a Responses object is often used to specify generic responses such as error cases (because it can be very tedious to document every possible status returned, and a bit of doc is better than nothing). Currently default is always rendered in green.

I propose that default would be rendered using a color (well, CSS class) depending on the presence of other responses in the same Responses object:

  • if at least one response in the 100-399 range is specified, render default in red
  • if none 100-399 status is specified, render default in green

For an example of spec where default is used to specifiy generic error messages and which is incorrectly always rendered in green with ReDoc: http://developers.ijenko.com/swagger.json

@dolmen dolmen changed the title Color of "default" response Color of "default" Response Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants