Skip to main content
Version: Current

OpenAPIOptions

@rotorsoft/act-root


@rotorsoft/act-root / act-http/src/openapi / OpenAPIOptions

Type Alias: OpenAPIOptions

OpenAPIOptions = object

Defined in: libs/act-http/src/openapi/index.ts:101

Per-call options for openapi. The host supplies the document-shape fields the registry can't derive (title, version, servers) and toggles for the cross-cutting headers that the live REST API may accept.

  • info — required. title and version must be non-empty; info may carry any other top-level OpenAPI info fields.
  • servers — optional. Each entry's url may contain {variable} template syntax; bare URLs are validated through URL's parser and reject malformed inputs.
  • basePath — optional, default /api. Mirrors the Hono sibling's default so the doc describes the same paths the generated REST surface serves.
  • idempotency — optional, default false. When true, every mutation operation documents a required Idempotency-Key request header (the generated route fail-closes with 400 when the header is absent, so the doc marks it required, not optional).
  • expectedVersion — optional, default false. When true, every mutation operation documents an optional If-Match request header carrying the expected stream version.

Properties​

basePath?​

readonly optional basePath?: string

Defined in: libs/act-http/src/openapi/index.ts:104


expectedVersion?​

readonly optional expectedVersion?: boolean

Defined in: libs/act-http/src/openapi/index.ts:106


idempotency?​

readonly optional idempotency?: boolean

Defined in: libs/act-http/src/openapi/index.ts:105


info​

readonly info: OpenAPIInfo

Defined in: libs/act-http/src/openapi/index.ts:102


servers?​

readonly optional servers?: ReadonlyArray<OpenAPIServer>

Defined in: libs/act-http/src/openapi/index.ts:103