UNPKG

fluid-oas

Version:

Build declarative OpenApiv3.* specifications.

51 lines (50 loc) 1.7 kB
import type { OpenApiMediaContentType } from "../types"; import type { OpenApiSchema } from "../schema/OpenApiSchema"; import { Base, type BaseInterface } from "./base"; import type { OpenApiExample } from "./OpenApiExample"; import type { OpenApiMediaType } from "./OpenApiMedia"; import type { OpenApiReferenceObject } from "./OpenApiReferenceObject"; declare const HeaderBase: { new (...args: any[]): { _required?: boolean; addRequired(val: boolean): /*elided*/ any; toJSON(): unknown; }; } & { new (...args: any[]): { _deprecated?: boolean; addDeprecated(val: boolean): /*elided*/ any; toJSON(): unknown; }; } & { new (...args: any[]): { _description?: string; addDescription(val: string): /*elided*/ any; toJSON(): unknown; }; } & typeof Base; interface HeaderBase extends BaseInterface { addRequired(required: boolean): this; addDeprecated(deprecated: boolean): this; addDescription(description: string): this; } export interface SchemaHeader extends HeaderBase { addStyle(simple: "simple"): this; addExplode(explode: boolean): this; addSchema(schema: OpenApiSchema | OpenApiReferenceObject): this; addExample(example: any): this; addExamples(mappings: Partial<{ [K in string]: OpenApiExample | OpenApiReferenceObject; }>): this; } export interface ContentHeader extends HeaderBase { addContents(mappings: Partial<{ [K in OpenApiMediaContentType]: OpenApiMediaType; }>): this; } export type OpenApiHeader = SchemaHeader | ContentHeader; export declare const Header: { schema: SchemaHeader; content: ContentHeader; }; export {};