Note: This generation from a service is a shortcut to get a preview of the OpenAPI description. Akwatype will automatically try to find in your model a description of an openAPI object referencing this service to get a complete description with servers, info ... 

View or Export a service in OpenAPI format

To generate an OpenAPI description you must have described at least one route with at least an url

  • Without url the OpenAPI generation will crash

Ideally the minimum would be to also associate a facade to a response.

for example :

service person{
    expose persons {
        route person{       
            url:"person"
            response:PersonDTO
        }
    }
}

When it's done:

  • Position the cursor on the name of the service
    • The view or export will contain all the routes of the service.
  • Right click on the mouse

To view your OpenAPI description

  • Select [View OpenAPI] option in the context menu

The Open API view or export of the example will produce the following description (displayed in SwaggerEditor) :

 

To export your OpenAPI description

  • Select [export] in the context menu
  • A dialog box allows you to export the open API v3 description 

View or Export a resource in Open API format

  • Position the cursor on the name of the resource
    • The export will contain all the routes of the resource.
  • Right click on the mouse
  • Select export in the context menu
    • note: you can directly view the Open API description in Akwatype by selecting the Swagger Editor option in the context menu
  • A dialog box allows you to export the open API v3 description 

View or Export a route in OpenAPI format

  • Position the cursor on the name of the route
  • Right click on the mouse
  • Select export in the context menu
    • note: you can directly view the Open API description in Akwatype by selecting the Swagger Editor option in the context menu
  • A dialog box allows you to export the open API v3 description 

 

Excel Export

you can also export the description of your services to Excel from the same dialog  box

Generate OpenAPI from exchanges or Service focus graph

From Exchange and Service focus graph, select a node (service, resource or route), right-click on the element and select Export from the contextual menu