How to provide relative path for the url in swagger-ui 1.3 version

1,017 views
Skip to first unread message

Vibha

unread,
Aug 28, 2013, 6:59:58 AM8/28/13
to swagger-sw...@googlegroups.com
Is there a way to provide relative path for the url in swagger-ui 1.3 version? It was working fine when I provided relative path for discovery url in 1.2.3 version.

tony tam

unread,
Sep 2, 2013, 11:34:52 PM9/2/13
to swagger-sw...@googlegroups.com
Hi, you can edit your index.html file and put something like this:

var host = window.location.host
window.swaggerUi = new SwaggerUi({
  url: host + "/api/api-docs",
  dom_id: "swagger-ui-container",
...
Reply all
Reply to author
Forward
0 new messages