@skmtc/core 0.38.0 → 0.40.0
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.js +22 -8
- package/esm/context/GenerateContext.d.ts +5 -4
- package/esm/context/GenerateContext.js +110 -37
- package/esm/context/ParseContext.d.ts +9 -1
- package/esm/context/ParseContext.js +12 -1
- package/esm/context/generateTypes.d.ts +19 -4
- package/esm/context/generateTypes.js +2 -0
- package/esm/context/toGenerationFailure.d.ts +21 -0
- package/esm/context/toGenerationFailure.js +38 -0
- package/esm/dsl/CustomValue.d.ts +4 -0
- package/esm/dsl/CustomValue.js +8 -0
- package/esm/dsl/Definition.d.ts +10 -0
- package/esm/dsl/Definition.js +14 -0
- package/esm/dsl/PendingDefinition.d.ts +47 -0
- package/esm/dsl/PendingDefinition.js +83 -0
- package/esm/dsl/model/ModelDriver.d.ts +55 -1
- package/esm/dsl/model/ModelDriver.js +228 -51
- package/esm/dsl/model/toModelEntry.d.ts +1 -1
- package/esm/dsl/model/toModelEntry.js +1 -1
- package/esm/dsl/model/types.d.ts +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.js +1 -4
- package/esm/dsl/webhook/WebhookDriver.js +1 -4
- package/esm/enrichments/parseEnrichmentUmbrella.d.ts +5 -6
- package/esm/enrichments/parseEnrichmentUmbrella.js +23 -8
- package/esm/enrichments/parseEnrichmentValue.d.ts +17 -0
- package/esm/enrichments/parseEnrichmentValue.js +32 -0
- package/esm/enrichments/readEnrichments.d.ts +5 -5
- package/esm/enrichments/readEnrichments.js +17 -7
- package/esm/mod.d.ts +1 -0
- package/esm/mod.js +1 -0
- package/esm/oas/array/Array.d.ts +19 -0
- package/esm/oas/array/Array.js +47 -0
- package/esm/oas/boolean/Boolean.d.ts +19 -0
- package/esm/oas/boolean/Boolean.js +51 -8
- package/esm/oas/example/Example.d.ts +4 -0
- package/esm/oas/example/Example.js +8 -0
- package/esm/oas/header/Header.d.ts +4 -0
- package/esm/oas/header/Header.js +8 -0
- package/esm/oas/integer/Integer.d.ts +19 -0
- package/esm/oas/integer/Integer.js +49 -0
- package/esm/oas/link/Link.d.ts +4 -0
- package/esm/oas/link/Link.js +8 -0
- package/esm/oas/number/Number.d.ts +19 -0
- package/esm/oas/number/Number.js +49 -0
- package/esm/oas/object/Object.d.ts +19 -0
- package/esm/oas/object/Object.js +68 -18
- package/esm/oas/operation/Operation.d.ts +5 -1
- package/esm/oas/operation/Operation.js +17 -5
- package/esm/oas/operation/toEffectiveParameters.d.ts +16 -0
- package/esm/oas/operation/toEffectiveParameters.js +13 -0
- package/esm/oas/parameter/Parameter.d.ts +4 -0
- package/esm/oas/parameter/Parameter.js +8 -0
- package/esm/oas/ref/Ref.d.ts +147 -25
- package/esm/oas/ref/Ref.js +387 -25
- package/esm/oas/requestBody/RequestBody.d.ts +4 -0
- package/esm/oas/requestBody/RequestBody.js +8 -0
- package/esm/oas/response/Response.d.ts +4 -0
- package/esm/oas/response/Response.js +8 -0
- package/esm/oas/schema/siblings.d.ts +127 -0
- package/esm/oas/schema/siblings.js +240 -0
- package/esm/oas/securitySchemes/SecurityScheme.d.ts +16 -0
- package/esm/oas/securitySchemes/SecurityScheme.js +32 -0
- package/esm/oas/string/String.d.ts +19 -0
- package/esm/oas/string/String.js +47 -0
- package/esm/oas/union/Union.d.ts +31 -0
- package/esm/oas/union/Union.js +100 -0
- package/esm/oas/unknown/Unknown.d.ts +18 -0
- package/esm/oas/unknown/Unknown.js +38 -0
- package/esm/oas/void/Void.d.ts +4 -0
- package/esm/oas/void/Void.js +8 -0
- package/esm/oas/webhook/Webhook.d.ts +2 -2
- package/esm/oas/webhook/Webhook.js +6 -5
- package/esm/parse/allOfSystem.d.ts +32 -0
- package/esm/parse/allOfSystem.js +30 -0
- package/esm/parse/anyOfSystem.d.ts +68 -0
- package/esm/parse/anyOfSystem.js +107 -0
- package/esm/parse/toSiblingKeywords.d.ts +28 -0
- package/esm/parse/toSiblingKeywords.js +109 -0
- package/esm/parse/v3-0/_merge-all-of/decompose-union.d.ts +8 -0
- package/esm/parse/v3-0/_merge-all-of/decompose-union.js +9 -1
- package/esm/parse/v3-0/_merge-all-of/generic-merge.d.ts +2 -3
- package/esm/parse/v3-0/_merge-all-of/generic-merge.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-array-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-array-constraints.js +5 -5
- package/esm/parse/v3-0/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-integer-constraints.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-intersection.d.ts +3 -2
- package/esm/parse/v3-0/_merge-all-of/merge-intersection.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-number-constraints.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-object-constraints.js +3 -3
- package/esm/parse/v3-0/_merge-all-of/merge-properties.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-properties.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-string-constraints.js +3 -3
- package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts +10 -3
- package/esm/parse/v3-0/_merge-all-of/merge-union.js +50 -12
- package/esm/parse/v3-0/_merge-all-of/merge.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge.js +78 -27
- package/esm/parse/v3-0/_merge-all-of/nullable-merge.d.ts +4 -0
- package/esm/parse/v3-0/_merge-all-of/nullable-merge.js +9 -7
- package/esm/parse/v3-0/_merge-all-of/types.d.ts +33 -0
- package/esm/parse/v3-0/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-0/ref/toRefV31.js +2 -2
- package/esm/parse/v3-0/schema/toSchemasV3.js +107 -15
- package/esm/parse/v3-1/_merge-all-of/decompose-union.d.ts +7 -1
- package/esm/parse/v3-1/_merge-all-of/decompose-union.js +8 -2
- package/esm/parse/v3-1/_merge-all-of/generic-merge.d.ts +2 -3
- package/esm/parse/v3-1/_merge-all-of/generic-merge.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-array-constraints.d.ts +3 -2
- package/esm/parse/v3-1/_merge-all-of/merge-array-constraints.js +5 -5
- package/esm/parse/v3-1/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-integer-constraints.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-intersection.d.ts +3 -2
- package/esm/parse/v3-1/_merge-all-of/merge-intersection.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-number-constraints.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-object-constraints.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge-properties.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-properties.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/esm/parse/v3-1/_merge-all-of/merge-string-constraints.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts +10 -3
- package/esm/parse/v3-1/_merge-all-of/merge-union.js +54 -15
- package/esm/parse/v3-1/_merge-all-of/merge.d.ts +3 -2
- package/esm/parse/v3-1/_merge-all-of/merge.js +88 -29
- package/esm/parse/v3-1/_merge-all-of/nullable-merge.d.ts +4 -0
- package/esm/parse/v3-1/_merge-all-of/nullable-merge.js +9 -7
- package/esm/parse/v3-1/_merge-all-of/types.d.ts +37 -0
- package/esm/parse/v3-1/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-1/ref/toRefV31.js +2 -2
- package/esm/parse/v3-1/schema/toSchemasV3.js +111 -16
- package/esm/parse/v3-2/_merge-all-of/decompose-union.d.ts +7 -1
- package/esm/parse/v3-2/_merge-all-of/decompose-union.js +8 -2
- package/esm/parse/v3-2/_merge-all-of/generic-merge.d.ts +2 -3
- package/esm/parse/v3-2/_merge-all-of/generic-merge.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-array-constraints.d.ts +3 -2
- package/esm/parse/v3-2/_merge-all-of/merge-array-constraints.js +5 -5
- package/esm/parse/v3-2/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-integer-constraints.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-intersection.d.ts +3 -2
- package/esm/parse/v3-2/_merge-all-of/merge-intersection.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-number-constraints.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-object-constraints.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge-properties.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-properties.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/esm/parse/v3-2/_merge-all-of/merge-string-constraints.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge-union.d.ts +10 -3
- package/esm/parse/v3-2/_merge-all-of/merge-union.js +54 -15
- package/esm/parse/v3-2/_merge-all-of/merge.d.ts +3 -2
- package/esm/parse/v3-2/_merge-all-of/merge.js +88 -29
- package/esm/parse/v3-2/_merge-all-of/nullable-merge.d.ts +4 -0
- package/esm/parse/v3-2/_merge-all-of/nullable-merge.js +9 -7
- package/esm/parse/v3-2/_merge-all-of/types.d.ts +37 -0
- package/esm/parse/v3-2/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-2/ref/toRefV31.js +2 -2
- package/esm/parse/v3-2/schema/toSchemasV3.js +111 -16
- package/esm/types/OasBase.d.ts +1 -1
- package/esm/types/Settings.d.ts +34 -0
- package/esm/types/Settings.js +8 -0
- package/package.json +1 -1
- package/script/context/CoreContext.js +22 -8
- package/script/context/GenerateContext.d.ts +5 -4
- package/script/context/GenerateContext.js +110 -37
- package/script/context/ParseContext.d.ts +9 -1
- package/script/context/ParseContext.js +12 -1
- package/script/context/generateTypes.d.ts +19 -4
- package/script/context/generateTypes.js +2 -0
- package/script/context/toGenerationFailure.d.ts +21 -0
- package/script/context/toGenerationFailure.js +43 -0
- package/script/dsl/CustomValue.d.ts +4 -0
- package/script/dsl/CustomValue.js +8 -0
- package/script/dsl/Definition.d.ts +10 -0
- package/script/dsl/Definition.js +14 -0
- package/script/dsl/PendingDefinition.d.ts +47 -0
- package/script/dsl/PendingDefinition.js +87 -0
- package/script/dsl/model/ModelDriver.d.ts +55 -1
- package/script/dsl/model/ModelDriver.js +231 -52
- package/script/dsl/model/toModelEntry.d.ts +1 -1
- package/script/dsl/model/toModelEntry.js +1 -1
- package/script/dsl/model/types.d.ts +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.js +1 -4
- package/script/dsl/webhook/WebhookDriver.js +1 -4
- package/script/enrichments/parseEnrichmentUmbrella.d.ts +5 -6
- package/script/enrichments/parseEnrichmentUmbrella.js +23 -41
- package/script/enrichments/parseEnrichmentValue.d.ts +17 -0
- package/script/enrichments/parseEnrichmentValue.js +69 -0
- package/script/enrichments/readEnrichments.d.ts +5 -5
- package/script/enrichments/readEnrichments.js +17 -40
- package/script/mod.d.ts +1 -0
- package/script/mod.js +1 -0
- package/script/oas/array/Array.d.ts +19 -0
- package/script/oas/array/Array.js +47 -0
- package/script/oas/boolean/Boolean.d.ts +19 -0
- package/script/oas/boolean/Boolean.js +51 -8
- package/script/oas/example/Example.d.ts +4 -0
- package/script/oas/example/Example.js +8 -0
- package/script/oas/header/Header.d.ts +4 -0
- package/script/oas/header/Header.js +8 -0
- package/script/oas/integer/Integer.d.ts +19 -0
- package/script/oas/integer/Integer.js +49 -0
- package/script/oas/link/Link.d.ts +4 -0
- package/script/oas/link/Link.js +8 -0
- package/script/oas/number/Number.d.ts +19 -0
- package/script/oas/number/Number.js +49 -0
- package/script/oas/object/Object.d.ts +19 -0
- package/script/oas/object/Object.js +68 -18
- package/script/oas/operation/Operation.d.ts +5 -1
- package/script/oas/operation/Operation.js +17 -5
- package/script/oas/operation/toEffectiveParameters.d.ts +16 -0
- package/script/oas/operation/toEffectiveParameters.js +17 -0
- package/script/oas/parameter/Parameter.d.ts +4 -0
- package/script/oas/parameter/Parameter.js +8 -0
- package/script/oas/ref/Ref.d.ts +147 -25
- package/script/oas/ref/Ref.js +387 -25
- package/script/oas/requestBody/RequestBody.d.ts +4 -0
- package/script/oas/requestBody/RequestBody.js +8 -0
- package/script/oas/response/Response.d.ts +4 -0
- package/script/oas/response/Response.js +8 -0
- package/script/oas/schema/siblings.d.ts +127 -0
- package/script/oas/schema/siblings.js +295 -0
- package/script/oas/securitySchemes/SecurityScheme.d.ts +16 -0
- package/script/oas/securitySchemes/SecurityScheme.js +32 -0
- package/script/oas/string/String.d.ts +19 -0
- package/script/oas/string/String.js +47 -0
- package/script/oas/union/Union.d.ts +31 -0
- package/script/oas/union/Union.js +100 -0
- package/script/oas/unknown/Unknown.d.ts +18 -0
- package/script/oas/unknown/Unknown.js +38 -0
- package/script/oas/void/Void.d.ts +4 -0
- package/script/oas/void/Void.js +8 -0
- package/script/oas/webhook/Webhook.d.ts +2 -2
- package/script/oas/webhook/Webhook.js +6 -5
- package/script/parse/allOfSystem.d.ts +32 -0
- package/script/parse/allOfSystem.js +35 -0
- package/script/parse/anyOfSystem.d.ts +68 -0
- package/script/parse/anyOfSystem.js +116 -0
- package/script/parse/toSiblingKeywords.d.ts +28 -0
- package/script/parse/toSiblingKeywords.js +146 -0
- package/script/parse/v3-0/_merge-all-of/decompose-union.d.ts +8 -0
- package/script/parse/v3-0/_merge-all-of/decompose-union.js +11 -2
- package/script/parse/v3-0/_merge-all-of/generic-merge.d.ts +2 -3
- package/script/parse/v3-0/_merge-all-of/generic-merge.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-array-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-array-constraints.js +5 -5
- package/script/parse/v3-0/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-integer-constraints.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-intersection.d.ts +3 -2
- package/script/parse/v3-0/_merge-all-of/merge-intersection.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-number-constraints.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-object-constraints.js +3 -3
- package/script/parse/v3-0/_merge-all-of/merge-properties.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-properties.js +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-string-constraints.js +3 -3
- package/script/parse/v3-0/_merge-all-of/merge-union.d.ts +10 -3
- package/script/parse/v3-0/_merge-all-of/merge-union.js +52 -13
- package/script/parse/v3-0/_merge-all-of/merge.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge.js +77 -26
- package/script/parse/v3-0/_merge-all-of/nullable-merge.d.ts +4 -0
- package/script/parse/v3-0/_merge-all-of/nullable-merge.js +9 -7
- package/script/parse/v3-0/_merge-all-of/types.d.ts +33 -0
- package/script/parse/v3-0/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-0/ref/toRefV31.js +2 -2
- package/script/parse/v3-0/schema/toSchemasV3.js +107 -15
- package/script/parse/v3-1/_merge-all-of/decompose-union.d.ts +7 -1
- package/script/parse/v3-1/_merge-all-of/decompose-union.js +8 -2
- package/script/parse/v3-1/_merge-all-of/generic-merge.d.ts +2 -3
- package/script/parse/v3-1/_merge-all-of/generic-merge.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-array-constraints.d.ts +3 -2
- package/script/parse/v3-1/_merge-all-of/merge-array-constraints.js +5 -5
- package/script/parse/v3-1/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-integer-constraints.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-intersection.d.ts +3 -2
- package/script/parse/v3-1/_merge-all-of/merge-intersection.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-number-constraints.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-object-constraints.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge-properties.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-properties.js +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/script/parse/v3-1/_merge-all-of/merge-string-constraints.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge-union.d.ts +10 -3
- package/script/parse/v3-1/_merge-all-of/merge-union.js +56 -16
- package/script/parse/v3-1/_merge-all-of/merge.d.ts +3 -2
- package/script/parse/v3-1/_merge-all-of/merge.js +87 -28
- package/script/parse/v3-1/_merge-all-of/nullable-merge.d.ts +4 -0
- package/script/parse/v3-1/_merge-all-of/nullable-merge.js +9 -7
- package/script/parse/v3-1/_merge-all-of/types.d.ts +37 -0
- package/script/parse/v3-1/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-1/ref/toRefV31.js +2 -2
- package/script/parse/v3-1/schema/toSchemasV3.js +111 -16
- package/script/parse/v3-2/_merge-all-of/decompose-union.d.ts +7 -1
- package/script/parse/v3-2/_merge-all-of/decompose-union.js +8 -2
- package/script/parse/v3-2/_merge-all-of/generic-merge.d.ts +2 -3
- package/script/parse/v3-2/_merge-all-of/generic-merge.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-array-constraints.d.ts +3 -2
- package/script/parse/v3-2/_merge-all-of/merge-array-constraints.js +5 -5
- package/script/parse/v3-2/_merge-all-of/merge-boolean-constraints.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-boolean-constraints.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-integer-constraints.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-integer-constraints.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-intersection.d.ts +3 -2
- package/script/parse/v3-2/_merge-all-of/merge-intersection.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-number-constraints.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-number-constraints.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-object-constraints.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-object-constraints.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge-properties.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-properties.js +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-string-constraints.d.ts +2 -2
- package/script/parse/v3-2/_merge-all-of/merge-string-constraints.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge-union.d.ts +10 -3
- package/script/parse/v3-2/_merge-all-of/merge-union.js +56 -16
- package/script/parse/v3-2/_merge-all-of/merge.d.ts +3 -2
- package/script/parse/v3-2/_merge-all-of/merge.js +87 -28
- package/script/parse/v3-2/_merge-all-of/nullable-merge.d.ts +4 -0
- package/script/parse/v3-2/_merge-all-of/nullable-merge.js +9 -7
- package/script/parse/v3-2/_merge-all-of/types.d.ts +37 -0
- package/script/parse/v3-2/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-2/ref/toRefV31.js +2 -2
- package/script/parse/v3-2/schema/toSchemasV3.js +111 -16
- package/script/types/OasBase.d.ts +1 -1
- package/script/types/Settings.d.ts +34 -0
- package/script/types/Settings.js +9 -1
package/script/oas/ref/Ref.d.ts
CHANGED
|
@@ -13,26 +13,26 @@ import type { RefName } from '../../types/RefName.js';
|
|
|
13
13
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
14
14
|
import type { OasSecurityScheme } from '../securitySchemes/SecurityScheme.js';
|
|
15
15
|
import { OasBase } from '../../types/OasBase.js';
|
|
16
|
+
import { type SiblingKeywords } from '../schema/siblings.js';
|
|
16
17
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* What a reference reads from the parse context when it is made: the document
|
|
20
|
+
* it resolves through, and the trail it records. `clone` passes them itself.
|
|
21
|
+
*/
|
|
22
|
+
type RefContext = Pick<ParseContextType, 'parsedDocument' | 'currentStackTrail'>;
|
|
23
|
+
/**
|
|
24
|
+
* Field data for creating OAS reference objects: the reference, its use-site
|
|
25
|
+
* flags, and the other keywords next to it in a one-member `allOf`
|
|
26
|
+
* (`{ allOf: [{ $ref }], minLength: 3, description: '…' }`), parsed without
|
|
27
|
+
* the target's type (see {@link SiblingKeywords}). {@link OasRef.resolve}
|
|
28
|
+
* applies the keywords to a copy of the target, so the shared target never
|
|
29
|
+
* changes, and the reference stays lazy, so a self-reference still ends.
|
|
19
30
|
*
|
|
20
31
|
* @template T - The type of component being referenced (e.g., 'schema', 'response')
|
|
21
32
|
*/
|
|
22
|
-
export type RefFields<T extends OasRefData['refType']> = {
|
|
33
|
+
export type RefFields<T extends OasRefData['refType']> = SiblingKeywords & {
|
|
23
34
|
refType: T;
|
|
24
35
|
$ref: string;
|
|
25
|
-
/**
|
|
26
|
-
* Use-site nullability. A `$ref` is a per-reference node: the same
|
|
27
|
-
* refName may be referenced nullable at one site and non-nullable at
|
|
28
|
-
* another, so nullability rides the reference, not the shared referent.
|
|
29
|
-
* Set by the single-member `oneOf`/`anyOf` collapse for the 3.1
|
|
30
|
-
* `oneOf:[{$ref},{type:null}]` idiom; consumed directly by generators
|
|
31
|
-
* (`'nullable' in schema ? schema.nullable`) to render `Foo | null`,
|
|
32
|
-
* while `ModelDriver` builds the un-nullable shared model from the
|
|
33
|
-
* refName.
|
|
34
|
-
*/
|
|
35
|
-
nullable?: boolean;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* Represents an OpenAPI reference ($ref) in the SKMTC OAS processing system.
|
|
@@ -126,16 +126,81 @@ export declare class OasRef<T extends OasRefData['refType']> extends OasBase {
|
|
|
126
126
|
oasType: 'ref';
|
|
127
127
|
/** Type identifier */
|
|
128
128
|
type: 'ref';
|
|
129
|
+
/** The kind of component the reference points to. */
|
|
130
|
+
refType: T;
|
|
131
|
+
/** The JSON Reference: `#/components/<bucket>/<name>`. */
|
|
132
|
+
$ref: string;
|
|
133
|
+
/**
|
|
134
|
+
* Use-site nullability (see {@link SiblingKeywords.nullable}). Assigned
|
|
135
|
+
* even when `undefined`, so `'nullable' in ref` is always true and the
|
|
136
|
+
* value-function nullable read picks it up uniformly.
|
|
137
|
+
*/
|
|
138
|
+
nullable: SiblingKeywords['nullable'];
|
|
139
|
+
/** Use-site `readOnly` (see {@link SiblingKeywords.readOnly}). */
|
|
140
|
+
readOnly: SiblingKeywords['readOnly'];
|
|
141
|
+
/** Use-site `writeOnly` (see {@link SiblingKeywords.writeOnly}). */
|
|
142
|
+
writeOnly: SiblingKeywords['writeOnly'];
|
|
143
|
+
/** The `type` written next to this reference (see {@link SiblingKeywords._type}). */
|
|
144
|
+
_type: SiblingKeywords['_type'];
|
|
145
|
+
/** The `title` next to this reference (see {@link SiblingKeywords}). */
|
|
146
|
+
title: SiblingKeywords['title'];
|
|
147
|
+
/** The `description` next to this reference (see {@link SiblingKeywords}). */
|
|
148
|
+
description: SiblingKeywords['description'];
|
|
149
|
+
/** The `deprecated` next to this reference (see {@link SiblingKeywords}). */
|
|
150
|
+
deprecated: SiblingKeywords['deprecated'];
|
|
151
|
+
/** The `example` next to this reference (see {@link SiblingKeywords}). */
|
|
152
|
+
example: SiblingKeywords['example'];
|
|
153
|
+
/** The `default` next to this reference (see {@link SiblingKeywords}). */
|
|
154
|
+
default: SiblingKeywords['default'];
|
|
155
|
+
/** The `enum` next to this reference (see {@link SiblingKeywords}). */
|
|
156
|
+
enums: SiblingKeywords['enums'];
|
|
157
|
+
/** The extensions (`x-*`) next to this reference (see {@link SiblingKeywords}). */
|
|
158
|
+
extensionFields: SiblingKeywords['extensionFields'];
|
|
159
|
+
/** The `format` next to this reference (see {@link SiblingKeywords}). */
|
|
160
|
+
format: SiblingKeywords['format'];
|
|
161
|
+
/** The `minLength` next to this reference (see {@link SiblingKeywords}). */
|
|
162
|
+
minLength: SiblingKeywords['minLength'];
|
|
163
|
+
/** The `maxLength` next to this reference (see {@link SiblingKeywords}). */
|
|
164
|
+
maxLength: SiblingKeywords['maxLength'];
|
|
165
|
+
/** The `pattern` next to this reference (see {@link SiblingKeywords}). */
|
|
166
|
+
pattern: SiblingKeywords['pattern'];
|
|
167
|
+
/** The `multipleOf` next to this reference (see {@link SiblingKeywords}). */
|
|
168
|
+
multipleOf: SiblingKeywords['multipleOf'];
|
|
169
|
+
/** The `minimum` next to this reference (see {@link SiblingKeywords}). */
|
|
170
|
+
minimum: SiblingKeywords['minimum'];
|
|
171
|
+
/** The `maximum` next to this reference (see {@link SiblingKeywords}). */
|
|
172
|
+
maximum: SiblingKeywords['maximum'];
|
|
173
|
+
/** The `exclusiveMinimum` next to this reference (see {@link SiblingKeywords}). */
|
|
174
|
+
exclusiveMinimum: SiblingKeywords['exclusiveMinimum'];
|
|
175
|
+
/** The `exclusiveMaximum` next to this reference (see {@link SiblingKeywords}). */
|
|
176
|
+
exclusiveMaximum: SiblingKeywords['exclusiveMaximum'];
|
|
177
|
+
/** The `minItems` next to this reference (see {@link SiblingKeywords}). */
|
|
178
|
+
minItems: SiblingKeywords['minItems'];
|
|
179
|
+
/** The `maxItems` next to this reference (see {@link SiblingKeywords}). */
|
|
180
|
+
maxItems: SiblingKeywords['maxItems'];
|
|
181
|
+
/** The `uniqueItems` next to this reference (see {@link SiblingKeywords}). */
|
|
182
|
+
uniqueItems: SiblingKeywords['uniqueItems'];
|
|
183
|
+
/** The `properties` next to this reference (see {@link SiblingKeywords}). */
|
|
184
|
+
properties: SiblingKeywords['properties'];
|
|
185
|
+
/** The `required` next to this reference (see {@link SiblingKeywords}). */
|
|
186
|
+
required: SiblingKeywords['required'];
|
|
187
|
+
/** The `additionalProperties` next to this reference (see {@link SiblingKeywords}). */
|
|
188
|
+
additionalProperties: SiblingKeywords['additionalProperties'];
|
|
189
|
+
/** The `minProperties` next to this reference (see {@link SiblingKeywords}). */
|
|
190
|
+
minProperties: SiblingKeywords['minProperties'];
|
|
191
|
+
/** The `maxProperties` next to this reference (see {@link SiblingKeywords}). */
|
|
192
|
+
maxProperties: SiblingKeywords['maxProperties'];
|
|
129
193
|
/**
|
|
130
194
|
* Creates a new OAS reference instance.
|
|
131
195
|
*
|
|
132
196
|
* @param fields - Reference field data including refType and $ref
|
|
133
|
-
* @param
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* schema refs)
|
|
197
|
+
* @param context - The parse context, or what `clone` passes in its place:
|
|
198
|
+
* the discriminated document containing the referenced component (for
|
|
199
|
+
* OAS, refs resolve through the document's components; for GQL, through
|
|
200
|
+
* the document's registry, as GQL only ever creates schema refs) and the
|
|
201
|
+
* current trail.
|
|
137
202
|
*/
|
|
138
|
-
constructor(fields: RefFields<T>, context:
|
|
203
|
+
constructor(fields: RefFields<T>, context: RefContext);
|
|
139
204
|
/**
|
|
140
205
|
* Type guard to check if this instance is a reference.
|
|
141
206
|
*
|
|
@@ -146,7 +211,15 @@ export declare class OasRef<T extends OasRefData['refType']> extends OasBase {
|
|
|
146
211
|
* Recursively resolves this reference to its final target component.
|
|
147
212
|
*
|
|
148
213
|
* Follows reference chains until reaching a non-reference component,
|
|
149
|
-
* with protection against infinite loops.
|
|
214
|
+
* with protection against infinite loops. A schema reference returns the
|
|
215
|
+
* schema at this site: when the keywords next to it, or next to a
|
|
216
|
+
* reference on the chain ({@link SiblingKeywords}), change the target, a
|
|
217
|
+
* copy of the target with them applied. When they change nothing, the
|
|
218
|
+
* shared target itself. `resolveOnce()` applies no siblings.
|
|
219
|
+
*
|
|
220
|
+
* The result is shared, so do not modify it: the shared target is the
|
|
221
|
+
* model every reference to it sees, and a copy is built once, kept on
|
|
222
|
+
* this reference, and returned on every call.
|
|
150
223
|
*
|
|
151
224
|
* @param lookupsPerformed - Internal counter to prevent infinite recursion
|
|
152
225
|
* @returns The resolved component
|
|
@@ -182,14 +255,55 @@ export declare class OasRef<T extends OasRefData['refType']> extends OasBase {
|
|
|
182
255
|
* @throws Error when called on a non-schema ref.
|
|
183
256
|
*/
|
|
184
257
|
traverse(path: SchemaPath): OasSchema | OasRef<'schema'>;
|
|
185
|
-
get $ref(): string;
|
|
186
|
-
get refType(): OasRefData['refType'];
|
|
187
258
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
259
|
+
* Whether this reference adds anything at its site: a use-site flag
|
|
260
|
+
* (`nullable`, `readOnly`, `writeOnly`) or another keyword next to it (see
|
|
261
|
+
* {@link RefFields}). {@link resolve} then returns a copy of the target with
|
|
262
|
+
* them applied, not the shared target.
|
|
191
263
|
*/
|
|
192
|
-
|
|
264
|
+
hasSiblings(): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* A copy of this reference with what `ref` adds at its site merged in: its
|
|
267
|
+
* flags, and its keywords over this reference's own
|
|
268
|
+
* ({@link mergeSiblingKeywords}). It points at the same target. Each schema
|
|
269
|
+
* class's `clone` does the same for a schema, so one step along a chain of
|
|
270
|
+
* references can carry a site's keywords (`resolveSchemaRefOnce`). This
|
|
271
|
+
* reference does not change.
|
|
272
|
+
*/
|
|
273
|
+
clone(ref?: OasRef<'schema'>): OasRef<T>;
|
|
274
|
+
/**
|
|
275
|
+
* Whether the keywords next to this reference change which values it
|
|
276
|
+
* accepts (`minLength` next to a string, `properties` next to an object),
|
|
277
|
+
* not only how it is described (`description`, `deprecated`, `x-*`). No
|
|
278
|
+
* shared model accepts the same values as such a site, so a generator
|
|
279
|
+
* applies these keywords where it renders the reference by name. See
|
|
280
|
+
* {@link changesValues}.
|
|
281
|
+
*/
|
|
282
|
+
hasValueSiblings(): boolean;
|
|
283
|
+
/**
|
|
284
|
+
* The keywords next to this reference that {@link resolve} leaves out, by
|
|
285
|
+
* their names in the document: ones the target's type does not take
|
|
286
|
+
* (`minLength` next to an array), a `type` that disagrees, and values that
|
|
287
|
+
* do not fit. The parser cannot tell them while the reference is lazy, so a
|
|
288
|
+
* generator logs them when it renders the site. See {@link toSkippedSiblings}.
|
|
289
|
+
*/
|
|
290
|
+
toSkippedSiblings(): string[];
|
|
291
|
+
/**
|
|
292
|
+
* Whether the value is `readOnly` at this site, as Forge reads it: on this
|
|
293
|
+
* reference (`{ allOf: [{ $ref }], readOnly: true }`), or on what it points
|
|
294
|
+
* to, through any chain of references. A `readOnly: false` does not undo
|
|
295
|
+
* another's `true`. `false` for a reference to anything but a schema.
|
|
296
|
+
*
|
|
297
|
+
* @param lookupsPerformed - Internal counter that stops a chain of references with no schema
|
|
298
|
+
*/
|
|
299
|
+
isReadOnly(lookupsPerformed?: number): boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Whether the value is `writeOnly` at this site: on this reference, or on
|
|
302
|
+
* what it points to, as {@link isReadOnly} reads `readOnly`.
|
|
303
|
+
*
|
|
304
|
+
* @param lookupsPerformed - Internal counter that stops a chain of references with no schema
|
|
305
|
+
*/
|
|
306
|
+
isWriteOnly(lookupsPerformed?: number): boolean;
|
|
193
307
|
/**
|
|
194
308
|
* Returns the discriminated parsed document this ref resolves
|
|
195
309
|
* through. OAS variant carries the parent `OasDocument`; GQL variant
|
|
@@ -197,7 +311,14 @@ export declare class OasRef<T extends OasRefData['refType']> extends OasBase {
|
|
|
197
311
|
* schemas).
|
|
198
312
|
*/
|
|
199
313
|
get document(): SkmtcParsedDocument;
|
|
314
|
+
/**
|
|
315
|
+
* The reference as JSON Schema. With `resolve`, the schema at this site,
|
|
316
|
+
* with the keywords next to the reference applied. Without it, only
|
|
317
|
+
* `{ $ref }`: the keywords next to the reference are not written yet
|
|
318
|
+
* (skmtc/skmtc#338).
|
|
319
|
+
*/
|
|
200
320
|
toJsonSchema({ resolve }: ToJsonSchemaOptions): OpenAPIV3.ReferenceObject | ResolvedRefJsonType<T>;
|
|
321
|
+
/** `{ $ref }` only, as {@link toJsonSchema} without `resolve` (skmtc/skmtc#338). */
|
|
201
322
|
toJSON(): object;
|
|
202
323
|
}
|
|
203
324
|
/**
|
|
@@ -220,3 +341,4 @@ export type OasComponentType = OasSchema | OasResponse | OasParameter | OasExamp
|
|
|
220
341
|
export type ResolvedRef<T extends OasRefData['refType']> = Extract<OasComponentType, {
|
|
221
342
|
oasType: T;
|
|
222
343
|
}>;
|
|
344
|
+
export {};
|