swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.24k stars 8.9k forks source link

Collapse "Response" section #8002

Open 2019-05-10 opened 2 years ago

2019-05-10 commented 2 years ago

The REST API I am using has a large number of endpoints and each endpoint again a rather large number of possible responses, hence the "Responses" section at every endpoint is very long, about 2/3 of the whole page consists of "Responses", and thus navigation requires constant scrolling.

"Responses" section should be collapsible and a config setting added to keep collapsed initially.

Screenshot_20220428_112735

Tridy commented 1 year ago

agree with that. this will help with hiding secrets like usernames and passwords from "Curl" and "Request URL" sections

screenshot

or if anyone knows a way of hiding them, please let me know.

2019-05-10 commented 1 year ago

or if anyone knows a way of hiding them, please let me know.

Don´t use GET for credentials -- it´s a terrible idea.

Tridy commented 1 year ago

Yes, I changed it to Post.

I also found a post that says that there is no way of hiding the information within the Swagger UI

https://stackoverflow.com/questions/75377846/swagger-swashbuckle-can-i-mask-sensitive-information-in-the-request-ui