swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Button to toggle a preview of html returned in a response

Open vdwees opened this issue 4 years ago • 4 comments

I am using Swagger UI to document a service, and one of the endpoints returns embeddable content. Swagger UI renders the code as HTML, for reasons described in https://github.com/swagger-api/swagger-ui/issues/1748 and https://github.com/swagger-api/swagger-ui/issues/3881. However, I found it useful to extend Swagger UI with a button to toggle rendering the html inline, so that it is easy to visualize and interact with the response from the server.

Screenshots are below. Notice the Show/Hide preview button in the bottom left corner. Its a small change that adds a really valuable feature without breaking any existing behaviour (vdwees@1344e49)

Would a formal PR be welcome?

image

image

vdwees avatar Jan 18 '21 16:01 vdwees

This would be awesome

smalagon15 avatar Mar 22 '21 10:03 smalagon15

please do this

qeleb avatar Jan 18 '23 21:01 qeleb

Does anyone know a patch like this, but for the latest swagger-ui version

AmyChodorowski avatar Sep 06 '23 14:09 AmyChodorowski

any news about this ?

noor-tg avatar Apr 28 '24 10:04 noor-tg