@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
|
@@ -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;
|
|
@@ -9,17 +6,11 @@ export type IntegerFields = {
|
|
|
9
6
|
format?: 'int32' | 'int64';
|
|
10
7
|
enums?: number[];
|
|
11
8
|
};
|
|
12
|
-
|
|
13
|
-
fields: IntegerFields;
|
|
14
|
-
trail: Trail;
|
|
15
|
-
skipped: Record<string, unknown>;
|
|
16
|
-
context: CoreContext;
|
|
17
|
-
};
|
|
18
|
-
export declare class OasInteger extends OasBase {
|
|
9
|
+
export declare class OasInteger {
|
|
19
10
|
#private;
|
|
20
11
|
oasType: 'schema';
|
|
21
12
|
type: 'integer';
|
|
22
|
-
constructor(
|
|
13
|
+
constructor(fields: IntegerFields);
|
|
23
14
|
get title(): string | undefined;
|
|
24
15
|
get description(): string | undefined;
|
|
25
16
|
get nullable(): boolean | undefined;
|
|
@@ -29,5 +20,4 @@ export declare class OasInteger extends OasBase {
|
|
|
29
20
|
resolve(): OasInteger;
|
|
30
21
|
resolveOnce(): OasInteger;
|
|
31
22
|
}
|
|
32
|
-
export {};
|
|
33
23
|
//# sourceMappingURL=Integer.d.ts.map
|
|
@@ -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,qBAAa,UAAU;;IACrB,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,SAAS,CAAY;gBAGf,MAAM,EAAE,aAAa;IAIjC,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;IAED,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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { OasInteger } from './Integer.js';
|
|
2
2
|
import { oasIntegerData } from './integer-types.js';
|
|
3
|
-
export const toInteger = ({ value,
|
|
3
|
+
export const toInteger = ({ value, context }) => {
|
|
4
4
|
const { type: _type, title, description, nullable, format, enum: enums, ...skipped } = oasIntegerData.parse(value);
|
|
5
|
+
context.logSkippedFields(skipped);
|
|
5
6
|
const fields = {
|
|
6
7
|
title,
|
|
7
8
|
description,
|
|
@@ -9,5 +10,5 @@ export const toInteger = ({ value, trail, context }) => {
|
|
|
9
10
|
format,
|
|
10
11
|
enums
|
|
11
12
|
};
|
|
12
|
-
return new OasInteger(
|
|
13
|
+
return new OasInteger(fields);
|
|
13
14
|
};
|
|
@@ -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 { OasDiscriminator } from '../discriminator/Discriminator.js';
|
|
5
2
|
import type { OasRef } from '../ref/Ref.js';
|
|
6
3
|
import type { OasSchema } from '../schema/Schema.js';
|
|
@@ -11,17 +8,11 @@ export type IntersectionFields = {
|
|
|
11
8
|
discriminator?: OasDiscriminator;
|
|
12
9
|
members: (OasSchema | OasRef<'schema'>)[];
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
fields: IntersectionFields;
|
|
16
|
-
trail: Trail;
|
|
17
|
-
skipped: Record<string, unknown>;
|
|
18
|
-
context: CoreContext;
|
|
19
|
-
};
|
|
20
|
-
export declare class OasIntersection extends OasBase {
|
|
11
|
+
export declare class OasIntersection {
|
|
21
12
|
#private;
|
|
22
13
|
oasType: 'schema';
|
|
23
14
|
type: 'intersection';
|
|
24
|
-
constructor(
|
|
15
|
+
constructor(fields: IntersectionFields);
|
|
25
16
|
get title(): string | undefined;
|
|
26
17
|
get description(): string | undefined;
|
|
27
18
|
get discriminator(): OasDiscriminator | undefined;
|
|
@@ -31,5 +22,4 @@ export declare class OasIntersection extends OasBase {
|
|
|
31
22
|
resolve(): OasIntersection;
|
|
32
23
|
resolveOnce(): OasIntersection;
|
|
33
24
|
}
|
|
34
|
-
export {};
|
|
35
25
|
//# sourceMappingURL=Intersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Intersection.d.ts","sourceRoot":"","sources":["../../../src/oas/intersection/Intersection.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Intersection.d.ts","sourceRoot":"","sources":["../../../src/oas/intersection/Intersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAA;CAC1C,CAAA;AAED,qBAAa,eAAe;;IAC1B,OAAO,EAAE,QAAQ,CAAW;IAC5B,IAAI,EAAE,cAAc,CAAiB;gBAGzB,MAAM,EAAE,kBAAkB;IAItC,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,aAAa,IAAI,gBAAgB,GAAG,SAAS,CAEhD;IAED,IAAI,OAAO,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAE9C;IAED,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAElC;IAED,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,eAAe;IAI1B,WAAW,IAAI,eAAe;CAG/B"}
|
|
@@ -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 _OasIntersection_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasIntersection {
|
|
14
|
+
constructor(fields) {
|
|
17
15
|
Object.defineProperty(this, "oasType", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
configurable: true,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type { CoreContext } from '../../context/CoreContext.js';
|
|
2
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
3
|
import { OasIntersection } from './Intersection.js';
|
|
5
4
|
type ToIntersectionArgs = {
|
|
6
5
|
value: OpenAPIV3.SchemaObject;
|
|
7
6
|
members: (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
|
|
8
|
-
|
|
9
|
-
context: CoreContext;
|
|
7
|
+
context: ParseContext;
|
|
10
8
|
};
|
|
11
|
-
export declare const toIntersection: ({ value, members,
|
|
9
|
+
export declare const toIntersection: ({ value, members, context }: ToIntersectionArgs) => OasIntersection;
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=toIntersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toIntersection.d.ts","sourceRoot":"","sources":["../../../src/oas/intersection/toIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"toIntersection.d.ts","sourceRoot":"","sources":["../../../src/oas/intersection/toIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAA2B,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAK5E,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,gCAIxB,kBAAkB,KAAG,eAkBvB,CAAA"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { OasIntersection } from './Intersection.js';
|
|
2
2
|
import { toDiscriminatorV3 } from '../discriminator/toDiscriminatorV3.js';
|
|
3
3
|
import { toSchemaV3 } from '../schema/toSchemasV3.js';
|
|
4
|
-
|
|
4
|
+
import { tracer } from '../../helpers/tracer.js';
|
|
5
|
+
export const toIntersection = ({ value, members, context }) => {
|
|
5
6
|
const { discriminator, title, description, nullable, ...skipped } = value;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
6
8
|
const fields = {
|
|
7
9
|
title,
|
|
8
10
|
description,
|
|
9
11
|
nullable,
|
|
10
|
-
discriminator: toDiscriminatorV3({
|
|
11
|
-
|
|
12
|
-
trail: trail.add('allOf').add('discriminator'),
|
|
13
|
-
context
|
|
14
|
-
}),
|
|
15
|
-
members: members.map((item, index) => toSchemaV3({
|
|
16
|
-
schema: item,
|
|
17
|
-
trail: trail.add('allOf').add(`${index}`),
|
|
18
|
-
context
|
|
19
|
-
}))
|
|
12
|
+
discriminator: tracer(context, 'discriminator', () => toDiscriminatorV3({ discriminator, context })),
|
|
13
|
+
members: members.map((schema, index) => tracer(context, index, () => toSchemaV3({ schema, context })))
|
|
20
14
|
};
|
|
21
|
-
return new OasIntersection(
|
|
15
|
+
return new OasIntersection(fields);
|
|
22
16
|
};
|
|
@@ -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
|
import type { OasSchema } from '../schema/Schema.js';
|
|
6
3
|
import type { OasExample } from '../example/Example.js';
|
|
@@ -9,19 +6,12 @@ export type MediaTypeFields = {
|
|
|
9
6
|
schema: OasSchema | OasRef<'schema'> | undefined;
|
|
10
7
|
examples: Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
11
8
|
};
|
|
12
|
-
|
|
13
|
-
fields: MediaTypeFields;
|
|
14
|
-
trail: Trail;
|
|
15
|
-
context: CoreContext;
|
|
16
|
-
skipped: Record<string, unknown>;
|
|
17
|
-
};
|
|
18
|
-
export declare class OasMediaType extends OasBase {
|
|
9
|
+
export declare class OasMediaType {
|
|
19
10
|
#private;
|
|
20
11
|
oasType: 'mediaType';
|
|
21
|
-
constructor(
|
|
12
|
+
constructor(fields: MediaTypeFields);
|
|
22
13
|
get mediaType(): string;
|
|
23
14
|
get schema(): OasSchema | OasRef<'schema'> | undefined;
|
|
24
15
|
get examples(): Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
25
16
|
}
|
|
26
|
-
export {};
|
|
27
17
|
//# sourceMappingURL=MediaType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaType.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/MediaType.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MediaType.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/MediaType.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,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,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;CACrE,CAAA;AAED,qBAAa,YAAY;;IACvB,OAAO,EAAE,WAAW,CAAc;gBAGtB,MAAM,EAAE,eAAe;IAInC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,MAAM,IAAI,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAErD;IAED,IAAI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAEzE;CACF"}
|
|
@@ -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 _OasMediaType_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasMediaType {
|
|
14
|
+
constructor(fields) {
|
|
17
15
|
Object.defineProperty(this, "oasType", {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
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"}
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import { toOptionalSchemaV3 } from '../schema/toSchemasV3.js';
|
|
2
2
|
import { toExamplesV3 } from '../example/toExamplesV3.js';
|
|
3
3
|
import { OasMediaType } from './MediaType.js';
|
|
4
|
-
|
|
4
|
+
import { tracer } from '../../helpers/tracer.js';
|
|
5
|
+
export const toMediaTypeItemV3 = ({ mediaTypeItem, mediaType, context }) => {
|
|
5
6
|
const { schema, example, examples, ...skipped } = mediaTypeItem;
|
|
7
|
+
context.logSkippedFields(skipped);
|
|
6
8
|
const fields = {
|
|
7
9
|
mediaType,
|
|
8
|
-
schema:
|
|
9
|
-
examples: toExamplesV3({
|
|
10
|
+
schema: tracer(context, 'schema', () => toOptionalSchemaV3({ schema, context })),
|
|
11
|
+
examples: tracer(context, 'examples', () => toExamplesV3({
|
|
10
12
|
example,
|
|
11
13
|
examples,
|
|
12
14
|
exampleKey: mediaType,
|
|
13
|
-
trail: trail.add('examples'),
|
|
14
15
|
context
|
|
15
|
-
})
|
|
16
|
+
}))
|
|
16
17
|
};
|
|
17
|
-
return new OasMediaType(
|
|
18
|
+
return new OasMediaType(fields);
|
|
18
19
|
};
|
|
19
|
-
export const toMediaTypeItemsV3 = ({ content,
|
|
20
|
-
return Object.fromEntries(Object.entries(content).map(([mediaType, value]) =>
|
|
21
|
-
|
|
20
|
+
export const toMediaTypeItemsV3 = ({ content, context }) => {
|
|
21
|
+
return Object.fromEntries(Object.entries(content).map(([mediaType, value]) => [
|
|
22
|
+
mediaType,
|
|
23
|
+
tracer(context, mediaType, () => toMediaTypeItemV3({
|
|
24
|
+
mediaTypeItem: value,
|
|
22
25
|
mediaType,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
trail: trail.add(mediaType),
|
|
27
|
-
context
|
|
28
|
-
})
|
|
29
|
-
];
|
|
30
|
-
}));
|
|
26
|
+
context
|
|
27
|
+
}))
|
|
28
|
+
]));
|
|
31
29
|
};
|
|
32
|
-
export const toOptionalMediaTypeItemsV3 = ({ content,
|
|
30
|
+
export const toOptionalMediaTypeItemsV3 = ({ content, context }) => {
|
|
33
31
|
if (!content) {
|
|
34
32
|
return;
|
|
35
33
|
}
|
|
36
|
-
return toMediaTypeItemsV3({ content,
|
|
34
|
+
return toMediaTypeItemsV3({ content, context });
|
|
37
35
|
};
|
|
@@ -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"}
|
package/esm/oas/number/Number.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 _OasNumber_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor({ fields, trail, skipped, context }) {
|
|
16
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasNumber {
|
|
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 { 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"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { OasNumber } from './Number.js';
|
|
2
|
-
export const toNumber = ({ value,
|
|
2
|
+
export const toNumber = ({ value, context }) => {
|
|
3
3
|
const { type: _type, title, description, nullable, ...skipped } = value;
|
|
4
|
+
context.logSkippedFields(skipped);
|
|
4
5
|
const fields = {
|
|
5
6
|
title,
|
|
6
7
|
description,
|
|
7
8
|
nullable
|
|
8
9
|
};
|
|
9
|
-
return new OasNumber(
|
|
10
|
+
return new OasNumber(fields);
|
|
10
11
|
};
|
|
@@ -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"}
|
package/esm/oas/object/Object.js
CHANGED
|
@@ -10,11 +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 _OasObject_fields;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export class OasObject extends OasBase {
|
|
16
|
-
constructor({ fields, trail, skipped, context }) {
|
|
17
|
-
super({ trail, skipped, context });
|
|
13
|
+
export class OasObject {
|
|
14
|
+
constructor(fields) {
|
|
18
15
|
Object.defineProperty(this, "oasType", {
|
|
19
16
|
enumerable: true,
|
|
20
17
|
configurable: true,
|
|
@@ -31,15 +28,10 @@ export class OasObject extends OasBase {
|
|
|
31
28
|
__classPrivateFieldSet(this, _OasObject_fields, fields, "f");
|
|
32
29
|
}
|
|
33
30
|
/** Creates new empty OasObject */
|
|
34
|
-
static empty(
|
|
31
|
+
static empty() {
|
|
35
32
|
return new OasObject({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
required: []
|
|
39
|
-
},
|
|
40
|
-
trail: new Trail(),
|
|
41
|
-
context,
|
|
42
|
-
skipped: {}
|
|
33
|
+
properties: {},
|
|
34
|
+
required: []
|
|
43
35
|
});
|
|
44
36
|
}
|
|
45
37
|
get title() {
|
|
@@ -65,35 +57,25 @@ export class OasObject extends OasBase {
|
|
|
65
57
|
return this;
|
|
66
58
|
}
|
|
67
59
|
return new OasObject({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
properties
|
|
71
|
-
|
|
72
|
-
[name]: schema
|
|
73
|
-
},
|
|
74
|
-
required: required
|
|
75
|
-
? [...__classPrivateFieldGet(this, _OasObject_fields, "f").required, name]
|
|
76
|
-
: __classPrivateFieldGet(this, _OasObject_fields, "f").required
|
|
60
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f"),
|
|
61
|
+
properties: {
|
|
62
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f").properties,
|
|
63
|
+
[name]: schema
|
|
77
64
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
required: required
|
|
66
|
+
? [...(__classPrivateFieldGet(this, _OasObject_fields, "f").required ?? []), name]
|
|
67
|
+
: __classPrivateFieldGet(this, _OasObject_fields, "f").required
|
|
81
68
|
});
|
|
82
69
|
}
|
|
83
70
|
removeProperty({ name }) {
|
|
84
|
-
if (!__classPrivateFieldGet(this, _OasObject_fields, "f").properties[name]) {
|
|
71
|
+
if (!__classPrivateFieldGet(this, _OasObject_fields, "f").properties?.[name]) {
|
|
85
72
|
return this;
|
|
86
73
|
}
|
|
87
74
|
const { [name]: _removed, ...properties } = __classPrivateFieldGet(this, _OasObject_fields, "f").properties;
|
|
88
75
|
return new OasObject({
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
required: __classPrivateFieldGet(this, _OasObject_fields, "f").required.filter(n => n !== name)
|
|
93
|
-
},
|
|
94
|
-
trail: this.trail.clone(),
|
|
95
|
-
context: this.context,
|
|
96
|
-
skipped: {}
|
|
76
|
+
...__classPrivateFieldGet(this, _OasObject_fields, "f"),
|
|
77
|
+
properties,
|
|
78
|
+
required: __classPrivateFieldGet(this, _OasObject_fields, "f").required?.filter(n => n !== name)
|
|
97
79
|
});
|
|
98
80
|
}
|
|
99
81
|
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"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { toSchemaV3 } from '../schema/toSchemasV3.js';
|
|
2
|
-
export const toAdditionalPropertiesV3 = ({ additionalProperties,
|
|
2
|
+
export const toAdditionalPropertiesV3 = ({ additionalProperties, context }) => {
|
|
3
3
|
if (typeof additionalProperties === 'boolean') {
|
|
4
4
|
return additionalProperties;
|
|
5
5
|
}
|
|
6
6
|
if (additionalProperties === undefined) {
|
|
7
7
|
return undefined;
|
|
8
8
|
}
|
|
9
|
-
return toSchemaV3({
|
|
10
|
-
schema: additionalProperties,
|
|
11
|
-
trail,
|
|
12
|
-
context
|
|
13
|
-
});
|
|
9
|
+
return toSchemaV3({ schema: additionalProperties, context });
|
|
14
10
|
};
|