swagger-ui

47 views
Skip to first unread message

DK

unread,
May 26, 2015, 9:36:47 AM5/26/15
to swagger-sw...@googlegroups.com
Hi,

I'm looking for to configure swagger-ui index.html to allow the user to switch between multiple different swagger.json urls.
Is this possible?

Ron Ratovsky

unread,
May 26, 2015, 9:44:21 AM5/26/15
to swagger-sw...@googlegroups.com
It's possible with some basic html/javascript. Just create a drop down list and call the SwaggerUi with the different URLs.

Josh should be able to provide more information when he's around.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Josh Ponelat

unread,
May 27, 2015, 1:08:45 AM5/27/15
to swagger-sw...@googlegroups.com
Yup, should be straightforward....

There are two changes... one change the input box to a select box.
........ (near the top of the file) https://gist.github.com/ponelat/a51fe50481f8b7a31038#file-select-box-url-swagger-ui-L91-L94
Two preload the select box with some URLs

PS: Please note, that if you want to build swagger-ui (with gulp) you would need to update `src/main/html/index.html` as well.

Reply all
Reply to author
Forward
0 new messages