import { m as Handler } from "./router-Cwb7ak0J.mjs"; //#region src/router/handlers/openapi/openapi.d.ts /** * OpenAPI document `info` section. */ type OpenApiInfo = { title: string; version: string; description?: string; termsOfService?: string; contact?: Record; license?: Record; }; /** * OpenAPI server definition. */ type OpenApiServer = { url: string; description?: string; variables?: Record; }; /** * OpenAPI operation object. */ type OpenApiOperation = Record; /** * OpenAPI paths dictionary keyed by pathname then method. */ type OpenApiPaths = Record>; /** * OpenAPI document returned by the `openapi` plugin handler. */ type OpenApiDocument = { openapi: string; info: OpenApiInfo; servers?: OpenApiServer[]; paths: OpenApiPaths; components?: Record; security?: Array>; }; /** * Options used to build an OpenAPI document from registered routes. */ type OpenApiOptions = { info: OpenApiInfo; servers?: OpenApiServer[]; components?: Record; security?: Array>; openapi?: string; }; /** * Create an OpenAPI response handler that reflects the active router. * * @example * ```ts * router.add({ * path: '/swagger.json', * method: HttpMethod.GET, * handler: openapi({ * info: {title: 'Example API', version: '1.0.0'}, * servers: [{url: 'https://api.example.com'}], * }), * }) * ``` * * @param options - OpenAPI document options for info, servers, and optional components/security. * @returns A route handler that returns the generated OpenAPI JSON document. */ declare function openapi(options: OpenApiOptions): Handler; //#endregion export { type OpenApiDocument, type OpenApiInfo, type OpenApiOptions, type OpenApiServer, openapi };