i am wondering if it is possible to get swagger-ui to show all the webservices provided through the rest-api-addon.
I tried to integrate it into our application but i can’t seem to get it to show the services provided through the plugin.
How do i configure the swagger-ui to display all the services?
Hi,
can you please explain in more details what is your task?
URLs for getting general and project-specific swagger documentation are described in the here. So just run swagger UI and use the URL from the documentation.
thanks for your reply, i’m trying to run swagger-ui in our application context. I’m able to open the ui under http://localhost:8080/app/dispatch/swagger-ui.html
but it just displays the following services
You didn’t mention that you use springfox. Swagger UI bundled into springfox doesn’t allow to select a json/yaml file with the documentation.
If you want to see REST API addon controllers and your custom MVC controllers, then you need to register the SwaggerConfig bean in the spring context of the REST API (in the rest-dispatcher-spring.xml) file.
You’ll find REST API controllers (entities-controller, services-controller) and custom MVC controllers there.
Also you may run a standalone swagger-ui instance - download it from the swagger website and run it locally on your machine. In this case swagger ui will allow you to define a URL for swagger documentation file. If you use this: http://localhost:8080/app/rest/v2/docs/swaggerDetailed.yaml
then you’ll get project-specific swagger documentation:
I am so sorry, i didn’t know there was tha kind of difference in using springfox.
Thank you very much, i did miss the rest-dispacher-spring.xml settings in my project, now i’m able to do test what i wanted.