Try it out button - URL path incorrect

418 views
Skip to first unread message

Maaz Hurzuk

unread,
Jul 15, 2014, 2:56:12 AM7/15/14
to swagger-sw...@googlegroups.com
Hi, 
I have been able to deploy my application on tomcat 6 with swagger. 

I am able to see the neat swagger UI and it displays my resources perfectly fine. 
My URLs looks precisely like these: 


When I click on "Try it out" it does not execute the correct URL.
It executes the URL: http://localhost:8080/api/customers/getallcustomers (Incorrect URL)
The correct URL which needs to be executed is http://localhost:8080/billinggw2/api/customers/getallcustomers (Correct URL)
Notice the context root billinggw2 is missing after the localhost:8080

How can I fix this and change the button to fire the right URL ??

Ron

unread,
Jul 15, 2014, 3:10:54 AM7/15/14
to swagger-sw...@googlegroups.com
Hi Maaz,

Based on the web.xml you shared in the previous issue, your basepath is misconfigured.
Right now it looks like:
  <init-param>
     <param-name>swagger.api.basepath</param-name>
     <param-value>http://localhost:8080/api</param-value>
   </init-param>

which is what you're getting with the request execution.
Change that value to http://localhost:8080/billinggw2/api and it should work fine.


--
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