@znight/openapi 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +572 -2
- package/dist/build-BTUC96mY.d.mts +174 -0
- package/dist/build-DXunOzlI.mjs +733 -0
- package/dist/build-DXunOzlI.mjs.map +1 -0
- package/dist/compiler.d.mts +16 -0
- package/dist/compiler.mjs +2639 -0
- package/dist/compiler.mjs.map +1 -0
- package/dist/emit-child.d.mts +1 -0
- package/dist/emit-child.mjs +124 -0
- package/dist/emit-child.mjs.map +1 -0
- package/dist/emit.d.mts +2 -0
- package/dist/emit.mjs +252 -0
- package/dist/emit.mjs.map +1 -0
- package/dist/index-CqQ6IRnN.d.mts +60 -0
- package/dist/index.d.mts +260 -0
- package/dist/index.mjs +777 -0
- package/dist/index.mjs.map +1 -0
- package/dist/openapi-CQk5dHqc.mjs +39 -0
- package/dist/openapi-CQk5dHqc.mjs.map +1 -0
- package/dist/shared-BZxtyaB0.mjs +147 -0
- package/dist/shared-BZxtyaB0.mjs.map +1 -0
- package/dist/testing.d.mts +39 -0
- package/dist/testing.mjs +155 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/types-VzBexMKj.d.mts +213 -0
- package/dist/vite.d.mts +24 -0
- package/dist/vite.mjs +64 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +115 -4
- package/src/build.ts +898 -0
- package/src/compiler/analyze.ts +81 -0
- package/src/compiler/document.ts +612 -0
- package/src/compiler/generate.ts +79 -0
- package/src/compiler/index.ts +47 -0
- package/src/compiler/model.ts +141 -0
- package/src/compiler/operations.ts +1475 -0
- package/src/compiler/schemas.ts +706 -0
- package/src/compiler/validate.ts +102 -0
- package/src/compiler/values.ts +81 -0
- package/src/converters.ts +137 -0
- package/src/decorators.ts +187 -0
- package/src/emit/child.ts +144 -0
- package/src/emit/index.ts +377 -0
- package/src/emit/protocol.ts +35 -0
- package/src/index.ts +94 -0
- package/src/metadata.ts +112 -0
- package/src/openapi.ts +55 -0
- package/src/plugin.ts +810 -0
- package/src/shared.ts +154 -0
- package/src/testing.ts +224 -0
- package/src/types.ts +240 -0
- package/src/ui.ts +215 -0
- package/src/vite.ts +126 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-DXunOzlI.mjs","names":[],"sources":["../src/metadata.ts","../src/converters.ts","../src/build.ts"],"sourcesContent":["/**\n * `metadata.extensions.openapi` (format 1): the contract between the compiler extension\n * (`@znight/openapi/compiler`) and the runtime (`buildOpenApiDocument`, `OpenApiPlugin`).\n *\n * Everything is JSON-compatible, except the `schema` values of {@link OpenApiSchemaSlot}s (Standard\n * Schemas imported by the generated module). Where a schema is expected, the compiler writes JSON\n * Schema or a {@link SchemaPlaceholder} that the assembly replaces.\n */\nimport type { Token } from '@znight/core'\nimport type { StandardSchemaV1 } from '@znight/http'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n JsonSchema,\n JsonValue,\n OpenApiMethod,\n OperationObjectOf,\n SecurityRequirementObject,\n SecuritySchemeObject,\n ServerObject,\n TagObject,\n} from './types.ts'\n\n/** Format version of {@link OpenApiMetadata}. */\nexport const OPENAPI_METADATA_VERSION = 1\n\n/** A Standard Schema converted at assembly: `{ $ref }` to its component once replaced. */\nexport interface SchemaPlaceholder {\n readonly $znight: 'schema'\n /** Slot name ({@link OpenApiSchemaSlot.name}). */\n readonly name: string\n readonly io: 'input' | 'output'\n}\n\n/**\n * In `parameters` arrays: one parameter per property of the (input) object schema of a slot\n * (`@Query(SearchQuery)`), `required` from its `required` list.\n */\nexport interface ParametersPlaceholder {\n readonly $znight: 'parameters'\n readonly in: 'path' | 'query' | 'header' | 'cookie'\n /** Slot name. */\n readonly name: string\n readonly io: 'input'\n}\n\n/** JSON Schema, or a placeholder of a Standard Schema. */\nexport type SchemaTemplate = JsonSchema | SchemaPlaceholder\n\n/** An Operation Object whose schemas are {@link SchemaTemplate}s and whose parameters may be {@link ParametersPlaceholder}s. */\nexport type OperationTemplate = OperationObjectOf<SchemaTemplate, ParametersPlaceholder>\n\n/** Root fields of the document known at build time. */\nexport interface OpenApiDocumentTemplate {\n readonly openapi: string\n readonly info: InfoObject\n readonly servers?: readonly ServerObject[]\n readonly tags?: readonly TagObject[]\n readonly externalDocs?: ExternalDocumentationObject\n readonly security?: readonly SecurityRequirementObject[]\n readonly [extension: `x-${string}`]: JsonValue | undefined\n}\n\n/** A documented operation. */\nexport interface OpenApiOperationDefinition {\n /** Controller token. */\n readonly controller: Token\n readonly handler: string\n /** The compiled route method (`'ALL'` gives one definition per documented method). */\n readonly route: string\n readonly method: OpenApiMethod\n /** OpenAPI path template, without the HTTP prefix (`/books/{id}`). */\n readonly path: string\n readonly operation: OperationTemplate\n}\n\n/** A Standard Schema converted when the document is assembled. */\nexport interface OpenApiSchemaSlot {\n /** Component name (export name of the binding: `CreateBook`). */\n readonly name: string\n /** The imported schema value. */\n readonly schema: StandardSchemaV1\n /** The JSON Schemas needed: `input` for requests, `output` for responses. */\n readonly io: readonly ('input' | 'output')[]\n /** Where the schema is declared (relative path), for messages. */\n readonly source?: { readonly file: string; readonly line: number; readonly column: number }\n}\n\n/** `metadata.extensions.openapi`. */\nexport interface OpenApiMetadata {\n readonly version: 1\n /** SHA-256 (base64url) of the section, schema values replaced by their names (stale-file detection). */\n readonly fingerprint: string\n readonly document: OpenApiDocumentTemplate\n /** Sorted by path, then by method (get, put, post, delete, options, head, patch). */\n readonly operations: readonly OpenApiOperationDefinition[]\n /** JSON Schemas computed by the compiler from TypeScript declarations, by component name (sorted). */\n readonly components: Readonly<Record<string, SchemaTemplate>>\n readonly securitySchemes: Readonly<Record<string, SecuritySchemeObject>>\n /** Standard Schemas converted at assembly, sorted by name. */\n readonly schemas: readonly OpenApiSchemaSlot[]\n /** Standard error components; absent with `errors: false`. */\n readonly errors?: { readonly contentType: string; readonly schema?: string }\n /** Descriptions of the default tags (JSDoc of the controllers), by tag name; absent when empty. */\n readonly tagDescriptions?: Readonly<Record<string, string>>\n}\n\ndeclare module '@znight/core' {\n interface ZnightExtensionsMetadata {\n readonly openapi?: OpenApiMetadata\n }\n}\n","/**\n * Standard Schema → JSON Schema converters (§7.3 of RFC 0002). The library that defines a schema is\n * the only one that knows its JSON Schema: Zod, ArkType and the libraries implementing Standard\n * JSON Schema convert their own schemas; Valibot goes through `@valibot/to-json-schema`.\n */\nimport type { StandardSchemaV1 } from '@znight/http'\nimport type { JsonSchema } from './types.ts'\n\n/** What a converter receives next to the schema. */\nexport interface SchemaConverterContext {\n /** `input` for requests (what clients send), `output` for responses (what the server sends). */\n readonly io: 'input' | 'output'\n readonly target: 'draft-2020-12'\n /** Retry after a failure with `unrepresentable: 'warn'`: approximate instead of throwing. */\n readonly lenient: boolean\n}\n\n/** Converts Standard Schemas of one library to JSON Schema 2020-12. */\nexport interface SchemaConverter {\n readonly name: string\n /** `undefined`: not supported, the next converter is tried. Throwing reports ZNIGHT037. */\n convert(\n schema: StandardSchemaV1,\n context: SchemaConverterContext,\n ): JsonSchema | undefined | Promise<JsonSchema | undefined>\n}\n\n/** The Standard JSON Schema interface (`~standard.jsonSchema`). */\ninterface StandardJsonSchemaProps {\n readonly vendor?: unknown\n readonly jsonSchema?: {\n readonly input?: (options: { target: string; libraryOptions?: Record<string, unknown> }) => unknown\n readonly output?: (options: { target: string; libraryOptions?: Record<string, unknown> }) => unknown\n }\n}\n\nfunction propsOf(schema: StandardSchemaV1): StandardJsonSchemaProps | undefined {\n const props = (schema as unknown as { '~standard'?: unknown })['~standard']\n return typeof props === 'object' && props !== null ? (props as StandardJsonSchemaProps) : undefined\n}\n\n/** `vendor` of a Standard Schema (`zod`, `valibot`, `arktype`...). */\nexport function vendorOf(schema: StandardSchemaV1): string {\n const vendor = propsOf(schema)?.vendor\n return typeof vendor === 'string' ? vendor : 'unknown'\n}\n\n/** How a date travels in JSON: an ISO 8601 string. */\nconst DATE_TIME: JsonSchema = Object.freeze({ type: 'string', format: 'date-time' })\n\n/**\n * Zod dates are serialised with `Date.prototype.toJSON`: in responses they are ISO strings. A\n * coerced date (`z.coerce.date()`) reads a string in requests (query, path, body). Other\n * unrepresentable parts throw (or become `{}` when lenient).\n */\nfunction zodOptions(context: SchemaConverterContext): Record<string, unknown> {\n return {\n unrepresentable: (site: { zodSchema?: { _zod?: { def?: { type?: unknown; coerce?: unknown } } } }) => {\n const def = site.zodSchema?._zod?.def\n if (def?.type === 'date' && (context.io === 'output' || def.coerce === true)) return { ...DATE_TIME }\n return context.lenient ? 'any' : 'throw'\n },\n }\n}\n\n/**\n * `@valibot/to-json-schema` options: dates of responses are ISO strings (`Date.prototype.toJSON`),\n * other unrepresentable parts throw (or are left out when lenient).\n */\nfunction valibotOptions(context: SchemaConverterContext): Record<string, unknown> {\n return {\n ...(context.lenient ? { errorMode: 'ignore' } : {}),\n overrideSchema: (site: { valibotSchema?: { type?: unknown } }) =>\n context.io === 'output' && site.valibotSchema?.type === 'date' ? { ...DATE_TIME } : undefined,\n }\n}\n\nfunction callStandard(\n props: StandardJsonSchemaProps | undefined,\n context: SchemaConverterContext,\n libraryOptions?: Record<string, unknown>,\n): unknown {\n const convert = props?.jsonSchema?.[context.io]\n if (typeof convert !== 'function') return undefined\n return convert.call(props?.jsonSchema, {\n target: context.target,\n ...(libraryOptions === undefined ? {} : { libraryOptions }),\n })\n}\n\n/**\n * Standard JSON Schema (`schema['~standard'].jsonSchema[io]({ target: 'draft-2020-12' })`): Zod ≥ 4.2,\n * ArkType ≥ 2.1.28 and every library implementing the interface.\n */\nexport const standardJsonSchemaConverter: SchemaConverter = Object.freeze({\n name: 'standard-json-schema',\n convert(schema: StandardSchemaV1, context: SchemaConverterContext): JsonSchema | undefined {\n const props = propsOf(schema)\n if (typeof props?.jsonSchema?.[context.io] !== 'function') return undefined\n const result = callStandard(props, context, props.vendor === 'zod' ? zodOptions(context) : undefined)\n return result as JsonSchema | undefined\n },\n})\n\n/** Valibot schemas (no `~standard.jsonSchema`) through `toStandardJsonSchema()` of `@valibot/to-json-schema`. */\nexport const valibotConverter: SchemaConverter = Object.freeze({\n name: 'valibot',\n async convert(schema: StandardSchemaV1, context: SchemaConverterContext): Promise<JsonSchema | undefined> {\n const props = propsOf(schema)\n if (props?.vendor !== 'valibot' || props.jsonSchema !== undefined) return undefined\n let module: { toStandardJsonSchema?: (schema: unknown) => unknown }\n try {\n module = (await import('@valibot/to-json-schema')) as typeof module\n } catch (error) {\n throw new Error(\n 'Valibot schemas need the optional peer @valibot/to-json-schema (npm install @valibot/to-json-schema)',\n {\n cause: error,\n },\n )\n }\n if (typeof module.toStandardJsonSchema !== 'function') {\n throw new Error('@valibot/to-json-schema has no toStandardJsonSchema(): install version 1.5 or later')\n }\n // options go through `libraryOptions` (toStandardJsonSchema takes the schema only)\n const standard = module.toStandardJsonSchema(schema)\n return callStandard(propsOf(standard as StandardSchemaV1), context, valibotOptions(context)) as\n | JsonSchema\n | undefined\n },\n})\n\n/** Built-in converters, tried after the user's. */\nexport const BUILT_IN_CONVERTERS: readonly SchemaConverter[] = Object.freeze([\n standardJsonSchemaConverter,\n valibotConverter,\n])\n","/**\n * `buildOpenApiDocument` (§7.3 of RFC 0002, normative): assembles the OpenAPI document from\n * `metadata.extensions.openapi`. The same pure function runs at boot (`OpenApiPlugin`), at build time\n * (`znight openapi`, `znight build --openapi`, the `openapi()` Vite plugin) and in tests, so the\n * served document and the emitted file are byte-identical.\n */\nimport type { ZnightMetadata } from '@znight/core'\nimport type { StandardSchemaV1 } from '@znight/http'\nimport type { SchemaConverter } from './converters.ts'\nimport type { OpenApiMetadata, OpenApiSchemaSlot } from './metadata.ts'\nimport type {\n InfoObject,\n JsonSchema,\n JsonValue,\n OpenApiMethod,\n OpenApiObject,\n ServerObject,\n TagObject,\n} from './types.ts'\n\nimport { displayName, ErrorCode, ZnightError } from '@znight/core'\n\nimport { BUILT_IN_CONVERTERS, vendorOf } from './converters.ts'\nimport { OPENAPI_METADATA_VERSION } from './metadata.ts'\nimport {\n compareStrings,\n componentName,\n ERROR_COMPONENTS,\n ERROR_RESPONSES,\n jsonEquals,\n reasonPhrase,\n schemaRef,\n} from './shared.ts'\n\n/** A static view of an operation (no schema conversion), used by `filter` and `OpenApi.operations`. */\nexport interface OpenApiOperationView {\n readonly method: OpenApiMethod\n /** Path template without the HTTP prefix (`/books/{id}`). */\n readonly path: string\n readonly operationId: string\n readonly tags: readonly string[]\n /** Controller display name. */\n readonly controller: string\n readonly handler: string\n /** Effective route metadata (`createRouteDecorator` values, the nearest decision of each group). */\n readonly meta: Readonly<Record<string, unknown>>\n}\n\n/** Options of {@link buildOpenApiDocument}. */\nexport interface BuildOpenApiOptions {\n /** The HTTP prefix: `servers` defaults to `[{ url: prefix }]` when nothing declares servers. */\n readonly prefix?: string\n /** Merged over the static `info`. */\n readonly info?: Partial<InfoObject>\n /** Replaces the declared `servers`. */\n readonly servers?: readonly ServerObject[]\n /** Hides operations; unreferenced components are pruned. */\n readonly filter?: (operation: OpenApiOperationView) => boolean\n /** Last-resort escape hatch, applied before freezing. */\n readonly transform?: (document: OpenApiObject) => OpenApiObject\n /** Extra converters, tried before the built-in ones. */\n readonly converters?: readonly SchemaConverter[]\n /** `'warn'`: a schema that cannot be converted becomes `{}` with a ZNIGHT037 warning. Default `'error'`. */\n readonly unrepresentable?: 'error' | 'warn'\n}\n\n/** A warning of the assembly. */\nexport interface OpenApiWarning {\n readonly code: ErrorCode\n readonly message: string\n readonly hints: readonly string[]\n}\n\n/** Result of {@link buildOpenApiDocument}. */\nexport interface OpenApiBuildResult {\n /** The document, deep-frozen. */\n readonly document: OpenApiObject\n /** `JSON.stringify(document, null, 2)` and a final newline. */\n readonly json: string\n readonly warnings: readonly OpenApiWarning[]\n readonly stats: { readonly operations: number; readonly schemas: number; readonly durationMs: number }\n}\n\ntype Json = Record<string, unknown>\n\n/** Reads and checks `metadata.extensions.openapi` (ZNIGHT030 when missing, ZNIGHT018 for another version). */\nexport function openApiSection(metadata: ZnightMetadata): OpenApiMetadata {\n const section = (metadata?.extensions as { openapi?: unknown } | undefined)?.openapi\n if (section === undefined || section === null || typeof section !== 'object') {\n throw new ZnightError(\n ErrorCode.InvalidOpenApiDefinition,\n 'The metadata has no OpenAPI section (metadata.extensions.openapi)',\n {\n hints: [\n 'Import @znight/openapi in a scanned file (src/main.ts imports OpenApiPlugin) and regenerate the container (znight generate)',\n ],\n },\n )\n }\n const version = (section as { version?: unknown }).version\n if (version !== OPENAPI_METADATA_VERSION) {\n throw new ZnightError(\n ErrorCode.VersionMismatch,\n `Unsupported metadata.extensions.openapi version ${JSON.stringify(version)} (this @znight/openapi reads version ${OPENAPI_METADATA_VERSION})`,\n { hints: ['Use the same version of @znight/compiler and @znight/openapi, then regenerate the container'] },\n )\n }\n const value = section as OpenApiMetadata\n if (!Array.isArray(value.operations) || !Array.isArray(value.schemas) || typeof value.document !== 'object') {\n throw new ZnightError(ErrorCode.InvalidOpenApiDefinition, 'Malformed metadata.extensions.openapi', {\n hints: ['Regenerate the container (znight generate)'],\n })\n }\n return value\n}\n\n/**\n * Assembles the OpenAPI 3.1 document of an application from its generated metadata: converts the\n * Standard Schemas (user converters, Standard JSON Schema, Valibot), hoists their `$defs`, names\n * the components, fills the placeholders of the compiler, applies `filter`, prunes the unused\n * components, applies `transform`, deep-freezes and serialises once.\n *\n * @throws ZnightError ZNIGHT030 (no OpenAPI section), ZNIGHT018 (another format version), ZNIGHT034\n * (component name conflict), ZNIGHT037 (schema conversion, unless `unrepresentable: 'warn'`).\n */\nexport async function buildOpenApiDocument(\n metadata: ZnightMetadata,\n options: BuildOpenApiOptions = {},\n): Promise<OpenApiBuildResult> {\n const started = performance.now()\n const section = openApiSection(metadata)\n const warnings: OpenApiWarning[] = []\n const lenient = options.unrepresentable === 'warn'\n const converters = [...(options.converters ?? []), ...BUILT_IN_CONVERTERS]\n\n // 1. conversion of the Standard Schemas\n const failures: string[] = []\n const converted = new Map<string, { input?: JsonSchema; output?: JsonSchema }>()\n for (const slot of section.schemas) {\n const entry: { input?: JsonSchema; output?: JsonSchema } = {}\n for (const io of [...slot.io].sort()) {\n const result = await convertSlot(slot, io, converters, false)\n if (result.schema !== undefined) {\n entry[io] = result.schema\n continue\n }\n if (!lenient) {\n failures.push(result.message)\n continue\n }\n const retried = await convertSlot(slot, io, converters, true)\n entry[io] = retried.schema ?? {}\n warnings.push({\n code: ErrorCode.SchemaConversionFailed,\n message: `${result.message}; documented as ${retried.schema === undefined ? 'any value ({})' : 'an approximation'}`,\n hints: [],\n })\n }\n converted.set(slot.name, entry)\n }\n if (failures.length > 0) {\n throw new ZnightError(\n ErrorCode.SchemaConversionFailed,\n `Cannot convert ${failures.length === 1 ? 'a schema' : `${failures.length} schemas`} to JSON Schema:\\n${failures.map(line => ` - ${line}`).join('\\n')}`,\n {\n hints: [\n 'Add a converter (OpenApiPlugin.configure({ converters }), --converters), or document the schema with unrepresentable: \"warn\"',\n ],\n },\n )\n }\n\n // 2. names of the converted schemas\n const schemas = new Map<string, JsonSchema>()\n const owners = new Map<string, string>()\n const define = (name: string, schema: JsonSchema, owner: string): void => {\n const existing = schemas.get(name)\n if (existing === undefined) {\n schemas.set(name, schema)\n owners.set(name, owner)\n return\n }\n if (jsonEquals(existing, schema)) return\n throw new ZnightError(\n ErrorCode.SchemaNameConflict,\n `Two different schemas are named \"${name}\" in the OpenAPI document (${owners.get(name)} and ${owner})`,\n { hints: ['Rename one of them (exported schema names and ids of hoisted definitions name the components)'] },\n )\n }\n for (const [name, schema] of Object.entries(section.components ?? {}))\n define(name, schema as JsonSchema, 'a TypeScript declaration')\n const named = nameConverted(section.schemas, converted)\n for (const item of named.components) define(item.name, item.schema, item.owner)\n const slotNames = named.slots\n\n // 3. standard errors\n const errors = section.errors\n const responses: Json = {}\n if (errors !== undefined) {\n let body: string\n let validation: string\n if (errors.schema === undefined) {\n define(ERROR_COMPONENTS.body, HTTP_ERROR_BODY, 'the standard errors')\n define(ERROR_COMPONENTS.validation, VALIDATION_ERROR_BODY, 'the standard errors')\n body = ERROR_COMPONENTS.body\n validation = ERROR_COMPONENTS.validation\n } else {\n body = slotNames.get(errors.schema)?.output ?? errors.schema\n validation = body\n }\n const response = (status: string, name: string): Json => ({\n description: reasonPhrase(status),\n content: { [errors.contentType]: { schema: { $ref: schemaRef(name) } } },\n })\n responses[ERROR_RESPONSES.badRequest] = response('400', validation)\n responses[ERROR_RESPONSES.payloadTooLarge] = response('413', body)\n responses[ERROR_RESPONSES.unsupportedMediaType] = response('415', body)\n }\n\n // 4. placeholders\n const duplicates: string[] = []\n const resolve = (value: unknown, where = ''): unknown =>\n replacePlaceholders(value, slotNames, schemas, (parameter, slot) =>\n duplicates.push(`${where}: the ${parameter.in} parameter \"${parameter.name}\" of the schema ${slot}`),\n )\n for (const [name, schema] of schemas) schemas.set(name, resolve(schema) as JsonSchema)\n\n // 5. operations, filter\n const views = operationViews(metadata, section)\n const paths: Record<string, Json> = {}\n let operations = 0\n section.operations.forEach((definition, index) => {\n const view = views[index] as OpenApiOperationView\n if (options.filter !== undefined && !options.filter(view)) return\n let item = paths[definition.path]\n if (item === undefined) {\n item = {}\n paths[definition.path] = item\n }\n item[definition.method] = resolve(definition.operation, `${definition.method.toUpperCase()} ${definition.path}`)\n operations++\n })\n if (duplicates.length > 0) {\n warnings.push({\n code: ErrorCode.InconsistentOperation,\n message: `${duplicates.length === 1 ? 'A parameter expanded from a whole-object schema is' : 'Parameters expanded from whole-object schemas are'} already documented (OpenAPI forbids two parameters with one name and location), the duplicate is dropped:\\n${duplicates.map(line => ` - ${line}`).join('\\n')}`,\n hints: [\"Remove the property from the schema, or the @Query('name') / @ApiQuery('name') that reads it again\"],\n })\n }\n\n // 6. document\n const template = section.document\n const document: Json = { openapi: template.openapi }\n document['info'] = options.info === undefined ? template.info : { ...template.info, ...options.info }\n const servers =\n options.servers ??\n template.servers ??\n (options.prefix !== undefined && options.prefix !== '' && options.prefix !== '/'\n ? [{ url: options.prefix }]\n : undefined)\n if (servers !== undefined) document['servers'] = servers\n if (template.security !== undefined) document['security'] = template.security\n const tags = tagsOf(template.tags ?? [], paths, section.tagDescriptions ?? {})\n if (tags.length > 0) document['tags'] = tags\n if (template.externalDocs !== undefined) document['externalDocs'] = template.externalDocs\n document['paths'] = paths\n const components = prune(document, {\n schemas: Object.fromEntries([...schemas].sort(([a], [b]) => compareStrings(a, b))),\n responses,\n securitySchemes: section.securitySchemes ?? {},\n })\n if (Object.keys(components).length > 0) document['components'] = components\n for (const [key, value] of Object.entries(template)) {\n if (key.startsWith('x-') && value !== undefined) document[key] = value\n }\n document['x-znight-fingerprint'] = section.fingerprint\n\n // 7. output\n const transformed =\n options.transform === undefined\n ? (document as unknown as OpenApiObject)\n : options.transform(document as unknown as OpenApiObject)\n const json = `${JSON.stringify(transformed, null, 2)}\\n`\n const frozen = deepFreeze(JSON.parse(json) as OpenApiObject)\n const componentCount = Object.keys((frozen.components?.schemas ?? {}) as object).length\n return {\n document: frozen,\n json,\n warnings,\n stats: { operations, schemas: componentCount, durationMs: performance.now() - started },\n }\n}\n\n/** Root keys of a document, in the order {@link buildOpenApiDocument} writes them. */\nconst ROOT_ORDER = ['openapi', 'info', 'servers', 'security', 'tags', 'externalDocs', 'paths', 'components']\n\n/**\n * Applies the runtime options of {@link buildOpenApiDocument} to a prebuilt document (`OpenApiPlugin`\n * with `document: { file }`), so that a file and a build serve the same document: `filter` (the\n * operations are matched by path and method, unreferenced components and unused tags are pruned),\n * `info`, `servers`, else the `prefix` rule when the file declares no servers, then `transform`.\n * `undefined` when there is nothing to apply (the file is served as is).\n */\nexport function applyDocumentOptions(\n text: string,\n metadata: ZnightMetadata,\n options: Pick<BuildOpenApiOptions, 'filter' | 'info' | 'servers' | 'transform' | 'prefix'>,\n): { document: OpenApiObject; json: string } | undefined {\n const document = JSON.parse(text) as Json\n const prefixed =\n document['servers'] === undefined && options.prefix !== undefined && options.prefix !== '' && options.prefix !== '/'\n if (\n options.filter === undefined &&\n options.info === undefined &&\n options.servers === undefined &&\n options.transform === undefined &&\n !prefixed\n ) {\n return undefined\n }\n if (options.filter !== undefined) filterDocument(document, metadata, options.filter)\n if (options.info !== undefined) document['info'] = { ...(document['info'] as Json), ...options.info }\n if (options.servers !== undefined) document['servers'] = options.servers\n else if (prefixed) document['servers'] = [{ url: options.prefix }]\n const ordered: Json = {}\n for (const key of ROOT_ORDER) if (document[key] !== undefined) ordered[key] = document[key]\n for (const [key, value] of Object.entries(document)) if (!(key in ordered)) ordered[key] = value\n const transformed =\n options.transform === undefined\n ? (ordered as unknown as OpenApiObject)\n : options.transform(ordered as unknown as OpenApiObject)\n const json = `${JSON.stringify(transformed, null, 2)}\\n`\n return { document: deepFreeze(JSON.parse(json) as OpenApiObject), json }\n}\n\n/** Removes the operations `filter` rejects, the paths left empty, the unused tags and components. */\nfunction filterDocument(\n document: Json,\n metadata: ZnightMetadata,\n filter: (operation: OpenApiOperationView) => boolean,\n): void {\n const section = openApiSection(metadata)\n const views = new Map<string, OpenApiOperationView>()\n for (const view of operationViews(metadata, section)) views.set(`${view.method} ${view.path}`, view)\n const paths: Record<string, Json> = {}\n for (const [path, item] of Object.entries((document['paths'] ?? {}) as Record<string, Json>)) {\n const kept: Json = {}\n let methods = 0\n for (const [key, value] of Object.entries(item)) {\n if (METHODS.has(key)) {\n // an operation unknown to this build (stale file) is kept: the filter cannot judge it\n const view = views.get(`${key} ${path}`)\n if (view !== undefined && !filter(view)) continue\n methods++\n }\n kept[key] = value\n }\n if (methods > 0) paths[path] = kept\n }\n document['paths'] = paths\n if (Array.isArray(document['tags'])) {\n const declared = new Set((section.document.tags ?? []).map(tag => tag.name))\n const used = new Set(tagsOf([], paths, {}).map(tag => tag.name))\n const tags = (document['tags'] as TagObject[]).filter(tag => declared.has(tag.name) || used.has(tag.name))\n if (tags.length > 0) document['tags'] = tags\n else delete document['tags']\n }\n const components = (document['components'] ?? {}) as Json\n delete document['components']\n const pruned = prune(document, {\n schemas: (components['schemas'] ?? {}) as Json,\n responses: (components['responses'] ?? {}) as Json,\n securitySchemes: (components['securitySchemes'] ?? {}) as Json,\n })\n const result: Json = {}\n for (const [kind, value] of Object.entries(components)) {\n if (kind !== 'schemas' && kind !== 'responses' && kind !== 'securitySchemes') result[kind] = value\n else if (pruned[kind] !== undefined) result[kind] = pruned[kind]\n }\n if (Object.keys(result).length > 0) document['components'] = result\n}\n\nconst METHODS: ReadonlySet<string> = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\nasync function convertSlot(\n slot: OpenApiSchemaSlot,\n io: 'input' | 'output',\n converters: readonly SchemaConverter[],\n lenient: boolean,\n): Promise<{ schema: JsonSchema | undefined; message: string }> {\n const where = slot.source === undefined ? '' : ` (${slot.source.file}:${slot.source.line}:${slot.source.column})`\n const label = `${slot.name}${where}, ${vendorOf(slot.schema)} schema, ${io}`\n for (const converter of converters) {\n let result: unknown\n try {\n result = await converter.convert(slot.schema as StandardSchemaV1, { io, target: 'draft-2020-12', lenient })\n } catch (error) {\n return {\n schema: undefined,\n message: `${label}: the converter \"${converter.name}\" failed: ${error instanceof Error ? error.message : String(error)}`,\n }\n }\n if (result === undefined) continue\n if (typeof result !== 'object' || result === null || Array.isArray(result)) {\n return {\n schema: undefined,\n message: `${label}: the converter \"${converter.name}\" returned ${Array.isArray(result) ? 'an array' : typeof result} instead of a JSON Schema object`,\n }\n }\n return { schema: result as JsonSchema, message: '' }\n }\n return {\n schema: undefined,\n message: `${label}: no converter supports it (the library implements no Standard JSON Schema)`,\n }\n}\n\n/** Drops `$schema` and `$id` (top level). */\nfunction clean(schema: JsonSchema): JsonSchema {\n const { $schema: _schema, $id: _id, ...rest } = schema\n return JSON.parse(JSON.stringify(rest)) as JsonSchema\n}\n\n/**\n * Definition names a library generates for anonymous sub-schemas (Zod: `__schema0` for a recursive\n * schema without id). They are local to one conversion, so they are scoped to their slot.\n */\nconst ANONYMOUS_DEFINITION = /^__schema(\\d+)$/\n\n/** Marks the references between definitions until the final names are known (`\\0<name>\\0<rest>`). */\nconst MARK = '\\u0000'\n\n/** A JSON Schema of one slot and one io, split into its root and its local definitions. */\ninterface ConvertedUnit {\n readonly slot: string\n readonly io: 'input' | 'output'\n /** Global names of the bodies (the root is the slot name), references marked. */\n readonly bodies: { readonly name: string; readonly body: unknown; readonly owner: string }[]\n}\n\n/**\n * Names the converted schemas (steps 3 and 4 of §7.3): hoists `$defs` / `definitions` into\n * components, scopes anonymous definitions to their slot (`Tree_schema0`), takes the definition as\n * the slot component when the root only references it (`.meta({ id })` equal to the export name),\n * and gives `<Name>Input` to the input variant of every schema — slot or definition — whose input\n * and output JSON Schemas differ (directly or through the definitions it references). Two different\n * schemas of one io under one name are ZNIGHT034.\n */\nfunction nameConverted(\n slots: readonly OpenApiSchemaSlot[],\n converted: ReadonlyMap<string, { input?: JsonSchema; output?: JsonSchema }>,\n): {\n components: { name: string; schema: JsonSchema; owner: string }[]\n slots: Map<string, { input?: string; output?: string }>\n} {\n const units: ConvertedUnit[] = []\n for (const slot of slots) {\n const entry = converted.get(slot.name) ?? {}\n for (const io of ['output', 'input'] as const) {\n const schema = entry[io]\n if (schema !== undefined) units.push(splitUnit(slot.name, io, clean(schema)))\n }\n }\n // variants of every global name, by io\n const variants = new Map<string, { input?: unknown; output?: unknown; owners: Partial<Record<string, string>> }>()\n for (const unit of units) {\n for (const { name, body, owner } of unit.bodies) {\n let entry = variants.get(name)\n if (entry === undefined) {\n entry = { owners: {} }\n variants.set(name, entry)\n }\n const existing = entry[unit.io]\n if (existing === undefined) {\n entry[unit.io] = body\n entry.owners[unit.io] = owner\n } else if (!jsonEquals(existing, body)) {\n throw new ZnightError(\n ErrorCode.SchemaNameConflict,\n `Two different schemas are named \"${name}\" in the OpenAPI document (${entry.owners[unit.io]} and ${owner})`,\n { hints: ['Rename one of them (exported schema names and ids of hoisted definitions name the components)'] },\n )\n }\n }\n }\n // `<Name>Input` when the input variant differs, directly or through a definition it references\n const split = new Set<string>()\n for (const [name, entry] of variants) {\n if (entry.input !== undefined && entry.output !== undefined && !jsonEquals(entry.input, entry.output)) {\n split.add(name)\n }\n }\n for (let changed = true; changed; ) {\n changed = false\n for (const [name, entry] of variants) {\n if (split.has(name) || entry.input === undefined || entry.output === undefined) continue\n if ([...referencedNames(entry.input)].some(target => split.has(target))) {\n split.add(name)\n changed = true\n }\n }\n }\n const nameFor = (name: string, io: 'input' | 'output'): string =>\n io === 'input' && split.has(name) ? `${name}Input` : name\n const components: { name: string; schema: JsonSchema; owner: string }[] = []\n for (const [name, entry] of variants) {\n if (entry.output !== undefined) {\n components.push({\n name,\n schema: resolveMarks(entry.output, 'output', nameFor) as JsonSchema,\n owner: entry.owners['output'] as string,\n })\n }\n if (entry.input !== undefined && (entry.output === undefined || split.has(name))) {\n components.push({\n name: nameFor(name, 'input'),\n schema: resolveMarks(entry.input, 'input', nameFor) as JsonSchema,\n owner: entry.owners['input'] as string,\n })\n }\n }\n const names = new Map<string, { input?: string; output?: string }>()\n for (const slot of slots) {\n const entry = converted.get(slot.name) ?? {}\n const result: { input?: string; output?: string } = {}\n if (entry.output !== undefined) result.output = nameFor(slot.name, 'output')\n if (entry.input !== undefined) result.input = nameFor(slot.name, 'input')\n names.set(slot.name, result)\n }\n return { components, slots: names }\n}\n\n/**\n * Splits a converted schema into its root and its `$defs` / `definitions` (at every level), with\n * global names: the slot name for the root, `<slot>_schemaN` for anonymous definitions, the\n * definition name (a library id) otherwise. Inside an OpenAPI document `#` is the document, not the\n * schema, so every local reference is rewritten (`#/$defs/X`, `#`, `#/properties/...`).\n */\nfunction splitUnit(slot: string, io: 'input' | 'output', schema: JsonSchema): ConvertedUnit {\n const defs = new Map<string, unknown>()\n const collect = (value: unknown): void => {\n if (typeof value !== 'object' || value === null) return\n if (Array.isArray(value)) {\n for (const item of value) collect(item)\n return\n }\n for (const key of ['$defs', 'definitions']) {\n const block = (value as Json)[key]\n if (typeof block === 'object' && block !== null && !Array.isArray(block)) {\n for (const [defName, def] of Object.entries(block)) defs.set(defName, def)\n }\n }\n for (const [key, item] of Object.entries(value)) if (key !== '$defs' && key !== 'definitions') collect(item)\n }\n collect(schema)\n const globals = new Map<string, string>()\n for (const local of defs.keys()) {\n const anonymous = ANONYMOUS_DEFINITION.exec(local)\n globals.set(local, anonymous === null ? componentName(local) : componentName(`${slot}_schema${anonymous[1]}`))\n }\n let root: unknown = schema\n // `{ $ref: '#/$defs/X', $defs: { X } }` (Zod `.meta({ id })` on the root): X is the slot itself\n const keys = Object.keys(schema).filter(key => key !== '$defs' && key !== 'definitions')\n const target = keys.length === 1 && typeof schema['$ref'] === 'string' ? localTarget(schema['$ref']) : undefined\n if (target !== undefined && target.rest === '' && defs.has(target.local)) {\n const global = globals.get(target.local) as string\n if (global === slot || ANONYMOUS_DEFINITION.test(target.local)) {\n root = defs.get(target.local)\n defs.delete(target.local)\n globals.set(target.local, slot)\n }\n }\n const rewrite = (value: unknown): unknown => {\n if (Array.isArray(value)) return value.map(rewrite)\n if (typeof value !== 'object' || value === null) return value\n const result: Json = {}\n for (const [key, item] of Object.entries(value)) {\n if (key === '$defs' || key === 'definitions') continue\n if (key === '$ref' && typeof item === 'string') result[key] = markRef(item, slot, globals)\n else result[key] = rewrite(item)\n }\n return result\n }\n const bodies = [{ name: slot, body: rewrite(root), owner: `the schema ${slot}` }]\n for (const [local, def] of defs) {\n bodies.push({ name: globals.get(local) as string, body: rewrite(def), owner: `a definition of ${slot}` })\n }\n return { slot, io, bodies }\n}\n\n/** The local definition a reference points to (`#/$defs/X/rest`), JSON pointer and URI escapes decoded. */\nfunction localTarget(ref: string): { local: string; rest: string } | undefined {\n for (const prefix of ['#/$defs/', '#/definitions/']) {\n if (!ref.startsWith(prefix)) continue\n const tail = ref.slice(prefix.length)\n const slash = tail.indexOf('/')\n const segment = slash === -1 ? tail : tail.slice(0, slash)\n let local: string\n try {\n local = decodeURIComponent(segment)\n } catch {\n local = segment\n }\n return { local: local.replaceAll('~1', '/').replaceAll('~0', '~'), rest: slash === -1 ? '' : tail.slice(slash) }\n }\n return undefined\n}\n\nfunction markRef(ref: string, slot: string, globals: ReadonlyMap<string, string>): string {\n const target = localTarget(ref)\n if (target !== undefined) {\n return `${MARK}${globals.get(target.local) ?? componentName(target.local)}${MARK}${target.rest}`\n }\n if (ref === '#') return `${MARK}${slot}${MARK}`\n if (ref.startsWith('#/')) return `${MARK}${slot}${MARK}${ref.slice(1)}`\n return ref\n}\n\nfunction parseMark(ref: string): { name: string; rest: string } | undefined {\n if (!ref.startsWith(MARK)) return undefined\n const end = ref.indexOf(MARK, 1)\n return end === -1 ? undefined : { name: ref.slice(1, end), rest: ref.slice(end + 1) }\n}\n\n/** Global names referenced by a marked body. */\nfunction referencedNames(value: unknown, found: Set<string> = new Set()): Set<string> {\n if (Array.isArray(value)) {\n for (const item of value) referencedNames(item, found)\n } else if (typeof value === 'object' && value !== null) {\n for (const [key, item] of Object.entries(value)) {\n const mark = key === '$ref' && typeof item === 'string' ? parseMark(item) : undefined\n if (mark === undefined) referencedNames(item, found)\n else found.add(mark.name)\n }\n }\n return found\n}\n\n/** Replaces the marked references with `#/components/schemas/<final name>`. */\nfunction resolveMarks(\n value: unknown,\n io: 'input' | 'output',\n nameFor: (name: string, io: 'input' | 'output') => string,\n): unknown {\n if (Array.isArray(value)) return value.map(item => resolveMarks(item, io, nameFor))\n if (typeof value !== 'object' || value === null) return value\n const result: Json = {}\n for (const [key, item] of Object.entries(value)) {\n const mark = key === '$ref' && typeof item === 'string' ? parseMark(item) : undefined\n result[key] =\n mark === undefined ? resolveMarks(item, io, nameFor) : `${schemaRef(nameFor(mark.name, io))}${mark.rest}`\n }\n return result\n}\n\nfunction isPlaceholder(\n value: unknown,\n): value is { $znight: string; name: string; io: 'input' | 'output'; in?: string } {\n return typeof value === 'object' && value !== null && typeof (value as { $znight?: unknown }).$znight === 'string'\n}\n\nfunction replacePlaceholders(\n value: unknown,\n names: ReadonlyMap<string, { input?: string; output?: string }>,\n schemas: ReadonlyMap<string, JsonSchema>,\n duplicate: (parameter: { in: string; name: string }, slot: string) => void,\n): unknown {\n if (Array.isArray(value)) {\n if (!value.some(item => isPlaceholder(item) && item.$znight === 'parameters')) {\n return value.map(item => replacePlaceholders(item, names, schemas, duplicate))\n }\n // a parameters array: OpenAPI forbids two parameters with one name and location, explicit ones win\n const explicit = new Set<string>()\n for (const item of value) {\n const key = isPlaceholder(item) ? undefined : parameterKey(item)\n if (key !== undefined) explicit.add(key)\n }\n const expanded = new Set<string>()\n const result: unknown[] = []\n for (const item of value) {\n if (!isPlaceholder(item) || item.$znight !== 'parameters') {\n result.push(replacePlaceholders(item, names, schemas, duplicate))\n continue\n }\n for (const parameter of expandParameters(item, names, schemas)) {\n const key = parameterKey(parameter) as string\n if (explicit.has(key) || expanded.has(key)) {\n duplicate(parameter as { in: string; name: string }, item.name)\n continue\n }\n expanded.add(key)\n result.push(parameter)\n }\n }\n return result\n }\n if (typeof value !== 'object' || value === null) return value\n if (isPlaceholder(value) && value.$znight === 'schema') {\n const name = names.get(value.name)?.[value.io] ?? value.name\n return { $ref: schemaRef(name) }\n }\n const result: Json = {}\n for (const [key, item] of Object.entries(value)) result[key] = replacePlaceholders(item, names, schemas, duplicate)\n return result\n}\n\n/** `in name` of a Parameter Object (header names are case-insensitive), `undefined` for a `$ref`. */\nfunction parameterKey(parameter: unknown): string | undefined {\n if (typeof parameter !== 'object' || parameter === null) return undefined\n const { in: location, name } = parameter as { in?: unknown; name?: unknown }\n if (typeof location !== 'string' || typeof name !== 'string') return undefined\n return `${location} ${location === 'header' ? name.toLowerCase() : name}`\n}\n\n/** One parameter per property of the (input) object schema of a slot. */\nfunction expandParameters(\n placeholder: { name: string; in?: string },\n names: ReadonlyMap<string, { input?: string; output?: string }>,\n schemas: ReadonlyMap<string, JsonSchema>,\n): Json[] {\n const name = names.get(placeholder.name)?.input ?? placeholder.name\n let schema = schemas.get(name)\n for (let depth = 0; depth < 8 && typeof schema?.['$ref'] === 'string'; depth++) {\n schema = schemas.get(String(schema['$ref']).slice('#/components/schemas/'.length))\n }\n const properties = schema?.['properties']\n if (schema === undefined || typeof properties !== 'object' || properties === null || Array.isArray(properties)) {\n throw new ZnightError(\n ErrorCode.SchemaConversionFailed,\n `The ${placeholder.in ?? 'query'} schema ${placeholder.name} is not an object schema: its properties cannot become parameters`,\n { hints: [`Validate the whole ${placeholder.in ?? 'query'} object with an object schema (z.object({...}))`] },\n )\n }\n const required = new Set(Array.isArray(schema['required']) ? (schema['required'] as string[]) : [])\n return Object.entries(properties).map(([property, propertySchema]) => {\n const { description, ...rest } = propertySchema as Json\n const parameter: Json = { name: property, in: placeholder.in ?? 'query' }\n if (typeof description === 'string') parameter['description'] = description\n if (placeholder.in === 'path' || required.has(property)) parameter['required'] = true\n parameter['schema'] = rest\n if ((rest['type'] === 'array' || Array.isArray(rest['items'])) && placeholder.in === 'query') {\n parameter['style'] = 'form'\n parameter['explode'] = true\n }\n return parameter\n })\n}\n\n/** Declared tags first (in order), then the used tags, sorted. */\nfunction tagsOf(\n declared: readonly TagObject[],\n paths: Readonly<Record<string, Json>>,\n descriptions: Readonly<Record<string, string>>,\n): TagObject[] {\n const tags: TagObject[] = [...declared]\n const known = new Set(declared.map(tag => tag.name))\n const used = new Set<string>()\n for (const item of Object.values(paths)) {\n for (const operation of Object.values(item)) {\n for (const tag of ((operation as { tags?: unknown }).tags ?? []) as string[]) used.add(tag)\n }\n }\n for (const tag of [...used].sort(compareStrings)) {\n if (known.has(tag)) continue\n const description = descriptions[tag]\n tags.push(description === undefined ? { name: tag } : { name: tag, description })\n }\n return tags\n}\n\n/** Components referenced by the document (paths, security), transitively. */\nfunction prune(document: Json, components: { schemas: Json; responses: Json; securitySchemes: Json }): Json {\n const used = { schemas: new Set<string>(), responses: new Set<string>(), securitySchemes: new Set<string>() }\n const visit = (value: unknown): void => {\n if (Array.isArray(value)) {\n for (const item of value) visit(item)\n return\n }\n if (typeof value !== 'object' || value === null) return\n for (const [key, item] of Object.entries(value)) {\n if (key === '$ref' && typeof item === 'string') {\n const match = /^#\\/components\\/(schemas|responses)\\/([^/]+)/.exec(item)\n const kind = match?.[1] as 'schemas' | 'responses' | undefined\n const name =\n match?.[2] === undefined\n ? undefined\n : decodeURIComponent(match[2].replaceAll('~1', '/').replaceAll('~0', '~'))\n if (kind !== undefined && name !== undefined && !used[kind].has(name)) {\n used[kind].add(name)\n visit(components[kind][name])\n }\n } else if (key === 'security' && Array.isArray(item)) {\n for (const requirement of item)\n for (const scheme of Object.keys(requirement as object)) used.securitySchemes.add(scheme)\n } else {\n visit(item)\n }\n }\n }\n visit(document)\n const result: Json = {}\n for (const kind of ['schemas', 'responses', 'securitySchemes'] as const) {\n const kept: Json = {}\n for (const name of Object.keys(components[kind]).sort(compareStrings)) {\n if (used[kind].has(name)) kept[name] = components[kind][name]\n }\n if (Object.keys(kept).length > 0) result[kind] = kept\n }\n return result\n}\n\n/** Views of the operations of the section (effective route metadata from `extensions.http`). */\nexport function operationViews(\n metadata: ZnightMetadata,\n section: OpenApiMetadata = openApiSection(metadata),\n): OpenApiOperationView[] {\n const http = (metadata.extensions as { http?: HttpSectionLike } | undefined)?.http\n const groups = new Map<string, string>()\n for (const [group, definition] of Object.entries(http?.groups ?? {})) {\n for (const key of definition.keys ?? []) groups.set(key, group)\n }\n const groupOf = (key: string): string => groups.get(key) ?? key\n return section.operations.map(definition => {\n const controller = http?.controllers?.find(candidate => candidate.token === definition.controller)\n const route = controller?.routes?.find(\n candidate => candidate.handler === definition.handler && candidate.method === definition.route,\n )\n const routeMeta = route?.meta ?? {}\n const decided = new Set(Object.keys(routeMeta).map(groupOf))\n const meta: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(controller?.meta ?? {})) if (!decided.has(groupOf(key))) meta[key] = value\n Object.assign(meta, routeMeta)\n const operation = definition.operation as { operationId?: string; tags?: readonly string[] }\n return Object.freeze({\n method: definition.method,\n path: definition.path,\n operationId: operation.operationId ?? '',\n tags: Object.freeze([...(operation.tags ?? [])]),\n controller: displayName(definition.controller),\n handler: definition.handler,\n meta: Object.freeze(meta),\n })\n })\n}\n\n/** The parts of `metadata.extensions.http` read for the effective metadata. */\ninterface HttpSectionLike {\n readonly controllers?: readonly {\n readonly token: string\n readonly meta?: Readonly<Record<string, unknown>>\n readonly routes?: readonly {\n readonly method: string\n readonly handler: string\n readonly meta?: Readonly<Record<string, unknown>>\n }[]\n }[]\n readonly groups?: Readonly<Record<string, { readonly keys?: readonly string[] }>>\n}\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value === 'object' && value !== null && !Object.isFrozen(value)) {\n Object.freeze(value)\n for (const item of Object.values(value)) deepFreeze(item)\n }\n return value\n}\n\n/** `HttpErrorBody` (the body of every Znight error response). */\nconst HTTP_ERROR_BODY: JsonSchema = {\n type: 'object',\n properties: {\n statusCode: { type: 'integer' },\n error: { type: 'string' },\n message: { type: 'string' },\n details: {},\n },\n required: ['statusCode', 'error', 'message'],\n}\n\n/** `ValidationErrorBody`: a 400 body; validation failures list their issues in `details`. */\nconst VALIDATION_ERROR_BODY: JsonSchema = {\n allOf: [\n { $ref: schemaRef(ERROR_COMPONENTS.body) },\n {\n type: 'object',\n properties: {\n details: {\n type: 'array',\n items: {\n type: 'object',\n properties: { path: { type: 'string' }, message: { type: 'string' } },\n required: ['path', 'message'],\n },\n },\n },\n },\n ],\n} satisfies Record<string, JsonValue>\n"],"mappings":";;;;AAwBA,MAAa,2BAA2B;;ACYxC,SAAS,QAAQ,QAA+D;CAC9E,MAAM,QAAS,OAAgD;CAC/D,OAAO,OAAO,UAAU,YAAY,UAAU,OAAQ,QAAoC,KAAA;AAC5F;;AAGA,SAAgB,SAAS,QAAkC;CACzD,MAAM,SAAS,QAAQ,MAAM,CAAC,EAAE;CAChC,OAAO,OAAO,WAAW,WAAW,SAAS;AAC/C;;AAGA,MAAM,YAAwB,OAAO,OAAO;CAAE,MAAM;CAAU,QAAQ;AAAY,CAAC;;;;;;AAOnF,SAAS,WAAW,SAA0D;CAC5E,OAAO,EACL,kBAAkB,SAAoF;EACpG,MAAM,MAAM,KAAK,WAAW,MAAM;EAClC,IAAI,KAAK,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AAC,GAAI,UAAU,QAAQ,CAAC,CAAE,CAAC;GAC/C,YAAY,YAAY,WAAW,UAAU;GAC7C,SAAS,WAAW;GACpB,MAAM,OAAO,OAAO,IAAI;EAC1B,CAAC;CACH,CAAC;AACH;AAgBA,SAAS,WAAc,OAAa;CAClC,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,OAAO,SAAS,KAAK,GAAG;EAC1E,OAAO,OAAO,KAAK;EACnB,KAAK,MAAM,QAAQ,OAAO,OAAO,KAAK,GAAG,WAAW,IAAI;CAC1D;CACA,OAAO;AACT;;AAGA,MAAM,kBAA8B;CAClC,MAAM;CACN,YAAY;EACV,YAAY,EAAE,MAAM,UAAU;EAC9B,OAAO,EAAE,MAAM,SAAS;EACxB,SAAS,EAAE,MAAM,SAAS;EAC1B,SAAS,CAAC;CACZ;CACA,UAAU;EAAC;EAAc;EAAS;CAAS;AAC7C;;AAGA,MAAM,wBAAoC,EACxC,OAAO,CACL,EAAE,MAAM,UAAU,iBAAiB,IAAI,EAAE,GACzC;CACE,MAAM;CACN,YAAY,EACV,SAAS;EACP,MAAM;EACN,OAAO;GACL,MAAM;GACN,YAAY;IAAE,MAAM,EAAE,MAAM,SAAS;IAAG,SAAS,EAAE,MAAM,SAAS;GAAE;GACpE,UAAU,CAAC,QAAQ,SAAS;EAC9B;CACF,EACF;AACF,CACF,EACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CompilerExtension, Location } from "@znight/compiler";
|
|
2
|
+
/** Data stored by `analyzeClass`. */
|
|
3
|
+
type OpenApiStored = {
|
|
4
|
+
readonly kind: "document";
|
|
5
|
+
readonly identity: string;
|
|
6
|
+
readonly displayName: string;
|
|
7
|
+
readonly location: Location;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "controller";
|
|
10
|
+
readonly identity: string;
|
|
11
|
+
readonly displayName: string;
|
|
12
|
+
};
|
|
13
|
+
/** The `@znight/openapi` compiler extension. */
|
|
14
|
+
declare const openapi: CompilerExtension<OpenApiStored>;
|
|
15
|
+
export { type OpenApiStored, openapi as default };
|
|
16
|
+
//# sourceMappingURL=compiler.d.mts.map
|