/** * OpenAPI 3.1 generator. * * Pure function: takes the flattened route list (`RouteRegistry.flatten()`) and * emits an OpenAPI document. No CLI, no fs, no app boot — the `openapi` command * (`src/commands/OpenApi.ts`) populates the registry and hands the routes here. * * Schema → JSON Schema goes through the validator driver seam * (`ValidateService.resolve(schema).toJsonSchema`), so any vendor with * introspection (zod native, yup `describe()`, arktype, or a user-registered * driver) is documented; vendors without it degrade to a placeholder + warning. * The same seam powers the future MCP surface — nothing here is OpenAPI-only * throwaway. */ import type { FlatRoute } from '../http/routing/RouteNode.ts'; export interface OpenApiInfo { title: string; description?: string; version: string; contact?: { email?: string; }; } export interface OpenApiServer { url: string; description?: string; } export interface GenerateOpenApiOptions { info: OpenApiInfo; servers?: OpenApiServer[]; /** Called once per route/field whose schema can't be introspected. */ onWarning?: (message: string) => void; } type Obj = Record; /** * Build an OpenAPI 3.1 document from flattened routes. */ export declare function generateOpenApi(routes: FlatRoute[], opts: GenerateOpenApiOptions): Promise; export {};