@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
|
@@ -10,10 +10,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasDiscriminator_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasDiscriminator {
|
|
14
|
+
constructor({ fields }) {
|
|
17
15
|
Object.defineProperty(this, "oasType", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
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"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { OasDiscriminator } from './Discriminator.js';
|
|
2
|
-
export const toDiscriminatorV3 = ({ discriminator,
|
|
2
|
+
export const toDiscriminatorV3 = ({ discriminator, context }) => {
|
|
3
3
|
if (!discriminator) {
|
|
4
4
|
return undefined;
|
|
5
5
|
}
|
|
6
6
|
const { propertyName, ...skipped } = discriminator;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
7
8
|
const fields = {
|
|
8
9
|
propertyName
|
|
9
10
|
};
|
|
10
|
-
return new OasDiscriminator({ fields
|
|
11
|
+
return new OasDiscriminator({ fields });
|
|
11
12
|
};
|
|
@@ -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"}
|
|
@@ -10,11 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasDocument_fields;
|
|
13
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
14
13
|
/** Top level document object describing the API */
|
|
15
|
-
export class OasDocument
|
|
16
|
-
constructor({ fields
|
|
17
|
-
super({ trail, skipped, context });
|
|
14
|
+
export class OasDocument {
|
|
15
|
+
constructor({ fields }) {
|
|
18
16
|
/** Static identifier property for OasDocument */
|
|
19
17
|
Object.defineProperty(this, "oasType", {
|
|
20
18
|
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"}
|
|
@@ -3,22 +3,16 @@ import { toOperationsV3 } from '../operation/toOperationsV3.js';
|
|
|
3
3
|
import { toComponentsV3 } from '../components/toComponentsV3.js';
|
|
4
4
|
import { OasDocument } from './Document.js';
|
|
5
5
|
import { toInfoV3 } from '../info/toInfoV3.js';
|
|
6
|
-
|
|
6
|
+
import { tracer } from '../../helpers/tracer.js';
|
|
7
|
+
export const toDocumentV3 = ({ document, context }) => {
|
|
7
8
|
const { openapi, info, paths, components, tags, ...skipped } = document;
|
|
9
|
+
context.logSkippedFields(skipped);
|
|
8
10
|
const fields = {
|
|
9
11
|
openapi,
|
|
10
|
-
info:
|
|
11
|
-
operations: toOperationsV3({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
context
|
|
15
|
-
}),
|
|
16
|
-
components: toComponentsV3({
|
|
17
|
-
components,
|
|
18
|
-
trail: trail.add('components'),
|
|
19
|
-
context
|
|
20
|
-
}),
|
|
21
|
-
tags: toTagsV3({ tags, trail: trail.add('tags'), context })
|
|
12
|
+
info: tracer(context, 'info', () => toInfoV3({ info, context })),
|
|
13
|
+
operations: tracer(context, 'paths', () => toOperationsV3({ paths, context })),
|
|
14
|
+
components: tracer(context, 'components', () => toComponentsV3({ components, context })),
|
|
15
|
+
tags: tracer(context, 'tags', () => toTagsV3({ tags, context }))
|
|
22
16
|
};
|
|
23
|
-
return new OasDocument({ fields
|
|
17
|
+
return new OasDocument({ fields });
|
|
24
18
|
};
|
|
@@ -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"}
|
|
@@ -10,11 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasExample_fields;
|
|
13
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
14
13
|
/** Provides example data represented by schema */
|
|
15
|
-
export class OasExample
|
|
16
|
-
constructor({ fields
|
|
17
|
-
super({ trail, skipped, context });
|
|
14
|
+
export class OasExample {
|
|
15
|
+
constructor({ fields }) {
|
|
18
16
|
/** Static identifier property for OasExample */
|
|
19
17
|
Object.defineProperty(this, "oasType", {
|
|
20
18
|
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"}
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { isRef } from '../../helpers/refFns.js';
|
|
2
2
|
import { toRefV31 } from '../ref/toRefV31.js';
|
|
3
3
|
import { OasExample } from './Example.js';
|
|
4
|
-
|
|
4
|
+
import { tracer } from '../../helpers/tracer.js';
|
|
5
|
+
export const toExampleSimpleV3 = ({ example }) => {
|
|
5
6
|
const fields = {
|
|
6
7
|
value: example,
|
|
7
8
|
summary: undefined,
|
|
8
9
|
description: undefined
|
|
9
10
|
};
|
|
10
|
-
return new OasExample({ fields
|
|
11
|
+
return new OasExample({ fields });
|
|
11
12
|
};
|
|
12
|
-
export const toExamplesV3 = ({ example, examples, exampleKey,
|
|
13
|
+
export const toExamplesV3 = ({ example, examples, exampleKey, context }) => {
|
|
13
14
|
if (example && examples) {
|
|
14
|
-
context.logger.warn(
|
|
15
|
-
trail: trail.toString(),
|
|
16
|
-
message: `Both example and examples are defined for ${exampleKey}`
|
|
17
|
-
}));
|
|
15
|
+
context.logger.warn(`Both example and examples are defined for ${exampleKey}`);
|
|
18
16
|
}
|
|
19
17
|
if (example) {
|
|
20
18
|
return {
|
|
21
|
-
[exampleKey]:
|
|
19
|
+
[exampleKey]: tracer(context, 'example', () => toExampleSimpleV3({ example }))
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
22
|
if (examples) {
|
|
25
|
-
|
|
26
|
-
return [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
tracer(context, 'examples', () => {
|
|
24
|
+
return Object.fromEntries(Object.entries(examples).map(([key, value]) => {
|
|
25
|
+
return [
|
|
26
|
+
key,
|
|
27
|
+
tracer(context, key, () => toExampleV3({ example: value, context }))
|
|
28
|
+
];
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
31
31
|
}
|
|
32
32
|
return undefined;
|
|
33
33
|
};
|
|
34
|
-
export const toExampleV3 = ({ example,
|
|
34
|
+
export const toExampleV3 = ({ example, context }) => {
|
|
35
35
|
if (isRef(example)) {
|
|
36
|
-
return toRefV31({ ref: example, refType: 'example',
|
|
36
|
+
return toRefV31({ ref: example, refType: 'example', context });
|
|
37
37
|
}
|
|
38
38
|
const { summary, description, value, ...skipped } = example;
|
|
39
|
+
context.logSkippedFields(skipped);
|
|
39
40
|
const fields = {
|
|
40
41
|
summary,
|
|
41
42
|
description,
|
|
42
43
|
value
|
|
43
44
|
};
|
|
44
|
-
return new OasExample({ fields
|
|
45
|
+
return new OasExample({ fields });
|
|
45
46
|
};
|
|
@@ -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 { OasMediaType } from '../mediaType/MediaType.js';
|
|
5
2
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
3
|
import type { OasExample } from '../example/Example.js';
|
|
@@ -15,15 +12,12 @@ export type HeaderFields = {
|
|
|
15
12
|
};
|
|
16
13
|
type ToHeaderV3Args = {
|
|
17
14
|
fields: HeaderFields;
|
|
18
|
-
trail: Trail;
|
|
19
|
-
skipped: Record<string, unknown>;
|
|
20
|
-
context: CoreContext;
|
|
21
15
|
};
|
|
22
16
|
/** Describes a single header in the API */
|
|
23
|
-
export declare class OasHeader
|
|
17
|
+
export declare class OasHeader {
|
|
24
18
|
#private;
|
|
25
19
|
oasType: 'header';
|
|
26
|
-
constructor({ fields
|
|
20
|
+
constructor({ fields }: ToHeaderV3Args);
|
|
27
21
|
/** Brief description of header */
|
|
28
22
|
get description(): string | undefined;
|
|
29
23
|
/** Indicates if header is mandatory. Default value is `false` */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/oas/header/Header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/oas/header/Header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAA;IAChD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAA;IACpE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAAA;CAClD,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AAED,2CAA2C;AAC3C,qBAAa,SAAS;;IACpB,OAAO,EAAE,QAAQ,CAAW;gBAGhB,EAAE,MAAM,EAAE,EAAE,cAAc;IAItC,kCAAkC;IAClC,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,iEAAiE;IACjE,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;IAED,6FAA6F;IAC7F,IAAI,UAAU,IAAI,OAAO,GAAG,SAAS,CAEpC;IAED,4BAA4B;IAC5B,IAAI,MAAM,IAAI,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAErD;IAED,6BAA6B;IAC7B,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAEzE;IAED,4BAA4B;IAC5B,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAEtD;IAED,4CAA4C;IAC5C,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,qBAAqB;IACrB,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAIxB;;;;OAIG;IACH,QAAQ,CACN,SAAS,GAAE,MAA2B,GACrC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;CAO5C"}
|
package/esm/oas/header/Header.js
CHANGED
|
@@ -10,11 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasHeader_fields;
|
|
13
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
14
13
|
/** Describes a single header in the API */
|
|
15
|
-
export class OasHeader
|
|
16
|
-
constructor({ fields
|
|
17
|
-
super({ trail, skipped, context });
|
|
14
|
+
export class OasHeader {
|
|
15
|
+
constructor({ fields }) {
|
|
18
16
|
Object.defineProperty(this, "oasType", {
|
|
19
17
|
enumerable: true,
|
|
20
18
|
configurable: true,
|
|
@@ -1,13 +1,11 @@
|
|
|
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 { OasHeader } from './Header.js';
|
|
5
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
5
|
type ToHeadersV3Args = {
|
|
7
6
|
headers: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.HeaderObject> | undefined;
|
|
8
|
-
|
|
9
|
-
context: CoreContext;
|
|
7
|
+
context: ParseContext;
|
|
10
8
|
};
|
|
11
|
-
export declare const toHeadersV3: ({ headers,
|
|
9
|
+
export declare const toHeadersV3: ({ headers, context }: ToHeadersV3Args) => Record<string, OasHeader | OasRef<"header">> | undefined;
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=toHeadersV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toHeadersV3.d.ts","sourceRoot":"","sources":["../../../src/oas/header/toHeadersV3.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toHeadersV3.d.ts","sourceRoot":"","sources":["../../../src/oas/header/toHeadersV3.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,eAAe,GAAG;IACrB,OAAO,EACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,GAClE,SAAS,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,WAAW,yBAGrB,eAAe,KACd,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAC5C,SAaH,CAAA"}
|
|
@@ -4,39 +4,36 @@ import { toOptionalSchemaV3 } from '../schema/toSchemasV3.js';
|
|
|
4
4
|
import { isRef } from '../../helpers/refFns.js';
|
|
5
5
|
import { toOptionalMediaTypeItemsV3 } from '../mediaType/toMediaTypeItemV3.js';
|
|
6
6
|
import { OasHeader } from './Header.js';
|
|
7
|
-
|
|
7
|
+
import { tracer } from '../../helpers/tracer.js';
|
|
8
|
+
export const toHeadersV3 = ({ headers, context }) => {
|
|
8
9
|
if (!headers) {
|
|
9
10
|
return undefined;
|
|
10
11
|
}
|
|
11
12
|
return Object.fromEntries(Object.entries(headers).map(([key, value]) => {
|
|
12
13
|
return [
|
|
13
14
|
key,
|
|
14
|
-
toHeaderV3({ header: value,
|
|
15
|
+
tracer(context, key, () => toHeaderV3({ header: value, context }))
|
|
15
16
|
];
|
|
16
17
|
}));
|
|
17
18
|
};
|
|
18
|
-
const toHeaderV3 = ({ header,
|
|
19
|
+
const toHeaderV3 = ({ header, context }) => {
|
|
19
20
|
if (isRef(header)) {
|
|
20
|
-
return toRefV31({ ref: header, refType: 'header',
|
|
21
|
+
return toRefV31({ ref: header, refType: 'header', context });
|
|
21
22
|
}
|
|
22
23
|
const { description, required, deprecated, schema, example, examples, content, ...skipped } = header;
|
|
24
|
+
context.logSkippedFields(skipped);
|
|
23
25
|
const fields = {
|
|
24
26
|
description,
|
|
25
27
|
required,
|
|
26
28
|
deprecated,
|
|
27
|
-
schema:
|
|
29
|
+
schema: tracer(context, 'schema', () => toOptionalSchemaV3({ schema, context })),
|
|
28
30
|
examples: toExamplesV3({
|
|
29
31
|
examples,
|
|
30
32
|
example,
|
|
31
33
|
exampleKey: `TEMP`,
|
|
32
|
-
trail,
|
|
33
34
|
context
|
|
34
35
|
}),
|
|
35
|
-
content: toOptionalMediaTypeItemsV3({
|
|
36
|
-
content,
|
|
37
|
-
trail: trail.add('content'),
|
|
38
|
-
context
|
|
39
|
-
})
|
|
36
|
+
content: tracer(context, 'content', () => toOptionalMediaTypeItemsV3({ content, context }))
|
|
40
37
|
};
|
|
41
|
-
return new OasHeader({ fields
|
|
38
|
+
return new OasHeader({ fields });
|
|
42
39
|
};
|
package/esm/oas/info/Info.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
1
|
import type { OasLicenseData } from '../license/license-types.js';
|
|
3
2
|
import type { OasContactData } from '../contact/contact-types.js';
|
|
4
|
-
import type { Trail } from '../../context/Trail.js';
|
|
5
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
6
3
|
export type InfoFields = {
|
|
7
4
|
title: string;
|
|
8
5
|
version: string;
|
|
@@ -13,14 +10,11 @@ export type InfoFields = {
|
|
|
13
10
|
};
|
|
14
11
|
type ToInfoV3Args = {
|
|
15
12
|
fields: InfoFields;
|
|
16
|
-
trail: Trail;
|
|
17
|
-
context: CoreContext;
|
|
18
|
-
skipped: Record<string, unknown>;
|
|
19
13
|
};
|
|
20
|
-
export declare class OasInfo
|
|
14
|
+
export declare class OasInfo {
|
|
21
15
|
#private;
|
|
22
16
|
oasType: 'info';
|
|
23
|
-
constructor({ fields
|
|
17
|
+
constructor({ fields }: ToInfoV3Args);
|
|
24
18
|
get title(): string;
|
|
25
19
|
get description(): string | undefined;
|
|
26
20
|
get termsOfService(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../src/oas/info/Info.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../src/oas/info/Info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAEjE,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAA;IACnC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAA;CACpC,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,qBAAa,OAAO;;IAClB,OAAO,EAAE,MAAM,CAAS;gBAGZ,EAAE,MAAM,EAAE,EAAE,YAAY;IAIpC,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,IAAI,OAAO,IAAI,cAAc,GAAG,SAAS,CAExC;IAED,IAAI,OAAO,IAAI,cAAc,GAAG,SAAS,CAExC;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF"}
|
package/esm/oas/info/Info.js
CHANGED
|
@@ -10,10 +10,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasInfo_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasInfo {
|
|
14
|
+
constructor({ fields }) {
|
|
17
15
|
Object.defineProperty(this, "oasType", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
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 { OasInfo } from './Info.js';
|
|
5
4
|
type ToInfoV3Args = {
|
|
6
5
|
info: OpenAPIV3.InfoObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toInfoV3: ({ info,
|
|
8
|
+
export declare const toInfoV3: ({ info, context }: ToInfoV3Args) => OasInfo;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toInfoV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,UAAU,CAAA;IAC1B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,OAuB1D,CAAA"}
|
package/esm/oas/info/toInfoV3.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OasInfo } from './Info.js';
|
|
2
|
-
export const toInfoV3 = ({ info,
|
|
2
|
+
export const toInfoV3 = ({ info, context }) => {
|
|
3
3
|
const { title, description, termsOfService, contact, license, version, ...skipped } = info;
|
|
4
|
+
context.logSkippedFields(skipped);
|
|
4
5
|
const fields = {
|
|
5
6
|
title,
|
|
6
7
|
description,
|
|
@@ -9,7 +10,7 @@ export const toInfoV3 = ({ info, trail, context }) => {
|
|
|
9
10
|
license: license ? toLicense(license) : undefined,
|
|
10
11
|
version
|
|
11
12
|
};
|
|
12
|
-
return new OasInfo({ fields
|
|
13
|
+
return new OasInfo({ fields });
|
|
13
14
|
};
|
|
14
15
|
const toLicense = (license) => ({
|
|
15
16
|
oasType: 'license',
|
|
@@ -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 IntegerFields = {
|
|
6
3
|
title?: string;
|
|
@@ -11,15 +8,12 @@ export type IntegerFields = {
|
|
|
11
8
|
};
|
|
12
9
|
type ToIntegerV3Args = {
|
|
13
10
|
fields: IntegerFields;
|
|
14
|
-
trail: Trail;
|
|
15
|
-
skipped: Record<string, unknown>;
|
|
16
|
-
context: CoreContext;
|
|
17
11
|
};
|
|
18
|
-
export declare class OasInteger
|
|
12
|
+
export declare class OasInteger {
|
|
19
13
|
#private;
|
|
20
14
|
oasType: 'schema';
|
|
21
15
|
type: 'integer';
|
|
22
|
-
constructor({ fields
|
|
16
|
+
constructor({ fields }: ToIntegerV3Args);
|
|
23
17
|
get title(): string | undefined;
|
|
24
18
|
get description(): string | undefined;
|
|
25
19
|
get nullable(): boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Integer.d.ts","sourceRoot":"","sources":["../../../src/oas/integer/Integer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Integer.d.ts","sourceRoot":"","sources":["../../../src/oas/integer/Integer.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;IAClB,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB,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,IAAI,MAAM,IAAI,OAAO,GAAG,OAAO,GAAG,SAAS,CAE1C;IAED,IAAI,KAAK,IAAI,MAAM,EAAE,GAAG,SAAS,CAEhC;IAED,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,UAAU;IAIrB,WAAW,IAAI,UAAU;CAG1B"}
|
|
@@ -10,10 +10,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _OasInteger_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasInteger {
|
|
14
|
+
constructor({ fields }) {
|
|
17
15
|
Object.defineProperty(this, "oasType", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
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 { OasInteger } from './Integer.js';
|
|
5
4
|
type ToIntegerArgs = {
|
|
6
5
|
value: OpenAPIV3.NonArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toInteger: ({ value,
|
|
8
|
+
export declare const toInteger: ({ value, context }: ToIntegerArgs) => OasInteger;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toInteger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toInteger.d.ts","sourceRoot":"","sources":["../../../src/oas/integer/toInteger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toInteger.d.ts","sourceRoot":"","sources":["../../../src/oas/integer/toInteger.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;AAG7D,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAsB7D,CAAA"}
|