UNPKG

openapi3-ts

Version:

TS Model & utils for OpenAPI 3.x specification.

1 lines 25.5 kB
{"version":3,"file":"oas31.mjs","names":[],"sources":["../src/dsl/openapi-builder31.ts","../src/model/openapi31.ts","../src/oas31.ts"],"sourcesContent":["import * as yaml from 'yaml';\r\nimport * as oa from '../model/openapi31';\r\n\r\n// Internal DSL for building an OpenAPI 3.1.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.1.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 = this.rootDoc.paths || {};\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 addWebhook(webhook: string, webhookItem: oa.PathItemObject): OpenApiBuilder {\r\n this.rootDoc.webhooks ??= {};\r\n this.rootDoc.webhooks[webhook] = webhookItem;\r\n return this;\r\n }\r\n}","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\n// Typed interfaces for OpenAPI 3.1.0\r\n// see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.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 /** Webhooks added in v. 3.1.0 */\r\n webhooks?: PathsObject;\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 identifier?: 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 pathItems?: { [pathItem: string]: PathItemObject | 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.1.0.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(\r\n pathsObject: PathsObject | undefined,\r\n path: string\r\n): PathItemObject | undefined {\r\n if (SpecificationExtension.isValidExtension(path)) {\r\n return undefined;\r\n }\r\n return pathsObject ? (pathsObject[path] as PathItemObject) : undefined;\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.1.0.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.1.0.md#style-values\r\n */\r\nexport type ParameterStyle =\r\n | 'matrix'\r\n | 'label'\r\n | 'form'\r\n | 'simple'\r\n | 'spaceDelimited'\r\n | 'pipeDelimited'\r\n | '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 summary?: string;\r\n description?: 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'\r\n | 'number'\r\n | 'string'\r\n | 'boolean'\r\n | 'object'\r\n | 'null'\r\n | 'array';\r\n\r\nexport interface SchemaObject extends ISpecificationExtension {\r\n $ref?: string,\r\n discriminator?: DiscriminatorObject;\r\n readOnly?: boolean;\r\n writeOnly?: boolean;\r\n xml?: XmlObject;\r\n externalDocs?: ExternalDocumentationObject;\r\n /** @deprecated use examples instead */\r\n example?: any;\r\n examples?: any[];\r\n deprecated?: boolean;\r\n\r\n type?: SchemaObjectType | SchemaObjectType[];\r\n format?:\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 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 propertyNames?: SchemaObject | ReferenceObject;\r\n description?: string;\r\n default?: any;\r\n\r\n title?: string;\r\n multipleOf?: number;\r\n maximum?: number;\r\n const?: any;\r\n /** @desc In OpenAPI 3.1: number */\r\n exclusiveMaximum?: number;\r\n minimum?: number;\r\n /** @desc In OpenAPI 3.1: number */\r\n exclusiveMinimum?: number;\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 prefixItems?: (SchemaObject | ReferenceObject)[];\r\n /** \r\n * @desc JSON Schema compliant Content-Type, optional when specified as a key of ContentObject\r\n * @example image/png\r\n */\r\n contentMediaType?: string;\r\n /**\r\n * @desc Specifies the Content-Encoding for the schema, supports all encodings from RFC4648, and \"quoted-printable\" from RFC2045\r\n * @override format\r\n * @see https://datatracker.ietf.org/doc/html/rfc4648\r\n * @see https://datatracker.ietf.org/doc/html/rfc2045#section-6.7\r\n * @example base64\r\n */\r\n contentEncoding?: string; \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-builder31';\nexport * from './model/openapi31';\nexport { Server, ServerVariable } from './model/server';\nexport type { IExtensionName, IExtensionType, ISpecificationExtension } 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,GACA,GACM;EACN,OAAO,EAAK,UAAU,KAAK,SAAS,GAAU,CAAO;CACzD;CAEA,OAAe,sBAAsB,GAAoB;EACrD,MAAS;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