export interface OpenAPISpec { openapi: string; info: OpenAPIInfo; servers: OpenAPIServer[]; paths: OpenAPIPaths; components?: OpenAPIComponents; } export interface OpenAPIInfo { title: string; version: string; description?: string; contact?: { name?: string; url?: string; email?: string; }; license?: { name: string; url?: string; }; } export interface OpenAPIServer { url: string; description?: string; } export interface OpenAPIPaths { [path: string]: OpenAPIPathItem; } export interface OpenAPIPathItem { summary?: string; description?: string; get?: OpenAPIOperation; post?: OpenAPIOperation; put?: OpenAPIOperation; delete?: OpenAPIOperation; patch?: OpenAPIOperation; options?: OpenAPIOperation; head?: OpenAPIOperation; } export interface OpenAPIOperation { summary?: string; description?: string; operationId?: string; tags?: string[]; parameters?: OpenAPIParameter[]; requestBody?: OpenAPIRequestBody; responses: OpenAPIResponses; security?: Array>; } export interface OpenAPIParameter { name: string; in: 'query' | 'header' | 'path' | 'cookie'; description?: string; required?: boolean; schema: OpenAPISchema; } export interface OpenAPIRequestBody { description?: string; required?: boolean; content: { [mediaType: string]: OpenAPIMediaType; }; } export interface OpenAPIMediaType { schema: OpenAPISchema; example?: unknown; } export interface OpenAPIResponses { [statusCode: string]: OpenAPIResponse; } export interface OpenAPIResponse { description: string; content?: { [mediaType: string]: OpenAPIMediaType; }; } export interface OpenAPISchema { type?: string; format?: string; properties?: { [property: string]: OpenAPISchema; }; items?: OpenAPISchema; required?: string[]; example?: unknown; } export interface OpenAPIComponents { schemas?: { [schema: string]: OpenAPISchema; }; securitySchemes?: { [scheme: string]: OpenAPISecurityScheme; }; } export interface OpenAPISecurityScheme { type: string; description?: string; name?: string; in?: string; scheme?: string; bearerFormat?: string; }