@skmtc/core 0.0.300 → 0.0.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/context/CoreContext.d.ts +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +3 -3
- package/esm/context/GenerateContext.d.ts +2 -2
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/ParseContext.d.ts +14 -6
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +28 -12
- package/esm/context/StackTrail.d.ts +3 -3
- package/esm/context/StackTrail.d.ts.map +1 -1
- package/esm/context/StackTrail.js +9 -1
- package/esm/helpers/tracer.d.ts +7 -0
- package/esm/helpers/tracer.d.ts.map +1 -0
- package/esm/helpers/tracer.js +6 -0
- package/esm/oas/array/Array.d.ts +2 -12
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +2 -4
- package/esm/oas/array/toArray.d.ts +3 -5
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +5 -7
- package/esm/oas/boolean/Boolean.d.ts +2 -12
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +2 -4
- package/esm/oas/boolean/toBoolean.d.ts +3 -5
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +3 -2
- package/esm/oas/components/Components.d.ts +2 -12
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +2 -4
- package/esm/oas/components/toComponentsV3.d.ts +3 -5
- package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
- package/esm/oas/components/toComponentsV3.js +10 -22
- package/esm/oas/discriminator/Discriminator.d.ts +2 -12
- package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/esm/oas/discriminator/Discriminator.js +2 -4
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts +3 -5
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/esm/oas/discriminator/toDiscriminatorV3.js +3 -2
- package/esm/oas/document/Document.d.ts +3 -12
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +20 -4
- package/esm/oas/document/toDocumentFieldsV3.d.ts +10 -0
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/esm/oas/document/toDocumentFieldsV3.js +17 -0
- package/esm/oas/example/Example.d.ts +2 -12
- package/esm/oas/example/Example.d.ts.map +1 -1
- package/esm/oas/example/Example.js +2 -4
- package/esm/oas/example/toExamplesV3.d.ts +6 -11
- package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
- package/esm/oas/example/toExamplesV3.js +18 -17
- package/esm/oas/header/Header.d.ts +2 -12
- package/esm/oas/header/Header.d.ts.map +1 -1
- package/esm/oas/header/Header.js +2 -4
- package/esm/oas/header/toHeadersV3.d.ts +3 -5
- package/esm/oas/header/toHeadersV3.d.ts.map +1 -1
- package/esm/oas/header/toHeadersV3.js +9 -12
- package/esm/oas/info/Info.d.ts +2 -12
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/info/Info.js +2 -4
- package/esm/oas/info/toInfoV3.d.ts +3 -5
- package/esm/oas/info/toInfoV3.d.ts.map +1 -1
- package/esm/oas/info/toInfoV3.js +3 -2
- package/esm/oas/integer/Integer.d.ts +2 -12
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +2 -4
- package/esm/oas/integer/toInteger.d.ts +3 -5
- package/esm/oas/integer/toInteger.d.ts.map +1 -1
- package/esm/oas/integer/toInteger.js +3 -2
- package/esm/oas/intersection/Intersection.d.ts +2 -12
- package/esm/oas/intersection/Intersection.d.ts.map +1 -1
- package/esm/oas/intersection/Intersection.js +2 -4
- package/esm/oas/intersection/toIntersection.d.ts +3 -5
- package/esm/oas/intersection/toIntersection.d.ts.map +1 -1
- package/esm/oas/intersection/toIntersection.js +6 -12
- package/esm/oas/mediaType/MediaType.d.ts +2 -12
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +2 -4
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts +7 -11
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.js +17 -19
- package/esm/oas/number/Number.d.ts +2 -12
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +2 -4
- package/esm/oas/number/toNumber.d.ts +3 -5
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +3 -2
- package/esm/oas/object/Object.d.ts +5 -15
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +16 -34
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts +3 -5
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/esm/oas/object/toAdditionalPropertiesV3.js +2 -6
- package/esm/oas/object/toObject.d.ts +3 -5
- package/esm/oas/object/toObject.d.ts.map +1 -1
- package/esm/oas/object/toObject.js +7 -10
- package/esm/oas/operation/Operation.d.ts +2 -12
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +3 -5
- package/esm/oas/operation/toOperationsV3.d.ts +5 -8
- package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/oas/operation/toOperationsV3.js +42 -53
- package/esm/oas/parameter/Parameter.d.ts +2 -12
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +3 -5
- package/esm/oas/parameter/toParameterV3.d.ts +7 -11
- package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/esm/oas/parameter/toParameterV3.js +18 -24
- package/esm/oas/pathItem/PathItem.d.ts +2 -12
- package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
- package/esm/oas/pathItem/PathItem.js +2 -4
- package/esm/oas/pathItem/toPathItemV3.d.ts +3 -5
- package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/esm/oas/pathItem/toPathItemV3.js +5 -7
- package/esm/oas/ref/Ref.d.ts +4 -12
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +10 -17
- package/esm/oas/ref/toRefV31.d.ts +3 -5
- package/esm/oas/ref/toRefV31.d.ts.map +1 -1
- package/esm/oas/ref/toRefV31.js +3 -2
- package/esm/oas/requestBody/RequestBody.d.ts +2 -12
- package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/esm/oas/requestBody/RequestBody.js +2 -4
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts +5 -8
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.js +9 -18
- package/esm/oas/response/Response.d.ts +2 -12
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +2 -4
- package/esm/oas/response/toResponseV3.d.ts +7 -11
- package/esm/oas/response/toResponseV3.d.ts.map +1 -1
- package/esm/oas/response/toResponseV3.js +11 -13
- package/esm/oas/schema/toSchemasV3.d.ts +9 -14
- package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/oas/schema/toSchemasV3.js +22 -24
- package/esm/oas/string/String.d.ts +2 -12
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +2 -4
- package/esm/oas/string/toString.d.ts +3 -5
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +3 -2
- package/esm/oas/tag/Tag.d.ts +2 -12
- package/esm/oas/tag/Tag.d.ts.map +1 -1
- package/esm/oas/tag/Tag.js +2 -4
- package/esm/oas/tag/toTagsV3.d.ts +8 -5
- package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
- package/esm/oas/tag/toTagsV3.js +11 -9
- package/esm/oas/union/Union.d.ts +2 -12
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +2 -4
- package/esm/oas/union/toUnion.d.ts +3 -5
- package/esm/oas/union/toUnion.d.ts.map +1 -1
- package/esm/oas/union/toUnion.js +6 -12
- package/esm/oas/unknown/Unknown.d.ts +2 -12
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +2 -4
- package/esm/oas/unknown/toUnknown.d.ts +3 -5
- package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
- package/esm/oas/unknown/toUnknown.js +3 -2
- package/esm/oas/void/Void.d.ts +3 -13
- package/esm/oas/void/Void.d.ts.map +1 -1
- package/esm/oas/void/Void.js +4 -12
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +3 -3
- package/script/context/GenerateContext.d.ts +2 -2
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/ParseContext.d.ts +14 -6
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +28 -12
- package/script/context/StackTrail.d.ts +3 -3
- package/script/context/StackTrail.d.ts.map +1 -1
- package/script/context/StackTrail.js +9 -1
- package/script/helpers/tracer.d.ts +7 -0
- package/script/helpers/tracer.d.ts.map +1 -0
- package/script/helpers/tracer.js +10 -0
- package/script/oas/array/Array.d.ts +2 -12
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +2 -4
- package/script/oas/array/toArray.d.ts +3 -5
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +5 -7
- package/script/oas/boolean/Boolean.d.ts +2 -12
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +2 -4
- package/script/oas/boolean/toBoolean.d.ts +3 -5
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +3 -2
- package/script/oas/components/Components.d.ts +2 -12
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +2 -4
- package/script/oas/components/toComponentsV3.d.ts +3 -5
- package/script/oas/components/toComponentsV3.d.ts.map +1 -1
- package/script/oas/components/toComponentsV3.js +10 -22
- package/script/oas/discriminator/Discriminator.d.ts +2 -12
- package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/script/oas/discriminator/Discriminator.js +2 -4
- package/script/oas/discriminator/toDiscriminatorV3.d.ts +3 -5
- package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/script/oas/discriminator/toDiscriminatorV3.js +3 -2
- package/script/oas/document/Document.d.ts +3 -12
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +20 -4
- package/script/oas/document/toDocumentFieldsV3.d.ts +10 -0
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/script/oas/document/toDocumentFieldsV3.js +21 -0
- package/script/oas/example/Example.d.ts +2 -12
- package/script/oas/example/Example.d.ts.map +1 -1
- package/script/oas/example/Example.js +2 -4
- package/script/oas/example/toExamplesV3.d.ts +6 -11
- package/script/oas/example/toExamplesV3.d.ts.map +1 -1
- package/script/oas/example/toExamplesV3.js +18 -17
- package/script/oas/header/Header.d.ts +2 -12
- package/script/oas/header/Header.d.ts.map +1 -1
- package/script/oas/header/Header.js +2 -4
- package/script/oas/header/toHeadersV3.d.ts +3 -5
- package/script/oas/header/toHeadersV3.d.ts.map +1 -1
- package/script/oas/header/toHeadersV3.js +9 -12
- package/script/oas/info/Info.d.ts +2 -12
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/info/Info.js +2 -4
- package/script/oas/info/toInfoV3.d.ts +3 -5
- package/script/oas/info/toInfoV3.d.ts.map +1 -1
- package/script/oas/info/toInfoV3.js +3 -2
- package/script/oas/integer/Integer.d.ts +2 -12
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +2 -4
- package/script/oas/integer/toInteger.d.ts +3 -5
- package/script/oas/integer/toInteger.d.ts.map +1 -1
- package/script/oas/integer/toInteger.js +3 -2
- package/script/oas/intersection/Intersection.d.ts +2 -12
- package/script/oas/intersection/Intersection.d.ts.map +1 -1
- package/script/oas/intersection/Intersection.js +2 -4
- package/script/oas/intersection/toIntersection.d.ts +3 -5
- package/script/oas/intersection/toIntersection.d.ts.map +1 -1
- package/script/oas/intersection/toIntersection.js +6 -12
- package/script/oas/mediaType/MediaType.d.ts +2 -12
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +2 -4
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts +7 -11
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/script/oas/mediaType/toMediaTypeItemV3.js +17 -19
- package/script/oas/number/Number.d.ts +2 -12
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +2 -4
- package/script/oas/number/toNumber.d.ts +3 -5
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +3 -2
- package/script/oas/object/Object.d.ts +5 -15
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +16 -34
- package/script/oas/object/toAdditionalPropertiesV3.d.ts +3 -5
- package/script/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/script/oas/object/toAdditionalPropertiesV3.js +2 -6
- package/script/oas/object/toObject.d.ts +3 -5
- package/script/oas/object/toObject.d.ts.map +1 -1
- package/script/oas/object/toObject.js +7 -10
- package/script/oas/operation/Operation.d.ts +2 -12
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +3 -5
- package/script/oas/operation/toOperationsV3.d.ts +5 -8
- package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/script/oas/operation/toOperationsV3.js +42 -53
- package/script/oas/parameter/Parameter.d.ts +2 -12
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +3 -5
- package/script/oas/parameter/toParameterV3.d.ts +7 -11
- package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/script/oas/parameter/toParameterV3.js +18 -24
- package/script/oas/pathItem/PathItem.d.ts +2 -12
- package/script/oas/pathItem/PathItem.d.ts.map +1 -1
- package/script/oas/pathItem/PathItem.js +2 -4
- package/script/oas/pathItem/toPathItemV3.d.ts +3 -5
- package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/script/oas/pathItem/toPathItemV3.js +5 -7
- package/script/oas/ref/Ref.d.ts +4 -12
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +10 -17
- package/script/oas/ref/toRefV31.d.ts +3 -5
- package/script/oas/ref/toRefV31.d.ts.map +1 -1
- package/script/oas/ref/toRefV31.js +3 -2
- package/script/oas/requestBody/RequestBody.d.ts +2 -12
- package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/script/oas/requestBody/RequestBody.js +2 -4
- package/script/oas/requestBody/toRequestBodiesV3.d.ts +5 -8
- package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.js +9 -18
- package/script/oas/response/Response.d.ts +2 -12
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +2 -4
- package/script/oas/response/toResponseV3.d.ts +7 -11
- package/script/oas/response/toResponseV3.d.ts.map +1 -1
- package/script/oas/response/toResponseV3.js +11 -13
- package/script/oas/schema/toSchemasV3.d.ts +9 -14
- package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/script/oas/schema/toSchemasV3.js +22 -24
- package/script/oas/string/String.d.ts +2 -12
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +2 -4
- package/script/oas/string/toString.d.ts +3 -5
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +3 -2
- package/script/oas/tag/Tag.d.ts +2 -12
- package/script/oas/tag/Tag.d.ts.map +1 -1
- package/script/oas/tag/Tag.js +2 -4
- package/script/oas/tag/toTagsV3.d.ts +8 -5
- package/script/oas/tag/toTagsV3.d.ts.map +1 -1
- package/script/oas/tag/toTagsV3.js +13 -10
- package/script/oas/union/Union.d.ts +2 -12
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +2 -4
- package/script/oas/union/toUnion.d.ts +3 -5
- package/script/oas/union/toUnion.d.ts.map +1 -1
- package/script/oas/union/toUnion.js +6 -12
- package/script/oas/unknown/Unknown.d.ts +2 -12
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +2 -4
- package/script/oas/unknown/toUnknown.d.ts +3 -5
- package/script/oas/unknown/toUnknown.d.ts.map +1 -1
- package/script/oas/unknown/toUnknown.js +3 -2
- package/script/oas/void/Void.d.ts +3 -13
- package/script/oas/void/Void.d.ts.map +1 -1
- package/script/oas/void/Void.js +4 -12
- package/esm/dsl/OasBase.d.ts +0 -15
- package/esm/dsl/OasBase.d.ts.map +0 -1
- package/esm/dsl/OasBase.js +0 -28
- package/esm/oas/document/toDocumentV3.d.ts +0 -12
- package/esm/oas/document/toDocumentV3.d.ts.map +0 -1
- package/esm/oas/document/toDocumentV3.js +0 -24
- package/script/dsl/OasBase.d.ts +0 -15
- package/script/dsl/OasBase.d.ts.map +0 -1
- package/script/dsl/OasBase.js +0 -32
- package/script/oas/document/toDocumentV3.d.ts +0 -12
- package/script/oas/document/toDocumentV3.d.ts.map +0 -1
- package/script/oas/document/toDocumentV3.js +0 -28
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasUnion_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasUnion = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasUnion {
|
|
17
|
+
constructor(fields) {
|
|
20
18
|
Object.defineProperty(this, "oasType", {
|
|
21
19
|
enumerable: true,
|
|
22
20
|
configurable: true,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasUnion } from './Union.js';
|
|
5
4
|
type ToUnionArgs = {
|
|
6
5
|
value: OpenAPIV3.SchemaObject;
|
|
7
6
|
members: (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
|
|
8
|
-
|
|
9
|
-
context: CoreContext;
|
|
7
|
+
context: ParseContext;
|
|
10
8
|
};
|
|
11
|
-
export declare const toUnion: ({ value, members,
|
|
9
|
+
export declare const toUnion: ({ value, members, context }: ToUnionArgs) => OasUnion;
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=toUnion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAoB,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKvD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,gCAAiC,WAAW,KAAG,QAkBlE,CAAA"}
|
|
@@ -4,23 +4,17 @@ exports.toUnion = void 0;
|
|
|
4
4
|
const Union_js_1 = require("./Union.js");
|
|
5
5
|
const toDiscriminatorV3_js_1 = require("../discriminator/toDiscriminatorV3.js");
|
|
6
6
|
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
7
|
-
const
|
|
7
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
8
|
+
const toUnion = ({ value, members, context }) => {
|
|
8
9
|
const { discriminator, title, description, nullable, ...skipped } = value;
|
|
10
|
+
context.logSkippedFields(skipped);
|
|
9
11
|
const fields = {
|
|
10
12
|
title,
|
|
11
13
|
description,
|
|
12
14
|
nullable,
|
|
13
|
-
discriminator: (0, toDiscriminatorV3_js_1.toDiscriminatorV3)({
|
|
14
|
-
|
|
15
|
-
trail: trail.add('oneOf').add('discriminator'),
|
|
16
|
-
context
|
|
17
|
-
}),
|
|
18
|
-
members: members.map((item, index) => (0, toSchemasV3_js_1.toSchemaV3)({
|
|
19
|
-
schema: item,
|
|
20
|
-
trail: trail.add('oneOf').add(`${index}`),
|
|
21
|
-
context
|
|
22
|
-
}))
|
|
15
|
+
discriminator: (0, tracer_js_1.tracer)(context, 'discriminator', () => (0, toDiscriminatorV3_js_1.toDiscriminatorV3)({ discriminator, context })),
|
|
16
|
+
members: members.map((schema, index) => (0, tracer_js_1.tracer)(context, index, () => (0, toSchemasV3_js_1.toSchemaV3)({ schema, context })))
|
|
23
17
|
};
|
|
24
|
-
return new Union_js_1.OasUnion(
|
|
18
|
+
return new Union_js_1.OasUnion(fields);
|
|
25
19
|
};
|
|
26
20
|
exports.toUnion = toUnion;
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
|
-
import type { Trail } from '../../context/Trail.js';
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
4
1
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
2
|
export type UnknownFields = {
|
|
6
3
|
title?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
};
|
|
9
|
-
|
|
10
|
-
fields: UnknownFields;
|
|
11
|
-
trail: Trail;
|
|
12
|
-
skipped: Record<string, unknown>;
|
|
13
|
-
context: CoreContext;
|
|
14
|
-
};
|
|
15
|
-
export declare class OasUnknown extends OasBase {
|
|
6
|
+
export declare class OasUnknown {
|
|
16
7
|
#private;
|
|
17
8
|
oasType: 'schema';
|
|
18
9
|
type: 'unknown';
|
|
19
|
-
constructor(
|
|
10
|
+
constructor(fields: UnknownFields);
|
|
20
11
|
get title(): string | undefined;
|
|
21
12
|
get description(): string | undefined;
|
|
22
13
|
isRef(): this is OasRef<'schema'>;
|
|
23
14
|
resolve(): OasUnknown;
|
|
24
15
|
resolveOnce(): OasUnknown;
|
|
25
16
|
}
|
|
26
|
-
export {};
|
|
27
17
|
//# sourceMappingURL=Unknown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/Unknown.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Unknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/Unknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,qBAAa,UAAU;;IACrB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,SAAS,CAAY;gBAGf,MAAM,EAAE,aAAa;IAIjC,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,UAAU;IAIrB,WAAW,IAAI,UAAU;CAG1B"}
|
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasUnknown_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasUnknown = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasUnknown {
|
|
17
|
+
constructor(fields) {
|
|
20
18
|
Object.defineProperty(this, "oasType", {
|
|
21
19
|
enumerable: true,
|
|
22
20
|
configurable: true,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasUnknown } from './Unknown.js';
|
|
5
4
|
type ToUnknownArgs = {
|
|
6
5
|
value: OpenAPIV3.NonArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toUnknown: ({ value,
|
|
8
|
+
export declare const toUnknown: ({ value, context }: ToUnknownArgs) => OasUnknown;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toUnknown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAsB,UAAU,EAAE,MAAM,cAAc,CAAA;AAE7D,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IAErC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAW7D,CAAA"}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toUnknown = void 0;
|
|
4
4
|
const Unknown_js_1 = require("./Unknown.js");
|
|
5
|
-
const toUnknown = ({ value,
|
|
5
|
+
const toUnknown = ({ value, context }) => {
|
|
6
6
|
const { type: _type, title, description, ...skipped } = value;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
7
8
|
const fields = {
|
|
8
9
|
title,
|
|
9
10
|
description
|
|
10
11
|
};
|
|
11
|
-
return new Unknown_js_1.OasUnknown(
|
|
12
|
+
return new Unknown_js_1.OasUnknown(fields);
|
|
12
13
|
};
|
|
13
14
|
exports.toUnknown = toUnknown;
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
|
-
import { Trail } from '../../context/Trail.js';
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
4
1
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
2
|
export type VoidFields = {
|
|
6
3
|
title?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
};
|
|
9
|
-
|
|
10
|
-
fields: VoidFields;
|
|
11
|
-
trail: Trail;
|
|
12
|
-
skipped: Record<string, unknown>;
|
|
13
|
-
context: CoreContext;
|
|
14
|
-
};
|
|
15
|
-
export declare class OasVoid extends OasBase {
|
|
6
|
+
export declare class OasVoid {
|
|
16
7
|
#private;
|
|
17
8
|
oasType: 'schema';
|
|
18
9
|
type: 'void';
|
|
19
|
-
constructor(
|
|
20
|
-
static empty(
|
|
10
|
+
constructor(fields?: VoidFields);
|
|
11
|
+
static empty(): OasVoid;
|
|
21
12
|
get title(): string | undefined;
|
|
22
13
|
get description(): string | undefined;
|
|
23
14
|
isRef(): this is OasRef<'schema'>;
|
|
24
15
|
resolve(): OasVoid;
|
|
25
16
|
resolveOnce(): OasVoid;
|
|
26
17
|
}
|
|
27
|
-
export {};
|
|
28
18
|
//# sourceMappingURL=Void.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Void.d.ts","sourceRoot":"","sources":["../../../src/oas/void/Void.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Void.d.ts","sourceRoot":"","sources":["../../../src/oas/void/Void.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,qBAAa,OAAO;;IAClB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,MAAM,CAAS;gBAGT,MAAM,GAAE,UAAe;IAInC,MAAM,CAAC,KAAK,IAAI,OAAO;IAIvB,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,OAAO;IAIlB,WAAW,IAAI,OAAO;CAGvB"}
|
package/script/oas/void/Void.js
CHANGED
|
@@ -13,11 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasVoid_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasVoid = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class OasVoid extends OasBase_js_1.OasBase {
|
|
19
|
-
constructor({ fields, trail, skipped, context }) {
|
|
20
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasVoid {
|
|
17
|
+
constructor(fields = {}) {
|
|
21
18
|
Object.defineProperty(this, "oasType", {
|
|
22
19
|
enumerable: true,
|
|
23
20
|
configurable: true,
|
|
@@ -33,13 +30,8 @@ class OasVoid extends OasBase_js_1.OasBase {
|
|
|
33
30
|
_OasVoid_fields.set(this, void 0);
|
|
34
31
|
__classPrivateFieldSet(this, _OasVoid_fields, fields, "f");
|
|
35
32
|
}
|
|
36
|
-
static empty(
|
|
37
|
-
return new OasVoid(
|
|
38
|
-
fields: {},
|
|
39
|
-
trail: new Trail_js_1.Trail(),
|
|
40
|
-
context,
|
|
41
|
-
skipped: {}
|
|
42
|
-
});
|
|
33
|
+
static empty() {
|
|
34
|
+
return new OasVoid();
|
|
43
35
|
}
|
|
44
36
|
get title() {
|
|
45
37
|
return __classPrivateFieldGet(this, _OasVoid_fields, "f").title;
|
package/esm/dsl/OasBase.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Trail } from '../context/Trail.js';
|
|
2
|
-
import type { CoreContext } from '../context/CoreContext.js';
|
|
3
|
-
type OasBaseArgs = {
|
|
4
|
-
trail: Trail;
|
|
5
|
-
skipped: Record<string, unknown>;
|
|
6
|
-
context: CoreContext;
|
|
7
|
-
};
|
|
8
|
-
export declare class OasBase {
|
|
9
|
-
trail: Trail;
|
|
10
|
-
context: CoreContext;
|
|
11
|
-
constructor({ trail, context, skipped }: OasBaseArgs);
|
|
12
|
-
logSkippedFields(skipped: Record<string, unknown>): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=OasBase.d.ts.map
|
package/esm/dsl/OasBase.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OasBase.d.ts","sourceRoot":"","sources":["../../src/dsl/OasBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,qBAAa,OAAO;IAClB,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;gBAER,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW;IAOpD,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAgBlD"}
|
package/esm/dsl/OasBase.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class OasBase {
|
|
2
|
-
constructor({ trail, context, skipped }) {
|
|
3
|
-
Object.defineProperty(this, "trail", {
|
|
4
|
-
enumerable: true,
|
|
5
|
-
configurable: true,
|
|
6
|
-
writable: true,
|
|
7
|
-
value: void 0
|
|
8
|
-
});
|
|
9
|
-
Object.defineProperty(this, "context", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: void 0
|
|
14
|
-
});
|
|
15
|
-
this.trail = trail;
|
|
16
|
-
this.context = context;
|
|
17
|
-
this.logSkippedFields(skipped);
|
|
18
|
-
}
|
|
19
|
-
logSkippedFields(skipped) {
|
|
20
|
-
if (this.context.phaseType !== 'parse') {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const { logger } = this.context;
|
|
24
|
-
Object.entries(skipped).forEach(([key, value]) => {
|
|
25
|
-
logger.warn(`Property not yet implemented. Please request from support if needed - ${JSON.stringify(value).slice(0, 30)}`, { trail: this.trail.add(key).toString() });
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
|
-
import { OasDocument } from './Document.js';
|
|
5
|
-
type ToDocumentV3Args = {
|
|
6
|
-
document: OpenAPIV3.Document;
|
|
7
|
-
trail: Trail;
|
|
8
|
-
context: CoreContext;
|
|
9
|
-
};
|
|
10
|
-
export declare const toDocumentV3: ({ document, trail, context }: ToDocumentV3Args) => OasDocument;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=toDocumentV3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toDocumentV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAI/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,iCAItB,gBAAgB,KAAG,WAoBrB,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { toTagsV3 } from '../tag/toTagsV3.js';
|
|
2
|
-
import { toOperationsV3 } from '../operation/toOperationsV3.js';
|
|
3
|
-
import { toComponentsV3 } from '../components/toComponentsV3.js';
|
|
4
|
-
import { OasDocument } from './Document.js';
|
|
5
|
-
import { toInfoV3 } from '../info/toInfoV3.js';
|
|
6
|
-
export const toDocumentV3 = ({ document, trail, context }) => {
|
|
7
|
-
const { openapi, info, paths, components, tags, ...skipped } = document;
|
|
8
|
-
const fields = {
|
|
9
|
-
openapi,
|
|
10
|
-
info: toInfoV3({ info, trail: trail.add('info'), context }),
|
|
11
|
-
operations: toOperationsV3({
|
|
12
|
-
paths,
|
|
13
|
-
trail: trail.add('paths'),
|
|
14
|
-
context
|
|
15
|
-
}),
|
|
16
|
-
components: toComponentsV3({
|
|
17
|
-
components,
|
|
18
|
-
trail: trail.add('components'),
|
|
19
|
-
context
|
|
20
|
-
}),
|
|
21
|
-
tags: toTagsV3({ tags, trail: trail.add('tags'), context })
|
|
22
|
-
};
|
|
23
|
-
return new OasDocument({ fields, trail, context, skipped });
|
|
24
|
-
};
|
package/script/dsl/OasBase.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Trail } from '../context/Trail.js';
|
|
2
|
-
import type { CoreContext } from '../context/CoreContext.js';
|
|
3
|
-
type OasBaseArgs = {
|
|
4
|
-
trail: Trail;
|
|
5
|
-
skipped: Record<string, unknown>;
|
|
6
|
-
context: CoreContext;
|
|
7
|
-
};
|
|
8
|
-
export declare class OasBase {
|
|
9
|
-
trail: Trail;
|
|
10
|
-
context: CoreContext;
|
|
11
|
-
constructor({ trail, context, skipped }: OasBaseArgs);
|
|
12
|
-
logSkippedFields(skipped: Record<string, unknown>): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=OasBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OasBase.d.ts","sourceRoot":"","sources":["../../src/dsl/OasBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,qBAAa,OAAO;IAClB,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;gBAER,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW;IAOpD,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAgBlD"}
|
package/script/dsl/OasBase.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OasBase = void 0;
|
|
4
|
-
class OasBase {
|
|
5
|
-
constructor({ trail, context, skipped }) {
|
|
6
|
-
Object.defineProperty(this, "trail", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true,
|
|
10
|
-
value: void 0
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(this, "context", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: void 0
|
|
17
|
-
});
|
|
18
|
-
this.trail = trail;
|
|
19
|
-
this.context = context;
|
|
20
|
-
this.logSkippedFields(skipped);
|
|
21
|
-
}
|
|
22
|
-
logSkippedFields(skipped) {
|
|
23
|
-
if (this.context.phaseType !== 'parse') {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const { logger } = this.context;
|
|
27
|
-
Object.entries(skipped).forEach(([key, value]) => {
|
|
28
|
-
logger.warn(`Property not yet implemented. Please request from support if needed - ${JSON.stringify(value).slice(0, 30)}`, { trail: this.trail.add(key).toString() });
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.OasBase = OasBase;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
|
-
import { OasDocument } from './Document.js';
|
|
5
|
-
type ToDocumentV3Args = {
|
|
6
|
-
document: OpenAPIV3.Document;
|
|
7
|
-
trail: Trail;
|
|
8
|
-
context: CoreContext;
|
|
9
|
-
};
|
|
10
|
-
export declare const toDocumentV3: ({ document, trail, context }: ToDocumentV3Args) => OasDocument;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=toDocumentV3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toDocumentV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAI/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,iCAItB,gBAAgB,KAAG,WAoBrB,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toDocumentV3 = void 0;
|
|
4
|
-
const toTagsV3_js_1 = require("../tag/toTagsV3.js");
|
|
5
|
-
const toOperationsV3_js_1 = require("../operation/toOperationsV3.js");
|
|
6
|
-
const toComponentsV3_js_1 = require("../components/toComponentsV3.js");
|
|
7
|
-
const Document_js_1 = require("./Document.js");
|
|
8
|
-
const toInfoV3_js_1 = require("../info/toInfoV3.js");
|
|
9
|
-
const toDocumentV3 = ({ document, trail, context }) => {
|
|
10
|
-
const { openapi, info, paths, components, tags, ...skipped } = document;
|
|
11
|
-
const fields = {
|
|
12
|
-
openapi,
|
|
13
|
-
info: (0, toInfoV3_js_1.toInfoV3)({ info, trail: trail.add('info'), context }),
|
|
14
|
-
operations: (0, toOperationsV3_js_1.toOperationsV3)({
|
|
15
|
-
paths,
|
|
16
|
-
trail: trail.add('paths'),
|
|
17
|
-
context
|
|
18
|
-
}),
|
|
19
|
-
components: (0, toComponentsV3_js_1.toComponentsV3)({
|
|
20
|
-
components,
|
|
21
|
-
trail: trail.add('components'),
|
|
22
|
-
context
|
|
23
|
-
}),
|
|
24
|
-
tags: (0, toTagsV3_js_1.toTagsV3)({ tags, trail: trail.add('tags'), context })
|
|
25
|
-
};
|
|
26
|
-
return new Document_js_1.OasDocument({ fields, trail, context, skipped });
|
|
27
|
-
};
|
|
28
|
-
exports.toDocumentV3 = toDocumentV3;
|