@skmtc/core 0.0.299 → 0.0.301
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 +7 -4
- package/esm/context/GenerateContext.d.ts +2 -2
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +1 -1
- package/esm/context/ParseContext.d.ts +12 -5
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +17 -10
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 +2 -8
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +2 -4
- package/esm/oas/document/toDocumentV3.d.ts +3 -5
- package/esm/oas/document/toDocumentV3.d.ts.map +1 -1
- package/esm/oas/document/toDocumentV3.js +8 -14
- package/esm/oas/example/Example.d.ts +2 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -11
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +9 -21
- 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 +6 -11
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +9 -11
- 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 -8
- 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 -8
- 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 +5 -10
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +9 -21
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -9
- package/esm/oas/void/Void.d.ts.map +1 -1
- package/esm/oas/void/Void.js +4 -10
- package/esm/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/esm/typescript/ReactRouterPathParams.js +3 -1
- 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 +7 -4
- package/script/context/GenerateContext.d.ts +2 -2
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +1 -1
- package/script/context/ParseContext.d.ts +12 -5
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +17 -10
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 +2 -8
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +2 -4
- package/script/oas/document/toDocumentV3.d.ts +3 -5
- package/script/oas/document/toDocumentV3.d.ts.map +1 -1
- package/script/oas/document/toDocumentV3.js +8 -14
- package/script/oas/example/Example.d.ts +2 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -11
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +9 -21
- 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 +6 -11
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +9 -11
- 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 -8
- 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 -8
- 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 +5 -10
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +9 -21
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -8
- 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 -9
- package/script/oas/void/Void.d.ts.map +1 -1
- package/script/oas/void/Void.js +4 -10
- package/script/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/script/typescript/ReactRouterPathParams.js +3 -1
- 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/script/dsl/OasBase.d.ts +0 -15
- package/script/dsl/OasBase.d.ts.map +0 -1
- package/script/dsl/OasBase.js +0 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../src/oas/array/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAoB,MAAM,YAAY,CAAA;AAEvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../src/oas/array/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAoB,MAAM,YAAY,CAAA;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,uBAAwB,WAAW,KAAG,QA4BzD,CAAA"}
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toArray = void 0;
|
|
4
4
|
const Array_js_1 = require("./Array.js");
|
|
5
5
|
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
6
|
-
const
|
|
6
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
7
|
+
const toArray = ({ value, context }) => {
|
|
7
8
|
const { type: _type, items, title, description, nullable, uniqueItems, ...skipped } = value;
|
|
9
|
+
context.logSkippedFields(skipped);
|
|
8
10
|
if (uniqueItems === true) {
|
|
9
11
|
throw new Error('uniqueItems is not supported');
|
|
10
12
|
}
|
|
@@ -13,12 +15,8 @@ const toArray = ({ value, trail, context }) => {
|
|
|
13
15
|
description,
|
|
14
16
|
nullable,
|
|
15
17
|
uniqueItems,
|
|
16
|
-
items: (0, toSchemasV3_js_1.toSchemaV3)({
|
|
17
|
-
schema: items,
|
|
18
|
-
trail: trail.add('items'),
|
|
19
|
-
context
|
|
20
|
-
})
|
|
18
|
+
items: (0, tracer_js_1.tracer)(context, 'items', () => (0, toSchemasV3_js_1.toSchemaV3)({ schema: items, context }))
|
|
21
19
|
};
|
|
22
|
-
return new Array_js_1.OasArray({ fields
|
|
20
|
+
return new Array_js_1.OasArray({ fields });
|
|
23
21
|
};
|
|
24
22
|
exports.toArray = toArray;
|
|
@@ -1,6 +1,3 @@
|
|
|
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 BooleanFields = {
|
|
6
3
|
title?: string;
|
|
@@ -9,15 +6,12 @@ export type BooleanFields = {
|
|
|
9
6
|
};
|
|
10
7
|
type ToBooleanV3Args = {
|
|
11
8
|
fields: BooleanFields;
|
|
12
|
-
trail: Trail;
|
|
13
|
-
skipped: Record<string, unknown>;
|
|
14
|
-
context: CoreContext;
|
|
15
9
|
};
|
|
16
|
-
export declare class OasBoolean
|
|
10
|
+
export declare class OasBoolean {
|
|
17
11
|
#private;
|
|
18
12
|
oasType: 'schema';
|
|
19
13
|
type: 'boolean';
|
|
20
|
-
constructor({ fields
|
|
14
|
+
constructor({ fields }: ToBooleanV3Args);
|
|
21
15
|
get title(): string | undefined;
|
|
22
16
|
get description(): string | undefined;
|
|
23
17
|
get nullable(): boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/Boolean.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/Boolean.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;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,qBAAa,UAAU;;IACrB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,SAAS,CAAY;gBAGf,EAAE,MAAM,EAAE,EAAE,eAAe;IAIvC,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;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 _OasBoolean_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasBoolean = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasBoolean {
|
|
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 { OasBoolean } from './Boolean.js';
|
|
5
4
|
type ToBooleanArgs = {
|
|
6
5
|
value: OpenAPIV3.NonArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toBoolean: ({ value,
|
|
8
|
+
export declare const toBoolean: ({ value, context }: ToBooleanArgs) => OasBoolean;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toBoolean.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toBoolean.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/toBoolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toBoolean.d.ts","sourceRoot":"","sources":["../../../src/oas/boolean/toBoolean.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;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAY7D,CAAA"}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toBoolean = void 0;
|
|
4
4
|
const Boolean_js_1 = require("./Boolean.js");
|
|
5
|
-
const toBoolean = ({ value,
|
|
5
|
+
const toBoolean = ({ value, context }) => {
|
|
6
6
|
const { type: _type, title, description, nullable, ...skipped } = value;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
7
8
|
const fields = {
|
|
8
9
|
nullable,
|
|
9
10
|
title,
|
|
10
11
|
description
|
|
11
12
|
};
|
|
12
|
-
return new Boolean_js_1.OasBoolean({ fields
|
|
13
|
+
return new Boolean_js_1.OasBoolean({ fields });
|
|
13
14
|
};
|
|
14
15
|
exports.toBoolean = toBoolean;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
2
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
1
|
import type { OasResponse } from '../response/Response.js';
|
|
5
2
|
import type { OasParameter } from '../parameter/Parameter.js';
|
|
6
3
|
import type { OasExample } from '../example/Example.js';
|
|
@@ -19,19 +16,16 @@ export type ComponentsFields = {
|
|
|
19
16
|
};
|
|
20
17
|
type ToComponentsV3Args = {
|
|
21
18
|
fields: ComponentsFields;
|
|
22
|
-
trail: Trail;
|
|
23
|
-
skipped: Record<string, unknown>;
|
|
24
|
-
context: CoreContext;
|
|
25
19
|
};
|
|
26
20
|
/** Container object for re-usable schema items within the API
|
|
27
21
|
*
|
|
28
22
|
* Fields not yet implemented: **securitySchemes**, **links**, **callbacks**
|
|
29
23
|
*/
|
|
30
|
-
export declare class OasComponents
|
|
24
|
+
export declare class OasComponents {
|
|
31
25
|
#private;
|
|
32
26
|
/** Static identifier property for OasComponents */
|
|
33
27
|
oasType: 'components';
|
|
34
|
-
constructor({ fields
|
|
28
|
+
constructor({ fields }: ToComponentsV3Args);
|
|
35
29
|
/** Record holding re-usable {@link OasSchema} objects or Refs */
|
|
36
30
|
get schemas(): Record<RefName, OasSchema | OasRef<'schema'>> | undefined;
|
|
37
31
|
/** Record holding re-usable {@link OasResponse} objects or Refs */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Components.d.ts","sourceRoot":"","sources":["../../../src/oas/components/Components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Components.d.ts","sourceRoot":"","sources":["../../../src/oas/components/Components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAA;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAA;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;CACxD,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAAA;AAED;;;GAGG;AACH,qBAAa,aAAa;;IACxB,mDAAmD;IACnD,OAAO,EAAE,YAAY,CAAe;gBAIxB,EAAE,MAAM,EAAE,EAAE,kBAAkB;IAI1C,kEAAkE;IAClE,IAAI,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAEvE;IAED,oEAAoE;IACpE,IAAI,SAAS,IACT,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GACjD,SAAS,CAEZ;IAED,qEAAqE;IACrE,IAAI,UAAU,IACV,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GACnD,SAAS,CAEZ;IAED,mEAAmE;IACnE,IAAI,QAAQ,IAAI,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAE1E;IAED,uEAAuE;IACvE,IAAI,aAAa,IACb,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GACvD,SAAS,CAEZ;IAED,kEAAkE;IAClE,IAAI,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAEvE;CACF"}
|
|
@@ -13,14 +13,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasComponents_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasComponents = void 0;
|
|
16
|
-
const OasBase_js_1 = require("../../dsl/OasBase.js");
|
|
17
16
|
/** Container object for re-usable schema items within the API
|
|
18
17
|
*
|
|
19
18
|
* Fields not yet implemented: **securitySchemes**, **links**, **callbacks**
|
|
20
19
|
*/
|
|
21
|
-
class OasComponents
|
|
22
|
-
constructor({ fields
|
|
23
|
-
super({ trail, skipped, context });
|
|
20
|
+
class OasComponents {
|
|
21
|
+
constructor({ fields }) {
|
|
24
22
|
/** Static identifier property for OasComponents */
|
|
25
23
|
Object.defineProperty(this, "oasType", {
|
|
26
24
|
enumerable: true,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasComponents } from './Components.js';
|
|
5
4
|
type ToComponentsV3Args = {
|
|
6
5
|
components: OpenAPIV3.ComponentsObject | undefined;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toComponentsV3: ({ components,
|
|
8
|
+
export declare const toComponentsV3: ({ components, context }: ToComponentsV3Args) => OasComponents | undefined;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toComponentsV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/components/toComponentsV3.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/components/toComponentsV3.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAI/C,KAAK,kBAAkB,GAAG;IACxB,UAAU,EAAE,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,4BAGxB,kBAAkB,KAAG,aAAa,GAAG,SA0CvC,CAAA"}
|
|
@@ -8,41 +8,29 @@ const toParameterV3_js_1 = require("../parameter/toParameterV3.js");
|
|
|
8
8
|
const toExamplesV3_js_1 = require("../example/toExamplesV3.js");
|
|
9
9
|
const toRequestBodiesV3_js_1 = require("../requestBody/toRequestBodiesV3.js");
|
|
10
10
|
const Components_js_1 = require("./Components.js");
|
|
11
|
-
const
|
|
11
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
12
|
+
const toComponentsV3 = ({ components, context }) => {
|
|
12
13
|
if (!components) {
|
|
13
14
|
return undefined;
|
|
14
15
|
}
|
|
15
16
|
const { schemas, responses, parameters, examples, requestBodies, headers, ...skipped } = components;
|
|
17
|
+
context.logSkippedFields(skipped);
|
|
16
18
|
const fields = {
|
|
17
|
-
schemas: (0, toSchemasV3_js_1.toOptionalSchemasV3)({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
context
|
|
21
|
-
}),
|
|
22
|
-
responses: (0, toResponseV3_js_1.toOptionalResponsesV3)({
|
|
23
|
-
responses,
|
|
24
|
-
trail: trail.add('responses'),
|
|
25
|
-
context
|
|
26
|
-
}),
|
|
27
|
-
parameters: (0, toParameterV3_js_1.toOptionalParametersV3)({
|
|
19
|
+
schemas: (0, tracer_js_1.tracer)(context, 'schemas', () => (0, toSchemasV3_js_1.toOptionalSchemasV3)({ schemas, context })),
|
|
20
|
+
responses: (0, tracer_js_1.tracer)(context, 'responses', () => (0, toResponseV3_js_1.toOptionalResponsesV3)({ responses, context })),
|
|
21
|
+
parameters: (0, tracer_js_1.tracer)(context, 'parameters', () => (0, toParameterV3_js_1.toOptionalParametersV3)({
|
|
28
22
|
parameters,
|
|
29
|
-
trail: trail.add('parameters'),
|
|
30
23
|
context
|
|
31
|
-
}),
|
|
24
|
+
})),
|
|
32
25
|
examples: (0, toExamplesV3_js_1.toExamplesV3)({
|
|
33
26
|
examples,
|
|
34
27
|
example: undefined,
|
|
35
28
|
exampleKey: 'TEMP',
|
|
36
|
-
trail: trail.add('examples'),
|
|
37
|
-
context
|
|
38
|
-
}),
|
|
39
|
-
requestBodies: (0, toRequestBodiesV3_js_1.toRequestBodiesV3)({
|
|
40
|
-
requestBodies,
|
|
41
|
-
trail: trail.add('requestBodies'),
|
|
42
29
|
context
|
|
43
30
|
}),
|
|
44
|
-
|
|
31
|
+
requestBodies: (0, tracer_js_1.tracer)(context, 'requestBodies', () => (0, toRequestBodiesV3_js_1.toRequestBodiesV3)({ requestBodies, context })),
|
|
32
|
+
headers: (0, tracer_js_1.tracer)(context, 'headers', () => (0, toHeadersV3_js_1.toHeadersV3)({ headers, context }))
|
|
45
33
|
};
|
|
46
|
-
return new Components_js_1.OasComponents({ fields
|
|
34
|
+
return new Components_js_1.OasComponents({ fields });
|
|
47
35
|
};
|
|
48
36
|
exports.toComponentsV3 = toComponentsV3;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
1
|
export type DiscriminatorFields = {
|
|
5
2
|
propertyName: string;
|
|
6
3
|
};
|
|
7
4
|
type ToDiscriminatorV3Args = {
|
|
8
5
|
fields: DiscriminatorFields;
|
|
9
|
-
trail: Trail;
|
|
10
|
-
skipped: Record<string, unknown>;
|
|
11
|
-
context: CoreContext;
|
|
12
6
|
};
|
|
13
|
-
export declare class OasDiscriminator
|
|
7
|
+
export declare class OasDiscriminator {
|
|
14
8
|
#private;
|
|
15
9
|
oasType: 'discriminator';
|
|
16
|
-
constructor({ fields
|
|
10
|
+
constructor({ fields }: ToDiscriminatorV3Args);
|
|
17
11
|
get propertyName(): string;
|
|
18
12
|
}
|
|
19
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Discriminator.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/Discriminator.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Discriminator.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/Discriminator.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,mBAAmB,CAAA;CAC5B,CAAA;AAED,qBAAa,gBAAgB;;IAC3B,OAAO,EAAE,eAAe,CAAkB;gBAG9B,EAAE,MAAM,EAAE,EAAE,qBAAqB;IAI7C,IAAI,YAAY,IAAI,MAAM,CAEzB;CACF"}
|
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasDiscriminator_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasDiscriminator = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasDiscriminator {
|
|
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 { Trail } from '../../context/Trail.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasDiscriminator } from './Discriminator.js';
|
|
5
4
|
type ToDiscriminatorV3Args = {
|
|
6
5
|
discriminator: OpenAPIV3.DiscriminatorObject | undefined;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toDiscriminatorV3: ({ discriminator,
|
|
8
|
+
export declare const toDiscriminatorV3: ({ discriminator, context }: ToDiscriminatorV3Args) => OasDiscriminator | undefined;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toDiscriminatorV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toDiscriminatorV3.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/toDiscriminatorV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toDiscriminatorV3.d.ts","sourceRoot":"","sources":["../../../src/oas/discriminator/toDiscriminatorV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,mBAAmB,GAAG,SAAS,CAAA;IACxD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,gBAAgB,GAAG,SAc7C,CAAA"}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toDiscriminatorV3 = void 0;
|
|
4
4
|
const Discriminator_js_1 = require("./Discriminator.js");
|
|
5
|
-
const toDiscriminatorV3 = ({ discriminator,
|
|
5
|
+
const toDiscriminatorV3 = ({ discriminator, context }) => {
|
|
6
6
|
if (!discriminator) {
|
|
7
7
|
return undefined;
|
|
8
8
|
}
|
|
9
9
|
const { propertyName, ...skipped } = discriminator;
|
|
10
|
+
context.logSkippedFields(skipped);
|
|
10
11
|
const fields = {
|
|
11
12
|
propertyName
|
|
12
13
|
};
|
|
13
|
-
return new Discriminator_js_1.OasDiscriminator({ fields
|
|
14
|
+
return new Discriminator_js_1.OasDiscriminator({ fields });
|
|
14
15
|
};
|
|
15
16
|
exports.toDiscriminatorV3 = toDiscriminatorV3;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
2
|
-
import type { Trail } from '../../context/Trail.js';
|
|
3
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
4
1
|
import type { OasTag } from '../tag/Tag.js';
|
|
5
2
|
import type { OasComponents } from '../components/Components.js';
|
|
6
3
|
import type { OasOperation } from '../operation/Operation.js';
|
|
@@ -14,16 +11,13 @@ export type DocumentFields = {
|
|
|
14
11
|
};
|
|
15
12
|
type ToDocumentV3Args = {
|
|
16
13
|
fields: DocumentFields;
|
|
17
|
-
trail: Trail;
|
|
18
|
-
skipped: Record<string, unknown>;
|
|
19
|
-
context: CoreContext;
|
|
20
14
|
};
|
|
21
15
|
/** Top level document object describing the API */
|
|
22
|
-
export declare class OasDocument
|
|
16
|
+
export declare class OasDocument {
|
|
23
17
|
#private;
|
|
24
18
|
/** Static identifier property for OasDocument */
|
|
25
19
|
oasType: 'openapi';
|
|
26
|
-
constructor({ fields
|
|
20
|
+
constructor({ fields }: ToDocumentV3Args);
|
|
27
21
|
/** OpenAPI specification version */
|
|
28
22
|
get openapi(): string;
|
|
29
23
|
/** API metadata */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../../src/oas/document/Document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../../src/oas/document/Document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,EAAE,YAAY,EAAE,CAAA;IAC1B,UAAU,EAAE,aAAa,GAAG,SAAS,CAAA;IACrC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,cAAc,CAAA;CACvB,CAAA;AAED,mDAAmD;AACnD,qBAAa,WAAW;;IACtB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAY;gBAIlB,EAAE,MAAM,EAAE,EAAE,gBAAgB;IAIxC,oCAAoC;IACpC,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,mBAAmB;IACnB,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,yCAAyC;IACzC,IAAI,UAAU,IAAI,YAAY,EAAE,CAE/B;IAED,iEAAiE;IACjE,IAAI,UAAU,IAAI,aAAa,GAAG,SAAS,CAE1C;IAED,wDAAwD;IACxD,IAAI,IAAI,IAAI,MAAM,EAAE,GAAG,SAAS,CAE/B;CACF"}
|
|
@@ -13,11 +13,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasDocument_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasDocument = void 0;
|
|
16
|
-
const OasBase_js_1 = require("../../dsl/OasBase.js");
|
|
17
16
|
/** Top level document object describing the API */
|
|
18
|
-
class OasDocument
|
|
19
|
-
constructor({ fields
|
|
20
|
-
super({ trail, skipped, context });
|
|
17
|
+
class OasDocument {
|
|
18
|
+
constructor({ fields }) {
|
|
21
19
|
/** Static identifier property for OasDocument */
|
|
22
20
|
Object.defineProperty(this, "oasType", {
|
|
23
21
|
enumerable: true,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasDocument } from './Document.js';
|
|
5
4
|
type ToDocumentV3Args = {
|
|
6
5
|
document: OpenAPIV3.Document;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toDocumentV3: ({ document,
|
|
8
|
+
export declare const toDocumentV3: ({ document, context }: ToDocumentV3Args) => OasDocument;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toDocumentV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAkBrB,CAAA"}
|
|
@@ -6,23 +6,17 @@ const toOperationsV3_js_1 = require("../operation/toOperationsV3.js");
|
|
|
6
6
|
const toComponentsV3_js_1 = require("../components/toComponentsV3.js");
|
|
7
7
|
const Document_js_1 = require("./Document.js");
|
|
8
8
|
const toInfoV3_js_1 = require("../info/toInfoV3.js");
|
|
9
|
-
const
|
|
9
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
10
|
+
const toDocumentV3 = ({ document, context }) => {
|
|
10
11
|
const { openapi, info, paths, components, tags, ...skipped } = document;
|
|
12
|
+
context.logSkippedFields(skipped);
|
|
11
13
|
const fields = {
|
|
12
14
|
openapi,
|
|
13
|
-
info: (0,
|
|
14
|
-
operations: (0, toOperationsV3_js_1.toOperationsV3)({
|
|
15
|
-
|
|
16
|
-
|
|
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 })
|
|
15
|
+
info: (0, tracer_js_1.tracer)(context, 'info', () => (0, toInfoV3_js_1.toInfoV3)({ info, context })),
|
|
16
|
+
operations: (0, tracer_js_1.tracer)(context, 'paths', () => (0, toOperationsV3_js_1.toOperationsV3)({ paths, context })),
|
|
17
|
+
components: (0, tracer_js_1.tracer)(context, 'components', () => (0, toComponentsV3_js_1.toComponentsV3)({ components, context })),
|
|
18
|
+
tags: (0, tracer_js_1.tracer)(context, 'tags', () => (0, toTagsV3_js_1.toTagsV3)({ tags, context }))
|
|
25
19
|
};
|
|
26
|
-
return new Document_js_1.OasDocument({ fields
|
|
20
|
+
return new Document_js_1.OasDocument({ fields });
|
|
27
21
|
};
|
|
28
22
|
exports.toDocumentV3 = toDocumentV3;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
1
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
2
|
export type ExampleFields = {
|
|
6
3
|
summary: string | undefined;
|
|
@@ -9,16 +6,13 @@ export type ExampleFields = {
|
|
|
9
6
|
};
|
|
10
7
|
type ToExampleV3Args = {
|
|
11
8
|
fields: ExampleFields;
|
|
12
|
-
trail: Trail;
|
|
13
|
-
context: CoreContext;
|
|
14
|
-
skipped: Record<string, unknown>;
|
|
15
9
|
};
|
|
16
10
|
/** Provides example data represented by schema */
|
|
17
|
-
export declare class OasExample
|
|
11
|
+
export declare class OasExample {
|
|
18
12
|
#private;
|
|
19
13
|
/** Static identifier property for OasExample */
|
|
20
14
|
oasType: 'example';
|
|
21
|
-
constructor({ fields
|
|
15
|
+
constructor({ fields }: ToExampleV3Args);
|
|
22
16
|
/** Brief summary of example */
|
|
23
17
|
get summary(): string | undefined;
|
|
24
18
|
/** Detailed description of the example. May contain CommonMark Markdown */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Example.d.ts","sourceRoot":"","sources":["../../../src/oas/example/Example.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Example.d.ts","sourceRoot":"","sources":["../../../src/oas/example/Example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,kDAAkD;AAClD,qBAAa,UAAU;;IACrB,gDAAgD;IAChD,OAAO,EAAE,SAAS,CAAY;gBAIlB,EAAE,MAAM,EAAE,EAAE,eAAe;IAIvC,+BAA+B;IAC/B,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAEhC;IAED,2EAA2E;IAC3E,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,6BAA6B;IAE7B,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,4CAA4C;IAC5C,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC;IAIlC,qBAAqB;IACrB,OAAO,IAAI,UAAU;IAIrB,WAAW,IAAI,UAAU;CAG1B"}
|
|
@@ -13,11 +13,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasExample_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasExample = void 0;
|
|
16
|
-
const OasBase_js_1 = require("../../dsl/OasBase.js");
|
|
17
16
|
/** Provides example data represented by schema */
|
|
18
|
-
class OasExample
|
|
19
|
-
constructor({ fields
|
|
20
|
-
super({ trail, skipped, context });
|
|
17
|
+
class OasExample {
|
|
18
|
+
constructor({ fields }) {
|
|
21
19
|
/** Static identifier property for OasExample */
|
|
22
20
|
Object.defineProperty(this, "oasType", {
|
|
23
21
|
enumerable: true,
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
2
2
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
-
import type { Trail } from '../../context/Trail.js';
|
|
4
3
|
import { OasExample } from './Example.js';
|
|
5
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
5
|
type ToExampleSimpleV3Args = {
|
|
7
6
|
example: unknown;
|
|
8
|
-
trail: Trail;
|
|
9
|
-
context: CoreContext;
|
|
10
7
|
};
|
|
11
|
-
export declare const toExampleSimpleV3: ({ example
|
|
8
|
+
export declare const toExampleSimpleV3: ({ example }: ToExampleSimpleV3Args) => OasExample | OasRef<"example">;
|
|
12
9
|
export type ToExamplesV3Args = {
|
|
13
10
|
example: OpenAPIV3.ExampleObject | undefined;
|
|
14
11
|
examples: Record<string, OpenAPIV3.ExampleObject | OpenAPIV3.ReferenceObject> | undefined;
|
|
15
12
|
exampleKey: string;
|
|
16
|
-
|
|
17
|
-
context: CoreContext;
|
|
13
|
+
context: ParseContext;
|
|
18
14
|
};
|
|
19
|
-
export declare const toExamplesV3: ({ example, examples, exampleKey,
|
|
15
|
+
export declare const toExamplesV3: ({ example, examples, exampleKey, context }: ToExamplesV3Args) => Record<string, OasExample | OasRef<"example">> | undefined;
|
|
20
16
|
type ToExampleV3Args = {
|
|
21
17
|
example: OpenAPIV3.ExampleObject | OpenAPIV3.ReferenceObject;
|
|
22
|
-
|
|
23
|
-
context: CoreContext;
|
|
18
|
+
context: ParseContext;
|
|
24
19
|
};
|
|
25
|
-
export declare const toExampleV3: ({ example,
|
|
20
|
+
export declare const toExampleV3: ({ example, context }: ToExampleV3Args) => OasExample | OasRef<"example">;
|
|
26
21
|
export {};
|
|
27
22
|
//# sourceMappingURL=toExamplesV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toExamplesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/example/toExamplesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toExamplesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/example/toExamplesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,iBAAiB,gBAE3B,qBAAqB,KAAG,UAAU,GAAG,MAAM,CAAC,SAAS,CAQvD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,QAAQ,EACJ,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC,eAAe,CAAC,GACnE,SAAS,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,+CAKtB,gBAAgB,KACf,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAC9C,SA6BH,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC,eAAe,CAAA;IAC5D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,WAAW,yBAGrB,eAAe,KAAG,UAAU,GAAG,MAAM,CAAC,SAAS,CAgBjD,CAAA"}
|
|
@@ -4,48 +4,49 @@ exports.toExampleV3 = exports.toExamplesV3 = exports.toExampleSimpleV3 = void 0;
|
|
|
4
4
|
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
5
5
|
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
6
6
|
const Example_js_1 = require("./Example.js");
|
|
7
|
-
const
|
|
7
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
8
|
+
const toExampleSimpleV3 = ({ example }) => {
|
|
8
9
|
const fields = {
|
|
9
10
|
value: example,
|
|
10
11
|
summary: undefined,
|
|
11
12
|
description: undefined
|
|
12
13
|
};
|
|
13
|
-
return new Example_js_1.OasExample({ fields
|
|
14
|
+
return new Example_js_1.OasExample({ fields });
|
|
14
15
|
};
|
|
15
16
|
exports.toExampleSimpleV3 = toExampleSimpleV3;
|
|
16
|
-
const toExamplesV3 = ({ example, examples, exampleKey,
|
|
17
|
+
const toExamplesV3 = ({ example, examples, exampleKey, context }) => {
|
|
17
18
|
if (example && examples) {
|
|
18
|
-
context.logger.warn(
|
|
19
|
-
trail: trail.toString(),
|
|
20
|
-
message: `Both example and examples are defined for ${exampleKey}`
|
|
21
|
-
}));
|
|
19
|
+
context.logger.warn(`Both example and examples are defined for ${exampleKey}`);
|
|
22
20
|
}
|
|
23
21
|
if (example) {
|
|
24
22
|
return {
|
|
25
|
-
[exampleKey]: (0,
|
|
23
|
+
[exampleKey]: (0, tracer_js_1.tracer)(context, 'example', () => (0, exports.toExampleSimpleV3)({ example }))
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
if (examples) {
|
|
29
|
-
|
|
30
|
-
return [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
(0, tracer_js_1.tracer)(context, 'examples', () => {
|
|
28
|
+
return Object.fromEntries(Object.entries(examples).map(([key, value]) => {
|
|
29
|
+
return [
|
|
30
|
+
key,
|
|
31
|
+
(0, tracer_js_1.tracer)(context, key, () => (0, exports.toExampleV3)({ example: value, context }))
|
|
32
|
+
];
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
35
35
|
}
|
|
36
36
|
return undefined;
|
|
37
37
|
};
|
|
38
38
|
exports.toExamplesV3 = toExamplesV3;
|
|
39
|
-
const toExampleV3 = ({ example,
|
|
39
|
+
const toExampleV3 = ({ example, context }) => {
|
|
40
40
|
if ((0, refFns_js_1.isRef)(example)) {
|
|
41
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: example, refType: 'example',
|
|
41
|
+
return (0, toRefV31_js_1.toRefV31)({ ref: example, refType: 'example', context });
|
|
42
42
|
}
|
|
43
43
|
const { summary, description, value, ...skipped } = example;
|
|
44
|
+
context.logSkippedFields(skipped);
|
|
44
45
|
const fields = {
|
|
45
46
|
summary,
|
|
46
47
|
description,
|
|
47
48
|
value
|
|
48
49
|
};
|
|
49
|
-
return new Example_js_1.OasExample({ fields
|
|
50
|
+
return new Example_js_1.OasExample({ fields });
|
|
50
51
|
};
|
|
51
52
|
exports.toExampleV3 = toExampleV3;
|