UNPKG

ng-openapi-gen

Version:

An OpenAPI 3.0 and 3.1 codegen for Angular 16+

58 lines (57 loc) 1.87 kB
import { Logger } from './logger'; import { OpenAPIObject, OperationObject, PathItemObject } from './openapi-typings'; import { OperationVariant } from './operation-variant'; import { Options } from './options'; import { Parameter } from './parameter'; import { RequestBody } from './request-body'; import { Response } from './response'; import { Security } from './security'; /** * An operation descriptor */ export declare class Operation { openApi: OpenAPIObject; path: string; pathSpec: PathItemObject; method: string; id: string; spec: OperationObject; options: Options; tags: string[]; methodName: string; pathVar: string; parameters: Parameter[]; hasParameters: boolean; parametersRequired: boolean; security: Security[][]; deprecated: boolean; requestBody?: RequestBody; successResponse?: Response; allResponses: Response[]; pathExpression: string; variants: OperationVariant[]; logger: Logger; constructor(openApi: OpenAPIObject, path: string, pathSpec: PathItemObject, method: string, id: string, spec: OperationObject, options: Options); protected skipImport(): boolean; private collectParameters; private collectSecurity; private paramIsExcluded; private collectContent; private collectResponses; private getResponse; /** * Returns a path expression to be evaluated, for example: * "/a/{var1}/b/{var2}/" returns "/a/${params.var1}/b/${params.var2}" */ private toPathExpression; private contentsByMethodPart; private calculateVariants; /** * Returns how the given content is represented on the method name */ private variantMethodPart; /** * Returns hint, how the expected response type in the request method names should be abbreviated. */ private keepFullResponseMediaType; }