import { Api } from "../../models"; import { OpenAPI3SchemaType } from "./openapi3-schema"; export declare function generateOpenApiV3(api: Api, format: "json" | "yaml"): string; export declare function openApiV3(api: Api): OpenApiV3; export interface OpenApiV3 { openapi: "3.0.0"; tags?: OpenAPIV3TagObject[]; info: { version: string; title: string; description?: string; termsOfService?: string; contact?: { name?: string; url?: string; email?: string; }; license?: { name: string; url?: string; }; }; servers?: { url: string; description?: string; }[]; paths: { [endpointPath: string]: { [method: string]: OpenAPIV3Operation; }; }; components: { schemas: { [typeName: string]: OpenAPI3SchemaType; }; }; } export interface OpenAPIV3TagObject { name: string; description?: string; } export interface OpenAPIV3Operation { operationId: string; description?: string; tags?: string[]; parameters: OpenAPIV3Parameter[]; requestBody?: OpenAPI3SchemaType; responses: { default?: OpenAPIV3Response; [statusCode: string]: OpenAPIV3Response | undefined; }; } export interface OpenAPIV3Parameter { in: "path" | "query"; name: string; description?: string; required: boolean; schema: OpenAPI3SchemaType; } export interface OpenAPIV3Response { content?: { "application/json": { schema: OpenAPI3SchemaType; }; }; description: string; }