Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate swagger-ui in my application

I am trying to integrate swagger with camel project

following this example https://github.com/smparekh/camel-example-servlet-rest-tomcat

How do i access swagger-ui using this example project ?

I delopyed the war file in tomcat.

and access http://localhost:8080/camel-example-servlet-rest-tomcat/api-docs i get this ...

{"apiVersion":"1.2.3","swaggerVersion":"1.2","apis":[{"path":"/user","description":"User rest service"}],"info":{"title":"User Services","description":"Camel Rest Example with Swagger that provides an User REST service"}}

BUT MY QUESTION IS - how do i access swagger-ui/index.html?

what is the exact URL to access swagger-UI?

like image 623
Neha Avatar asked Apr 07 '15 16:04

Neha


People also ask

How do I connect to swagger UI?

Go to http://localhost:8000/ in your address bar. This address lets you view the local web server. By default, web servers default to the index. html file in the directory, so it will show the Swagger UI file automatically.


2 Answers

To access swagger2 it is

http://localhost:${port}/${contextPath}/swagger-ui.html
like image 93
Anand Avatar answered Oct 31 '22 17:10

Anand


You should use http://localhost:${port}/${contextPath}/swagger/index.html

like image 28
StasKolodyuk Avatar answered Oct 31 '22 16:10

StasKolodyuk