OpenAPI & AsyncAPI
When it makes sense, OpenAPI and AsyncAPI specifications can optionally be leveraged for data validation. This can happen in the REST router for request/response validation against an OpenAPI description, or in other integrations for message validation against an AsyncAPI description.
You will find below OpenAPI and AsyncAPI definitions of helix objects, shared across languages and integrations.
Each object can be used as a $ref
in your OpenAPI and AsyncAPI descriptions, either as a "schema" object or as a whole response. Example:
post:
operationId: custom
tags:
- System
summary: Custom operation
description: |
This is a custom operation.
responses:
'202':
description: Accepted
content:
application/json:
schema:
allOf:
- $ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/schemas/rest/200.yaml
- type: object
properties:
metadata:
type: object
properties:
temporal:
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/schemas/temporal/Metadata.yaml
required:
- temporal
required:
- metadata
'400':
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/responses/400.yaml
'401':
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/responses/401.yaml
'429':
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/responses/429.yaml
'500':
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/responses/500.yaml
'503':
$ref: https://raw.githubusercontent.com/nunchistudio/helix/refs/heads/main/descriptions/openapi/components/responses/503.yaml
Shared objects
Below are objects compatible with both OpenAPI and AsyncAPI specifications, used by helix core and all integrations.
OpenAPI
REST integration
Below are objects compatible with OpenAPI designed for the the REST router integration.
2xx responses
4xx responses
5xx responses
Temporal integration
Below are objects compatible with OpenAPI designed and scoped in the Temporal integration, and that can be returned in a HTTP response of a REST API.