Skip to content

covenix / ServeDocsOptions

Interface: ServeDocsOptions

Defined in: src/serve-docs.ts:14

Options for import('./covenix.js').Covenix.serveDocs.

Properties

cdn?

optional cdn?: boolean

Defined in: src/serve-docs.ts:23

Serve the UI assets from a CDN instead of the installed package. false (default) self-hosts from node_modules — works offline / under strict CSP, but requires the UI's package to be installed. true needs no install but fetches the bundle from jsDelivr at runtime.


schemas?

optional schemas?: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>[]

Defined in: src/serve-docs.ts:31

Route-less named schemas (.meta({ id })) to add to the served document's components.schemas — the same schemas accepted by import('./covenix.js').Covenix.swagger. Pass these so the docs spec includes types not referenced by any route.


specVersion?

optional specVersion?: SpecVersion

Defined in: src/serve-docs.ts:25

OpenAPI spec version to serve. Defaults to '3.1'.


title?

optional title?: string

Defined in: src/serve-docs.ts:33

Page <title>. Defaults to 'API Reference'.


ui?

optional ui?: DocsUi

Defined in: src/serve-docs.ts:16

Which UI to render. Defaults to 'scalar'.