openapi Binding
openapi Binding
Zilla runtime openapi binding.
openapi_server:
type: openapi
kind: server
options:
specs:
petstore:
servers:
- url: http://localhost:9090
catalog:
my_catalog:
subject: petstore
version: latest
exit: openapi_client
openapi_client:
type: openapi
kind: client
options:
tcp:
host: localhost
port: 8080
specs:
petstore:
servers:
- url: http://localhost:9090
catalog:
my_catalog:
subject: petstore
version: latest
Summary
Defines a binding with openapi spec, with server or client behavior.
The server kind openapi binding creates composite of tcp, tls, and http bindings with server kind and adapts HTTP request-response streams to OpenAPI request-response streams.
The client kind openapi binding creates composite of http, tls, and tcp bindings with client kind and adapts OpenAPI request-response streams to HTTP request-response streams.
Configuration
kind*
enum[ "client", "server" ]
Behave as a openapi client or server.
kind: server
options
object
openapi-specific options.
options:
specs:
petstore:
servers:
- url: http://localhost:9090
catalog:
my_catalog:
subject: petstore
version: latest
options.specs
objectas map of named properties
specs specific options
specs.catalog
objectas map of named properties
catalog specific options.
catalog.subject
string
Subject name used when storing the catalog artifact.
catalog.version
string
Catalog artifact version to use.
specs.servers
object
servers.url
string
The server url to match in openapi spec
options.http
object
http specific options.
http.authorization
objectas map of named properties
Authorization by guard for the HTTP/1.1 and HTTP/2 protocols.
authorization:
my_jwt_guard:
credentials:
headers:
authorization: Bearer {credentials}
authorization.credentials
object
Defines how to extract credentials from the HTTP request.
credentials.cookies
mapofname: valueproperties
Named cookie value pattern with {credentials}.
credentials.headers
mapofname: valueproperties
Named header value pattern with {credentials}, e.g. "Bearer {credentials}".
credentials.query
mapofname: valueproperties
Named query parameter value pattern with {credentials}.
options.tcp
object
client specific tcp options.
tcp.host
string
Hostname or IP address.
tcp.port
integer|string|arrayofinteger|arrayofstring
Port number(s), including port number ranges.
options.tls
object
tls specific options.
tls.version
string
Protocol version.
tls.keys
arrayofstring
A list of reference names for the Vault key.
tls.trust
arrayofstring
A list of reference names for the Vault certificate.
tls.signers
arrayofstring
A list of reference names for the Vault signer certificate.
tls.trustcacerts
boolean| Default:truewhen trust isnull
Trust CA certificates.
tls.sni*
arrayofstring
A list of the Server Name Indications.
tls.alpn
arrayofstring
Application protocols.
tls.mutual
enum[ "required", "requested", "none" ] | Default:"none"
Mutual authentication.
exit
string
Default exit binding.
exit: echo_server
* required

