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

In the sample below we use local OpenKM demo URL. You should use your own OpenKM URL ( associated IP or domain ).

For accessing Swagger documentation, open in your browser the URL http://localhost:8080/OpenKM/services/ you will get some page as image below:

Click in the URL http://localhost:8080/OpenKM/services/rest/api-docs?url=/OpenKM/services/rest/swagger.json 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 getRoles method and click on the button "Try it out":

  • Click on the "Execute" button;

  • Finally will be shown the results