Swagger-ui: Add option to hide/suppress error response body schema/model

Created on 3 Nov 2015  路  4Comments  路  Source: swagger-api/swagger-ui

We have a standard error response schema that we use for 4xx and 5xx errors in our APIs. Works fine in Swagger UI, but the view consume a lot of real estate when we expand operations, and these models/schema tend to dominate the API doc, to the distraction of the main/expected body and parameters.

I propose adding an option (settable in index.html for example) that can leave the schema body
hidden by default for 4xx and 5xx responses.

Related, it would be nice to show the error response with Status code, Description, and Response Model
but in the Response Model show

Model | Model Schema | Hide

with the default being Hidden.

All 4 comments

:+1:

+1

Closing as this is not something we're going to implement soon. If anyone wants to submit a PR covering this feature, we'll be happy to review.

by the way. there is no reason to show the select box if only one option is present.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shockey picture shockey  路  3Comments

insideshell picture insideshell  路  3Comments

ankon picture ankon  路  4Comments

songtianyi picture songtianyi  路  3Comments

prabhat1790 picture prabhat1790  路  3Comments