openapi server
openapi server
The openapi server binding creates composite of tcp
, tls
, and http
bindings with server kind and adapts HTTP request-response streams to OpenAPI request-response streams.
openapi_server:
type: openapi
kind: server
options:
specs:
petstore:
servers:
- url: http://localhost:9090
catalog:
my_catalog:
subject: petstore
version: latest
exit: openapi_client
Configuration (* required)
vault
string
Vault name.
options
object
The openapi
specific options.
options:
specs:
petstore:
servers:
- url: http://localhost:9090
catalog:
my_catalog:
subject: petstore
version: latest
options.specs
object
as map of namedobject
properties
The specs
specific options.
specs.catalog
object
as map of namedobject
properties
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.
specs.servers
array
ofobject
The servers to match from the schema that are used when defining endpoints.
servers[].url
string
| Pattern:^([a-zA-Z0-9\\\\.-]+)(:(\\\\{[a-zA-Z_]+\\\\}|[0-9]+))?$
The server url to match in openapi spec
options.http
object
The http specific options.
http.authorization
object
as map of namedobject
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
object
as map of namedstring
properties
Named cookie value pattern with {credentials}
.
credentials.headers
object
as map of namedstring
properties
Named header value pattern with {credentials}
, e.g. "Bearer
{credentials}"
.
credentials.query*
object
as map of namedstring
properties
Named query parameter value pattern with {credentials}
.
options.tcp
object
TCP options to connect to an external client.
tcp.host
string
Hostname or IP address.
tcp.port
integer
,string
,array
Port number(s), including port number ranges.
options.tls
object
The tls
specific options.
tls.version
string
Protocol version.
tls.keys
array
ofstring
A list of reference names for the Vault key.
tls.trust
array
ofstring
A list of reference names for the Vault certificate.
tls.signers
array
ofstring
A list of reference names for the Vault signer certificate.
tls.trustcacerts
boolean
Trust CA certificates. When the this property is not explicitly set it will be automatically set to true
if tls.trust is null
.
tls.sni
array
ofstring
A list of the Server Name Indications.
tls.alpn
array
ofstring
Application protocols.
tls.mutual
enum
[required
,requested
,none
]
Mutual authentication. When the this property is not explicitly set it will be automatically set to none
if tls.trust is null
, otherwise it will be set to required
.
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_server
telemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*