@skmtc/core 0.0.300 → 0.0.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/context/CoreContext.d.ts +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +3 -3
- package/esm/context/GenerateContext.d.ts +2 -2
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/ParseContext.d.ts +14 -6
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +28 -12
- package/esm/context/StackTrail.d.ts +3 -3
- package/esm/context/StackTrail.d.ts.map +1 -1
- package/esm/context/StackTrail.js +9 -1
- package/esm/helpers/tracer.d.ts +7 -0
- package/esm/helpers/tracer.d.ts.map +1 -0
- package/esm/helpers/tracer.js +6 -0
- package/esm/oas/array/Array.d.ts +2 -12
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +2 -4
- package/esm/oas/array/toArray.d.ts +3 -5
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +5 -7
- package/esm/oas/boolean/Boolean.d.ts +2 -12
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +2 -4
- package/esm/oas/boolean/toBoolean.d.ts +3 -5
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +3 -2
- package/esm/oas/components/Components.d.ts +2 -12
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +2 -4
- package/esm/oas/components/toComponentsV3.d.ts +3 -5
- package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
- package/esm/oas/components/toComponentsV3.js +10 -22
- package/esm/oas/discriminator/Discriminator.d.ts +2 -12
- package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/esm/oas/discriminator/Discriminator.js +2 -4
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts +3 -5
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/esm/oas/discriminator/toDiscriminatorV3.js +3 -2
- package/esm/oas/document/Document.d.ts +3 -12
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +20 -4
- package/esm/oas/document/toDocumentFieldsV3.d.ts +10 -0
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/esm/oas/document/toDocumentFieldsV3.js +17 -0
- package/esm/oas/example/Example.d.ts +2 -12
- package/esm/oas/example/Example.d.ts.map +1 -1
- package/esm/oas/example/Example.js +2 -4
- package/esm/oas/example/toExamplesV3.d.ts +6 -11
- package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
- package/esm/oas/example/toExamplesV3.js +18 -17
- package/esm/oas/header/Header.d.ts +2 -12
- package/esm/oas/header/Header.d.ts.map +1 -1
- package/esm/oas/header/Header.js +2 -4
- package/esm/oas/header/toHeadersV3.d.ts +3 -5
- package/esm/oas/header/toHeadersV3.d.ts.map +1 -1
- package/esm/oas/header/toHeadersV3.js +9 -12
- package/esm/oas/info/Info.d.ts +2 -12
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/info/Info.js +2 -4
- package/esm/oas/info/toInfoV3.d.ts +3 -5
- package/esm/oas/info/toInfoV3.d.ts.map +1 -1
- package/esm/oas/info/toInfoV3.js +3 -2
- package/esm/oas/integer/Integer.d.ts +2 -12
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +2 -4
- package/esm/oas/integer/toInteger.d.ts +3 -5
- package/esm/oas/integer/toInteger.d.ts.map +1 -1
- package/esm/oas/integer/toInteger.js +3 -2
- package/esm/oas/intersection/Intersection.d.ts +2 -12
- package/esm/oas/intersection/Intersection.d.ts.map +1 -1
- package/esm/oas/intersection/Intersection.js +2 -4
- package/esm/oas/intersection/toIntersection.d.ts +3 -5
- package/esm/oas/intersection/toIntersection.d.ts.map +1 -1
- package/esm/oas/intersection/toIntersection.js +6 -12
- package/esm/oas/mediaType/MediaType.d.ts +2 -12
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +2 -4
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts +7 -11
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.js +17 -19
- package/esm/oas/number/Number.d.ts +2 -12
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +2 -4
- package/esm/oas/number/toNumber.d.ts +3 -5
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +3 -2
- package/esm/oas/object/Object.d.ts +5 -15
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +16 -34
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts +3 -5
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/esm/oas/object/toAdditionalPropertiesV3.js +2 -6
- package/esm/oas/object/toObject.d.ts +3 -5
- package/esm/oas/object/toObject.d.ts.map +1 -1
- package/esm/oas/object/toObject.js +7 -10
- package/esm/oas/operation/Operation.d.ts +2 -12
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +3 -5
- package/esm/oas/operation/toOperationsV3.d.ts +5 -8
- package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/oas/operation/toOperationsV3.js +42 -53
- package/esm/oas/parameter/Parameter.d.ts +2 -12
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +3 -5
- package/esm/oas/parameter/toParameterV3.d.ts +7 -11
- package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/esm/oas/parameter/toParameterV3.js +18 -24
- package/esm/oas/pathItem/PathItem.d.ts +2 -12
- package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
- package/esm/oas/pathItem/PathItem.js +2 -4
- package/esm/oas/pathItem/toPathItemV3.d.ts +3 -5
- package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/esm/oas/pathItem/toPathItemV3.js +5 -7
- package/esm/oas/ref/Ref.d.ts +4 -12
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +10 -17
- package/esm/oas/ref/toRefV31.d.ts +3 -5
- package/esm/oas/ref/toRefV31.d.ts.map +1 -1
- package/esm/oas/ref/toRefV31.js +3 -2
- package/esm/oas/requestBody/RequestBody.d.ts +2 -12
- package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/esm/oas/requestBody/RequestBody.js +2 -4
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts +5 -8
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.js +9 -18
- package/esm/oas/response/Response.d.ts +2 -12
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +2 -4
- package/esm/oas/response/toResponseV3.d.ts +7 -11
- package/esm/oas/response/toResponseV3.d.ts.map +1 -1
- package/esm/oas/response/toResponseV3.js +11 -13
- package/esm/oas/schema/toSchemasV3.d.ts +9 -14
- package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/oas/schema/toSchemasV3.js +22 -24
- package/esm/oas/string/String.d.ts +2 -12
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +2 -4
- package/esm/oas/string/toString.d.ts +3 -5
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +3 -2
- package/esm/oas/tag/Tag.d.ts +2 -12
- package/esm/oas/tag/Tag.d.ts.map +1 -1
- package/esm/oas/tag/Tag.js +2 -4
- package/esm/oas/tag/toTagsV3.d.ts +8 -5
- package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
- package/esm/oas/tag/toTagsV3.js +11 -9
- package/esm/oas/union/Union.d.ts +2 -12
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +2 -4
- package/esm/oas/union/toUnion.d.ts +3 -5
- package/esm/oas/union/toUnion.d.ts.map +1 -1
- package/esm/oas/union/toUnion.js +6 -12
- package/esm/oas/unknown/Unknown.d.ts +2 -12
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +2 -4
- package/esm/oas/unknown/toUnknown.d.ts +3 -5
- package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
- package/esm/oas/unknown/toUnknown.js +3 -2
- package/esm/oas/void/Void.d.ts +3 -13
- package/esm/oas/void/Void.d.ts.map +1 -1
- package/esm/oas/void/Void.js +4 -12
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +3 -3
- package/script/context/GenerateContext.d.ts +2 -2
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/ParseContext.d.ts +14 -6
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +28 -12
- package/script/context/StackTrail.d.ts +3 -3
- package/script/context/StackTrail.d.ts.map +1 -1
- package/script/context/StackTrail.js +9 -1
- package/script/helpers/tracer.d.ts +7 -0
- package/script/helpers/tracer.d.ts.map +1 -0
- package/script/helpers/tracer.js +10 -0
- package/script/oas/array/Array.d.ts +2 -12
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +2 -4
- package/script/oas/array/toArray.d.ts +3 -5
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +5 -7
- package/script/oas/boolean/Boolean.d.ts +2 -12
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +2 -4
- package/script/oas/boolean/toBoolean.d.ts +3 -5
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +3 -2
- package/script/oas/components/Components.d.ts +2 -12
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +2 -4
- package/script/oas/components/toComponentsV3.d.ts +3 -5
- package/script/oas/components/toComponentsV3.d.ts.map +1 -1
- package/script/oas/components/toComponentsV3.js +10 -22
- package/script/oas/discriminator/Discriminator.d.ts +2 -12
- package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/script/oas/discriminator/Discriminator.js +2 -4
- package/script/oas/discriminator/toDiscriminatorV3.d.ts +3 -5
- package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/script/oas/discriminator/toDiscriminatorV3.js +3 -2
- package/script/oas/document/Document.d.ts +3 -12
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +20 -4
- package/script/oas/document/toDocumentFieldsV3.d.ts +10 -0
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/script/oas/document/toDocumentFieldsV3.js +21 -0
- package/script/oas/example/Example.d.ts +2 -12
- package/script/oas/example/Example.d.ts.map +1 -1
- package/script/oas/example/Example.js +2 -4
- package/script/oas/example/toExamplesV3.d.ts +6 -11
- package/script/oas/example/toExamplesV3.d.ts.map +1 -1
- package/script/oas/example/toExamplesV3.js +18 -17
- package/script/oas/header/Header.d.ts +2 -12
- package/script/oas/header/Header.d.ts.map +1 -1
- package/script/oas/header/Header.js +2 -4
- package/script/oas/header/toHeadersV3.d.ts +3 -5
- package/script/oas/header/toHeadersV3.d.ts.map +1 -1
- package/script/oas/header/toHeadersV3.js +9 -12
- package/script/oas/info/Info.d.ts +2 -12
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/info/Info.js +2 -4
- package/script/oas/info/toInfoV3.d.ts +3 -5
- package/script/oas/info/toInfoV3.d.ts.map +1 -1
- package/script/oas/info/toInfoV3.js +3 -2
- package/script/oas/integer/Integer.d.ts +2 -12
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +2 -4
- package/script/oas/integer/toInteger.d.ts +3 -5
- package/script/oas/integer/toInteger.d.ts.map +1 -1
- package/script/oas/integer/toInteger.js +3 -2
- package/script/oas/intersection/Intersection.d.ts +2 -12
- package/script/oas/intersection/Intersection.d.ts.map +1 -1
- package/script/oas/intersection/Intersection.js +2 -4
- package/script/oas/intersection/toIntersection.d.ts +3 -5
- package/script/oas/intersection/toIntersection.d.ts.map +1 -1
- package/script/oas/intersection/toIntersection.js +6 -12
- package/script/oas/mediaType/MediaType.d.ts +2 -12
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +2 -4
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts +7 -11
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/script/oas/mediaType/toMediaTypeItemV3.js +17 -19
- package/script/oas/number/Number.d.ts +2 -12
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +2 -4
- package/script/oas/number/toNumber.d.ts +3 -5
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +3 -2
- package/script/oas/object/Object.d.ts +5 -15
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +16 -34
- package/script/oas/object/toAdditionalPropertiesV3.d.ts +3 -5
- package/script/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/script/oas/object/toAdditionalPropertiesV3.js +2 -6
- package/script/oas/object/toObject.d.ts +3 -5
- package/script/oas/object/toObject.d.ts.map +1 -1
- package/script/oas/object/toObject.js +7 -10
- package/script/oas/operation/Operation.d.ts +2 -12
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +3 -5
- package/script/oas/operation/toOperationsV3.d.ts +5 -8
- package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/script/oas/operation/toOperationsV3.js +42 -53
- package/script/oas/parameter/Parameter.d.ts +2 -12
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +3 -5
- package/script/oas/parameter/toParameterV3.d.ts +7 -11
- package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/script/oas/parameter/toParameterV3.js +18 -24
- package/script/oas/pathItem/PathItem.d.ts +2 -12
- package/script/oas/pathItem/PathItem.d.ts.map +1 -1
- package/script/oas/pathItem/PathItem.js +2 -4
- package/script/oas/pathItem/toPathItemV3.d.ts +3 -5
- package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/script/oas/pathItem/toPathItemV3.js +5 -7
- package/script/oas/ref/Ref.d.ts +4 -12
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +10 -17
- package/script/oas/ref/toRefV31.d.ts +3 -5
- package/script/oas/ref/toRefV31.d.ts.map +1 -1
- package/script/oas/ref/toRefV31.js +3 -2
- package/script/oas/requestBody/RequestBody.d.ts +2 -12
- package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/script/oas/requestBody/RequestBody.js +2 -4
- package/script/oas/requestBody/toRequestBodiesV3.d.ts +5 -8
- package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.js +9 -18
- package/script/oas/response/Response.d.ts +2 -12
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +2 -4
- package/script/oas/response/toResponseV3.d.ts +7 -11
- package/script/oas/response/toResponseV3.d.ts.map +1 -1
- package/script/oas/response/toResponseV3.js +11 -13
- package/script/oas/schema/toSchemasV3.d.ts +9 -14
- package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/script/oas/schema/toSchemasV3.js +22 -24
- package/script/oas/string/String.d.ts +2 -12
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +2 -4
- package/script/oas/string/toString.d.ts +3 -5
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +3 -2
- package/script/oas/tag/Tag.d.ts +2 -12
- package/script/oas/tag/Tag.d.ts.map +1 -1
- package/script/oas/tag/Tag.js +2 -4
- package/script/oas/tag/toTagsV3.d.ts +8 -5
- package/script/oas/tag/toTagsV3.d.ts.map +1 -1
- package/script/oas/tag/toTagsV3.js +13 -10
- package/script/oas/union/Union.d.ts +2 -12
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +2 -4
- package/script/oas/union/toUnion.d.ts +3 -5
- package/script/oas/union/toUnion.d.ts.map +1 -1
- package/script/oas/union/toUnion.js +6 -12
- package/script/oas/unknown/Unknown.d.ts +2 -12
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +2 -4
- package/script/oas/unknown/toUnknown.d.ts +3 -5
- package/script/oas/unknown/toUnknown.d.ts.map +1 -1
- package/script/oas/unknown/toUnknown.js +3 -2
- package/script/oas/void/Void.d.ts +3 -13
- package/script/oas/void/Void.d.ts.map +1 -1
- package/script/oas/void/Void.js +4 -12
- package/esm/dsl/OasBase.d.ts +0 -15
- package/esm/dsl/OasBase.d.ts.map +0 -1
- package/esm/dsl/OasBase.js +0 -28
- package/esm/oas/document/toDocumentV3.d.ts +0 -12
- package/esm/oas/document/toDocumentV3.d.ts.map +0 -1
- package/esm/oas/document/toDocumentV3.js +0 -24
- package/script/dsl/OasBase.d.ts +0 -15
- package/script/dsl/OasBase.d.ts.map +0 -1
- package/script/dsl/OasBase.js +0 -32
- package/script/oas/document/toDocumentV3.d.ts +0 -12
- package/script/oas/document/toDocumentV3.d.ts.map +0 -1
- package/script/oas/document/toDocumentV3.js +0 -28
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasMediaType_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasMediaType = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasMediaType {
|
|
17
|
+
constructor(fields) {
|
|
20
18
|
Object.defineProperty(this, "oasType", {
|
|
21
19
|
enumerable: true,
|
|
22
20
|
configurable: true,
|
|
@@ -1,25 +1,21 @@
|
|
|
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 { OasMediaType } from './MediaType.js';
|
|
5
4
|
type ToMediaTypeItemV3Args = {
|
|
6
5
|
mediaTypeItem: OpenAPIV3.MediaTypeObject;
|
|
7
6
|
mediaType: string;
|
|
8
|
-
|
|
9
|
-
context: CoreContext;
|
|
7
|
+
context: ParseContext;
|
|
10
8
|
};
|
|
11
|
-
export declare const toMediaTypeItemV3: ({ mediaTypeItem, mediaType,
|
|
9
|
+
export declare const toMediaTypeItemV3: ({ mediaTypeItem, mediaType, context }: ToMediaTypeItemV3Args) => OasMediaType;
|
|
12
10
|
type ToMediaTypeItemsV3Args = {
|
|
13
11
|
content: Record<string, OpenAPIV3.MediaTypeObject>;
|
|
14
|
-
|
|
15
|
-
context: CoreContext;
|
|
12
|
+
context: ParseContext;
|
|
16
13
|
};
|
|
17
|
-
export declare const toMediaTypeItemsV3: ({ content,
|
|
14
|
+
export declare const toMediaTypeItemsV3: ({ content, context }: ToMediaTypeItemsV3Args) => Record<string, OasMediaType>;
|
|
18
15
|
type ToOptionalMediaTypeItemsV3Args = {
|
|
19
16
|
content: Record<string, OpenAPIV3.MediaTypeObject> | undefined;
|
|
20
|
-
|
|
21
|
-
context: CoreContext;
|
|
17
|
+
context: ParseContext;
|
|
22
18
|
};
|
|
23
|
-
export declare const toOptionalMediaTypeItemsV3: ({ content,
|
|
19
|
+
export declare const toOptionalMediaTypeItemsV3: ({ content, context }: ToOptionalMediaTypeItemsV3Args) => Record<string, OasMediaType> | undefined;
|
|
24
20
|
export {};
|
|
25
21
|
//# sourceMappingURL=toMediaTypeItemV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,eAAe,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAI3B,qBAAqB,KAAG,YAqB1B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yBAG5B,sBAAsB,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAatD,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,0BAA0B,yBAGpC,8BAA8B,KAC7B,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAC5B,SAMH,CAAA"}
|
|
@@ -4,40 +4,38 @@ exports.toOptionalMediaTypeItemsV3 = exports.toMediaTypeItemsV3 = exports.toMedi
|
|
|
4
4
|
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
5
5
|
const toExamplesV3_js_1 = require("../example/toExamplesV3.js");
|
|
6
6
|
const MediaType_js_1 = require("./MediaType.js");
|
|
7
|
-
const
|
|
7
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
8
|
+
const toMediaTypeItemV3 = ({ mediaTypeItem, mediaType, context }) => {
|
|
8
9
|
const { schema, example, examples, ...skipped } = mediaTypeItem;
|
|
10
|
+
context.logSkippedFields(skipped);
|
|
9
11
|
const fields = {
|
|
10
12
|
mediaType,
|
|
11
|
-
schema: (0,
|
|
12
|
-
examples: (0, toExamplesV3_js_1.toExamplesV3)({
|
|
13
|
+
schema: (0, tracer_js_1.tracer)(context, 'schema', () => (0, toSchemasV3_js_1.toOptionalSchemaV3)({ schema, context })),
|
|
14
|
+
examples: (0, tracer_js_1.tracer)(context, 'examples', () => (0, toExamplesV3_js_1.toExamplesV3)({
|
|
13
15
|
example,
|
|
14
16
|
examples,
|
|
15
17
|
exampleKey: mediaType,
|
|
16
|
-
trail: trail.add('examples'),
|
|
17
18
|
context
|
|
18
|
-
})
|
|
19
|
+
}))
|
|
19
20
|
};
|
|
20
|
-
return new MediaType_js_1.OasMediaType(
|
|
21
|
+
return new MediaType_js_1.OasMediaType(fields);
|
|
21
22
|
};
|
|
22
23
|
exports.toMediaTypeItemV3 = toMediaTypeItemV3;
|
|
23
|
-
const toMediaTypeItemsV3 = ({ content,
|
|
24
|
-
return Object.fromEntries(Object.entries(content).map(([mediaType, value]) =>
|
|
25
|
-
|
|
24
|
+
const toMediaTypeItemsV3 = ({ content, context }) => {
|
|
25
|
+
return Object.fromEntries(Object.entries(content).map(([mediaType, value]) => [
|
|
26
|
+
mediaType,
|
|
27
|
+
(0, tracer_js_1.tracer)(context, mediaType, () => (0, exports.toMediaTypeItemV3)({
|
|
28
|
+
mediaTypeItem: value,
|
|
26
29
|
mediaType,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
trail: trail.add(mediaType),
|
|
31
|
-
context
|
|
32
|
-
})
|
|
33
|
-
];
|
|
34
|
-
}));
|
|
30
|
+
context
|
|
31
|
+
}))
|
|
32
|
+
]));
|
|
35
33
|
};
|
|
36
34
|
exports.toMediaTypeItemsV3 = toMediaTypeItemsV3;
|
|
37
|
-
const toOptionalMediaTypeItemsV3 = ({ content,
|
|
35
|
+
const toOptionalMediaTypeItemsV3 = ({ content, context }) => {
|
|
38
36
|
if (!content) {
|
|
39
37
|
return;
|
|
40
38
|
}
|
|
41
|
-
return (0, exports.toMediaTypeItemsV3)({ content,
|
|
39
|
+
return (0, exports.toMediaTypeItemsV3)({ content, context });
|
|
42
40
|
};
|
|
43
41
|
exports.toOptionalMediaTypeItemsV3 = toOptionalMediaTypeItemsV3;
|
|
@@ -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 NumberFields = {
|
|
6
3
|
title?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
nullable?: boolean;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
fields: NumberFields;
|
|
12
|
-
trail: Trail;
|
|
13
|
-
skipped: Record<string, unknown>;
|
|
14
|
-
context: CoreContext;
|
|
15
|
-
};
|
|
16
|
-
export declare class OasNumber extends OasBase {
|
|
7
|
+
export declare class OasNumber {
|
|
17
8
|
#private;
|
|
18
9
|
oasType: 'schema';
|
|
19
10
|
type: 'number';
|
|
20
|
-
constructor(
|
|
11
|
+
constructor(fields: NumberFields);
|
|
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 OasNumber extends OasBase {
|
|
|
25
16
|
resolve(): OasNumber;
|
|
26
17
|
resolveOnce(): OasNumber;
|
|
27
18
|
}
|
|
28
|
-
export {};
|
|
29
19
|
//# sourceMappingURL=Number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../../../src/oas/number/Number.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../../../src/oas/number/Number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,qBAAa,SAAS;;IACpB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,QAAQ,CAAW;gBAGb,MAAM,EAAE,YAAY;IAIhC,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,SAAS;IAIpB,WAAW,IAAI,SAAS;CAGzB"}
|
|
@@ -13,10 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasNumber_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasNumber = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor({ fields, trail, skipped, context }) {
|
|
19
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasNumber {
|
|
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 { OasNumber } from './Number.js';
|
|
5
4
|
type ToNumberArgs = {
|
|
6
5
|
value: OpenAPIV3.NonArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toNumber: ({ value,
|
|
8
|
+
export declare const toNumber: ({ value, context }: ToNumberArgs) => OasNumber;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAqB,SAAS,EAAE,MAAM,aAAa,CAAA;AAE1D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAY3D,CAAA"}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toNumber = void 0;
|
|
4
4
|
const Number_js_1 = require("./Number.js");
|
|
5
|
-
const toNumber = ({ value,
|
|
5
|
+
const toNumber = ({ value, context }) => {
|
|
6
6
|
const { type: _type, title, description, nullable, ...skipped } = value;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
7
8
|
const fields = {
|
|
8
9
|
title,
|
|
9
10
|
description,
|
|
10
11
|
nullable
|
|
11
12
|
};
|
|
12
|
-
return new Number_js_1.OasNumber(
|
|
13
|
+
return new Number_js_1.OasNumber(fields);
|
|
13
14
|
};
|
|
14
15
|
exports.toNumber = toNumber;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { OasBase } from '../../dsl/OasBase.js';
|
|
2
|
-
import { Trail } from '../../context/Trail.js';
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
4
1
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
2
|
import type { OasSchema } from '../schema/Schema.js';
|
|
6
3
|
import type { CustomValue } from '../../types/CustomValue.js';
|
|
7
4
|
export type OasObjectFields = {
|
|
8
5
|
title?: string;
|
|
9
6
|
description?: string;
|
|
10
|
-
properties: Record<string, OasSchema | OasRef<'schema'> | CustomValue
|
|
11
|
-
required: string[];
|
|
7
|
+
properties: Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
|
|
8
|
+
required: string[] | undefined;
|
|
12
9
|
additionalProperties?: boolean | OasSchema | OasRef<'schema'>;
|
|
13
10
|
nullable?: boolean;
|
|
14
11
|
};
|
|
@@ -20,19 +17,13 @@ export type AddPropertyArgs = {
|
|
|
20
17
|
schema: OasSchema | OasRef<'schema'> | CustomValue | undefined;
|
|
21
18
|
required?: boolean;
|
|
22
19
|
};
|
|
23
|
-
|
|
24
|
-
fields: OasObjectFields;
|
|
25
|
-
trail: Trail;
|
|
26
|
-
skipped: Record<string, unknown>;
|
|
27
|
-
context: CoreContext;
|
|
28
|
-
};
|
|
29
|
-
export declare class OasObject extends OasBase {
|
|
20
|
+
export declare class OasObject {
|
|
30
21
|
#private;
|
|
31
22
|
oasType: 'schema';
|
|
32
23
|
type: 'object';
|
|
33
|
-
constructor(
|
|
24
|
+
constructor(fields: OasObjectFields);
|
|
34
25
|
/** Creates new empty OasObject */
|
|
35
|
-
static empty(
|
|
26
|
+
static empty(): OasObject;
|
|
36
27
|
get title(): string | undefined;
|
|
37
28
|
get description(): string | undefined;
|
|
38
29
|
get properties(): Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
|
|
@@ -45,5 +36,4 @@ export declare class OasObject extends OasBase {
|
|
|
45
36
|
resolve(): OasObject;
|
|
46
37
|
resolveOnce(): OasObject;
|
|
47
38
|
}
|
|
48
|
-
export {};
|
|
49
39
|
//# sourceMappingURL=Object.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,EACN,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAC1D,SAAS,CAAA;IACb,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,GAAG,SAAS,CAAA;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,qBAAa,SAAS;;IACpB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,QAAQ,CAAW;gBAGb,MAAM,EAAE,eAAe;IAInC,kCAAkC;IAClC,MAAM,CAAC,KAAK,IAAI,SAAS;IAOzB,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,UAAU,IACV,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAC1D,SAAS,CAEZ;IAED,IAAI,QAAQ,IAAI,MAAM,EAAE,GAAG,SAAS,CAEnC;IAED,IAAI,oBAAoB,IACpB,OAAO,GACP,SAAS,GACT,MAAM,CAAC,QAAQ,CAAC,GAChB,SAAS,CAEZ;IAED,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;IAED,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,SAAS;IAiBnE,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,kBAAkB,GAAG,SAAS;IAcvD,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;CAGzB"}
|
|
@@ -13,11 +13,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasObject_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasObject = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class OasObject extends OasBase_js_1.OasBase {
|
|
19
|
-
constructor({ fields, trail, skipped, context }) {
|
|
20
|
-
super({ trail, skipped, context });
|
|
16
|
+
class OasObject {
|
|
17
|
+
constructor(fields) {
|
|
21
18
|
Object.defineProperty(this, "oasType", {
|
|
22
19
|
enumerable: true,
|
|
23
20
|
configurable: true,
|
|
@@ -34,15 +31,10 @@ class OasObject extends OasBase_js_1.OasBase {
|
|
|
34
31
|
__classPrivateFieldSet(this, _OasObject_fields, fields, "f");
|
|
35
32
|
}
|
|
36
33
|
/** Creates new empty OasObject */
|
|
37
|
-
static empty(
|
|
34
|
+
static empty() {
|
|
38
35
|
return new OasObject({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
required: []
|
|
42
|
-
},
|
|
43
|
-
trail: new Trail_js_1.Trail(),
|
|
44
|
-
context,
|
|
45
|
-
skipped: {}
|
|
36
|
+
properties: {},
|
|
37
|
+
required: []
|
|
46
38
|
});
|
|
47
39
|
}
|
|
48
40
|
get title() {
|
|
@@ -68,35 +60,25 @@ class OasObject extends OasBase_js_1.OasBase {
|
|
|
68
60
|
return this;
|
|
69
61
|
}
|
|
70
62
|
return new OasObject({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
properties
|
|
74
|
-
|
|
75
|
-
[name]: schema
|
|
76
|
-
},
|
|
77
|
-
required: required
|
|
78
|
-
? [...__classPrivateFieldGet(this, _OasObject_fields, "f").required, name]
|
|
79
|
-
: __classPrivateFieldGet(this, _OasObject_fields, "f").required
|
|
63
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f"),
|
|
64
|
+
properties: {
|
|
65
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f").properties,
|
|
66
|
+
[name]: schema
|
|
80
67
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
required: required
|
|
69
|
+
? [...(__classPrivateFieldGet(this, _OasObject_fields, "f").required ?? []), name]
|
|
70
|
+
: __classPrivateFieldGet(this, _OasObject_fields, "f").required
|
|
84
71
|
});
|
|
85
72
|
}
|
|
86
73
|
removeProperty({ name }) {
|
|
87
|
-
if (!__classPrivateFieldGet(this, _OasObject_fields, "f").properties[name]) {
|
|
74
|
+
if (!__classPrivateFieldGet(this, _OasObject_fields, "f").properties?.[name]) {
|
|
88
75
|
return this;
|
|
89
76
|
}
|
|
90
77
|
const { [name]: _removed, ...properties } = __classPrivateFieldGet(this, _OasObject_fields, "f").properties;
|
|
91
78
|
return new OasObject({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
required: __classPrivateFieldGet(this, _OasObject_fields, "f").required.filter(n => n !== name)
|
|
96
|
-
},
|
|
97
|
-
trail: this.trail.clone(),
|
|
98
|
-
context: this.context,
|
|
99
|
-
skipped: {}
|
|
79
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f"),
|
|
80
|
+
properties,
|
|
81
|
+
required: __classPrivateFieldGet(this, _OasObject_fields, "f").required?.filter(n => n !== name)
|
|
100
82
|
});
|
|
101
83
|
}
|
|
102
84
|
isRef() {
|
|
@@ -1,13 +1,11 @@
|
|
|
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 type { OasSchema } from '../schema/Schema.js';
|
|
5
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
5
|
type ToAdditionalPropertiesV3Args = {
|
|
7
6
|
additionalProperties: boolean | OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
|
|
8
|
-
|
|
9
|
-
context: CoreContext;
|
|
7
|
+
context: ParseContext;
|
|
10
8
|
};
|
|
11
|
-
export declare const toAdditionalPropertiesV3: ({ additionalProperties,
|
|
9
|
+
export declare const toAdditionalPropertiesV3: ({ additionalProperties, context }: ToAdditionalPropertiesV3Args) => OasSchema | OasRef<"schema"> | boolean | undefined;
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=toAdditionalPropertiesV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toAdditionalPropertiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toAdditionalPropertiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toAdditionalPropertiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toAdditionalPropertiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,KAAK,4BAA4B,GAAG;IAClC,oBAAoB,EAChB,OAAO,GACP,SAAS,CAAC,eAAe,GACzB,SAAS,CAAC,YAAY,GACtB,SAAS,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,wBAAwB,sCAGlC,4BAA4B,KAC3B,SAAS,GACT,MAAM,CAAC,QAAQ,CAAC,GAChB,OAAO,GACP,SAUH,CAAA"}
|
|
@@ -2,17 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toAdditionalPropertiesV3 = void 0;
|
|
4
4
|
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
5
|
-
const toAdditionalPropertiesV3 = ({ additionalProperties,
|
|
5
|
+
const toAdditionalPropertiesV3 = ({ additionalProperties, context }) => {
|
|
6
6
|
if (typeof additionalProperties === 'boolean') {
|
|
7
7
|
return additionalProperties;
|
|
8
8
|
}
|
|
9
9
|
if (additionalProperties === undefined) {
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
-
return (0, toSchemasV3_js_1.toSchemaV3)({
|
|
13
|
-
schema: additionalProperties,
|
|
14
|
-
trail,
|
|
15
|
-
context
|
|
16
|
-
});
|
|
12
|
+
return (0, toSchemasV3_js_1.toSchemaV3)({ schema: additionalProperties, context });
|
|
17
13
|
};
|
|
18
14
|
exports.toAdditionalPropertiesV3 = toAdditionalPropertiesV3;
|
|
@@ -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 { OasObject } from './Object.js';
|
|
5
4
|
type ToObjectArgs = {
|
|
6
5
|
value: OpenAPIV3.NonArraySchemaObject;
|
|
7
|
-
|
|
8
|
-
context: CoreContext;
|
|
6
|
+
context: ParseContext;
|
|
9
7
|
};
|
|
10
|
-
export declare const toObject: ({ value,
|
|
8
|
+
export declare const toObject: ({ value, context }: ToObjectArgs) => OasObject;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=toObject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.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,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA+B3D,CAAA"}
|
|
@@ -4,24 +4,21 @@ exports.toObject = void 0;
|
|
|
4
4
|
const Object_js_1 = require("./Object.js");
|
|
5
5
|
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
6
6
|
const toAdditionalPropertiesV3_js_1 = require("./toAdditionalPropertiesV3.js");
|
|
7
|
-
const
|
|
7
|
+
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
8
|
+
const toObject = ({ value, context }) => {
|
|
8
9
|
const { type: _type, title, description, properties, required, additionalProperties, nullable, ...skipped } = value;
|
|
10
|
+
context.logSkippedFields(skipped);
|
|
9
11
|
const fields = {
|
|
10
12
|
title,
|
|
11
13
|
description,
|
|
12
14
|
nullable,
|
|
13
|
-
properties: (0, toSchemasV3_js_1.toOptionalSchemasV3)({
|
|
15
|
+
properties: (0, tracer_js_1.tracer)(context, 'properties', () => (0, toSchemasV3_js_1.toOptionalSchemasV3)({
|
|
14
16
|
schemas: properties,
|
|
15
|
-
trail: trail.add('properties'),
|
|
16
17
|
context
|
|
17
|
-
})
|
|
18
|
+
})),
|
|
18
19
|
required: required ?? [],
|
|
19
|
-
additionalProperties: (0, toAdditionalPropertiesV3_js_1.toAdditionalPropertiesV3)({
|
|
20
|
-
additionalProperties,
|
|
21
|
-
trail: trail.add('additionalProperties'),
|
|
22
|
-
context
|
|
23
|
-
})
|
|
20
|
+
additionalProperties: (0, tracer_js_1.tracer)(context, 'additionalProperties', () => (0, toAdditionalPropertiesV3_js_1.toAdditionalPropertiesV3)({ additionalProperties, context }))
|
|
24
21
|
};
|
|
25
|
-
return new Object_js_1.OasObject(
|
|
22
|
+
return new Object_js_1.OasObject(fields);
|
|
26
23
|
};
|
|
27
24
|
exports.toObject = toObject;
|
|
@@ -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 { Method } from '../../types/Method.js';
|
|
5
2
|
import type { OasPathItem } from '../pathItem/PathItem.js';
|
|
6
3
|
import type { OasParameter } from '../parameter/Parameter.js';
|
|
@@ -23,17 +20,11 @@ export type OperationFields = {
|
|
|
23
20
|
responses: Record<string, OasResponse | OasRef<'response'>>;
|
|
24
21
|
deprecated: boolean | undefined;
|
|
25
22
|
};
|
|
26
|
-
type ToOperationV3Args = {
|
|
27
|
-
fields: OperationFields;
|
|
28
|
-
trail: Trail;
|
|
29
|
-
context: CoreContext;
|
|
30
|
-
skipped: Record<string, unknown>;
|
|
31
|
-
};
|
|
32
23
|
/** Operation represents a resource path and a method that can be enacted against it */
|
|
33
|
-
export declare class OasOperation
|
|
24
|
+
export declare class OasOperation {
|
|
34
25
|
#private;
|
|
35
26
|
oasType: 'operation';
|
|
36
|
-
constructor(
|
|
27
|
+
constructor(fields: OperationFields);
|
|
37
28
|
toSuccessResponse(): OasResponse | OasRef<'response'>;
|
|
38
29
|
toRequestBody(mediaType?: string): OasSchema | OasRef<'schema'> | undefined;
|
|
39
30
|
/**
|
|
@@ -56,5 +47,4 @@ export declare class OasOperation extends OasBase {
|
|
|
56
47
|
get responses(): Record<string, OasResponse | OasRef<'response'>>;
|
|
57
48
|
get deprecated(): boolean | undefined;
|
|
58
49
|
}
|
|
59
|
-
export {};
|
|
60
50
|
//# sourceMappingURL=Operation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,WAAW,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,SAAS,CAAA;IAC9D,WAAW,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SAAS,CAAA;IAC/D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;IAC3D,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,uFAAuF;AACvF,qBAAa,YAAY;;IACvB,OAAO,EAAE,WAAW,CAAc;gBAGtB,MAAM,EAAE,eAAe;IAInC,iBAAiB,IAAI,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAWrD,aAAa,CACX,SAAS,SAAqB,GAC7B,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;IAI3C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,YAAY,EAAE;IAUzD,kBAAkB,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE;IAYlD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,QAAQ,IAAI,WAAW,CAE1B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAEhC;IAED,IAAI,IAAI,IAAI,MAAM,EAAE,GAAG,SAAS,CAE/B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,UAAU,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,SAAS,CAEnE;IAED,IAAI,WAAW,IAAI,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SAAS,CAEpE;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAEhE;IAED,IAAI,UAAU,IAAI,OAAO,GAAG,SAAS,CAEpC;CACF"}
|
|
@@ -13,12 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _OasOperation_fields;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasOperation = void 0;
|
|
16
|
-
const OasBase_js_1 = require("../../dsl/OasBase.js");
|
|
17
16
|
const Object_js_1 = require("../object/Object.js");
|
|
18
17
|
/** Operation represents a resource path and a method that can be enacted against it */
|
|
19
|
-
class OasOperation
|
|
20
|
-
constructor(
|
|
21
|
-
super({ trail, skipped, context });
|
|
18
|
+
class OasOperation {
|
|
19
|
+
constructor(fields) {
|
|
22
20
|
Object.defineProperty(this, "oasType", {
|
|
23
21
|
enumerable: true,
|
|
24
22
|
configurable: true,
|
|
@@ -58,7 +56,7 @@ class OasOperation extends OasBase_js_1.OasBase {
|
|
|
58
56
|
schema: parameter.toSchema(),
|
|
59
57
|
required: parameter.required
|
|
60
58
|
});
|
|
61
|
-
}, Object_js_1.OasObject.empty(
|
|
59
|
+
}, Object_js_1.OasObject.empty());
|
|
62
60
|
}
|
|
63
61
|
get path() {
|
|
64
62
|
return __classPrivateFieldGet(this, _OasOperation_fields, "f").path;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
2
|
import type { Method } from '../../types/Method.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type { Trail } from '../../context/Trail.js';
|
|
3
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
5
4
|
import { OasOperation } from './Operation.js';
|
|
6
5
|
import type { OasPathItem } from '../pathItem/PathItem.js';
|
|
7
6
|
type OperationInfo = {
|
|
@@ -12,15 +11,13 @@ type OperationInfo = {
|
|
|
12
11
|
type ToOperationV3Args = {
|
|
13
12
|
operation: OpenAPIV3.OperationObject;
|
|
14
13
|
operationInfo: OperationInfo;
|
|
15
|
-
|
|
16
|
-
context: CoreContext;
|
|
14
|
+
context: ParseContext;
|
|
17
15
|
};
|
|
18
|
-
export declare const toOperationV3: ({ operation, operationInfo,
|
|
16
|
+
export declare const toOperationV3: ({ operation, operationInfo, context }: ToOperationV3Args) => OasOperation;
|
|
19
17
|
type ToOperationsV3Args = {
|
|
20
18
|
paths: OpenAPIV3.PathsObject;
|
|
21
|
-
|
|
22
|
-
context: CoreContext;
|
|
19
|
+
context: ParseContext;
|
|
23
20
|
};
|
|
24
|
-
export declare const toOperationsV3: ({ paths,
|
|
21
|
+
export declare const toOperationsV3: ({ paths, context }: ToOperationsV3Args) => OasOperation[];
|
|
25
22
|
export {};
|
|
26
23
|
//# sourceMappingURL=toOperationsV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,0CAIvB,iBAAiB,KAAG,YAqCtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAGxB,kBAAkB,KAAG,YAAY,EAqDnC,CAAA"}
|