openapi3-ts
Version:
TS Model & utils for OpenAPI 3.x specification.
1 lines • 23.9 kB
Source Map (JSON)
{"version":3,"file":"oas30-DXxEUSG-.mjs","sources":["../src/dsl/openapi-builder30.ts","../src/model/openapi30.ts"],"sourcesContent":["import * as yaml from 'yaml';\r\nimport * as oa from '../model/openapi30';\r\n\r\n// Internal DSL for building an OpenAPI 3.0.x contract\r\n// using a fluent interface\r\n\r\nexport class OpenApiBuilder {\r\n rootDoc: oa.OpenAPIObject;\r\n\r\n static create(doc?: oa.OpenAPIObject): OpenApiBuilder {\r\n return new OpenApiBuilder(doc);\r\n }\r\n\r\n constructor(doc?: oa.OpenAPIObject) {\r\n this.rootDoc = doc || {\r\n openapi: '3.0.0',\r\n info: {\r\n title: 'app',\r\n version: 'version'\r\n },\r\n paths: {},\r\n components: {\r\n schemas: {},\r\n responses: {},\r\n parameters: {},\r\n examples: {},\r\n requestBodies: {},\r\n headers: {},\r\n securitySchemes: {},\r\n links: {},\r\n callbacks: {}\r\n },\r\n tags: [],\r\n servers: []\r\n };\r\n }\r\n\r\n getSpec(): oa.OpenAPIObject {\r\n return this.rootDoc;\r\n }\r\n\r\n getSpecAsJson(\r\n replacer?: (key: string, value: unknown) => unknown,\r\n space?: string | number\r\n ): string {\r\n return JSON.stringify(this.rootDoc, replacer, space);\r\n }\r\n getSpecAsYaml(\r\n replacer?: Parameters<typeof yaml.stringify>[1],\r\n options?: Parameters<typeof yaml.stringify>[2]\r\n ): string {\r\n return yaml.stringify(this.rootDoc, replacer, options);\r\n }\r\n\r\n private static isValidOpenApiVersion(v: string): boolean {\r\n v = v || '';\r\n const match = /(\\d+)\\.(\\d+).(\\d+)/.exec(v);\r\n if (match) {\r\n const major = parseInt(match[1], 10);\r\n if (major >= 3) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n addOpenApiVersion(openApiVersion: string): OpenApiBuilder {\r\n if (!OpenApiBuilder.isValidOpenApiVersion(openApiVersion)) {\r\n throw new Error(\r\n 'Invalid OpenApi version: ' + openApiVersion + '. Follow convention: 3.x.y'\r\n );\r\n }\r\n this.rootDoc.openapi = openApiVersion;\r\n return this;\r\n }\r\n addInfo(info: oa.InfoObject): OpenApiBuilder {\r\n this.rootDoc.info = info;\r\n return this;\r\n }\r\n addContact(contact: oa.ContactObject): OpenApiBuilder {\r\n this.rootDoc.info.contact = contact;\r\n return this;\r\n }\r\n addLicense(license: oa.LicenseObject): OpenApiBuilder {\r\n this.rootDoc.info.license = license;\r\n return this;\r\n }\r\n addTitle(title: string): OpenApiBuilder {\r\n this.rootDoc.info.title = title;\r\n return this;\r\n }\r\n addDescription(description: string): OpenApiBuilder {\r\n this.rootDoc.info.description = description;\r\n return this;\r\n }\r\n addTermsOfService(termsOfService: string): OpenApiBuilder {\r\n this.rootDoc.info.termsOfService = termsOfService;\r\n return this;\r\n }\r\n addVersion(version: string): OpenApiBuilder {\r\n this.rootDoc.info.version = version;\r\n return this;\r\n }\r\n addPath(path: string, pathItem: oa.PathItemObject): OpenApiBuilder {\r\n this.rootDoc.paths[path] = { ...(this.rootDoc.paths[path] || {}), ...pathItem };\r\n return this;\r\n }\r\n addSchema(name: string, schema: oa.SchemaObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.schemas = this.rootDoc.components.schemas || {};\r\n this.rootDoc.components.schemas[name] = schema;\r\n return this;\r\n }\r\n addResponse(name: string, response: oa.ResponseObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.responses = this.rootDoc.components.responses || {};\r\n this.rootDoc.components.responses[name] = response;\r\n return this;\r\n }\r\n addParameter(name: string, parameter: oa.ParameterObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.parameters = this.rootDoc.components.parameters || {};\r\n this.rootDoc.components.parameters[name] = parameter;\r\n return this;\r\n }\r\n addExample(name: string, example: oa.ExampleObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.examples = this.rootDoc.components.examples || {};\r\n this.rootDoc.components.examples[name] = example;\r\n return this;\r\n }\r\n addRequestBody(\r\n name: string,\r\n reqBody: oa.RequestBodyObject | oa.ReferenceObject\r\n ): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.requestBodies = this.rootDoc.components.requestBodies || {};\r\n this.rootDoc.components.requestBodies[name] = reqBody;\r\n return this;\r\n }\r\n addHeader(name: string, header: oa.HeaderObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.headers = this.rootDoc.components.headers || {};\r\n this.rootDoc.components.headers[name] = header;\r\n return this;\r\n }\r\n addSecurityScheme(\r\n name: string,\r\n secScheme: oa.SecuritySchemeObject | oa.ReferenceObject\r\n ): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.securitySchemes = this.rootDoc.components.securitySchemes || {};\r\n this.rootDoc.components.securitySchemes[name] = secScheme;\r\n return this;\r\n }\r\n addLink(name: string, link: oa.LinkObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.links = this.rootDoc.components.links || {};\r\n this.rootDoc.components.links[name] = link;\r\n return this;\r\n }\r\n addCallback(name: string, callback: oa.CallbackObject | oa.ReferenceObject): OpenApiBuilder {\r\n this.rootDoc.components = this.rootDoc.components || {};\r\n this.rootDoc.components.callbacks = this.rootDoc.components.callbacks || {};\r\n this.rootDoc.components.callbacks[name] = callback;\r\n return this;\r\n }\r\n addServer(server: oa.ServerObject): OpenApiBuilder {\r\n this.rootDoc.servers = this.rootDoc.servers || [];\r\n this.rootDoc.servers.push(server);\r\n return this;\r\n }\r\n addTag(tag: oa.TagObject): OpenApiBuilder {\r\n this.rootDoc.tags = this.rootDoc.tags || [];\r\n this.rootDoc.tags.push(tag);\r\n return this;\r\n }\r\n addExternalDocs(extDoc: oa.ExternalDocumentationObject): OpenApiBuilder {\r\n this.rootDoc.externalDocs = extDoc;\r\n return this;\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// Typed interfaces for OpenAPI 3.0.3\n// see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md\n\nimport { ServerObject } from './oas-common';\nimport { ISpecificationExtension, SpecificationExtension } from './specification-extension';\n\nexport * from './oas-common';\nexport type { ISpecificationExtension, SpecificationExtension } from './specification-extension';\n\nexport interface OpenAPIObject extends ISpecificationExtension {\n openapi: string;\n info: InfoObject;\n servers?: ServerObject[];\n paths: PathsObject;\n components?: ComponentsObject;\n security?: SecurityRequirementObject[];\n tags?: TagObject[];\n externalDocs?: ExternalDocumentationObject;\n}\nexport interface InfoObject extends ISpecificationExtension {\n title: string;\n description?: string;\n termsOfService?: string;\n contact?: ContactObject;\n license?: LicenseObject;\n version: string;\n}\nexport interface ContactObject extends ISpecificationExtension {\n name?: string;\n url?: string;\n email?: string;\n}\nexport interface LicenseObject extends ISpecificationExtension {\n name: string;\n url?: string;\n}\n\nexport interface ComponentsObject extends ISpecificationExtension {\n schemas?: { [schema: string]: SchemaObject | ReferenceObject };\n responses?: { [response: string]: ResponseObject | ReferenceObject };\n parameters?: { [parameter: string]: ParameterObject | ReferenceObject };\n examples?: { [example: string]: ExampleObject | ReferenceObject };\n requestBodies?: { [request: string]: RequestBodyObject | ReferenceObject };\n headers?: { [header: string]: HeaderObject | ReferenceObject };\n securitySchemes?: { [securityScheme: string]: SecuritySchemeObject | ReferenceObject };\n links?: { [link: string]: LinkObject | ReferenceObject };\n callbacks?: { [callback: string]: CallbackObject | ReferenceObject };\n}\n\n/**\n * Rename it to Paths Object to be consistent with the spec\n * See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#pathsObject\n */\nexport interface PathsObject extends ISpecificationExtension {\n // [path: string]: PathItemObject;\n [path: string]: PathItemObject\n}\n\n/**\n * @deprecated\n * Create a type alias for backward compatibility\n */\nexport type PathObject = PathsObject;\n\nexport function getPath(pathsObject: PathsObject, path: string): PathItemObject | undefined {\n if (SpecificationExtension.isValidExtension(path)) {\n return undefined;\n }\n return pathsObject[path] as PathItemObject;\n}\n\nexport interface PathItemObject extends ISpecificationExtension {\n $ref?: string;\n summary?: string;\n description?: string;\n get?: OperationObject;\n put?: OperationObject;\n post?: OperationObject;\n delete?: OperationObject;\n options?: OperationObject;\n head?: OperationObject;\n patch?: OperationObject;\n trace?: OperationObject;\n servers?: ServerObject[];\n parameters?: (ParameterObject | ReferenceObject)[];\n}\nexport interface OperationObject extends ISpecificationExtension {\n tags?: string[];\n summary?: string;\n description?: string;\n externalDocs?: ExternalDocumentationObject;\n operationId?: string;\n parameters?: (ParameterObject | ReferenceObject)[];\n requestBody?: RequestBodyObject | ReferenceObject;\n responses: ResponsesObject;\n callbacks?: CallbacksObject;\n deprecated?: boolean;\n security?: SecurityRequirementObject[];\n servers?: ServerObject[];\n}\nexport interface ExternalDocumentationObject extends ISpecificationExtension {\n description?: string;\n url: string;\n}\n\n/**\n * The location of a parameter.\n * Possible values are \"query\", \"header\", \"path\" or \"cookie\".\n * Specification:\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-locations\n */\nexport type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';\n\n/**\n * The style of a parameter.\n * Describes how the parameter value will be serialized.\n * (serialization is not implemented yet)\n * Specification:\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#style-values\n */\nexport type ParameterStyle =\n | 'matrix'\n | 'label'\n | 'form'\n | 'simple'\n | 'spaceDelimited'\n | 'pipeDelimited'\n | 'deepObject';\n\nexport interface BaseParameterObject extends ISpecificationExtension {\n description?: string;\n required?: boolean;\n deprecated?: boolean;\n allowEmptyValue?: boolean;\n\n style?: ParameterStyle; // \"matrix\" | \"label\" | \"form\" | \"simple\" | \"spaceDelimited\" | \"pipeDelimited\" | \"deepObject\";\n explode?: boolean;\n allowReserved?: boolean;\n schema?: SchemaObject | ReferenceObject;\n examples?: { [param: string]: ExampleObject | ReferenceObject };\n example?: any;\n content?: ContentObject;\n}\n\nexport interface ParameterObject extends BaseParameterObject {\n name: string;\n in: ParameterLocation; // \"query\" | \"header\" | \"path\" | \"cookie\";\n}\nexport interface RequestBodyObject extends ISpecificationExtension {\n description?: string;\n content: ContentObject;\n required?: boolean;\n}\nexport interface ContentObject {\n [mediatype: string]: MediaTypeObject;\n}\nexport interface MediaTypeObject extends ISpecificationExtension {\n schema?: SchemaObject | ReferenceObject;\n examples?: ExamplesObject;\n example?: any;\n encoding?: EncodingObject;\n}\nexport interface EncodingObject extends ISpecificationExtension {\n // [property: string]: EncodingPropertyObject;\n [property: string]: EncodingPropertyObject | any; // Hack for allowing ISpecificationExtension\n}\nexport interface EncodingPropertyObject {\n contentType?: string;\n headers?: { [key: string]: HeaderObject | ReferenceObject };\n style?: string;\n explode?: boolean;\n allowReserved?: boolean;\n [key: string]: any; // (any) = Hack for allowing ISpecificationExtension\n}\nexport interface ResponsesObject extends ISpecificationExtension {\n default?: ResponseObject | ReferenceObject;\n\n // [statuscode: string]: ResponseObject | ReferenceObject;\n [statuscode: string]: ResponseObject | ReferenceObject | any; // (any) = Hack for allowing ISpecificationExtension\n}\nexport interface ResponseObject extends ISpecificationExtension {\n description: string;\n headers?: HeadersObject;\n content?: ContentObject;\n links?: LinksObject;\n}\nexport interface CallbacksObject extends ISpecificationExtension {\n // [name: string]: CallbackObject | ReferenceObject;\n [name: string]: CallbackObject | ReferenceObject | any; // Hack for allowing ISpecificationExtension\n}\nexport interface CallbackObject extends ISpecificationExtension {\n // [name: string]: PathItemObject;\n [name: string]: PathItemObject | any; // Hack for allowing ISpecificationExtension\n}\nexport interface HeadersObject {\n [name: string]: HeaderObject | ReferenceObject;\n}\nexport interface ExampleObject {\n summary?: string;\n description?: string;\n value?: any;\n externalValue?: string;\n [property: string]: any; // Hack for allowing ISpecificationExtension\n}\nexport interface LinksObject {\n [name: string]: LinkObject | ReferenceObject;\n}\nexport interface LinkObject extends ISpecificationExtension {\n operationRef?: string;\n operationId?: string;\n parameters?: LinkParametersObject;\n requestBody?: any | string;\n description?: string;\n server?: ServerObject;\n [property: string]: any; // Hack for allowing ISpecificationExtension\n}\nexport interface LinkParametersObject {\n [name: string]: any | string;\n}\n \nexport interface HeaderObject extends BaseParameterObject {\n $ref?: string;\n}\nexport interface TagObject extends ISpecificationExtension {\n name: string;\n description?: string;\n externalDocs?: ExternalDocumentationObject;\n [extension: string]: any; // Hack for allowing ISpecificationExtension\n}\nexport interface ExamplesObject {\n [name: string]: ExampleObject | ReferenceObject;\n}\n\nexport interface ReferenceObject {\n $ref: string;\n}\n\n/**\n * A type guard to check if the given value is a `ReferenceObject`.\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\n *\n * @param obj The value to check.\n */\nexport function isReferenceObject(obj: any): obj is ReferenceObject {\n return Object.prototype.hasOwnProperty.call(obj, '$ref');\n}\n\nexport type SchemaObjectType =\n | 'integer'\n | 'number'\n | 'string'\n | 'boolean'\n | 'object'\n | 'null'\n | 'array';\n\nexport type SchemaObjectFormat =\n | 'int32'\n | 'int64'\n | 'float'\n | 'double'\n | 'byte'\n | 'binary'\n | 'date'\n | 'date-time'\n | 'password'\n | string;\n\nexport interface SchemaObject extends ISpecificationExtension {\n nullable?: boolean;\n discriminator?: DiscriminatorObject;\n readOnly?: boolean;\n writeOnly?: boolean;\n xml?: XmlObject;\n externalDocs?: ExternalDocumentationObject;\n example?: any;\n examples?: any[];\n deprecated?: boolean;\n\n type?: SchemaObjectType | SchemaObjectType[];\n format?: SchemaObjectFormat;\n allOf?: (SchemaObject | ReferenceObject)[];\n oneOf?: (SchemaObject | ReferenceObject)[];\n anyOf?: (SchemaObject | ReferenceObject)[];\n not?: SchemaObject | ReferenceObject;\n items?: SchemaObject | ReferenceObject;\n properties?: { [propertyName: string]: SchemaObject | ReferenceObject };\n additionalProperties?: SchemaObject | ReferenceObject | boolean;\n description?: string;\n default?: any;\n\n title?: string;\n multipleOf?: number;\n maximum?: number;\n /** @desc In OpenAPI 3.0: boolean*/\n exclusiveMaximum?: boolean;\n minimum?: number;\n /** @desc In OpenAPI 3.0: boolean */\n exclusiveMinimum?: boolean;\n maxLength?: number;\n minLength?: number;\n pattern?: string;\n maxItems?: number;\n minItems?: number;\n uniqueItems?: boolean;\n maxProperties?: number;\n minProperties?: number;\n required?: string[];\n enum?: any[];\n}\n\n/**\n * A type guard to check if the given object is a `SchemaObject`.\n * Useful to distinguish from `ReferenceObject` values that can be used\n * in most places where `SchemaObject` is allowed.\n *\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\n *\n * @param schema The value to check.\n */\nexport function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject {\n return !Object.prototype.hasOwnProperty.call(schema, '$ref');\n}\n\nexport interface SchemasObject {\n [schema: string]: SchemaObject;\n}\n\nexport interface DiscriminatorObject {\n propertyName: string;\n mapping?: { [key: string]: string };\n}\n\nexport interface XmlObject extends ISpecificationExtension {\n name?: string;\n namespace?: string;\n prefix?: string;\n attribute?: boolean;\n wrapped?: boolean;\n}\nexport type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';\n\nexport interface SecuritySchemeObject extends ISpecificationExtension {\n type: SecuritySchemeType;\n description?: string;\n name?: string; // required only for apiKey\n in?: string; // required only for apiKey\n scheme?: string; // required only for http\n bearerFormat?: string;\n flows?: OAuthFlowsObject; // required only for oauth2\n openIdConnectUrl?: string; // required only for openIdConnect\n}\nexport interface OAuthFlowsObject extends ISpecificationExtension {\n implicit?: OAuthFlowObject;\n password?: OAuthFlowObject;\n clientCredentials?: OAuthFlowObject;\n authorizationCode?: OAuthFlowObject;\n}\nexport interface OAuthFlowObject extends ISpecificationExtension {\n authorizationUrl?: string;\n tokenUrl?: string;\n refreshUrl?: string;\n scopes: ScopesObject;\n}\nexport interface ScopesObject extends ISpecificationExtension {\n [scope: string]: any; // Hack for allowing ISpecificationExtension\n}\nexport interface SecurityRequirementObject {\n [name: string]: string[];\n}\n"],"names":["OpenApiBuilder","doc","replacer","space","options","yaml","v","match","openApiVersion","info","contact","license","title","description","termsOfService","version","path","pathItem","name","schema","response","parameter","example","reqBody","header","secScheme","link","callback","server","tag","extDoc","getPath","pathsObject","SpecificationExtension","isReferenceObject","obj","isSchemaObject"],"mappings":";;AAMO,MAAMA,EAAe;AAAA,EAGxB,OAAO,OAAOC,GAAwC;AAC3C,WAAA,IAAID,EAAeC,CAAG;AAAA,EACjC;AAAA,EAEA,YAAYA,GAAwB;AAChC,SAAK,UAAUA,KAAO;AAAA,MAClB,SAAS;AAAA,MACT,MAAM;AAAA,QACF,OAAO;AAAA,QACP,SAAS;AAAA,MACb;AAAA,MACA,OAAO,CAAC;AAAA,MACR,YAAY;AAAA,QACR,SAAS,CAAC;AAAA,QACV,WAAW,CAAC;AAAA,QACZ,YAAY,CAAC;AAAA,QACb,UAAU,CAAC;AAAA,QACX,eAAe,CAAC;AAAA,QAChB,SAAS,CAAC;AAAA,QACV,iBAAiB,CAAC;AAAA,QAClB,OAAO,CAAC;AAAA,QACR,WAAW,CAAC;AAAA,MAChB;AAAA,MACA,MAAM,CAAC;AAAA,MACP,SAAS,CAAC;AAAA,IAAA;AAAA,EAElB;AAAA,EAEA,UAA4B;AACxB,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,cACIC,GACAC,GACM;AACN,WAAO,KAAK,UAAU,KAAK,SAASD,GAAUC,CAAK;AAAA,EACvD;AAAA,EACA,cACID,GACAE,GACM;AACN,WAAOC,EAAK,UAAU,KAAK,SAASH,GAAUE,CAAO;AAAA,EACzD;AAAA,EAEA,OAAe,sBAAsBE,GAAoB;AACrD,IAAAA,IAAIA,KAAK;AACH,UAAAC,IAAQ,qBAAqB,KAAKD,CAAC;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