@skmtc/core 0.18.1 → 0.26.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/README.md +0 -1
- package/esm/anchors/buildSidecar.js +1 -1
- package/esm/anchors/postPass.d.ts +1 -1
- package/esm/anchors/postPass.js +1 -1
- package/esm/anchors/sidecar.d.ts +2 -2
- package/esm/anchors/sidecar.js +1 -1
- package/esm/context/CoreContext.d.ts +7 -1
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +17 -11
- package/esm/context/GenerateContext.d.ts +25 -4
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +135 -70
- package/esm/context/ParseIssue.d.ts +1 -1
- package/esm/context/RenderContext.d.ts +2 -6
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +4 -14
- package/esm/context/generateTypes.d.ts +35 -8
- package/esm/context/generateTypes.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/fs/1.0.23 → esm/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/esm/dsl/CodeFileBase.d.ts +57 -24
- package/esm/dsl/CodeFileBase.d.ts.map +1 -1
- package/esm/dsl/CodeFileBase.js +35 -53
- package/esm/dsl/FileBase.d.ts +21 -25
- package/esm/dsl/FileBase.d.ts.map +1 -1
- package/esm/dsl/FileBase.js +20 -29
- package/esm/dsl/GeneratorKeys.d.ts +19 -19
- package/esm/dsl/GeneratorKeys.d.ts.map +1 -1
- package/esm/dsl/GeneratorKeys.js +6 -5
- package/esm/dsl/IdentifierBase.d.ts +19 -5
- package/esm/dsl/IdentifierBase.d.ts.map +1 -1
- package/esm/dsl/IdentifierBase.js +21 -5
- package/esm/dsl/IdentifierType.d.ts +8 -14
- package/esm/dsl/IdentifierType.d.ts.map +1 -1
- package/esm/dsl/Lang.d.ts +18 -38
- package/esm/dsl/Lang.d.ts.map +1 -1
- package/esm/dsl/MarkdownFile.d.ts +55 -0
- package/esm/dsl/MarkdownFile.d.ts.map +1 -0
- package/esm/dsl/MarkdownFile.js +58 -0
- package/esm/dsl/model/ModelDriver.d.ts +3 -1
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +6 -8
- package/esm/dsl/model/toModelEntry.d.ts +21 -17
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +3 -27
- package/esm/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/esm/dsl/model/types.d.ts +2 -52
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/gql/toGqlOperationEntry.js +3 -25
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/gql/types.d.ts +1 -33
- package/esm/dsl/operation/gql/types.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/oas/toOasOperationEntry.js +3 -32
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/oas/types.d.ts +1 -43
- package/esm/dsl/operation/oas/types.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.js +12 -9
- package/esm/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/esm/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/esm/dsl/webhook/toWebhookEntry.js +3 -32
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/esm/dsl/webhook/types.d.ts +1 -36
- package/esm/dsl/webhook/types.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/esm/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.js +57 -31
- package/esm/enrichments/validateConfig.d.ts +1 -1
- package/esm/enrichments/validateConfig.js +2 -2
- package/esm/helpers/isImported.js +1 -1
- package/esm/helpers/toResolvedArtifactPath.js +1 -1
- package/esm/mod.d.ts +7 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +7 -1
- package/esm/oas/array/Array.d.ts +2 -0
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +4 -0
- package/esm/oas/boolean/Boolean.d.ts +3 -1
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +4 -0
- package/esm/oas/components/Components.d.ts +5 -0
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +6 -1
- package/esm/oas/integer/Integer.d.ts +3 -1
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +4 -0
- package/esm/oas/link/Link.d.ts +68 -0
- package/esm/oas/link/Link.d.ts.map +1 -0
- package/esm/oas/link/Link.js +107 -0
- package/esm/oas/number/Number.d.ts +3 -1
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +4 -0
- package/esm/oas/object/Object.d.ts +9 -0
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +14 -0
- package/esm/oas/operation/Operation.d.ts +15 -0
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +33 -0
- package/esm/oas/ref/Ref.d.ts +23 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +32 -0
- package/esm/oas/ref/ref-types.d.ts +18 -1
- package/esm/oas/ref/ref-types.d.ts.map +1 -1
- package/esm/oas/ref/ref-types.js +12 -1
- package/esm/oas/response/Response.d.ts +4 -0
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +7 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/esm/oas/schemaPath/traverseSchema.js +113 -0
- package/esm/oas/string/String.d.ts +3 -1
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +4 -0
- package/esm/oas/union/Union.d.ts +9 -0
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +14 -0
- package/esm/oas/unknown/Unknown.d.ts +3 -1
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +4 -0
- package/esm/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-0/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-0/link/toLinksV3.js +40 -0
- package/esm/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-0/object/toObject.js +3 -1
- package/esm/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-0/response/toResponseV3.js +4 -1
- package/esm/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-0/union/toUnion.js +3 -1
- package/esm/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-1/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-1/link/toLinksV3.js +40 -0
- package/esm/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-1/object/toObject.js +3 -1
- package/esm/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-1/response/toResponseV3.js +4 -1
- package/esm/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-1/union/toUnion.js +3 -1
- package/esm/run/toArtifacts.d.ts +8 -1
- package/esm/run/toArtifacts.d.ts.map +1 -1
- package/esm/run/toArtifacts.js +5 -5
- package/esm/run/toInspection.d.ts +8 -0
- package/esm/run/toInspection.d.ts.map +1 -0
- package/esm/run/toInspection.js +78 -0
- package/esm/types/Enrichments.d.ts +19 -8
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +4 -3
- package/esm/types/GeneratorType.d.ts +5 -5
- package/esm/types/GeneratorType.d.ts.map +1 -1
- package/esm/types/Manifest.d.ts +1 -2
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +1 -2
- package/esm/types/ModuleSelect.d.ts +81 -0
- package/esm/types/ModuleSelect.d.ts.map +1 -0
- package/esm/types/ModuleSelect.js +63 -0
- package/esm/types/Preview.d.ts +4 -27
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +4 -25
- package/esm/types/SchemaPath.d.ts +17 -0
- package/esm/types/SchemaPath.d.ts.map +1 -0
- package/esm/types/SchemaPath.js +9 -0
- package/esm/types/Settings.d.ts +8 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +1 -0
- package/esm/types/SkmtcDocument.d.ts +1 -1
- package/esm/types/SupportedSubjects.d.ts +1 -1
- package/package.json +1 -1
- package/script/anchors/buildSidecar.js +1 -1
- package/script/anchors/postPass.d.ts +1 -1
- package/script/anchors/postPass.js +1 -1
- package/script/anchors/sidecar.d.ts +2 -2
- package/script/anchors/sidecar.js +1 -1
- package/script/context/CoreContext.d.ts +7 -1
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +17 -11
- package/script/context/GenerateContext.d.ts +25 -4
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +135 -70
- package/script/context/ParseIssue.d.ts +1 -1
- package/script/context/RenderContext.d.ts +2 -6
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +4 -14
- package/script/context/generateTypes.d.ts +35 -8
- package/script/context/generateTypes.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/fs/1.0.23 → script/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/script/dsl/CodeFileBase.d.ts +57 -24
- package/script/dsl/CodeFileBase.d.ts.map +1 -1
- package/script/dsl/CodeFileBase.js +37 -54
- package/script/dsl/FileBase.d.ts +21 -25
- package/script/dsl/FileBase.d.ts.map +1 -1
- package/script/dsl/FileBase.js +20 -29
- package/script/dsl/GeneratorKeys.d.ts +19 -19
- package/script/dsl/GeneratorKeys.d.ts.map +1 -1
- package/script/dsl/GeneratorKeys.js +6 -5
- package/script/dsl/IdentifierBase.d.ts +19 -5
- package/script/dsl/IdentifierBase.d.ts.map +1 -1
- package/script/dsl/IdentifierBase.js +21 -5
- package/script/dsl/IdentifierType.d.ts +8 -14
- package/script/dsl/IdentifierType.d.ts.map +1 -1
- package/script/dsl/Lang.d.ts +18 -38
- package/script/dsl/Lang.d.ts.map +1 -1
- package/script/dsl/MarkdownFile.d.ts +55 -0
- package/script/dsl/MarkdownFile.d.ts.map +1 -0
- package/script/dsl/MarkdownFile.js +62 -0
- package/script/dsl/model/ModelDriver.d.ts +3 -1
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +6 -8
- package/script/dsl/model/toModelEntry.d.ts +21 -17
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +3 -63
- package/script/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/script/dsl/model/types.d.ts +2 -52
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/gql/toGqlOperationEntry.js +3 -61
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/gql/types.d.ts +1 -33
- package/script/dsl/operation/gql/types.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/oas/toOasOperationEntry.js +3 -68
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/oas/types.d.ts +1 -43
- package/script/dsl/operation/oas/types.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/script/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.js +12 -9
- package/script/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/script/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/script/dsl/webhook/toWebhookEntry.js +3 -68
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/script/dsl/webhook/types.d.ts +1 -36
- package/script/dsl/webhook/types.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/script/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.js +57 -31
- package/script/enrichments/validateConfig.d.ts +1 -1
- package/script/enrichments/validateConfig.js +2 -2
- package/script/helpers/isImported.js +1 -1
- package/script/helpers/toResolvedArtifactPath.js +1 -1
- package/script/mod.d.ts +7 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +7 -1
- package/script/oas/array/Array.d.ts +2 -0
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +4 -0
- package/script/oas/boolean/Boolean.d.ts +3 -1
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +4 -0
- package/script/oas/components/Components.d.ts +5 -0
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +6 -1
- package/script/oas/integer/Integer.d.ts +3 -1
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +4 -0
- package/script/oas/link/Link.d.ts +68 -0
- package/script/oas/link/Link.d.ts.map +1 -0
- package/script/oas/link/Link.js +111 -0
- package/script/oas/number/Number.d.ts +3 -1
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +4 -0
- package/script/oas/object/Object.d.ts +9 -0
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +14 -0
- package/script/oas/operation/Operation.d.ts +15 -0
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +33 -0
- package/script/oas/ref/Ref.d.ts +23 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +32 -0
- package/script/oas/ref/ref-types.d.ts +18 -1
- package/script/oas/ref/ref-types.d.ts.map +1 -1
- package/script/oas/ref/ref-types.js +13 -2
- package/script/oas/response/Response.d.ts +4 -0
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +7 -0
- package/script/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/script/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/script/oas/schemaPath/traverseSchema.js +117 -0
- package/script/oas/string/String.d.ts +3 -1
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +4 -0
- package/script/oas/union/Union.d.ts +9 -0
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +14 -0
- package/script/oas/unknown/Unknown.d.ts +3 -1
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +4 -0
- package/script/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-0/components/toComponentsV3.js +3 -1
- package/script/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-0/link/toLinksV3.js +44 -0
- package/script/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-0/object/toObject.js +3 -1
- package/script/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-0/response/toResponseV3.js +4 -1
- package/script/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-0/union/toUnion.js +3 -1
- package/script/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-1/components/toComponentsV3.js +3 -1
- package/script/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-1/link/toLinksV3.js +44 -0
- package/script/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-1/object/toObject.js +3 -1
- package/script/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-1/response/toResponseV3.js +4 -1
- package/script/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-1/union/toUnion.js +3 -1
- package/script/run/toArtifacts.d.ts +8 -1
- package/script/run/toArtifacts.d.ts.map +1 -1
- package/script/run/toArtifacts.js +5 -5
- package/script/run/toInspection.d.ts +8 -0
- package/script/run/toInspection.d.ts.map +1 -0
- package/script/run/toInspection.js +82 -0
- package/script/types/Enrichments.d.ts +19 -8
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +5 -4
- package/script/types/GeneratorType.d.ts +5 -5
- package/script/types/GeneratorType.d.ts.map +1 -1
- package/script/types/Manifest.d.ts +1 -2
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +0 -1
- package/script/types/ModuleSelect.d.ts +81 -0
- package/script/types/ModuleSelect.d.ts.map +1 -0
- package/script/types/ModuleSelect.js +101 -0
- package/script/types/Preview.d.ts +4 -27
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +5 -26
- package/script/types/SchemaPath.d.ts +17 -0
- package/script/types/SchemaPath.d.ts.map +1 -0
- package/script/types/{AccessorPath.js → SchemaPath.js} +7 -7
- package/script/types/Settings.d.ts +8 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +1 -0
- package/script/types/SkmtcDocument.d.ts +1 -1
- package/script/types/SupportedSubjects.d.ts +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
- package/esm/types/AccessorPath.d.ts +0 -17
- package/esm/types/AccessorPath.d.ts.map +0 -1
- package/esm/types/AccessorPath.js +0 -9
- package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/script/types/AccessorPath.d.ts +0 -17
- package/script/types/AccessorPath.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { toRefName } from '../../helpers/refFns.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walk an {@link SchemaPath} into a schema, resolving `$ref`s as it descends.
|
|
4
|
+
*
|
|
5
|
+
* The shared engine behind `OasOperation.traverse` and every `OasSchema`
|
|
6
|
+
* variant's `traverse`. A ref — or a `OasSchema | OasRef<'schema'>` union value —
|
|
7
|
+
* is passed straight to this function, which resolves refs itself, so `OasRef`
|
|
8
|
+
* needs no `traverse` method of its own. Navigation rules per segment, keyed by
|
|
9
|
+
* the schema currently under the cursor:
|
|
10
|
+
*
|
|
11
|
+
* - **empty path** → returns `value` unchanged (it may still be a ref — the
|
|
12
|
+
* final value is never force-resolved, so a target's refName survives).
|
|
13
|
+
* - **object** → the segment is a property name; descends into
|
|
14
|
+
* `properties[segment]`.
|
|
15
|
+
* - **array** → the segment must be the literal `'items'`; descends into the
|
|
16
|
+
* element schema.
|
|
17
|
+
* - **union** → the segment selects a member ({@link selectUnionMember}):
|
|
18
|
+
* `'$Circle'` by refName, `'{type:circle}'` by discriminator, `'[0]'` by index.
|
|
19
|
+
*
|
|
20
|
+
* A ref is resolved only when the path needs to descend *through* it. Anything
|
|
21
|
+
* the path cannot navigate throws a descriptive, segment-named error: a missing
|
|
22
|
+
* property, a {@link import('@/dsl/CustomValue.ts').CustomValue} property, a
|
|
23
|
+
* non-`'items'` segment on an array, a union member that doesn't match, or
|
|
24
|
+
* descending into a scalar.
|
|
25
|
+
*
|
|
26
|
+
* @throws Error when a segment cannot be navigated.
|
|
27
|
+
*/
|
|
28
|
+
export const traverseSchema = (value, path) => {
|
|
29
|
+
if (path.length === 0) {
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
// Resolve refs only to descend through them; the final value (path empty,
|
|
33
|
+
// above) is returned as-is.
|
|
34
|
+
const schema = value.isRef() ? value.resolve() : value;
|
|
35
|
+
const [segment, ...rest] = path;
|
|
36
|
+
switch (schema.type) {
|
|
37
|
+
case 'object': {
|
|
38
|
+
const property = schema.properties?.[segment];
|
|
39
|
+
if (!property) {
|
|
40
|
+
throw new Error(`Schema path segment "${segment}" is not a property of the object (available: ${Object.keys(schema.properties ?? {}).join(', ') || 'none'})`);
|
|
41
|
+
}
|
|
42
|
+
if (property.type === 'custom') {
|
|
43
|
+
throw new Error(`Schema path segment "${segment}" is a custom value and cannot be traversed`);
|
|
44
|
+
}
|
|
45
|
+
return traverseSchema(property, rest);
|
|
46
|
+
}
|
|
47
|
+
case 'array': {
|
|
48
|
+
if (segment !== 'items') {
|
|
49
|
+
throw new Error(`Schema path segment "${segment}" cannot traverse an array; use "items" to descend into the element schema`);
|
|
50
|
+
}
|
|
51
|
+
return traverseSchema(schema.items, rest);
|
|
52
|
+
}
|
|
53
|
+
case 'union': {
|
|
54
|
+
return traverseSchema(selectUnionMember(schema, segment), rest);
|
|
55
|
+
}
|
|
56
|
+
default: {
|
|
57
|
+
throw new Error(`Schema path segment "${segment}" cannot traverse a "${schema.type}" schema`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Pick one member of a union for an {@link SchemaPath} segment. The segment's
|
|
63
|
+
* notation chooses the branching strategy:
|
|
64
|
+
*
|
|
65
|
+
* - `'$Circle'` (`$`-prefixed) → by **member refName** (the schema identity).
|
|
66
|
+
* - `'{type:circle}'` (`{property:value}`) → by **discriminator** — the property
|
|
67
|
+
* must match the union's `discriminator.propertyName`, and the value is looked
|
|
68
|
+
* up in `discriminator.mapping` (or used as an implicit schema name).
|
|
69
|
+
* - `'[0]'` (bracketed) → by **member index** — the fallback for inline/anonymous
|
|
70
|
+
* members that have no refName.
|
|
71
|
+
*
|
|
72
|
+
* A plain (un-prefixed) segment is not a valid union selector.
|
|
73
|
+
*
|
|
74
|
+
* @throws Error when the segment is not a valid selector or selects no member.
|
|
75
|
+
*/
|
|
76
|
+
const selectUnionMember = (union, segment) => {
|
|
77
|
+
const indexMatch = segment.match(/^\[(\d+)\]$/);
|
|
78
|
+
if (indexMatch) {
|
|
79
|
+
const index = Number(indexMatch[1]);
|
|
80
|
+
const member = union.members[index];
|
|
81
|
+
if (!member) {
|
|
82
|
+
throw new Error(`Schema path segment "${segment}" is out of range; the union has ${union.members.length} member(s)`);
|
|
83
|
+
}
|
|
84
|
+
return member;
|
|
85
|
+
}
|
|
86
|
+
const discriminatorMatch = segment.match(/^\{([^:]+):(.+)\}$/);
|
|
87
|
+
if (discriminatorMatch) {
|
|
88
|
+
const [, propertyName, value] = discriminatorMatch;
|
|
89
|
+
if (!union.discriminator) {
|
|
90
|
+
throw new Error(`Schema path segment "${segment}" needs a discriminated union, but this union has no discriminator`);
|
|
91
|
+
}
|
|
92
|
+
if (union.discriminator.propertyName !== propertyName) {
|
|
93
|
+
throw new Error(`Schema path segment "${segment}" discriminates on "${propertyName}", but this union's discriminator is "${union.discriminator.propertyName}"`);
|
|
94
|
+
}
|
|
95
|
+
const mapped = union.discriminator.mapping?.[value];
|
|
96
|
+
const targetRefName = mapped ? toRefName(mapped) : value;
|
|
97
|
+
const member = findMemberByRefName(union, targetRefName);
|
|
98
|
+
if (!member) {
|
|
99
|
+
throw new Error(`Schema path segment "${segment}" does not resolve to a union member via the discriminator`);
|
|
100
|
+
}
|
|
101
|
+
return member;
|
|
102
|
+
}
|
|
103
|
+
if (segment.startsWith('$')) {
|
|
104
|
+
const member = findMemberByRefName(union, segment.slice(1));
|
|
105
|
+
if (!member) {
|
|
106
|
+
const refNames = union.members.filter(member => member.isRef()).map(member => member.toRefName());
|
|
107
|
+
throw new Error(`Schema path segment "${segment}" does not match a union member refName (available: ${refNames.map(name => `$${name}`).join(', ') || 'none — use "[index]" for inline members'})`);
|
|
108
|
+
}
|
|
109
|
+
return member;
|
|
110
|
+
}
|
|
111
|
+
throw new Error(`Schema path segment "${segment}" is not a valid union selector; use "$RefName", "{discriminator:value}", or "[index]"`);
|
|
112
|
+
};
|
|
113
|
+
const findMemberByRefName = (union, refName) => union.members.find(member => member.isRef() && member.toRefName() === refName);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../../_dnt.polyfills.js";
|
|
2
|
+
import type { SchemaPath } from '../../types/SchemaPath.js';
|
|
2
3
|
import type { OasRef } from '../ref/Ref.js';
|
|
3
|
-
import type { ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
4
|
+
import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
4
5
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
5
6
|
import { OasBase } from '../../types/OasBase.js';
|
|
6
7
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
@@ -103,6 +104,7 @@ export declare class OasString<Nullable extends boolean | undefined = boolean |
|
|
|
103
104
|
deprecated: boolean | undefined;
|
|
104
105
|
constructor(fields?: StringFields<Nullable>, context?: ParseContextType);
|
|
105
106
|
isRef(): this is OasRef<'schema'>;
|
|
107
|
+
traverse(path: SchemaPath): OasSchema | OasRef<'schema'>;
|
|
106
108
|
resolve(): OasString<Nullable>;
|
|
107
109
|
resolveOnce(): OasString<Nullable>;
|
|
108
110
|
toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../src/oas/string/String.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAC/D,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mCAAmC;IACnC,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SA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
|
import { OasBase } from '../../types/OasBase.js';
|
|
3
4
|
export class OasString extends OasBase {
|
|
4
5
|
constructor(fields = {}, context) {
|
|
@@ -162,6 +163,9 @@ export class OasString extends OasBase {
|
|
|
162
163
|
isRef() {
|
|
163
164
|
return false;
|
|
164
165
|
}
|
|
166
|
+
traverse(path) {
|
|
167
|
+
return traverseSchema(this, path);
|
|
168
|
+
}
|
|
165
169
|
resolve() {
|
|
166
170
|
return this;
|
|
167
171
|
}
|
package/esm/oas/union/Union.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { SchemaPath } from '../../types/SchemaPath.js';
|
|
1
2
|
import type { OasDiscriminator } from '../discriminator/Discriminator.js';
|
|
3
|
+
import type { OasExternalDocs } from '../externalDocs/ExternalDocs.js';
|
|
2
4
|
import type { OasSchema } from '../schema/Schema.js';
|
|
3
5
|
import type { OasRef } from '../ref/Ref.js';
|
|
4
6
|
import type { ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
@@ -13,6 +15,8 @@ export type UnionFields = {
|
|
|
13
15
|
title?: string;
|
|
14
16
|
/** A description of the union type */
|
|
15
17
|
description?: string;
|
|
18
|
+
/** External documentation for the union type */
|
|
19
|
+
externalDocs?: OasExternalDocs | undefined;
|
|
16
20
|
/** Whether the union value can be null */
|
|
17
21
|
nullable?: boolean;
|
|
18
22
|
/** Discriminator object for creating tagged unions */
|
|
@@ -156,6 +160,10 @@ export declare class OasUnion extends OasBase {
|
|
|
156
160
|
* A description of the union.
|
|
157
161
|
*/
|
|
158
162
|
description: string | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* External documentation for the union.
|
|
165
|
+
*/
|
|
166
|
+
externalDocs: OasExternalDocs | undefined;
|
|
159
167
|
/**
|
|
160
168
|
* Indicates whether value can be null.
|
|
161
169
|
*/
|
|
@@ -180,6 +188,7 @@ export declare class OasUnion extends OasBase {
|
|
|
180
188
|
default?: unknown;
|
|
181
189
|
constructor(fields: UnionFields, context?: ParseContextType);
|
|
182
190
|
isRef(): this is OasRef<'schema'>;
|
|
191
|
+
traverse(path: SchemaPath): OasSchema | OasRef<'schema'>;
|
|
183
192
|
resolve(): OasUnion;
|
|
184
193
|
resolveOnce(): OasUnion;
|
|
185
194
|
toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Union.d.ts","sourceRoot":"","sources":["../../../src/oas/union/Union.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Union.d.ts","sourceRoot":"","sources":["../../../src/oas/union/Union.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,YAAY,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IAC1C,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,kCAAkC;IAClC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E,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAIxD,OAAO,IAAI,QAAQ;IAInB,WAAW,IAAI,QAAQ;IAIvB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CAU3E"}
|
package/esm/oas/union/Union.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { traverseSchema } from '../schemaPath/traverseSchema.js';
|
|
1
2
|
import { OasBase } from '../../types/OasBase.js';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a union type schema in the OpenAPI Specification.
|
|
@@ -151,6 +152,15 @@ export class OasUnion extends OasBase {
|
|
|
151
152
|
writable: true,
|
|
152
153
|
value: void 0
|
|
153
154
|
});
|
|
155
|
+
/**
|
|
156
|
+
* External documentation for the union.
|
|
157
|
+
*/
|
|
158
|
+
Object.defineProperty(this, "externalDocs", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
configurable: true,
|
|
161
|
+
writable: true,
|
|
162
|
+
value: void 0
|
|
163
|
+
});
|
|
154
164
|
/**
|
|
155
165
|
* Indicates whether value can be null.
|
|
156
166
|
*/
|
|
@@ -205,6 +215,7 @@ export class OasUnion extends OasBase {
|
|
|
205
215
|
});
|
|
206
216
|
this.title = fields.title;
|
|
207
217
|
this.description = fields.description;
|
|
218
|
+
this.externalDocs = fields.externalDocs;
|
|
208
219
|
this.nullable = fields.nullable;
|
|
209
220
|
this.discriminator = fields.discriminator;
|
|
210
221
|
this.members = fields.members;
|
|
@@ -215,6 +226,9 @@ export class OasUnion extends OasBase {
|
|
|
215
226
|
isRef() {
|
|
216
227
|
return false;
|
|
217
228
|
}
|
|
229
|
+
traverse(path) {
|
|
230
|
+
return traverseSchema(this, path);
|
|
231
|
+
}
|
|
218
232
|
resolve() {
|
|
219
233
|
return this;
|
|
220
234
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "../../_dnt.polyfills.js";
|
|
2
|
+
import type { SchemaPath } from '../../types/SchemaPath.js';
|
|
2
3
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
4
|
-
import type { ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
5
|
+
import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
5
6
|
import { OasBase } from '../../types/OasBase.js';
|
|
6
7
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
7
8
|
export type UnknownFields = {
|
|
@@ -44,6 +45,7 @@ export declare class OasUnknown extends OasBase {
|
|
|
44
45
|
nullable: boolean | undefined;
|
|
45
46
|
constructor(fields?: UnknownFields, context?: ParseContextType);
|
|
46
47
|
isRef(): this is OasRef<'schema'>;
|
|
48
|
+
traverse(path: SchemaPath): OasSchema | OasRef<'schema'>;
|
|
47
49
|
resolve(): OasUnknown;
|
|
48
50
|
resolveOnce(): OasUnknown;
|
|
49
51
|
toJsonSchema(_options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject | OpenAPIV3.ArraySchemaObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/Unknown.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Unknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/Unknown.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,E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3
4
|
/**
|
|
4
5
|
* Object representing an unknown type in the OpenAPI Specification.
|
|
@@ -77,6 +78,9 @@ export class OasUnknown extends OasBase {
|
|
|
77
78
|
isRef() {
|
|
78
79
|
return false;
|
|
79
80
|
}
|
|
81
|
+
traverse(path) {
|
|
82
|
+
return traverseSchema(this, path);
|
|
83
|
+
}
|
|
80
84
|
resolve() {
|
|
81
85
|
return this;
|
|
82
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/components/toComponentsV3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/components/toComponentsV3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAIrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAA;IAClD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,qCAI5B,kBAAkB,KAAG,aAAa,GAAG,SAsDvC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toOptionalResponsesV3 } from '../response/toResponseV3.js';
|
|
2
2
|
import { toHeadersV3 } from '../header/toHeadersV3.js';
|
|
3
|
+
import { toLinksV3 } from '../link/toLinksV3.js';
|
|
3
4
|
import { toOptionalSchemasV3 } from '../schema/toSchemasV3.js';
|
|
4
5
|
import { toOptionalParametersV3 } from '../parameter/toParameterV3.js';
|
|
5
6
|
import { toExamplesV3 } from '../example/toExamplesV3.js';
|
|
@@ -11,7 +12,7 @@ export const toComponentsV3 = ({ components, stackTrail, context }) => {
|
|
|
11
12
|
if (!components) {
|
|
12
13
|
return undefined;
|
|
13
14
|
}
|
|
14
|
-
const { schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, ...skipped } = components;
|
|
15
|
+
const { schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links, ...skipped } = components;
|
|
15
16
|
const extensionFields = toSpecificationExtensionsV3({
|
|
16
17
|
skipped,
|
|
17
18
|
parent: components,
|
|
@@ -33,6 +34,7 @@ export const toComponentsV3 = ({ components, stackTrail, context }) => {
|
|
|
33
34
|
requestBodies: stackTrail.trace('requestBodies', st => toRequestBodiesV3({ requestBodies, stackTrail: st, context })),
|
|
34
35
|
headers: stackTrail.trace('headers', st => toHeadersV3({ headers, stackTrail: st, context })),
|
|
35
36
|
securitySchemes: stackTrail.trace('securitySchemes', st => toSecuritySchemesV3({ securitySchemes, stackTrail: st, context })),
|
|
37
|
+
links: stackTrail.trace('links', st => toLinksV3({ links, stackTrail: st, context })),
|
|
36
38
|
extensionFields
|
|
37
39
|
};
|
|
38
40
|
return new OasComponents(fields);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
import { OasLink } from '../../../oas/link/Link.js';
|
|
4
|
+
import type { OasRef } from '../../../oas/ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
6
|
+
export type ToLinksV3Args = {
|
|
7
|
+
links: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.LinkObject> | undefined;
|
|
8
|
+
stackTrail: StackTrail;
|
|
9
|
+
context: ParseContextType;
|
|
10
|
+
};
|
|
11
|
+
export declare const toLinksV3: ({ links, stackTrail, context }: ToLinksV3Args) => Record<string, OasLink | OasRef<"link">> | undefined;
|
|
12
|
+
export type ToLinkV3Args = {
|
|
13
|
+
link: OpenAPIV3.ReferenceObject | OpenAPIV3.LinkObject;
|
|
14
|
+
stackTrail: StackTrail;
|
|
15
|
+
context: ParseContextType;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=toLinksV3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLinksV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/link/toLinksV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;IACnF,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,gCAIvB,aAAa,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,SAY7D,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,UAAU,CAAA;IACtD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { toRefV31 } from '../ref/toRefV31.js';
|
|
2
|
+
import { toServerV3 } from '../server/toServerV3.js';
|
|
3
|
+
import { isRef } from '../../../helpers/refFns.js';
|
|
4
|
+
import { OasLink } from '../../../oas/link/Link.js';
|
|
5
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
6
|
+
export const toLinksV3 = ({ links, stackTrail, context }) => {
|
|
7
|
+
if (!links) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const output = {};
|
|
11
|
+
for (const [key, value] of Object.entries(links)) {
|
|
12
|
+
output[key] = stackTrail.trace(key, st => toLinkV3({ link: value, stackTrail: st, context }));
|
|
13
|
+
}
|
|
14
|
+
return output;
|
|
15
|
+
};
|
|
16
|
+
const toLinkV3 = ({ link, stackTrail, context }) => {
|
|
17
|
+
if (isRef(link)) {
|
|
18
|
+
return toRefV31({ ref: link, refType: 'link', stackTrail, context });
|
|
19
|
+
}
|
|
20
|
+
const { operationRef, operationId, parameters, requestBody, description, server, ...skipped } = link;
|
|
21
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
22
|
+
skipped,
|
|
23
|
+
parent: link,
|
|
24
|
+
context,
|
|
25
|
+
stackTrail,
|
|
26
|
+
parentType: 'link'
|
|
27
|
+
});
|
|
28
|
+
const fields = {
|
|
29
|
+
operationRef,
|
|
30
|
+
operationId,
|
|
31
|
+
parameters,
|
|
32
|
+
requestBody,
|
|
33
|
+
description,
|
|
34
|
+
server: server !== undefined
|
|
35
|
+
? stackTrail.trace('server', st => toServerV3({ server, stackTrail: st, context }))
|
|
36
|
+
: undefined,
|
|
37
|
+
extensionFields
|
|
38
|
+
};
|
|
39
|
+
return new OasLink(fields);
|
|
40
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAUzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,gCAAgC,YAAY,KAAG,SAoDvE,CAAA"}
|
|
@@ -6,6 +6,7 @@ import { parseNullable } from '../_helpers/parseNullable.js';
|
|
|
6
6
|
import { parseEnum } from '../_helpers/parseEnum.js';
|
|
7
7
|
import { parseExample } from '../_helpers/parseExample.js';
|
|
8
8
|
import { parseDefault } from '../_helpers/parseDefault.js';
|
|
9
|
+
import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
|
|
9
10
|
export const toObject = ({ value, context, stackTrail }) => {
|
|
10
11
|
const { nullable, value: valueWithoutNullable } = parseNullable({
|
|
11
12
|
value,
|
|
@@ -53,7 +54,7 @@ export const toObject = ({ value, context, stackTrail }) => {
|
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
56
|
const toParsedObject = ({ context, stackTrail, nullable, example, enums, defaultValue, value }) => {
|
|
56
|
-
const { type: _type, title, description, deprecated, properties, required, maxProperties, minProperties, additionalProperties, readOnly, writeOnly, ...skipped } = value;
|
|
57
|
+
const { type: _type, title, description, externalDocs, deprecated, properties, required, maxProperties, minProperties, additionalProperties, readOnly, writeOnly, ...skipped } = value;
|
|
57
58
|
const extensionFields = toSpecificationExtensionsV3({
|
|
58
59
|
skipped,
|
|
59
60
|
parent: value,
|
|
@@ -64,6 +65,7 @@ const toParsedObject = ({ context, stackTrail, nullable, example, enums, default
|
|
|
64
65
|
return context.withStackTrail(stackTrail, () => new OasObject({
|
|
65
66
|
title,
|
|
66
67
|
description,
|
|
68
|
+
externalDocs: stackTrail.trace('externalDocs', st => toExternalDocs({ externalDocs, stackTrail: st, context })),
|
|
67
69
|
nullable,
|
|
68
70
|
example,
|
|
69
71
|
enums,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/response/toResponseV3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/response/toResponseV3.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,oCAI3B,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAkBrE,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,oCAInC,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,mCAI1B,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAqCpD,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toRefV31 } from '../ref/toRefV31.js';
|
|
2
2
|
import { toHeadersV3 } from '../header/toHeadersV3.js';
|
|
3
|
+
import { toLinksV3 } from '../link/toLinksV3.js';
|
|
3
4
|
import { isRef } from '../../../helpers/refFns.js';
|
|
4
5
|
import { toOptionalMediaTypeItemsV3 } from '../mediaType/toMediaTypeItemV3.js';
|
|
5
6
|
import { OasResponse } from '../../../oas/response/Response.js';
|
|
@@ -33,7 +34,7 @@ export const toResponseV3 = ({ response, stackTrail, context }) => {
|
|
|
33
34
|
if (isRef(response)) {
|
|
34
35
|
return toRefV31({ ref: response, refType: 'response', stackTrail, context });
|
|
35
36
|
}
|
|
36
|
-
const { description, headers, content, ...skipped } = response;
|
|
37
|
+
const { description, headers, links, content, ...skipped } = response;
|
|
37
38
|
const extensionFields = toSpecificationExtensionsV3({
|
|
38
39
|
skipped,
|
|
39
40
|
parent: response,
|
|
@@ -42,10 +43,12 @@ export const toResponseV3 = ({ response, stackTrail, context }) => {
|
|
|
42
43
|
parentType: 'response'
|
|
43
44
|
});
|
|
44
45
|
const parsedHeaders = stackTrail.trace('headers', st => toHeadersV3({ headers, stackTrail: st, context }));
|
|
46
|
+
const parsedLinks = stackTrail.trace('links', st => toLinksV3({ links, stackTrail: st, context }));
|
|
45
47
|
const parsedContent = stackTrail.trace('content', st => toOptionalMediaTypeItemsV3({ content, stackTrail: st, context }));
|
|
46
48
|
return context.withStackTrail(stackTrail, () => new OasResponse({
|
|
47
49
|
description,
|
|
48
50
|
headers: parsedHeaders,
|
|
51
|
+
links: parsedLinks,
|
|
49
52
|
content: parsedContent,
|
|
50
53
|
extensionFields
|
|
51
54
|
}, context));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-0/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAUtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,UAAU,EAAE,OAAO,GAAG,OAAO,CAAA;IAC7B,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,qDAMrB,WAAW,KAAG,QA8EhB,CAAA"}
|
|
@@ -5,13 +5,14 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
|
|
|
5
5
|
import { parseNullable } from '../_helpers/parseNullable.js';
|
|
6
6
|
import { parseExample } from '../_helpers/parseExample.js';
|
|
7
7
|
import { parseDefault } from '../_helpers/parseDefault.js';
|
|
8
|
+
import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
|
|
8
9
|
export const toUnion = ({ value, members, parentType, stackTrail, context }) => {
|
|
9
10
|
const { nullable, value: valueWithoutNullable } = parseNullable({
|
|
10
11
|
value,
|
|
11
12
|
context,
|
|
12
13
|
stackTrail
|
|
13
14
|
});
|
|
14
|
-
const { discriminator, title, description, example: unparsedExample, default: unparsedDefaultValue, ...skipped } = valueWithoutNullable;
|
|
15
|
+
const { discriminator, title, description, externalDocs, example: unparsedExample, default: unparsedDefaultValue, ...skipped } = valueWithoutNullable;
|
|
15
16
|
const example = parseExample({
|
|
16
17
|
value: unparsedExample,
|
|
17
18
|
context,
|
|
@@ -50,6 +51,7 @@ export const toUnion = ({ value, members, parentType, stackTrail, context }) =>
|
|
|
50
51
|
return context.withStackTrail(stackTrail, () => new OasUnion({
|
|
51
52
|
title,
|
|
52
53
|
description,
|
|
54
|
+
externalDocs: stackTrail.trace('externalDocs', st => toExternalDocs({ externalDocs, stackTrail: st, context })),
|
|
53
55
|
nullable,
|
|
54
56
|
default: defaultValue,
|
|
55
57
|
discriminator: discriminatorParsed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/components/toComponentsV3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toComponentsV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/components/toComponentsV3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAIrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAA;IAClD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,qCAI5B,kBAAkB,KAAG,aAAa,GAAG,SAsDvC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toOptionalResponsesV3 } from '../response/toResponseV3.js';
|
|
2
2
|
import { toHeadersV3 } from '../header/toHeadersV3.js';
|
|
3
|
+
import { toLinksV3 } from '../link/toLinksV3.js';
|
|
3
4
|
import { toOptionalSchemasV3 } from '../schema/toSchemasV3.js';
|
|
4
5
|
import { toOptionalParametersV3 } from '../parameter/toParameterV3.js';
|
|
5
6
|
import { toExamplesV3 } from '../example/toExamplesV3.js';
|
|
@@ -11,7 +12,7 @@ export const toComponentsV3 = ({ components, stackTrail, context }) => {
|
|
|
11
12
|
if (!components) {
|
|
12
13
|
return undefined;
|
|
13
14
|
}
|
|
14
|
-
const { schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, ...skipped } = components;
|
|
15
|
+
const { schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links, ...skipped } = components;
|
|
15
16
|
const extensionFields = toSpecificationExtensionsV3({
|
|
16
17
|
skipped,
|
|
17
18
|
parent: components,
|
|
@@ -33,6 +34,7 @@ export const toComponentsV3 = ({ components, stackTrail, context }) => {
|
|
|
33
34
|
requestBodies: stackTrail.trace('requestBodies', st => toRequestBodiesV3({ requestBodies, stackTrail: st, context })),
|
|
34
35
|
headers: stackTrail.trace('headers', st => toHeadersV3({ headers, stackTrail: st, context })),
|
|
35
36
|
securitySchemes: stackTrail.trace('securitySchemes', st => toSecuritySchemesV3({ securitySchemes, stackTrail: st, context })),
|
|
37
|
+
links: stackTrail.trace('links', st => toLinksV3({ links, stackTrail: st, context })),
|
|
36
38
|
extensionFields
|
|
37
39
|
};
|
|
38
40
|
return new OasComponents(fields);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
import { OasLink } from '../../../oas/link/Link.js';
|
|
4
|
+
import type { OasRef } from '../../../oas/ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
6
|
+
export type ToLinksV3Args = {
|
|
7
|
+
links: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.LinkObject> | undefined;
|
|
8
|
+
stackTrail: StackTrail;
|
|
9
|
+
context: ParseContextType;
|
|
10
|
+
};
|
|
11
|
+
export declare const toLinksV3: ({ links, stackTrail, context }: ToLinksV3Args) => Record<string, OasLink | OasRef<"link">> | undefined;
|
|
12
|
+
export type ToLinkV3Args = {
|
|
13
|
+
link: OpenAPIV3.ReferenceObject | OpenAPIV3.LinkObject;
|
|
14
|
+
stackTrail: StackTrail;
|
|
15
|
+
context: ParseContextType;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=toLinksV3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLinksV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/link/toLinksV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;IACnF,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,gCAIvB,aAAa,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,SAY7D,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,UAAU,CAAA;IACtD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { toRefV31 } from '../ref/toRefV31.js';
|
|
2
|
+
import { toServerV3 } from '../server/toServerV3.js';
|
|
3
|
+
import { isRef } from '../../../helpers/refFns.js';
|
|
4
|
+
import { OasLink } from '../../../oas/link/Link.js';
|
|
5
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
6
|
+
export const toLinksV3 = ({ links, stackTrail, context }) => {
|
|
7
|
+
if (!links) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const output = {};
|
|
11
|
+
for (const [key, value] of Object.entries(links)) {
|
|
12
|
+
output[key] = stackTrail.trace(key, st => toLinkV3({ link: value, stackTrail: st, context }));
|
|
13
|
+
}
|
|
14
|
+
return output;
|
|
15
|
+
};
|
|
16
|
+
const toLinkV3 = ({ link, stackTrail, context }) => {
|
|
17
|
+
if (isRef(link)) {
|
|
18
|
+
return toRefV31({ ref: link, refType: 'link', stackTrail, context });
|
|
19
|
+
}
|
|
20
|
+
const { operationRef, operationId, parameters, requestBody, description, server, ...skipped } = link;
|
|
21
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
22
|
+
skipped,
|
|
23
|
+
parent: link,
|
|
24
|
+
context,
|
|
25
|
+
stackTrail,
|
|
26
|
+
parentType: 'link'
|
|
27
|
+
});
|
|
28
|
+
const fields = {
|
|
29
|
+
operationRef,
|
|
30
|
+
operationId,
|
|
31
|
+
parameters,
|
|
32
|
+
requestBody,
|
|
33
|
+
description,
|
|
34
|
+
server: server !== undefined
|
|
35
|
+
? stackTrail.trace('server', st => toServerV3({ server, stackTrail: st, context }))
|
|
36
|
+
: undefined,
|
|
37
|
+
extensionFields
|
|
38
|
+
};
|
|
39
|
+
return new OasLink(fields);
|
|
40
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAUzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,gCAAgC,YAAY,KAAG,SAoDvE,CAAA"}
|
|
@@ -6,6 +6,7 @@ import { parseNullable } from '../_helpers/parseNullable.js';
|
|
|
6
6
|
import { parseEnum } from '../_helpers/parseEnum.js';
|
|
7
7
|
import { parseExample } from '../_helpers/parseExample.js';
|
|
8
8
|
import { parseDefault } from '../_helpers/parseDefault.js';
|
|
9
|
+
import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
|
|
9
10
|
export const toObject = ({ value, context, stackTrail }) => {
|
|
10
11
|
const { nullable, value: valueWithoutNullable } = parseNullable({
|
|
11
12
|
value,
|
|
@@ -53,7 +54,7 @@ export const toObject = ({ value, context, stackTrail }) => {
|
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
56
|
const toParsedObject = ({ context, stackTrail, nullable, example, enums, defaultValue, value }) => {
|
|
56
|
-
const { type: _type, title, description, deprecated, properties, required, maxProperties, minProperties, additionalProperties, readOnly, writeOnly, ...skipped } = value;
|
|
57
|
+
const { type: _type, title, description, externalDocs, deprecated, properties, required, maxProperties, minProperties, additionalProperties, readOnly, writeOnly, ...skipped } = value;
|
|
57
58
|
const extensionFields = toSpecificationExtensionsV3({
|
|
58
59
|
skipped,
|
|
59
60
|
parent: value,
|
|
@@ -64,6 +65,7 @@ const toParsedObject = ({ context, stackTrail, nullable, example, enums, default
|
|
|
64
65
|
return context.withStackTrail(stackTrail, () => new OasObject({
|
|
65
66
|
title,
|
|
66
67
|
description,
|
|
68
|
+
externalDocs: stackTrail.trace('externalDocs', st => toExternalDocs({ externalDocs, stackTrail: st, context })),
|
|
67
69
|
nullable,
|
|
68
70
|
example,
|
|
69
71
|
enums,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/response/toResponseV3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/response/toResponseV3.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB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