UNPKG

openapi3-ts

Version:

TS Model & utils for OpenAPI 3.x specification.

1 lines 23.7 kB
{"version":3,"file":"oas30.mjs","names":[],"sources":["../src/dsl/openapi-builder30.ts","../src/model/openapi30.ts","../src/oas30.ts"],"sourcesContent":["import * as yaml from 'yaml';\nimport * as oa from '../model/openapi30';\n\n// Internal DSL for building an OpenAPI 3.0.x contract\n// using a fluent interface\n\nexport class OpenApiBuilder {\n rootDoc: oa.OpenAPIObject;\n\n static create(doc?: oa.OpenAPIObject): OpenApiBuilder {\n return new OpenApiBuilder(doc);\n }\n\n constructor(doc?: oa.OpenAPIObject) {\n this.rootDoc = doc || {\n openapi: '3.0.0',\n info: {\n title: 'app',\n version: 'version'\n },\n paths: {},\n components: {\n schemas: {},\n responses: {},\n parameters: {},\n examples: {},\n requestBodies: {},\n headers: {},\n securitySchemes: {},\n links: {},\n callbacks: {}\n },\n tags: [],\n servers: []\n };\n }\n\n getSpec(): oa.OpenAPIObject {\n return this.rootDoc;\n }\n\n getSpecAsJson(\n replacer?: (key: string, value: unknown) => unknown,\n space?: string | number\n ): string {\n return JSON.stringify(this.rootDoc, replacer, space);\n }\n getSpecAsYaml(\n replacer?: Parameters<typeof yaml.stringify>[1],\n options?: Parameters<typeof yaml.stringify>[2]\n ): string {\n return yaml.stringify(this.rootDoc, replacer, options);\n }\n\n private static isValidOpenApiVersion(v: string): boolean {\n v = v || '';\n const match = /(\\d+)\\.(\\d+).(\\d+)/.exec(v);\n if (match) {\n const major = parseInt(match[1], 10);\n if (major >= 3) {\n return true;\n }\n }\n return false;\n }\n\n addOpenApiVersion(openApiVersion: string): OpenApiBuilder {\n if (!OpenApiBuilder.isValidOpenApiVersion(openApiVersion)) {\n throw new Error(\n 'Invalid OpenApi version: ' + openApiVersion + '. Follow convention: 3.x.y'\n );\n }\n this.rootDoc.openapi = openApiVersion;\n return this;\n }\n addInfo(info: oa.InfoObject): OpenApiBuilder {\n this.rootDoc.info = info;\n return this;\n }\n addContact(contact: oa.ContactObject): OpenApiBuilder {\n this.rootDoc.info.contact = contact;\n return this;\n }\n addLicense(license: oa.LicenseObject): OpenApiBuilder {\n this.rootDoc.info.license = license;\n return this;\n }\n addTitle(title: string): OpenApiBuilder {\n this.rootDoc.info.title = title;\n return this;\n }\n addDescription(description: string): OpenApiBuilder {\n this.rootDoc.info.description = description;\n return this;\n }\n addTermsOfService(termsOfService: string): OpenApiBuilder {\n this.rootDoc.info.termsOfService = termsOfService;\n return this;\n }\n addVersion(version: string): OpenApiBuilder {\n this.rootDoc.info.version = version;\n return this;\n }\n addPath(path: string, pathItem: oa.PathItemObject): OpenApiBuilder {\n this.rootDoc.paths[path] = { ...(this.rootDoc.paths[path] || {}), ...pathItem };\n return this;\n }\n addSchema(name: string, schema: oa.SchemaObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.schemas = this.rootDoc.components.schemas || {};\n this.rootDoc.components.schemas[name] = schema;\n return this;\n }\n addResponse(name: string, response: oa.ResponseObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.responses = this.rootDoc.components.responses || {};\n this.rootDoc.components.responses[name] = response;\n return this;\n }\n addParameter(name: string, parameter: oa.ParameterObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.parameters = this.rootDoc.components.parameters || {};\n this.rootDoc.components.parameters[name] = parameter;\n return this;\n }\n addExample(name: string, example: oa.ExampleObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.examples = this.rootDoc.components.examples || {};\n this.rootDoc.components.examples[name] = example;\n return this;\n }\n addRequestBody(\n name: string,\n reqBody: oa.RequestBodyObject | oa.ReferenceObject\n ): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.requestBodies = this.rootDoc.components.requestBodies || {};\n this.rootDoc.components.requestBodies[name] = reqBody;\n return this;\n }\n addHeader(name: string, header: oa.HeaderObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.headers = this.rootDoc.components.headers || {};\n this.rootDoc.components.headers[name] = header;\n return this;\n }\n addSecurityScheme(\n name: string,\n secScheme: oa.SecuritySchemeObject | oa.ReferenceObject\n ): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.securitySchemes = this.rootDoc.components.securitySchemes || {};\n this.rootDoc.components.securitySchemes[name] = secScheme;\n return this;\n }\n addLink(name: string, link: oa.LinkObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.links = this.rootDoc.components.links || {};\n this.rootDoc.components.links[name] = link;\n return this;\n }\n addCallback(name: string, callback: oa.CallbackObject | oa.ReferenceObject): OpenApiBuilder {\n this.rootDoc.components = this.rootDoc.components || {};\n this.rootDoc.components.callbacks = this.rootDoc.components.callbacks || {};\n this.rootDoc.components.callbacks[name] = callback;\n return this;\n }\n addServer(server: oa.ServerObject): OpenApiBuilder {\n this.rootDoc.servers = this.rootDoc.servers || [];\n this.rootDoc.servers.push(server);\n return this;\n }\n addTag(tag: oa.TagObject): OpenApiBuilder {\n this.rootDoc.tags = this.rootDoc.tags || [];\n this.rootDoc.tags.push(tag);\n return this;\n }\n addExternalDocs(extDoc: oa.ExternalDocumentationObject): OpenApiBuilder {\n this.rootDoc.externalDocs = extDoc;\n return this;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\n// Typed interfaces for OpenAPI 3.0.3\r\n// see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md\r\n\r\nimport { ServerObject } from './oas-common';\r\nimport { ISpecificationExtension, SpecificationExtension } from './specification-extension';\r\n\r\nexport * from './oas-common';\r\nexport type { ISpecificationExtension, SpecificationExtension } from './specification-extension';\r\n\r\nexport interface OpenAPIObject extends ISpecificationExtension {\r\n openapi: string;\r\n info: InfoObject;\r\n servers?: ServerObject[];\r\n paths: PathsObject;\r\n components?: ComponentsObject;\r\n security?: SecurityRequirementObject[];\r\n tags?: TagObject[];\r\n externalDocs?: ExternalDocumentationObject;\r\n}\r\nexport interface InfoObject extends ISpecificationExtension {\r\n title: string;\r\n description?: string;\r\n termsOfService?: string;\r\n contact?: ContactObject;\r\n license?: LicenseObject;\r\n version: string;\r\n}\r\nexport interface ContactObject extends ISpecificationExtension {\r\n name?: string;\r\n url?: string;\r\n email?: string;\r\n}\r\nexport interface LicenseObject extends ISpecificationExtension {\r\n name: string;\r\n url?: string;\r\n}\r\n\r\nexport interface ComponentsObject extends ISpecificationExtension {\r\n schemas?: { [schema: string]: SchemaObject | ReferenceObject };\r\n responses?: { [response: string]: ResponseObject | ReferenceObject };\r\n parameters?: { [parameter: string]: ParameterObject | ReferenceObject };\r\n examples?: { [example: string]: ExampleObject | ReferenceObject };\r\n requestBodies?: { [request: string]: RequestBodyObject | ReferenceObject };\r\n headers?: { [header: string]: HeaderObject | ReferenceObject };\r\n securitySchemes?: { [securityScheme: string]: SecuritySchemeObject | ReferenceObject };\r\n links?: { [link: string]: LinkObject | ReferenceObject };\r\n callbacks?: { [callback: string]: CallbackObject | ReferenceObject };\r\n}\r\n\r\n/**\r\n * Rename it to Paths Object to be consistent with the spec\r\n * See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#pathsObject\r\n */\r\nexport interface PathsObject extends ISpecificationExtension {\r\n // [path: string]: PathItemObject;\r\n [path: string]: PathItemObject;\r\n}\r\n\r\n/**\r\n * @deprecated\r\n * Create a type alias for backward compatibility\r\n */\r\nexport type PathObject = PathsObject;\r\n\r\nexport function getPath(pathsObject: PathsObject, path: string): PathItemObject | undefined {\r\n if (SpecificationExtension.isValidExtension(path)) {\r\n return undefined;\r\n }\r\n return pathsObject[path] as PathItemObject;\r\n}\r\n\r\nexport interface PathItemObject extends ISpecificationExtension {\r\n $ref?: string;\r\n summary?: string;\r\n description?: string;\r\n get?: OperationObject;\r\n put?: OperationObject;\r\n post?: OperationObject;\r\n delete?: OperationObject;\r\n options?: OperationObject;\r\n head?: OperationObject;\r\n patch?: OperationObject;\r\n trace?: OperationObject;\r\n servers?: ServerObject[];\r\n parameters?: (ParameterObject | ReferenceObject)[];\r\n}\r\nexport interface OperationObject extends ISpecificationExtension {\r\n tags?: string[];\r\n summary?: string;\r\n description?: string;\r\n externalDocs?: ExternalDocumentationObject;\r\n operationId?: string;\r\n parameters?: (ParameterObject | ReferenceObject)[];\r\n requestBody?: RequestBodyObject | ReferenceObject;\r\n responses: ResponsesObject;\r\n callbacks?: CallbacksObject;\r\n deprecated?: boolean;\r\n security?: SecurityRequirementObject[];\r\n servers?: ServerObject[];\r\n}\r\nexport interface ExternalDocumentationObject extends ISpecificationExtension {\r\n description?: string;\r\n url: string;\r\n}\r\n\r\n/**\r\n * The location of a parameter.\r\n * Possible values are \"query\", \"header\", \"path\" or \"cookie\".\r\n * Specification:\r\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-locations\r\n */\r\nexport type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';\r\n\r\n/**\r\n * The style of a parameter.\r\n * Describes how the parameter value will be serialized.\r\n * (serialization is not implemented yet)\r\n * Specification:\r\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#style-values\r\n */\r\nexport type ParameterStyle =\r\n 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';\r\n\r\nexport interface BaseParameterObject extends ISpecificationExtension {\r\n description?: string;\r\n required?: boolean;\r\n deprecated?: boolean;\r\n allowEmptyValue?: boolean;\r\n\r\n style?: ParameterStyle; // \"matrix\" | \"label\" | \"form\" | \"simple\" | \"spaceDelimited\" | \"pipeDelimited\" | \"deepObject\";\r\n explode?: boolean;\r\n allowReserved?: boolean;\r\n schema?: SchemaObject | ReferenceObject;\r\n examples?: { [param: string]: ExampleObject | ReferenceObject };\r\n example?: any;\r\n content?: ContentObject;\r\n}\r\n\r\nexport interface ParameterObject extends BaseParameterObject {\r\n name: string;\r\n in: ParameterLocation; // \"query\" | \"header\" | \"path\" | \"cookie\";\r\n}\r\nexport interface RequestBodyObject extends ISpecificationExtension {\r\n description?: string;\r\n content: ContentObject;\r\n required?: boolean;\r\n}\r\nexport interface ContentObject {\r\n [mediatype: string]: MediaTypeObject;\r\n}\r\nexport interface MediaTypeObject extends ISpecificationExtension {\r\n schema?: SchemaObject | ReferenceObject;\r\n examples?: ExamplesObject;\r\n example?: any;\r\n encoding?: EncodingObject;\r\n}\r\nexport interface EncodingObject extends ISpecificationExtension {\r\n // [property: string]: EncodingPropertyObject;\r\n [property: string]: EncodingPropertyObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface EncodingPropertyObject {\r\n contentType?: string;\r\n headers?: { [key: string]: HeaderObject | ReferenceObject };\r\n style?: string;\r\n explode?: boolean;\r\n allowReserved?: boolean;\r\n [key: string]: any; // (any) = Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ResponsesObject extends ISpecificationExtension {\r\n default?: ResponseObject | ReferenceObject;\r\n\r\n // [statuscode: string]: ResponseObject | ReferenceObject;\r\n [statuscode: string]: ResponseObject | ReferenceObject | any; // (any) = Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ResponseObject extends ISpecificationExtension {\r\n description: string;\r\n headers?: HeadersObject;\r\n content?: ContentObject;\r\n links?: LinksObject;\r\n}\r\nexport interface CallbacksObject extends ISpecificationExtension {\r\n // [name: string]: CallbackObject | ReferenceObject;\r\n [name: string]: CallbackObject | ReferenceObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface CallbackObject extends ISpecificationExtension {\r\n // [name: string]: PathItemObject;\r\n [name: string]: PathItemObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface HeadersObject {\r\n [name: string]: HeaderObject | ReferenceObject;\r\n}\r\nexport interface ExampleObject {\r\n summary?: string;\r\n description?: string;\r\n value?: any;\r\n externalValue?: string;\r\n [property: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface LinksObject {\r\n [name: string]: LinkObject | ReferenceObject;\r\n}\r\nexport interface LinkObject extends ISpecificationExtension {\r\n operationRef?: string;\r\n operationId?: string;\r\n parameters?: LinkParametersObject;\r\n requestBody?: any | string;\r\n description?: string;\r\n server?: ServerObject;\r\n [property: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface LinkParametersObject {\r\n [name: string]: any | string;\r\n}\r\n\r\nexport interface HeaderObject extends BaseParameterObject {\r\n $ref?: string;\r\n}\r\nexport interface TagObject extends ISpecificationExtension {\r\n name: string;\r\n description?: string;\r\n externalDocs?: ExternalDocumentationObject;\r\n [extension: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ExamplesObject {\r\n [name: string]: ExampleObject | ReferenceObject;\r\n}\r\n\r\nexport interface ReferenceObject {\r\n $ref: string;\r\n}\r\n\r\n/**\r\n * A type guard to check if the given value is a `ReferenceObject`.\r\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\r\n *\r\n * @param obj The value to check.\r\n */\r\nexport function isReferenceObject(obj: any): obj is ReferenceObject {\r\n return Object.prototype.hasOwnProperty.call(obj, '$ref');\r\n}\r\n\r\nexport type SchemaObjectType =\r\n 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';\r\n\r\nexport type SchemaObjectFormat =\r\n | 'int32'\r\n | 'int64'\r\n | 'float'\r\n | 'double'\r\n | 'byte'\r\n | 'binary'\r\n | 'date'\r\n | 'date-time'\r\n | 'password'\r\n | string;\r\n\r\nexport interface SchemaObject extends ISpecificationExtension {\r\n nullable?: boolean;\r\n discriminator?: DiscriminatorObject;\r\n readOnly?: boolean;\r\n writeOnly?: boolean;\r\n xml?: XmlObject;\r\n externalDocs?: ExternalDocumentationObject;\r\n example?: any;\r\n examples?: any[];\r\n deprecated?: boolean;\r\n\r\n type?: SchemaObjectType | SchemaObjectType[];\r\n format?: SchemaObjectFormat;\r\n allOf?: (SchemaObject | ReferenceObject)[];\r\n oneOf?: (SchemaObject | ReferenceObject)[];\r\n anyOf?: (SchemaObject | ReferenceObject)[];\r\n not?: SchemaObject | ReferenceObject;\r\n items?: SchemaObject | ReferenceObject;\r\n properties?: { [propertyName: string]: SchemaObject | ReferenceObject };\r\n additionalProperties?: SchemaObject | ReferenceObject | boolean;\r\n description?: string;\r\n default?: any;\r\n\r\n title?: string;\r\n multipleOf?: number;\r\n maximum?: number;\r\n /** @desc In OpenAPI 3.0: boolean*/\r\n exclusiveMaximum?: boolean;\r\n minimum?: number;\r\n /** @desc In OpenAPI 3.0: boolean */\r\n exclusiveMinimum?: boolean;\r\n maxLength?: number;\r\n minLength?: number;\r\n pattern?: string;\r\n maxItems?: number;\r\n minItems?: number;\r\n uniqueItems?: boolean;\r\n maxProperties?: number;\r\n minProperties?: number;\r\n required?: string[];\r\n enum?: any[];\r\n}\r\n\r\n/**\r\n * A type guard to check if the given object is a `SchemaObject`.\r\n * Useful to distinguish from `ReferenceObject` values that can be used\r\n * in most places where `SchemaObject` is allowed.\r\n *\r\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\r\n *\r\n * @param schema The value to check.\r\n */\r\nexport function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject {\r\n return !Object.prototype.hasOwnProperty.call(schema, '$ref');\r\n}\r\n\r\nexport interface SchemasObject {\r\n [schema: string]: SchemaObject;\r\n}\r\n\r\nexport interface DiscriminatorObject {\r\n propertyName: string;\r\n mapping?: { [key: string]: string };\r\n}\r\n\r\nexport interface XmlObject extends ISpecificationExtension {\r\n name?: string;\r\n namespace?: string;\r\n prefix?: string;\r\n attribute?: boolean;\r\n wrapped?: boolean;\r\n}\r\nexport type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';\r\n\r\nexport interface SecuritySchemeObject extends ISpecificationExtension {\r\n type: SecuritySchemeType;\r\n description?: string;\r\n name?: string; // required only for apiKey\r\n in?: string; // required only for apiKey\r\n scheme?: string; // required only for http\r\n bearerFormat?: string;\r\n flows?: OAuthFlowsObject; // required only for oauth2\r\n openIdConnectUrl?: string; // required only for openIdConnect\r\n}\r\nexport interface OAuthFlowsObject extends ISpecificationExtension {\r\n implicit?: OAuthFlowObject;\r\n password?: OAuthFlowObject;\r\n clientCredentials?: OAuthFlowObject;\r\n authorizationCode?: OAuthFlowObject;\r\n}\r\nexport interface OAuthFlowObject extends ISpecificationExtension {\r\n authorizationUrl?: string;\r\n tokenUrl?: string;\r\n refreshUrl?: string;\r\n scopes: ScopesObject;\r\n}\r\nexport interface ScopesObject extends ISpecificationExtension {\r\n [scope: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface SecurityRequirementObject {\r\n [name: string]: string[];\r\n}\r\n","export * from './dsl/openapi-builder30';\nexport * from './model/openapi30';\nexport { Server, ServerVariable } from './model/server';\nexport type {\n IExtensionName,\n IExtensionType,\n ISpecificationExtension\n} from './model/specification-extension';\n"],"mappings":";;;AAMA,IAAa,IAAb,MAAa,EAAe;CAGxB,OAAO,OAAO,GAAwC;EAClD,OAAO,IAAI,EAAe,CAAG;CACjC;CAEA,YAAY,GAAwB;EAChC,KAAK,UAAU,KAAO;GAClB,SAAS;GACT,MAAM;IACF,OAAO;IACP,SAAS;GACb;GACA,OAAO,CAAC;GACR,YAAY;IACR,SAAS,CAAC;IACV,WAAW,CAAC;IACZ,YAAY,CAAC;IACb,UAAU,CAAC;IACX,eAAe,CAAC;IAChB,SAAS,CAAC;IACV,iBAAiB,CAAC;IAClB,OAAO,CAAC;IACR,WAAW,CAAC;GAChB;GACA,MAAM,CAAC;GACP,SAAS,CAAC;EACd;CACJ;CAEA,UAA4B;EACxB,OAAO,KAAK;CAChB;CAEA,cACI,GACA,GACM;EACN,OAAO,KAAK,UAAU,KAAK,SAAS,GAAU,CAAK;CACvD;CACA,cACI,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