Class RestOptions

Assembly: redb.Route.Http.dll

Settings of one Rest(...) declaration: where the routes listen, default binding and media
types, and the OpenAPI document.

public sealed class RestOptions

Inheritance

Object→RestOptions

Properties

BindingMode

Default binding mode of the verbs; a verb can override it. Default .

public RestBindingMode BindingMode { get; set; }

ClientRequestValidation

Validate client requests before the route runs, like Camel's clientRequestValidation:

public bool ClientRequestValidation { get; set; }

Consumes

Default request media type expected by the verbs (application/json); a verb can override it.

public string? Consumes { get; set; }

ErrorHandler

Registry name of an that writes the body of a refused

public string? ErrorHandler { get; set; }

ExtraConsumerOptions

Extra query parameters appended to every generated consumer URI ("ssl=true&sslCertPath=..."), for options the DSL does not model.

public string? ExtraConsumerOptions { get; set; }

Host

Bind host of the shared HTTP server. Default 0.0.0.0.

public string Host { get; set; }

InboundAuth

How the callers of every route of this declaration prove who they are (the http: consumer's inboundAuth):

public HttpAuthScheme InboundAuth { get; set; }

InboundPassword

Password InboundAuth=Basic accepts; take it from configuration ({{…}}).

public string? InboundPassword { get; set; }

InboundRealm

Realm named in WWW-Authenticate; null = the consumer's default.

public string? InboundRealm { get; set; }

InboundUsername

User name InboundAuth=Basic accepts.

public string? InboundUsername { get; set; }

OpenApi

Serve the generated OpenAPI 3.0 document. Default true.

public bool OpenApi { get; set; }

OpenApiPath

Path of the OpenAPI document on the same host and port; null = {basePath}/openapi.json, so several declarations on one port do not collide.

public string? OpenApiPath { get; set; }

Port

Bind port. Default 8080. Several Rest(...) declarations may share a port.

public int Port { get; set; }

Produces

Default response media type of the verbs; a verb can override it.

public string? Produces { get; set; }

Title

OpenAPI info.title.

public string Title { get; set; }

TokenValidator

Registry name of the for InboundAuth=Bearer.

public string? TokenValidator { get; set; }

Version

OpenAPI info.version.

public string Version { get; set; }