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 swa
To access swagger2 it is
http://localhost:${port}/${contextPath}/swagger-ui.html
These are your Swagger Docs:
{"apiVersion":"1.2.3","swaggerVersion":"1.2","apis":[{"path"...
Now you need Swagger-UI to consume them. You can install it anywhere. There is no hard requirement that you put Swagger-UI in your project. You just need to edit the index.html
file to point to your docs path (the JSON output above.)
You must copy the contents of the dist folder of swagger-ui into your project's webapp folder.
In index.html,
window.swaggerUi = new SwaggerUi({
url: "http://petstore.swagger.wordnik.com/api/api-docs",
dom_id: "swagger-ui-container",
you must replace url with this
http://localhost:8080/camel-example-servlet-rest-tomcat/api-docs
For details, Follow this link to integrate swagger-ui.
https://github.com/swagger-api/swagger-ui
You should use http://localhost:${port}/${contextPath}/swagger/index.html
http://localhost:8080/camel-example-servlet-rest-tomcat/{basepath}/dist/index.html if you have copied dist folder as is. If you have renamed dist folder, use the new name instead of dist. replace basepath with basepath you have configured in web.xml. The code snippet for that looks like this:
<init-param>
<param-name>swagger.api.basepath</param-name>
<param-value>/rest</param-value>
</init-param>