UNPKG

@dooboostore/simple-boot-http-server

Version:

back end http server frameworks

142 lines 3.69 kB
import { Filter } from './Filter'; import { SimpleBootHttpServer } from '../SimpleBootHttpServer'; import { RequestResponse } from '../models/RequestResponse'; type MethodType = { summary?: string; description?: string; operationId?: string; parameters?: { name: string; in: string; required: boolean; schema: { type: string; format?: string; items?: { type: string; format?: string; }; }; }[]; responses: { [code: string]: { description: string; content?: { [type: string]: { schema: { type: string; format?: string; items?: { type: string; format?: string; }; }; }; }; }; }; }; type PathType = { [method: string]: MethodType; }; type PathsType = { [path: string]: PathType; }; export type OpenApiType = { openapi: string; info?: { title?: string; description?: string; contact?: { name?: string; email?: string; }; }; servers?: { url: string; }[]; paths?: PathsType; components?: { schemas?: { [key: string]: { type: string; required?: string[]; properties?: { [key: string]: { type: string; format?: string; items?: { type: string; format?: string; }; }; }; }; }; securitySchemes?: { [key: string]: { type: string; description?: string; in?: string; name?: string; scheme?: string; bearerFormat?: string; flows?: { [key: string]: { authorizationUrl?: string; tokenUrl?: string; refreshUrl?: string; scopes?: { [key: string]: { description?: string; }; }; }; }; }; }; }; }; export type OpenApi3FilterConfig = { info?: { title?: string; description?: string; contact?: { name?: string; email?: string; }; }; servers?: { url: string; }[]; }; export declare class OpenApi3Filter implements Filter { config: { path: string; excludePath?: { method: string; path: string; }[]; }; private openApiConfig; constructor(config: { path: string; excludePath?: { method: string; path: string; }[]; }, openApiConfig?: OpenApi3FilterConfig); onInit(app: SimpleBootHttpServer): Promise<void>; proceedBefore({ rr, app }: { rr: RequestResponse; app: SimpleBootHttpServer; carrier: Map<string, any>; }): Promise<boolean>; proceedAfter({ rr, app }: { rr: RequestResponse; app: SimpleBootHttpServer; carrier: Map<string, any>; }): Promise<boolean>; } export {}; //# sourceMappingURL=OpenApi3Filter.d.ts.map