@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type StackTrailHandler = {
|
|
2
|
+
appendStackTrailChunk: (chunk: string | string[] | number) => void;
|
|
3
|
+
removeStackTrailChunk: (chunk: string | string[] | number) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const tracer: <T>(context: StackTrailHandler, chunk: string | string[] | number, fn: () => T) => T;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tracer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/helpers/tracer.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG;IACvB,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,KAAK,IAAI,CAAA;IAClE,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,KAAK,IAAI,CAAA;CACnE,CAAA;AAED,eAAO,MAAM,MAAM,GAAI,CAAC,WACb,iBAAiB,SACnB,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,MAC7B,MAAM,CAAC,MASZ,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tracer = void 0;
|
|
4
|
+
const tracer = (context, chunk, fn) => {
|
|
5
|
+
context.appendStackTrailChunk(chunk);
|
|
6
|
+
const result = fn();
|
|
7
|
+
context.removeStackTrailChunk(chunk);
|
|
8
|
+
return result;
|
|
9
|
+
};
|
|
10
|
+
exports.tracer = tracer;
|
|
@@ -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 { OasSchema } from '../schema/Schema.js';
|
|
5
2
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
3
|
export type ArrayFields = {
|
|
@@ -10,17 +7,11 @@ export type ArrayFields = {
|
|
|
10
7
|
nullable?: boolean;
|
|
11
8
|
uniqueItems?: boolean;
|
|
12
9
|
};
|
|
13
|
-
|
|
14
|
-
fields: ArrayFields;
|
|
15
|
-
trail: Trail;
|
|
16
|
-
skipped: Record<string, unknown>;
|
|
17
|
-
context: CoreContext;
|
|
18
|
-
};
|
|
19
|
-
export declare class OasArray extends OasBase {
|
|
10
|
+
export declare class OasArray {
|
|
20
11
|
#private;
|
|
21
12
|
oasType: 'schema';
|
|
22
13
|
type: 'array';
|
|
23
|
-
constructor(
|
|
14
|
+
constructor(fields: ArrayFields);
|
|
24
15
|
get items(): OasSchema | OasRef<'schema'>;
|
|
25
16
|
get title(): string | undefined;
|
|
26
17
|
get description(): string | undefined;
|
|
@@ -30,5 +21,4 @@ export declare class OasArray extends OasBase {
|
|
|
30
21
|
resolve(): OasArray;
|
|
31
22
|
resolveOnce(): OasArray;
|
|
32
23
|
}
|
|
33
|
-
export {};
|
|
34
24
|
//# sourceMappingURL=Array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,qBAAa,QAAQ;;IACnB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,OAAO,CAAU;gBAGX,MAAM,EAAE,WAAW;IAI/B,IAAI,KAAK,IAAI,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAExC;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;IAED,IAAI,WAAW,IAAI,OAAO,GAAG,SAAS,CAErC;IAED,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,QAAQ;IAInB,WAAW,IAAI,QAAQ;CAGxB"}
|
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasArray_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasArray = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasArray {
|
|
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
2
|
import { OasArray } from './Array.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
3
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
5
4
|
type ToArrayArgs = {
|
|
6
5
|
value: OpenAPIV3.ArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toArray: ({ value,
|
|
8
|
+
export declare const toArray: ({ value, context }: ToArrayArgs) => OasArray;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toArray.d.ts.map
|
|
@@ -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(
|
|
20
|
+
return new Array_js_1.OasArray(fields);
|
|
23
21
|
};
|
|
24
22
|
exports.toArray = toArray;
|
|
@@ -1,23 +1,14 @@
|
|
|
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;
|
|
7
4
|
description?: string;
|
|
8
5
|
nullable?: boolean;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
fields: BooleanFields;
|
|
12
|
-
trail: Trail;
|
|
13
|
-
skipped: Record<string, unknown>;
|
|
14
|
-
context: CoreContext;
|
|
15
|
-
};
|
|
16
|
-
export declare class OasBoolean extends OasBase {
|
|
7
|
+
export declare class OasBoolean {
|
|
17
8
|
#private;
|
|
18
9
|
oasType: 'schema';
|
|
19
10
|
type: 'boolean';
|
|
20
|
-
constructor(
|
|
11
|
+
constructor(fields: BooleanFields);
|
|
21
12
|
get title(): string | undefined;
|
|
22
13
|
get description(): string | undefined;
|
|
23
14
|
get nullable(): boolean | undefined;
|
|
@@ -25,5 +16,4 @@ export declare class OasBoolean extends OasBase {
|
|
|
25
16
|
resolve(): OasBoolean;
|
|
26
17
|
resolveOnce(): OasBoolean;
|
|
27
18
|
}
|
|
28
|
-
export {};
|
|
29
19
|
//# sourceMappingURL=Boolean.d.ts.map
|
|
@@ -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,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,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(
|
|
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';
|
|
@@ -17,21 +14,15 @@ export type ComponentsFields = {
|
|
|
17
14
|
requestBodies?: Record<RefName, OasRequestBody | OasRef<'requestBody'>>;
|
|
18
15
|
headers?: Record<RefName, OasHeader | OasRef<'header'>>;
|
|
19
16
|
};
|
|
20
|
-
type ToComponentsV3Args = {
|
|
21
|
-
fields: ComponentsFields;
|
|
22
|
-
trail: Trail;
|
|
23
|
-
skipped: Record<string, unknown>;
|
|
24
|
-
context: CoreContext;
|
|
25
|
-
};
|
|
26
17
|
/** Container object for re-usable schema items within the API
|
|
27
18
|
*
|
|
28
19
|
* Fields not yet implemented: **securitySchemes**, **links**, **callbacks**
|
|
29
20
|
*/
|
|
30
|
-
export declare class OasComponents
|
|
21
|
+
export declare class OasComponents {
|
|
31
22
|
#private;
|
|
32
23
|
/** Static identifier property for OasComponents */
|
|
33
24
|
oasType: 'components';
|
|
34
|
-
constructor(
|
|
25
|
+
constructor(fields: ComponentsFields);
|
|
35
26
|
/** Record holding re-usable {@link OasSchema} objects or Refs */
|
|
36
27
|
get schemas(): Record<RefName, OasSchema | OasRef<'schema'>> | undefined;
|
|
37
28
|
/** Record holding re-usable {@link OasResponse} objects or Refs */
|
|
@@ -45,5 +36,4 @@ export declare class OasComponents extends OasBase {
|
|
|
45
36
|
/** Record holding re-usable {@link OasHeader} objects or Refs */
|
|
46
37
|
get headers(): Record<RefName, OasHeader | OasRef<'header'>> | undefined;
|
|
47
38
|
}
|
|
48
|
-
export {};
|
|
49
39
|
//# sourceMappingURL=Components.d.ts.map
|
|
@@ -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;;;GAGG;AACH,qBAAa,aAAa;;IACxB,mDAAmD;IACnD,OAAO,EAAE,YAAY,CAAe;gBAIxB,MAAM,EAAE,gBAAgB;IAIpC,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(
|
|
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(
|
|
34
|
+
return new Components_js_1.OasComponents(fields);
|
|
47
35
|
};
|
|
48
36
|
exports.toComponentsV3 = toComponentsV3;
|
|
@@ -1,20 +1,10 @@
|
|
|
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
|
-
|
|
8
|
-
fields: DiscriminatorFields;
|
|
9
|
-
trail: Trail;
|
|
10
|
-
skipped: Record<string, unknown>;
|
|
11
|
-
context: CoreContext;
|
|
12
|
-
};
|
|
13
|
-
export declare class OasDiscriminator extends OasBase {
|
|
4
|
+
export declare class OasDiscriminator {
|
|
14
5
|
#private;
|
|
15
6
|
oasType: 'discriminator';
|
|
16
|
-
constructor(
|
|
7
|
+
constructor(fields: DiscriminatorFields);
|
|
17
8
|
get propertyName(): string;
|
|
18
9
|
}
|
|
19
|
-
export {};
|
|
20
10
|
//# sourceMappingURL=Discriminator.d.ts.map
|
|
@@ -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,qBAAa,gBAAgB;;IAC3B,OAAO,EAAE,eAAe,CAAkB;gBAG9B,MAAM,EAAE,mBAAmB;IAIvC,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(
|
|
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';
|
|
@@ -12,18 +9,13 @@ export type DocumentFields = {
|
|
|
12
9
|
components: OasComponents | undefined;
|
|
13
10
|
tags: OasTag[] | undefined;
|
|
14
11
|
};
|
|
15
|
-
type ToDocumentV3Args = {
|
|
16
|
-
fields: DocumentFields;
|
|
17
|
-
trail: Trail;
|
|
18
|
-
skipped: Record<string, unknown>;
|
|
19
|
-
context: CoreContext;
|
|
20
|
-
};
|
|
21
12
|
/** Top level document object describing the API */
|
|
22
|
-
export declare class OasDocument
|
|
13
|
+
export declare class OasDocument {
|
|
23
14
|
#private;
|
|
24
15
|
/** Static identifier property for OasDocument */
|
|
25
16
|
oasType: 'openapi';
|
|
26
|
-
constructor(
|
|
17
|
+
constructor(fields?: DocumentFields);
|
|
18
|
+
set fields(fields: DocumentFields);
|
|
27
19
|
/** OpenAPI specification version */
|
|
28
20
|
get openapi(): string;
|
|
29
21
|
/** API metadata */
|
|
@@ -35,5 +27,4 @@ export declare class OasDocument extends OasBase {
|
|
|
35
27
|
/** List of tags used by API with additional metadata */
|
|
36
28
|
get tags(): OasTag[] | undefined;
|
|
37
29
|
}
|
|
38
|
-
export {};
|
|
39
30
|
//# sourceMappingURL=Document.d.ts.map
|
|
@@ -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,mDAAmD;AACnD,qBAAa,WAAW;;IACtB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAY;gBAIlB,MAAM,CAAC,EAAE,cAAc;IAInC,IAAI,MAAM,CAAC,MAAM,EAAE,cAAc,EAEhC;IAED,oCAAoC;IACpC,IAAI,OAAO,IAAI,MAAM,CAMpB;IAED,mBAAmB;IACnB,IAAI,IAAI,IAAI,OAAO,CAMlB;IAED,yCAAyC;IACzC,IAAI,UAAU,IAAI,YAAY,EAAE,CAM/B;IAED,iEAAiE;IACjE,IAAI,UAAU,IAAI,aAAa,GAAG,SAAS,CAM1C;IAED,wDAAwD;IACxD,IAAI,IAAI,IAAI,MAAM,EAAE,GAAG,SAAS,CAM/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(
|
|
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,
|
|
@@ -29,24 +27,42 @@ class OasDocument extends OasBase_js_1.OasBase {
|
|
|
29
27
|
_OasDocument_fields.set(this, void 0);
|
|
30
28
|
__classPrivateFieldSet(this, _OasDocument_fields, fields, "f");
|
|
31
29
|
}
|
|
30
|
+
set fields(fields) {
|
|
31
|
+
__classPrivateFieldSet(this, _OasDocument_fields, fields, "f");
|
|
32
|
+
}
|
|
32
33
|
/** OpenAPI specification version */
|
|
33
34
|
get openapi() {
|
|
35
|
+
if (!__classPrivateFieldGet(this, _OasDocument_fields, "f")) {
|
|
36
|
+
throw new Error(`Accessing 'openapi' before fields are set`);
|
|
37
|
+
}
|
|
34
38
|
return __classPrivateFieldGet(this, _OasDocument_fields, "f").openapi;
|
|
35
39
|
}
|
|
36
40
|
/** API metadata */
|
|
37
41
|
get info() {
|
|
42
|
+
if (!__classPrivateFieldGet(this, _OasDocument_fields, "f")) {
|
|
43
|
+
throw new Error(`Accessing 'info' before fields are set`);
|
|
44
|
+
}
|
|
38
45
|
return __classPrivateFieldGet(this, _OasDocument_fields, "f").info;
|
|
39
46
|
}
|
|
40
47
|
/** List of all operations for the API */
|
|
41
48
|
get operations() {
|
|
49
|
+
if (!__classPrivateFieldGet(this, _OasDocument_fields, "f")) {
|
|
50
|
+
throw new Error(`Accessing 'operations' before fields are set`);
|
|
51
|
+
}
|
|
42
52
|
return __classPrivateFieldGet(this, _OasDocument_fields, "f").operations;
|
|
43
53
|
}
|
|
44
54
|
/** Container object for re-usable schema items within the API */
|
|
45
55
|
get components() {
|
|
56
|
+
if (!__classPrivateFieldGet(this, _OasDocument_fields, "f")) {
|
|
57
|
+
throw new Error(`Accessing 'components' before fields are set`);
|
|
58
|
+
}
|
|
46
59
|
return __classPrivateFieldGet(this, _OasDocument_fields, "f").components;
|
|
47
60
|
}
|
|
48
61
|
/** List of tags used by API with additional metadata */
|
|
49
62
|
get tags() {
|
|
63
|
+
if (!__classPrivateFieldGet(this, _OasDocument_fields, "f")) {
|
|
64
|
+
throw new Error(`Accessing 'tags' before fields are set`);
|
|
65
|
+
}
|
|
50
66
|
return __classPrivateFieldGet(this, _OasDocument_fields, "f").tags;
|
|
51
67
|
}
|
|
52
68
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
3
|
+
import type { DocumentFields } from './Document.js';
|
|
4
|
+
type ToDocumentV3Args = {
|
|
5
|
+
document: OpenAPIV3.Document;
|
|
6
|
+
context: ParseContext;
|
|
7
|
+
};
|
|
8
|
+
export declare const toDocumentFieldsV3: ({ document, context }: ToDocumentV3Args) => DocumentFields;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=toDocumentFieldsV3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,0BAG5B,gBAAgB,KAAG,cAkBrB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toDocumentFieldsV3 = 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 toInfoV3_js_1 = require("../info/toInfoV3.js");
|
|
8
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
9
|
+
const toDocumentFieldsV3 = ({ document, context }) => {
|
|
10
|
+
const { openapi, info, paths, components, tags, ...skipped } = document;
|
|
11
|
+
context.logSkippedFields(skipped);
|
|
12
|
+
const fields = {
|
|
13
|
+
openapi,
|
|
14
|
+
info: (0, tracer_js_1.tracer)(context, 'info', () => (0, toInfoV3_js_1.toInfoV3)({ info, context })),
|
|
15
|
+
operations: (0, tracer_js_1.tracer)(context, 'paths', () => (0, toOperationsV3_js_1.toOperationsV3)({ paths, context })),
|
|
16
|
+
components: (0, tracer_js_1.tracer)(context, 'components', () => (0, toComponentsV3_js_1.toComponentsV3)({ components, context })),
|
|
17
|
+
tags: (0, tracer_js_1.tracer)(context, 'tags', () => (0, toTagsV3_js_1.toTagsV3)({ tags, context }))
|
|
18
|
+
};
|
|
19
|
+
return fields;
|
|
20
|
+
};
|
|
21
|
+
exports.toDocumentFieldsV3 = toDocumentFieldsV3;
|
|
@@ -1,24 +1,15 @@
|
|
|
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;
|
|
7
4
|
description: string | undefined;
|
|
8
5
|
value: unknown;
|
|
9
6
|
};
|
|
10
|
-
type ToExampleV3Args = {
|
|
11
|
-
fields: ExampleFields;
|
|
12
|
-
trail: Trail;
|
|
13
|
-
context: CoreContext;
|
|
14
|
-
skipped: Record<string, unknown>;
|
|
15
|
-
};
|
|
16
7
|
/** Provides example data represented by schema */
|
|
17
|
-
export declare class OasExample
|
|
8
|
+
export declare class OasExample {
|
|
18
9
|
#private;
|
|
19
10
|
/** Static identifier property for OasExample */
|
|
20
11
|
oasType: 'example';
|
|
21
|
-
constructor(
|
|
12
|
+
constructor(fields: ExampleFields);
|
|
22
13
|
/** Brief summary of example */
|
|
23
14
|
get summary(): string | undefined;
|
|
24
15
|
/** Detailed description of the example. May contain CommonMark Markdown */
|
|
@@ -31,5 +22,4 @@ export declare class OasExample extends OasBase {
|
|
|
31
22
|
resolve(): OasExample;
|
|
32
23
|
resolveOnce(): OasExample;
|
|
33
24
|
}
|
|
34
|
-
export {};
|
|
35
25
|
//# sourceMappingURL=Example.d.ts.map
|