openapi-asyncapi proxy
openapi-asyncapi proxy
The openapi-asyncapi proxy binding for adapting openapi operations to asyncapi operations.
openapi_asyncapi_proxy:
type: openapi-asyncapi
kind: proxy
options:
specs:
openapi:
my-openapi-spec:
catalog:
my_catalog:
subject: petstore
version: latest
asyncapi:
my-asyncapi-spec:
catalog:
my_catalog:
subject: petstore
version: latest
routes:
- when:
- spec: my-openapi-spec
exit: asyncapi_client
with:
spec: my-asyncapi-specConfiguration (* required)
options
object
The openapi-asyncapi specific options.
options:
specs:
openapi:
my-openapi-spec:
catalog:
my_catalog:
subject: petstore
version: latest
asyncapi:
my-asyncapi-spec:
catalog:
my_catalog:
subject: petstore
version: latestoptions.specs
object
OpenAPI and AsyncAPI specs definition.
specs.openapi*
objectas map of namedobjectproperties
Options for each configured OpenAPI spec.
openapi.catalog
objectas map of namedobjectproperties
The Catalog specific options.
catalog.subject*
string
Subject name used when storing the catalog artifact.
catalog.version
string| Default:latest
Catalog artifact version to use.
openapi.security
objectas map of namedstringproperties, at most one entry
Maps an OpenAPI securitySchemes name declared in the spec document to a guard defined elsewhere in the configuration. Used to automatically derive guarded: on the routes generated for the composite.
specs:
openapi:
my-openapi-spec:
security:
bearerAuth: my_jwt_guardopenapi.overlay
objectas map of namedobjectproperties
Applies an OpenAPI Overlay Specification document, stored as a catalog artifact, to the base OpenAPI spec document before it is used. A single overlay may be configured per spec.
specs:
openapi:
my-openapi-spec:
overlay:
my_catalog:
subject: petstore-overlay
version: latestoverlay.subject*
string
Subject name used when storing the overlay artifact.
overlay.version
string| Default:latest
Overlay artifact version to use.
specs.asyncapi*
objectas map of namedobjectproperties
Options for each configured AsyncAPI spec.
asyncapi.catalog
objectas map of namedobjectproperties
The catalog catalog specific options.
catalog.subject*
string
Subject name used when storing the catalog artifact.
catalog.version
string| Default:latest
Catalog artifact version to use.
asyncapi.overlay
objectas map of namedobjectproperties
Applies an OpenAPI Overlay Specification document, stored as a catalog artifact, to the base AsyncAPI spec document before it is used. A single overlay may be configured per spec.
specs:
asyncapi:
my-asyncapi-spec:
overlay:
my_catalog:
subject: petstore-overlay
version: latestoverlay.subject*
string
Subject name used when storing the overlay artifact.
overlay.version
string| Default:latest
Overlay artifact version to use.
routes
arrayofobject
Conditional openapi-asyncapi specific routes.
routes:
- when:
- spec: my-openapi-spec
operation: createPets
exit: asyncapi_client
with:
spec: my-asyncapi-spec
operation: addPetroutes[].guarded
objectas map of namedarrayofstring
List of roles required by each named guard to authorize this route.
routes:
- guarded:
my_guard:
- read:itemsroutes[].when
arrayofobject
List of conditions to match this route when adapting openapi request-response streams to asyncapi streams. Read more: When a route matches
when[].spec
string
OpenAPI spec label that matches the resolved specification for the openapi binding request stream.
when[].operation
string
OpenAPI operationId that matches from the openapi binding request stream.
when[].tag
string
Matches when the resolved OpenAPI operation declares this tag.
when[].servers
arrayofobject
Matches when the resolved OpenAPI server for the request is one of these servers.
servers[].url
string
Server url to match.
routes[].exit
string
Next binding when following this route.
routes:
- when:
...
exit: asyncapi_clientroutes[].with*
object
Defines the target AsyncAPI spec and operation to proxy this route into. Required on every route.
with:
spec: my-asyncapi-specwith.spec*
string
AsyncAPI spec label that the route exits with to the next binding.
with.operation
string
AsyncAPI operationId that the route exits with to the next binding, either exactly or as a glob pattern, e.g. list*. Mutually exclusive with with.tag.
with.tag
string
Bulk-selects every AsyncAPI operation declaring this tag as the target of the route. Mutually exclusive with with.operation.
with:
spec: my-asyncapi-spec
tag: petsexit
string
Default exit binding when no conditional routes are viable.
exit: echo_servertelemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*telemetry.attributes
objectas map of namedstringproperties
Telemetry attributes to add to the binding metrics.

