Skip to main content

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:98

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 an optional Idempotency-Key request header.
  • 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:101


expectedVersion?โ€‹

readonly optional expectedVersion?: boolean

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


idempotency?โ€‹

readonly optional idempotency?: boolean

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


infoโ€‹

readonly info: OpenAPIInfo

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


servers?โ€‹

readonly optional servers?: ReadonlyArray<OpenAPIServer>

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