# Swagger Editor

The Swagger Editor (opens new window) is an open source editor to design, define and document RESTful APIs in the OpenAPI (opens new window) Specification. OpenAPI (opens new window) definitions are simple JSON or YAML files that you can create and edit with any text editor. But the right tooling can make your job a lot easier. The Swagger Editor can also added in testing of our KO Service. Below are examples of using Swagger Editor (opens new window) to access and test the Ten-year Fatal Cardiovascular Risk Calculation KO Service (opens new window) KO Service.

  1. We will view the OpenAPI specification for the Cardiovascular Risk Calculation KO. Each KO exposes its OpenAPI specifications via a /kos/naan/name/service endpoint for example https://activator.kgrid.org/kos/score/calc/service (opens new window)

  2. Now in the Swagger Editor we can reference this specification and access Swagger Editor http://editor.swagger.io/?url=https://activator.kgrid.org/kos/score/calc/v0.3.0/service (opens new window).
    You notice the we passed the OpenAPI spec via the url query parameter

  3. Once in the editor for Cardiovascular Risk Calculation KO, you can test the service via the POST method. Example data will appear which you can alter.

Swagger Editor Resources

Last Updated: 4/19/2021, 8:44:26 PM