Swagger
Swagger is an open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. While most users identify Swagger by the Swagger UI tool, the Swagger toolset includes support for automated documentation, code generation, and test case generation.
How to access Swagger
In the sample below, we use our OpenKM demo URL. You should use your OpenKM URL.
For accessing Swagger documentation, click in the URL http://localhost:8080/openkm/swagger-ui.html ;it will be shown and screen like shown below asking for authorized user credentials:
Then will be shown the Swagger tool:
Playing with Swagger
Let's do a quick test of the tool checking the getRoles method from auth-service.
- Open the auth-service
- Open the "roles" method and click on the button "Try it out":
- Click on the "Execute" button;
- Finally will be shown the results