@skmtc/core 0.39.0 → 0.41.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 +6 -5
- package/esm/context/GenerateContext.js +112 -38
- package/esm/context/ParseContext.d.ts +18 -1
- package/esm/context/ParseContext.js +102 -3
- package/esm/context/generateTypes.d.ts +33 -4
- package/esm/context/generateTypes.js +4 -0
- package/esm/context/toGenerationFailure.d.ts +21 -0
- package/esm/context/toGenerationFailure.js +38 -0
- package/esm/context/tryParseAt.d.ts +4 -1
- package/esm/context/tryParseAt.js +10 -3
- 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/helpers/collateExamples.js +15 -5
- package/esm/helpers/refFns.d.ts +6 -2
- package/esm/helpers/refFns.js +24 -7
- package/esm/mod.d.ts +2 -0
- package/esm/mod.js +2 -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 +8 -1
- package/esm/oas/operation/Operation.js +18 -5
- package/esm/oas/operation/toEffectiveParameters.d.ts +24 -0
- package/esm/oas/operation/toEffectiveParameters.js +42 -0
- package/esm/oas/parameter/Parameter.d.ts +4 -0
- package/esm/oas/parameter/Parameter.js +8 -0
- package/esm/oas/ref/DanglingRefError.d.ts +22 -0
- package/esm/oas/ref/DanglingRefError.js +33 -0
- package/esm/oas/ref/Ref.d.ts +152 -25
- package/esm/oas/ref/Ref.js +414 -26
- 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 +250 -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 +32 -0
- package/esm/oas/union/Union.js +111 -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 +4 -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/securityRequirements.d.ts +6 -0
- package/esm/parse/securityRequirements.js +8 -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/mediaType/toMediaTypeItemV3.js +4 -3
- package/esm/parse/v3-0/parameter/toParameterV3.js +4 -3
- package/esm/parse/v3-0/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-0/ref/toRefV31.js +6 -3
- 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/mediaType/toMediaTypeItemV3.js +4 -3
- package/esm/parse/v3-1/parameter/toParameterV3.js +4 -3
- package/esm/parse/v3-1/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-1/ref/toRefV31.js +6 -3
- 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/mediaType/toMediaTypeItemV3.js +4 -3
- package/esm/parse/v3-2/parameter/toParameterV3.js +4 -3
- package/esm/parse/v3-2/ref/toRefV31.d.ts +7 -1
- package/esm/parse/v3-2/ref/toRefV31.js +6 -3
- package/esm/parse/v3-2/schema/toSchemasV3.js +111 -16
- package/esm/types/OasBase.d.ts +1 -1
- package/esm/types/Settings.d.ts +44 -0
- package/esm/types/Settings.js +9 -0
- package/package.json +5 -1
- package/script/context/CoreContext.js +22 -8
- package/script/context/GenerateContext.d.ts +6 -5
- package/script/context/GenerateContext.js +112 -38
- package/script/context/ParseContext.d.ts +18 -1
- package/script/context/ParseContext.js +102 -3
- package/script/context/generateTypes.d.ts +33 -4
- package/script/context/generateTypes.js +4 -0
- package/script/context/toGenerationFailure.d.ts +21 -0
- package/script/context/toGenerationFailure.js +43 -0
- package/script/context/tryParseAt.d.ts +4 -1
- package/script/context/tryParseAt.js +10 -3
- 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/helpers/collateExamples.js +15 -5
- package/script/helpers/refFns.d.ts +6 -2
- package/script/helpers/refFns.js +24 -7
- package/script/mod.d.ts +2 -0
- package/script/mod.js +2 -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 +8 -1
- package/script/oas/operation/Operation.js +18 -5
- package/script/oas/operation/toEffectiveParameters.d.ts +24 -0
- package/script/oas/operation/toEffectiveParameters.js +47 -0
- package/script/oas/parameter/Parameter.d.ts +4 -0
- package/script/oas/parameter/Parameter.js +8 -0
- package/script/oas/ref/DanglingRefError.d.ts +22 -0
- package/script/oas/ref/DanglingRefError.js +37 -0
- package/script/oas/ref/Ref.d.ts +152 -25
- package/script/oas/ref/Ref.js +414 -26
- 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 +305 -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 +32 -0
- package/script/oas/union/Union.js +111 -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 +4 -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/securityRequirements.d.ts +6 -0
- package/script/parse/securityRequirements.js +8 -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/mediaType/toMediaTypeItemV3.js +4 -3
- package/script/parse/v3-0/parameter/toParameterV3.js +4 -3
- package/script/parse/v3-0/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-0/ref/toRefV31.js +6 -3
- 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/mediaType/toMediaTypeItemV3.js +4 -3
- package/script/parse/v3-1/parameter/toParameterV3.js +4 -3
- package/script/parse/v3-1/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-1/ref/toRefV31.js +6 -3
- 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/mediaType/toMediaTypeItemV3.js +4 -3
- package/script/parse/v3-2/parameter/toParameterV3.js +4 -3
- package/script/parse/v3-2/ref/toRefV31.d.ts +7 -1
- package/script/parse/v3-2/ref/toRefV31.js +6 -3
- package/script/parse/v3-2/schema/toSchemasV3.js +111 -16
- package/script/types/OasBase.d.ts +1 -1
- package/script/types/Settings.d.ts +44 -0
- package/script/types/Settings.js +10 -1
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toOptionalSchemaV3 = exports.toSchemaV3 = exports.toOptionalSchemasV3 = exports.toSchemasV3 = void 0;
|
|
4
4
|
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
5
5
|
const refFns_js_1 = require("../../../helpers/refFns.js");
|
|
6
|
+
const isEmpty_js_1 = require("../../../helpers/isEmpty.js");
|
|
7
|
+
const Unknown_js_1 = require("../../../oas/unknown/Unknown.js");
|
|
6
8
|
const toArray_js_1 = require("../array/toArray.js");
|
|
7
9
|
const toObject_js_1 = require("../object/toObject.js");
|
|
8
10
|
const toInteger_js_1 = require("../integer/toInteger.js");
|
|
@@ -12,8 +14,13 @@ const toString_js_1 = require("../string/toString.js");
|
|
|
12
14
|
const toUnknown_js_1 = require("../unknown/toUnknown.js");
|
|
13
15
|
const toUnion_js_1 = require("../union/toUnion.js");
|
|
14
16
|
const refFns_js_2 = require("../../../helpers/refFns.js");
|
|
17
|
+
const toSiblingKeywords_js_1 = require("../../toSiblingKeywords.js");
|
|
18
|
+
const allOfSystem_js_1 = require("../../allOfSystem.js");
|
|
19
|
+
const anyOfSystem_js_1 = require("../../anyOfSystem.js");
|
|
20
|
+
const toAdditionalPropertiesV3_js_1 = require("../object/toAdditionalPropertiesV3.js");
|
|
15
21
|
const merge_intersection_js_1 = require("../_merge-all-of/merge-intersection.js");
|
|
16
22
|
const merge_union_js_1 = require("../_merge-all-of/merge-union.js");
|
|
23
|
+
const nullable_merge_js_1 = require("../_merge-all-of/nullable-merge.js");
|
|
17
24
|
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
18
25
|
const normalize_schema_shape_js_1 = require("./normalize-schema-shape.js");
|
|
19
26
|
const toSchemasV3 = ({ schemas, stackTrail, context }) => {
|
|
@@ -62,13 +69,15 @@ const withoutWrapperUnevaluatedProperties = ({ schema, parentType, stackTrail, c
|
|
|
62
69
|
return rest;
|
|
63
70
|
};
|
|
64
71
|
/**
|
|
65
|
-
* Is this a
|
|
72
|
+
* Is this a null-only schema member: 3.1's `type: 'null'` or `['null']`, or
|
|
73
|
+
* 3.0's `{ nullable: true, enum: [null] }`?
|
|
66
74
|
*/
|
|
67
75
|
const isNullTypeSchema = (member) => {
|
|
68
76
|
if ((0, refFns_js_1.isRef)(member)) {
|
|
69
77
|
return false;
|
|
70
78
|
}
|
|
71
|
-
|
|
79
|
+
// 3.0's way to write null too: `{ nullable: true, enum: [null] }`, as the 3.0 parser reads it.
|
|
80
|
+
return (0, normalize_schema_shape_js_1.isNullOnlyType)(member.type) || (0, nullable_merge_js_1.isNullOnly)(member);
|
|
72
81
|
};
|
|
73
82
|
/**
|
|
74
83
|
* Split `oneOf`/`anyOf` members into the non-null members plus whether a
|
|
@@ -114,15 +123,48 @@ const collapseSingleMember = (value, member) => {
|
|
|
114
123
|
};
|
|
115
124
|
const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
116
125
|
if ((0, refFns_js_1.isRef)(schema)) {
|
|
117
|
-
|
|
126
|
+
// In 3.2, as in JSON Schema 2020-12, keywords beside `$ref` apply with
|
|
127
|
+
// the target: the same as an `allOf` that starts with the reference.
|
|
128
|
+
const { $ref, ...keywords } = schema;
|
|
129
|
+
const allOf = 'allOf' in keywords ? keywords.allOf : undefined;
|
|
130
|
+
// An `allOf` that is not an array holds no members: reported, and the reference kept.
|
|
131
|
+
if (allOf !== undefined && !Array.isArray(allOf)) {
|
|
132
|
+
context.logSkippedFields({
|
|
133
|
+
skipped: { allOf },
|
|
134
|
+
parent: schema,
|
|
135
|
+
parentType: 'ref',
|
|
136
|
+
stackTrail
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const members = Array.isArray(allOf) ? allOf : [];
|
|
140
|
+
return Object.keys(keywords).length > 0
|
|
141
|
+
? (0, exports.toSchemaV3)({ schema: { ...keywords, allOf: [{ $ref }, ...members] }, stackTrail, context })
|
|
142
|
+
: (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', stackTrail, context });
|
|
118
143
|
}
|
|
119
144
|
// OpenAPI `not` has no faithful TypeScript representation: a generated type
|
|
120
145
|
// that ignored it would *widen* the contract (accepting shapes the schema
|
|
121
|
-
// forbids).
|
|
122
|
-
// is
|
|
123
|
-
//
|
|
146
|
+
// forbids). Under `client.json` `system.not: strict` (the default) the schema
|
|
147
|
+
// is refused rather than emit a type that lies. The throw is isolated by
|
|
148
|
+
// `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
|
|
149
|
+
// are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
|
|
150
|
+
//
|
|
151
|
+
// Under `system.not: unknown` the schema parses with its other keywords, and
|
|
152
|
+
// its `not` is kept as an `OasUnknown` that core does not read: a generator
|
|
153
|
+
// can see that the document says "not something".
|
|
124
154
|
if ('not' in schema) {
|
|
125
|
-
|
|
155
|
+
// A test's mock context may have no `system`.
|
|
156
|
+
if (context.system?.not !== 'unknown') {
|
|
157
|
+
throw new Error('Schema uses unsupported "not" keyword');
|
|
158
|
+
}
|
|
159
|
+
const { not: _not, ...keywords } = schema;
|
|
160
|
+
const parsed = (0, exports.toSchemaV3)({ schema: keywords, stackTrail, context });
|
|
161
|
+
// Only a one-member `allOf` of a `$ref` parses to a reference, and a
|
|
162
|
+
// reference has no field for a `not`. Fail rather than lose it.
|
|
163
|
+
if (parsed.isRef()) {
|
|
164
|
+
throw new Error('Schema uses "not" next to a one-member allOf reference, which cannot keep it');
|
|
165
|
+
}
|
|
166
|
+
parsed.not = stackTrail.trace('not', notTrail => context.withStackTrail(notTrail, () => new Unknown_js_1.OasUnknown({}, context)));
|
|
167
|
+
return parsed;
|
|
126
168
|
}
|
|
127
169
|
const normalized = (0, normalize_schema_shape_js_1.normalizeSchemaShape)(schema);
|
|
128
170
|
if (normalized !== schema) {
|
|
@@ -148,14 +190,40 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
148
190
|
const members = allOf ?? [];
|
|
149
191
|
if (members.length === 1) {
|
|
150
192
|
const [member] = members;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
193
|
+
// Keywords next to the one member say how this site uses the
|
|
194
|
+
// reference, which stays lazy, so a self-reference still ends:
|
|
195
|
+
// `nullable`, `readOnly` and `writeOnly` ride it as use-site flags,
|
|
196
|
+
// and the others are read without the target's type (`siblings`).
|
|
197
|
+
// `resolve()` applies them to a copy of the target at generate time;
|
|
198
|
+
// the ones its type cannot take are left out there. The shared model
|
|
199
|
+
// never changes.
|
|
200
|
+
if ((0, refFns_js_1.isRef)(member)) {
|
|
201
|
+
const { nullable, readOnly, writeOnly, ...keywords } = value;
|
|
202
|
+
const siblings = (0, isEmpty_js_1.isEmpty)(keywords)
|
|
203
|
+
? undefined
|
|
204
|
+
: (0, toSiblingKeywords_js_1.toSiblingKeywords)({
|
|
205
|
+
keywords,
|
|
206
|
+
properties: stackTrail.trace('properties', propertiesTrail => (0, exports.toOptionalSchemasV3)({ schemas: keywords.properties, stackTrail: propertiesTrail, context })),
|
|
207
|
+
additionalProperties: stackTrail.trace('additionalProperties', additionalTrail => (0, toAdditionalPropertiesV3_js_1.toAdditionalPropertiesV3)({
|
|
208
|
+
additionalProperties: keywords.additionalProperties,
|
|
209
|
+
stackTrail: additionalTrail,
|
|
210
|
+
context
|
|
211
|
+
})),
|
|
212
|
+
stackTrail,
|
|
213
|
+
context
|
|
214
|
+
});
|
|
215
|
+
if (nullable || readOnly || writeOnly || siblings) {
|
|
216
|
+
return (0, toRefV31_js_1.toRefV31)({
|
|
217
|
+
ref: member,
|
|
218
|
+
refType: 'schema',
|
|
219
|
+
nullable: nullable || undefined,
|
|
220
|
+
readOnly: readOnly || undefined,
|
|
221
|
+
writeOnly: writeOnly || undefined,
|
|
222
|
+
siblings,
|
|
223
|
+
stackTrail: st,
|
|
224
|
+
context
|
|
225
|
+
});
|
|
226
|
+
}
|
|
159
227
|
}
|
|
160
228
|
return (0, exports.toSchemaV3)({
|
|
161
229
|
schema: collapseSingleMember(value, member),
|
|
@@ -163,11 +231,15 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
163
231
|
context
|
|
164
232
|
});
|
|
165
233
|
}
|
|
234
|
+
const system = (0, allOfSystem_js_1.toAllOfSystem)(context);
|
|
166
235
|
const merged = (0, merge_intersection_js_1.mergeIntersection)({
|
|
167
236
|
schema: wrapper,
|
|
168
237
|
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
169
|
-
normalize: normalize_schema_shape_js_1.normalizeMergeMember
|
|
238
|
+
normalize: normalize_schema_shape_js_1.normalizeMergeMember,
|
|
239
|
+
system
|
|
170
240
|
});
|
|
241
|
+
(0, allOfSystem_js_1.logAllOfContradictions)({ system, stackTrail, parent: schema, context });
|
|
242
|
+
(0, anyOfSystem_js_1.logMergedUnknownAnyOf)({ system, stackTrail, parent: schema, context });
|
|
171
243
|
return (0, exports.toSchemaV3)({ schema: merged, stackTrail: st, context });
|
|
172
244
|
});
|
|
173
245
|
}
|
|
@@ -191,12 +263,16 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
191
263
|
const withoutNull = hasNullMember
|
|
192
264
|
? { ...wrapper, oneOf: oneOfWithoutNull, nullable: true }
|
|
193
265
|
: wrapper;
|
|
266
|
+
const system = (0, allOfSystem_js_1.toAllOfSystem)(context);
|
|
194
267
|
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
195
268
|
schema: withoutNull,
|
|
196
269
|
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
197
270
|
normalize: normalize_schema_shape_js_1.normalizeMergeMember,
|
|
271
|
+
system,
|
|
198
272
|
groupType: 'oneOf'
|
|
199
273
|
});
|
|
274
|
+
(0, allOfSystem_js_1.logAllOfContradictions)({ system, stackTrail, parent: schema, context });
|
|
275
|
+
(0, anyOfSystem_js_1.logMergedUnknownAnyOf)({ system, stackTrail, parent: schema, context });
|
|
200
276
|
if (!('oneOf' in merged) || !Array.isArray(merged.oneOf)) {
|
|
201
277
|
throw new Error('Missing "oneOf" array');
|
|
202
278
|
}
|
|
@@ -240,6 +316,21 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
240
316
|
stackTrail,
|
|
241
317
|
context
|
|
242
318
|
});
|
|
319
|
+
// Under `system.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
|
|
320
|
+
// of two or more members is any value: the schema parses with its other
|
|
321
|
+
// keywords, so the properties next to it stay, without the members.
|
|
322
|
+
if ((0, anyOfSystem_js_1.isUnknownAnyOf)({ members: wrapper.anyOf ?? [], setting: context.system?.anyOf, getRef: (0, refFns_js_2.toGetRef)(context.documentObject) })) {
|
|
323
|
+
(0, anyOfSystem_js_1.logUnknownAnyOf)({ stackTrail, parent: schema, context });
|
|
324
|
+
const keywords = (0, anyOfSystem_js_1.withoutUnknownAnyOf)({
|
|
325
|
+
schema: wrapper,
|
|
326
|
+
setting: context.system?.anyOf,
|
|
327
|
+
getRef: (0, refFns_js_2.toGetRef)(context.documentObject)
|
|
328
|
+
});
|
|
329
|
+
// A `default` alone is no type: the parser would guess one from it.
|
|
330
|
+
return (0, anyOfSystem_js_1.hasShapeKeyword)(keywords)
|
|
331
|
+
? (0, exports.toSchemaV3)({ schema: keywords, stackTrail, context })
|
|
332
|
+
: (0, toUnknown_js_1.toUnknown)({ value: keywords, stackTrail, context });
|
|
333
|
+
}
|
|
243
334
|
return stackTrail.trace('anyOf', st => {
|
|
244
335
|
// deno-lint-ignore ban-ts-comment
|
|
245
336
|
// @ts-expect-error
|
|
@@ -253,12 +344,16 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
253
344
|
const withoutNull = hasNullMember
|
|
254
345
|
? { ...wrapper, anyOf: anyOfWithoutNull, nullable: true }
|
|
255
346
|
: wrapper;
|
|
347
|
+
const system = (0, allOfSystem_js_1.toAllOfSystem)(context);
|
|
256
348
|
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
257
349
|
schema: withoutNull,
|
|
258
350
|
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
259
351
|
normalize: normalize_schema_shape_js_1.normalizeMergeMember,
|
|
352
|
+
system,
|
|
260
353
|
groupType: 'anyOf'
|
|
261
354
|
});
|
|
355
|
+
(0, allOfSystem_js_1.logAllOfContradictions)({ system, stackTrail, parent: schema, context });
|
|
356
|
+
(0, anyOfSystem_js_1.logMergedUnknownAnyOf)({ system, stackTrail, parent: schema, context });
|
|
262
357
|
if (!('anyOf' in merged) || !Array.isArray(merged.anyOf)) {
|
|
263
358
|
throw new Error('Missing "anyOf" array');
|
|
264
359
|
}
|
|
@@ -162,6 +162,8 @@ export declare const includeModels: v.GenericSchema<IncludeModels>;
|
|
|
162
162
|
* {@link AnchorsSettings} for the consumer-facing fields.
|
|
163
163
|
*/
|
|
164
164
|
export declare const anchorsSettings: v.GenericSchema<AnchorsSettings>;
|
|
165
|
+
/** Valibot schema for {@link SystemSettings}: `client.json#settings.system`. */
|
|
166
|
+
export declare const systemSettings: v.GenericSchema<SystemSettings>;
|
|
165
167
|
export declare const clientSettings: v.GenericSchema<ClientSettings>;
|
|
166
168
|
/**
|
|
167
169
|
* Configuration for skipping specific HTTP methods + variants on API paths.
|
|
@@ -418,6 +420,46 @@ export type AnchorsSettings = {
|
|
|
418
420
|
*/
|
|
419
421
|
out?: string;
|
|
420
422
|
};
|
|
423
|
+
/**
|
|
424
|
+
* How the OpenAPI parser treats what it cannot read faithfully, or reads
|
|
425
|
+
* another way (`client.json#settings.system`). Each setting's default parses
|
|
426
|
+
* as core always did: `strict` fails the schema, and `removeErroredItems`
|
|
427
|
+
* removes each item that uses it.
|
|
428
|
+
*/
|
|
429
|
+
export type SystemSettings = {
|
|
430
|
+
/**
|
|
431
|
+
* `latestWins`: where `allOf` members contradict, the later member's
|
|
432
|
+
* keyword wins, with one warning for each schema where it happens.
|
|
433
|
+
*/
|
|
434
|
+
allOf?: 'strict' | 'latestWins';
|
|
435
|
+
/**
|
|
436
|
+
* `unknown`: a response whose schema fails gets an `unknown` schema (any
|
|
437
|
+
* body), with an error at the response, and the operation stays.
|
|
438
|
+
*/
|
|
439
|
+
responseContradictions?: 'strict' | 'unknown';
|
|
440
|
+
/**
|
|
441
|
+
* `unknown`: a schema with `not` parses with its other keywords, and keeps
|
|
442
|
+
* its `not` as an `OasUnknown`.
|
|
443
|
+
*/
|
|
444
|
+
not?: 'strict' | 'unknown';
|
|
445
|
+
/**
|
|
446
|
+
* `union` (the default): an `anyOf` is a union, as a `oneOf` is, and the
|
|
447
|
+
* keywords next to it merge into each member. `unknown`: as Cloudflare's
|
|
448
|
+
* `cf` reads it, an `anyOf` is any value. The schema parses with its other
|
|
449
|
+
* keywords and without the `anyOf`, with one warning for each schema.
|
|
450
|
+
*/
|
|
451
|
+
anyOf?: 'union' | 'unknown';
|
|
452
|
+
/**
|
|
453
|
+
* `strict` (the default): a `$ref` that names nothing in the document is a
|
|
454
|
+
* parse error, and what holds it is removed, with what uses that. `keep`:
|
|
455
|
+
* the `$ref` stays, with a warning, and resolving it throws
|
|
456
|
+
* `DanglingRefError`, which a generator can catch to render something
|
|
457
|
+
* else. With either, a `$ref` to an example or a link is a warning and
|
|
458
|
+
* stays, and a `$ref` that core resolves while it parses (an `allOf`
|
|
459
|
+
* member that it merges) is an error, and what holds it is removed.
|
|
460
|
+
*/
|
|
461
|
+
danglingRefs?: 'strict' | 'keep';
|
|
462
|
+
};
|
|
421
463
|
export type ClientSettings = {
|
|
422
464
|
/** Base output path for generated files */
|
|
423
465
|
basePath?: string;
|
|
@@ -441,6 +483,8 @@ export type ClientSettings = {
|
|
|
441
483
|
* in v1. See {@link AnchorsSettings}.
|
|
442
484
|
*/
|
|
443
485
|
anchors?: AnchorsSettings;
|
|
486
|
+
/** How the OpenAPI parser treats what it cannot read faithfully. See {@link SystemSettings}. */
|
|
487
|
+
system?: SystemSettings;
|
|
444
488
|
/**
|
|
445
489
|
* Preview input-matcher discovery directories (project-root relative, e.g.
|
|
446
490
|
* `src/fields`, `src/inputs`). A preview/hub concern: the generation engine
|
package/script/types/Settings.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.skmtcClientConfig = exports.clientSettings = exports.anchorsSettings = exports.includeModels = exports.includeModelRefs = exports.includeOperations = exports.includePaths = exports.skipModels = exports.skipModelRefs = exports.skipOperations = exports.skipPaths = exports.modulePackages = exports.modulePackage = void 0;
|
|
36
|
+
exports.skmtcClientConfig = exports.clientSettings = exports.systemSettings = exports.anchorsSettings = exports.includeModels = exports.includeModelRefs = exports.includeOperations = exports.includePaths = exports.skipModels = exports.skipModelRefs = exports.skipOperations = exports.skipPaths = exports.modulePackages = exports.modulePackage = void 0;
|
|
37
37
|
/**
|
|
38
38
|
* @fileoverview SKMTC Core Settings and Configuration
|
|
39
39
|
*
|
|
@@ -205,6 +205,14 @@ exports.anchorsSettings = v.object({
|
|
|
205
205
|
enabled: v.boolean(),
|
|
206
206
|
out: v.optional(v.string())
|
|
207
207
|
});
|
|
208
|
+
/** Valibot schema for {@link SystemSettings}: `client.json#settings.system`. */
|
|
209
|
+
exports.systemSettings = v.object({
|
|
210
|
+
allOf: v.optional(v.picklist(['strict', 'latestWins'])),
|
|
211
|
+
responseContradictions: v.optional(v.picklist(['strict', 'unknown'])),
|
|
212
|
+
not: v.optional(v.picklist(['strict', 'unknown'])),
|
|
213
|
+
anyOf: v.optional(v.picklist(['union', 'unknown'])),
|
|
214
|
+
danglingRefs: v.optional(v.picklist(['strict', 'keep']))
|
|
215
|
+
});
|
|
208
216
|
exports.clientSettings = v.object({
|
|
209
217
|
basePath: v.optional(v.pipe(v.string(), v.check(basePath => !(0, normalizeWorkspacePath_js_1.isAbsolutePath)(basePath), 'basePath must be relative to the SKMTC root (the directory containing .skmtc/); ' +
|
|
210
218
|
'absolute paths are not supported because generated output is always written under it'), v.check(basePath => !(0, normalizeWorkspacePath_js_1.hasParentSegment)(basePath), 'basePath must be a forward path with no ".." segments — it is the on-disk anchor ' +
|
|
@@ -215,6 +223,7 @@ exports.clientSettings = v.object({
|
|
|
215
223
|
include: v.optional(v.array(include)),
|
|
216
224
|
skip: v.optional(v.array(skip)),
|
|
217
225
|
anchors: v.optional(exports.anchorsSettings),
|
|
226
|
+
system: v.optional(exports.systemSettings),
|
|
218
227
|
inputDirs: v.optional(v.array(v.string())),
|
|
219
228
|
formatter: v.optional(v.string()),
|
|
220
229
|
generatedSuffix: v.optional(v.string()),
|