export type OpenAPISupportedVersion = '3.0.4' | '3.1.1'; export type AdditionalProperties = boolean | T | ReferenceObject; export declare enum ParameterLocation { cookie = "cookie", header = "header", path = "path", query = "query" } export interface SecurityRequirementObject { [key: string]: string[]; } export interface ContactObject { name?: string; url?: string; email?: string; [key: string]: unknown; } export interface LicenseObject { name: string; url?: string; [key: string]: unknown; } export interface InfoObject { title: string; description?: string; termsOfService?: string; contact?: ContactObject; license?: LicenseObject; version: string; [key: string]: unknown; } export type SchemaObject = SchemaObject3_0 | SchemaObject3_1; export interface CommonPropsSchemaObject { allOf?: Array; anyOf?: Array; oneOf?: Array; not?: T | ReferenceObject; items?: T | ReferenceObject; properties?: Record; additionalProperties?: AdditionalProperties; title?: string; /** * CommonMark syntax MAY be used for rich text representation. */ description?: string; format?: string; pattern?: RegExp | string; default?: unknown; enum?: unknown[]; multipleOf?: number; uniqueItems?: boolean; required?: string[]; maxLength?: number; minLength?: number; maxItems?: number; minItems?: number; maxProperties?: number; minProperties?: number; maximum?: number; minimum?: number; exclusiveMaximum?: boolean; exclusiveMinimum?: boolean; discriminator?: DiscriminatorObject; readOnly?: boolean; writeOnly?: boolean; xml?: unknown; externalDocs?: ExternalDocObject; deprecated?: boolean; allowEmptyValue?: boolean; $ref?: string; } /** * @links * - https://swagger.io/specification/#schema-object * - https://tools.ietf.org/html/draft-wright-json-schema-validation-00 */ export interface SchemaObject3_0 extends CommonPropsSchemaObject { type?: string; nullable?: boolean; example?: unknown; } export interface SchemaObject3_1 extends CommonPropsSchemaObject { type?: string | string[]; examples?: unknown[]; contentEncoding?: string; contentMediaType?: string; $schema?: string; } export interface XMLObject { name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } export interface DiscriminatorObject { propertyName: string; mapping?: Record; } export interface ExternalDocObject { description?: string; url: string; } export interface TagObject { name: string; description?: string; externalDocs?: ExternalDocObject; } export type TagObject3_2 = TagObject & { /** * @support OpenAPI 3.2 */ summary?: string; /** * @support OpenAPI 3.2 */ parent?: string; /** * @support OpenAPI 3.2 */ kind?: 'nav' | 'badge'; }; export interface OAuthFlowObject { authorizationUrl?: string; tokenUrl?: string; refreshUrl?: string; scopes?: Record; } export interface OAuthFlowsObject { implicit?: OAuthFlowObject; password?: OAuthFlowObject; clientCredentials?: OAuthFlowObject; authorizationCode?: OAuthFlowObject; } export interface SecuritySchemeObject { type: string; description?: string; name?: string; in?: string; scheme?: string; bearerFormat?: string; flows?: OAuthFlowsObject; openIdConnectUrl?: string; } export interface ReferenceObject { $ref: string; } export interface ServerVariableObject { enum?: string[]; default: string; description?: string; [x: string]: unknown; } export interface ServerObject { url: string; description?: string; variables?: Record; [x: string]: unknown; } export interface LinkObject { operationRef?: string; operationId?: string; parameters?: Record; requestBody?: unknown; description?: string; server?: ServerObject; [x: string]: unknown; } export interface ExampleObject { summary?: string; description?: string; value?: unknown; externalValue?: string; } export interface HeaderObject { description?: string; required?: boolean; deprecated?: boolean; style?: string; explode?: boolean; allowReserved?: boolean; schema?: SchemaObject | ReferenceObject; example?: unknown; examples?: Record; content?: Record; } export interface ParameterObject extends HeaderObject { name: string; in: string; allowEmptyValue?: boolean; } export interface EncodingObject { contentType?: string; headers?: Record; style?: string; explode?: boolean; allowReserved?: boolean; } export interface MediaTypeObject { schema?: SchemaObject | ReferenceObject; example?: unknown; examples?: Record; encoding?: Record; } export interface RequestBodyObject { content?: Record; [key: string]: unknown; } export interface ResponseObject { description: string; headers?: Record; content?: Record; links?: Record; [key: string]: unknown; } export interface ComponentsObject { schemas?: Record; requestBodies?: Record; headers?: Record; parameters?: Record; responses?: Record; examples?: Record; securitySchemes?: Record; links?: Record; callbacks?: Record; [key: string]: unknown; }