Skip to content

OpenApiOptions

Defined in: src/server/openapi.ts:19

Options for buildOpenApiDocument.

Type Parameter Default type
Action extends string string
Tag extends string string
Property Type Description Defined in
basePath? string Mount prefix used in the servers url (e.g. "/webhooks"). src/server/openapi.ts:32
bearerDescription? string Description of the default bearerAuth scheme, e.g. “Portal tokens (whpt_…)”. src/server/openapi.ts:43
description? string info.description. src/server/openapi.ts:30
extra? Schema Extra top-level fields merged into the document. src/server/openapi.ts:51
isMutatingAction? (action) => boolean Which actions the readonly switch blocks (documents the readonly status on them). src/server/openapi.ts:45
operation? (spec, operation) => Schema Adjust one generated operation (extra responses, headers, examples…). src/server/openapi.ts:49
readonlyStatus? number Status of a readonly denial (403 or 423). Default 403. src/server/openapi.ts:47
routes readonly RouteSpec<Action, Tag>[] The documented routes (hidden ones are skipped). src/server/openapi.ts:21
schemas? Record<string, Schema> components.schemas. Route body/response.schema names refer to these. src/server/openapi.ts:36
securitySchemes? Record<string, Schema> components.securitySchemes. Default: basicAuth and bearerAuth (the latter described with bearerDescription). src/server/openapi.ts:41
tags? readonly object[] Tag descriptions, in display order. src/server/openapi.ts:34
title string info.title. src/server/openapi.ts:23
version string info.version — the HTTP API version (entitlements: "1") or the package version (links). Required: never a hard-coded default. src/server/openapi.ts:28