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.

To access Swagger documentation, click the URL http://localhost:8080/openkm/swagger-ui.html It will show a screen like the one below asking for authorized user credentials:

Then the Swagger tool will be displayed:

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, the results will be shown.