Open API
Open API support was introduced in version 7.0 of the Genesis platform.
The Genesis Application Platform supports Open API for external systems to integrate with any Genesis application.
Genesis makes this easy to configure and set up, and an Open API specification is generated for the following resources:
- Request Server
- The specification is generated for every GPAL requestReply
codeblock
.
- The specification is generated for every GPAL requestReply
- Event Handler
- The specification is generated for each GPAL
eventHandler
codeblock.
- The specification is generated for each GPAL
- Custom Endpoints
- The specification is generated for each GPAL Custom Endpoint.
- The standard specification can be augmented using the
openapi { ... }
DSL, Custom Endpoints.
Internally, the framework uses a metadata system to generate JSON schemas for input and return objects in the Open API spec. For more details, see our pages on Network messages - type-safe messages and metadata annotations.
Accessing the Open API specification
Genesis Open API supports Open API version 3.1.
All requests to the rest endpoints below need to be authenticated to get a SESSION_AUTH_TOKEN
for the requests.
The Open API specification is generated at runtime and is available at the following endpoints:
Full specification:
https://{server-host}/gwf/open-api/spec/
Service specific specification:
https://{server-host}/gwf/open-api/spec/{service-name}
You can also generate the Open API specification when running via the IntelliJ plugin
You can verify the specification by copying the contents into Swagger Editor
For an example specification, see here.