Display REST API complete Request URL (endpoint URL) in Swagger UI

514 views
Skip to first unread message

Aman Jain

unread,
Mar 1, 2016, 6:08:38 AM3/1/16
to Swagger, ajay....@adeptia.com, Pintu Kumar, vishw...@gmail.com
Hi,

We are using Swagger framework for our REST API documentation. At present, there is no placeholder to display complete request URL (endpoint URL) in Swagger UI that is associated with each REST API.

Each REST API is associated with request URL (endpoint URL) that can be used by end user to consume it from any external application (outside of Swagger UI). How do we inform end user about this request URL (endpoint URL) in Swagger UI?

For example, in below pet store sample application, there is no way to know the complete request URL (endpoint URL) associated with this REST API.


However, when we test this API (by clicking "Try it out!") after providing input - this information is displayed in "Request URL" field. 




But we need to display this information (endpoint URL or Request URL associated with this API) upfront to end user and they should be able to know about it without testing it. My question is what is the recommended approach to display this information and how we can do it?


Any help in this regard shall be highly appreciated.


Thanks!


Ron Ratovsky

unread,
Mar 1, 2016, 2:27:33 PM3/1/16
to swagger-sw...@googlegroups.com, ajay....@adeptia.com, Pintu Kumar, vishw...@gmail.com
The information is not displayed by default because it’s somewhat overbearing. The basePath is displayed at the bottom of the page and can be calculated.
You should be able to modify the UI to display both.

--
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.
Reply all
Reply to author
Forward
0 new messages