@skmtc/core 0.28.7 → 0.30.1
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/_dnt.polyfills.d.ts +11 -0
- package/esm/_dnt.polyfills.js +14 -0
- package/esm/context/GenerateContext.js +16 -16
- package/esm/context/ParseContext.js +9 -1
- package/esm/context/RenderContext.d.ts +7 -7
- package/esm/context/RenderContext.js +17 -12
- package/esm/context/generateTypes.d.ts +2 -2
- package/esm/context/generateTypes.js +3 -1
- package/esm/deps/jsr.io/@std/path/1.1.6/posix/is_absolute.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/posix/is_absolute.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/is_absolute.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/is_absolute.js +38 -0
- package/esm/dsl/GeneratorKeys.d.ts +2 -2
- package/esm/dsl/GeneratorKeys.js +6 -3
- package/esm/dsl/model/ModelDriver.js +4 -3
- package/esm/dsl/operation/gql/GqlOperationDriver.js +4 -3
- package/esm/dsl/operation/oas/OasOperationDriver.js +4 -3
- package/esm/dsl/webhook/WebhookDriver.js +4 -3
- package/esm/helpers/applyGeneratedSuffix.js +1 -1
- package/esm/helpers/isImported.d.ts +10 -74
- package/esm/helpers/isImported.js +12 -76
- package/esm/helpers/naming.d.ts +2 -1
- package/esm/helpers/naming.js +4 -2
- package/esm/helpers/normalizeWorkspacePath.d.ts +64 -0
- package/esm/helpers/normalizeWorkspacePath.js +98 -0
- package/esm/helpers/toResolvedArtifactPath.d.ts +8 -5
- package/esm/helpers/toResolvedArtifactPath.js +11 -7
- package/esm/helpers/toWorkspacePath.d.ts +3 -3
- package/esm/helpers/toWorkspacePath.js +5 -5
- package/esm/mod.d.ts +1 -0
- package/esm/mod.js +1 -0
- package/esm/oas/discriminator/Discriminator.d.ts +3 -0
- package/esm/oas/discriminator/Discriminator.js +7 -0
- package/esm/oas/document/Document.d.ts +7 -0
- package/esm/oas/document/Document.js +8 -0
- package/esm/oas/example/Example.d.ts +10 -1
- package/esm/oas/example/Example.js +16 -0
- package/esm/oas/mediaType/MediaType.d.ts +12 -0
- package/esm/oas/mediaType/MediaType.js +24 -0
- package/esm/oas/parameter/Parameter.d.ts +2 -1
- package/esm/oas/parameter/Parameter.js +5 -2
- package/esm/oas/parameter/parameter-types.d.ts +10 -2
- package/esm/oas/parameter/parameter-types.js +3 -1
- package/esm/oas/response/Response.d.ts +6 -1
- package/esm/oas/response/Response.js +8 -0
- package/esm/oas/securitySchemes/SecurityScheme.d.ts +47 -4
- package/esm/oas/securitySchemes/SecurityScheme.js +46 -1
- package/esm/oas/securitySchemes/security-scheme-types.d.ts +21 -0
- package/esm/oas/server/Server.d.ts +8 -2
- package/esm/oas/server/Server.js +10 -1
- package/esm/oas/tag/Tag.d.ts +9 -0
- package/esm/oas/tag/Tag.js +9 -0
- package/esm/parse/toOasDialect.d.ts +8 -7
- package/esm/parse/toOasDialect.js +4 -2
- package/esm/parse/v3-0/methods.d.ts +11 -0
- package/esm/parse/v3-0/methods.js +16 -0
- package/esm/parse/v3-0/operation/toOperationsV3.js +5 -5
- package/esm/parse/v3-0/parameter/toParameterV3.d.ts +4 -2
- package/esm/parse/v3-0/parameter/toParameterV3.js +17 -3
- package/esm/parse/v3-0/securitySchemes/toSecuritySchemes.js +50 -38
- package/esm/parse/v3-0/webhook/toWebhooksV3.js +5 -5
- package/esm/parse/v3-1/methods.d.ts +11 -0
- package/esm/parse/v3-1/methods.js +16 -0
- package/esm/parse/v3-1/operation/toOperationsV3.js +5 -5
- package/esm/parse/v3-1/parameter/toParameterV3.d.ts +4 -2
- package/esm/parse/v3-1/parameter/toParameterV3.js +17 -3
- package/esm/parse/v3-1/securitySchemes/toSecuritySchemes.js +50 -38
- package/esm/parse/v3-1/webhook/toWebhooksV3.js +5 -5
- package/esm/parse/v3-2/_helpers/parseDefault.d.ts +43 -0
- package/esm/parse/v3-2/_helpers/parseDefault.js +39 -0
- package/esm/parse/v3-2/_helpers/parseEnum.d.ts +13 -0
- package/esm/parse/v3-2/_helpers/parseEnum.js +23 -0
- package/esm/parse/v3-2/_helpers/parseExample.d.ts +41 -0
- package/esm/parse/v3-2/_helpers/parseExample.js +37 -0
- package/esm/parse/v3-2/_helpers/parseNullable.d.ts +141 -0
- package/esm/parse/v3-2/_helpers/parseNullable.js +140 -0
- package/esm/parse/v3-2/_merge-all-of/check-array-item-type-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-array-item-type-conflicts.js +9 -0
- package/esm/parse/v3-2/_merge-all-of/check-at-least-one-type-match.d.ts +4 -0
- package/esm/parse/v3-2/_merge-all-of/check-at-least-one-type-match.js +5 -0
- package/esm/parse/v3-2/_merge-all-of/check-enum-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-enum-conflicts.js +11 -0
- package/esm/parse/v3-2/_merge-all-of/check-format-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-format-conflicts.js +5 -0
- package/esm/parse/v3-2/_merge-all-of/check-number-constraints-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-number-constraints-conflicts.js +11 -0
- package/esm/parse/v3-2/_merge-all-of/check-read-only-write-only-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-read-only-write-only-conflicts.js +5 -0
- package/esm/parse/v3-2/_merge-all-of/check-type-conflicts.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/check-type-conflicts.js +5 -0
- package/esm/parse/v3-2/_merge-all-of/cross-product.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/cross-product.js +3 -0
- package/esm/parse/v3-2/_merge-all-of/decompose-intersection.d.ts +6 -0
- package/esm/parse/v3-2/_merge-all-of/decompose-intersection.js +27 -0
- package/esm/parse/v3-2/_merge-all-of/decompose-union.d.ts +12 -0
- package/esm/parse/v3-2/_merge-all-of/decompose-union.js +69 -0
- package/esm/parse/v3-2/_merge-all-of/generic-merge.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/generic-merge.js +12 -0
- package/esm/parse/v3-2/_merge-all-of/is-equal.d.ts +1 -0
- package/esm/parse/v3-2/_merge-all-of/is-equal.js +19 -0
- package/esm/parse/v3-2/_merge-all-of/merge-array-constraints.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/merge-array-constraints.js +44 -0
- package/esm/parse/v3-2/_merge-all-of/merge-boolean-constraints.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-boolean-constraints.js +7 -0
- package/esm/parse/v3-2/_merge-all-of/merge-enum-values.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-enum-values.js +32 -0
- package/esm/parse/v3-2/_merge-all-of/merge-integer-constraints.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-integer-constraints.js +41 -0
- package/esm/parse/v3-2/_merge-all-of/merge-intersection.d.ts +8 -0
- package/esm/parse/v3-2/_merge-all-of/merge-intersection.js +16 -0
- package/esm/parse/v3-2/_merge-all-of/merge-number-constraints.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-number-constraints.js +41 -0
- package/esm/parse/v3-2/_merge-all-of/merge-object-constraints.d.ts +5 -0
- package/esm/parse/v3-2/_merge-all-of/merge-object-constraints.js +28 -0
- package/esm/parse/v3-2/_merge-all-of/merge-properties.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/merge-properties.js +25 -0
- package/esm/parse/v3-2/_merge-all-of/merge-required.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-required.js +10 -0
- package/esm/parse/v3-2/_merge-all-of/merge-string-constraints.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/merge-string-constraints.js +55 -0
- package/esm/parse/v3-2/_merge-all-of/merge-union.d.ts +15 -0
- package/esm/parse/v3-2/_merge-all-of/merge-union.js +53 -0
- package/esm/parse/v3-2/_merge-all-of/merge.d.ts +2 -0
- package/esm/parse/v3-2/_merge-all-of/merge.js +155 -0
- package/esm/parse/v3-2/_merge-all-of/nullable-merge.d.ts +3 -0
- package/esm/parse/v3-2/_merge-all-of/nullable-merge.js +12 -0
- package/esm/parse/v3-2/_merge-all-of/types.d.ts +14 -0
- package/esm/parse/v3-2/_merge-all-of/types.js +2 -0
- package/esm/parse/v3-2/array/toArray.d.ts +80 -0
- package/esm/parse/v3-2/array/toArray.js +165 -0
- package/esm/parse/v3-2/boolean/toBoolean.d.ts +78 -0
- package/esm/parse/v3-2/boolean/toBoolean.js +139 -0
- package/esm/parse/v3-2/components/toComponentsV3.d.ts +14 -0
- package/esm/parse/v3-2/components/toComponentsV3.js +43 -0
- package/esm/parse/v3-2/contact/toContactV3.d.ts +5 -0
- package/esm/parse/v3-2/contact/toContactV3.js +18 -0
- package/esm/parse/v3-2/discriminator/toDiscriminatorV3.d.ts +14 -0
- package/esm/parse/v3-2/discriminator/toDiscriminatorV3.js +21 -0
- package/esm/parse/v3-2/document/toDocumentFieldsV3.d.ts +16 -0
- package/esm/parse/v3-2/document/toDocumentFieldsV3.js +33 -0
- package/esm/parse/v3-2/example/toExamplesV3.d.ts +77 -0
- package/esm/parse/v3-2/example/toExamplesV3.js +143 -0
- package/esm/parse/v3-2/externalDocs/toExternalDocs.d.ts +10 -0
- package/esm/parse/v3-2/externalDocs/toExternalDocs.js +15 -0
- package/esm/parse/v3-2/header/toHeadersV3.d.ts +18 -0
- package/esm/parse/v3-2/header/toHeadersV3.js +47 -0
- package/esm/parse/v3-2/info/toInfoV3.d.ts +10 -0
- package/esm/parse/v3-2/info/toInfoV3.js +23 -0
- package/esm/parse/v3-2/integer/toInteger.d.ts +21 -0
- package/esm/parse/v3-2/integer/toInteger.js +115 -0
- package/esm/parse/v3-2/license/toLicenseV3.d.ts +5 -0
- package/esm/parse/v3-2/license/toLicenseV3.js +17 -0
- package/esm/parse/v3-2/link/toLinksV3.d.ts +16 -0
- package/esm/parse/v3-2/link/toLinksV3.js +40 -0
- package/esm/parse/v3-2/mediaType/toMediaTypeItemV3.d.ts +323 -0
- package/esm/parse/v3-2/mediaType/toMediaTypeItemV3.js +375 -0
- package/esm/parse/v3-2/methods.d.ts +17 -0
- package/esm/parse/v3-2/methods.js +21 -0
- package/esm/parse/v3-2/number/toNumber.d.ts +10 -0
- package/esm/parse/v3-2/number/toNumber.js +115 -0
- package/esm/parse/v3-2/object/toAdditionalPropertiesV3.d.ts +11 -0
- package/esm/parse/v3-2/object/toAdditionalPropertiesV3.js +10 -0
- package/esm/parse/v3-2/object/toObject.d.ts +10 -0
- package/esm/parse/v3-2/object/toObject.js +90 -0
- package/esm/parse/v3-2/operation/toOperationsV3.d.ts +25 -0
- package/esm/parse/v3-2/operation/toOperationsV3.js +129 -0
- package/esm/parse/v3-2/parameter/toParameterV3.d.ts +39 -0
- package/esm/parse/v3-2/parameter/toParameterV3.js +152 -0
- package/esm/parse/v3-2/parameter/warnQuerystringConflictsV3.d.ts +22 -0
- package/esm/parse/v3-2/parameter/warnQuerystringConflictsV3.js +39 -0
- package/esm/parse/v3-2/pathItem/dropAdditionalOperationsV3.d.ts +17 -0
- package/esm/parse/v3-2/pathItem/dropAdditionalOperationsV3.js +34 -0
- package/esm/parse/v3-2/pathItem/toPathItemV3.d.ts +23 -0
- package/esm/parse/v3-2/pathItem/toPathItemV3.js +45 -0
- package/esm/parse/v3-2/ref/toRefV31.d.ts +19 -0
- package/esm/parse/v3-2/ref/toRefV31.js +10 -0
- package/esm/parse/v3-2/requestBody/toRequestBodiesV3.d.ts +18 -0
- package/esm/parse/v3-2/requestBody/toRequestBodiesV3.js +44 -0
- package/esm/parse/v3-2/response/toResponseV3.d.ts +29 -0
- package/esm/parse/v3-2/response/toResponseV3.js +56 -0
- package/esm/parse/v3-2/schema/toSchemasV3.d.ts +29 -0
- package/esm/parse/v3-2/schema/toSchemasV3.js +511 -0
- package/esm/parse/v3-2/securityRequirement/toSecurityRequirement.d.ts +9 -0
- package/esm/parse/v3-2/securityRequirement/toSecurityRequirement.js +9 -0
- package/esm/parse/v3-2/securitySchemes/toSecuritySchemes.d.ts +17 -0
- package/esm/parse/v3-2/securitySchemes/toSecuritySchemes.js +152 -0
- package/esm/parse/v3-2/server/toServerV3.d.ts +26 -0
- package/esm/parse/v3-2/server/toServerV3.js +31 -0
- package/esm/parse/v3-2/serverVariable/toServerVariableV3.d.ts +22 -0
- package/esm/parse/v3-2/serverVariable/toServerVariableV3.js +30 -0
- package/esm/parse/v3-2/specificationExtensions/toSpecificationExtensionsV3.d.ts +14 -0
- package/esm/parse/v3-2/specificationExtensions/toSpecificationExtensionsV3.js +25 -0
- package/esm/parse/v3-2/string/toString.d.ts +146 -0
- package/esm/parse/v3-2/string/toString.js +211 -0
- package/esm/parse/v3-2/tag/toTagsV3.d.ts +22 -0
- package/esm/parse/v3-2/tag/toTagsV3.js +78 -0
- package/esm/parse/v3-2/union/toUnion.d.ts +12 -0
- package/esm/parse/v3-2/union/toUnion.js +68 -0
- package/esm/parse/v3-2/unknown/toUnknown.d.ts +10 -0
- package/esm/parse/v3-2/unknown/toUnknown.js +19 -0
- package/esm/parse/v3-2/webhook/toWebhooksV3.d.ts +48 -0
- package/esm/parse/v3-2/webhook/toWebhooksV3.js +139 -0
- package/esm/types/Method.d.ts +7 -4
- package/esm/types/Method.js +17 -4
- package/esm/types/Preview.d.ts +2 -1
- package/esm/types/Settings.js +6 -8
- package/esm/types/SkmtcDocument.d.ts +6 -6
- package/package.json +1 -1
- package/script/_dnt.polyfills.d.ts +11 -0
- package/script/_dnt.polyfills.js +14 -0
- package/script/context/GenerateContext.js +16 -16
- package/script/context/ParseContext.js +9 -1
- package/script/context/RenderContext.d.ts +7 -7
- package/script/context/RenderContext.js +17 -12
- package/script/context/generateTypes.d.ts +2 -2
- package/script/context/generateTypes.js +3 -1
- package/script/deps/jsr.io/@std/path/1.1.6/posix/is_absolute.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.6/posix/is_absolute.js +26 -0
- package/script/deps/jsr.io/@std/path/1.1.6/windows/is_absolute.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.6/windows/is_absolute.js +41 -0
- package/script/dsl/GeneratorKeys.d.ts +2 -2
- package/script/dsl/GeneratorKeys.js +6 -3
- package/script/dsl/model/ModelDriver.js +4 -3
- package/script/dsl/operation/gql/GqlOperationDriver.js +4 -3
- package/script/dsl/operation/oas/OasOperationDriver.js +4 -3
- package/script/dsl/webhook/WebhookDriver.js +4 -3
- package/script/helpers/applyGeneratedSuffix.js +1 -1
- package/script/helpers/isImported.d.ts +10 -74
- package/script/helpers/isImported.js +12 -76
- package/script/helpers/naming.d.ts +2 -1
- package/script/helpers/naming.js +4 -2
- package/script/helpers/normalizeWorkspacePath.d.ts +64 -0
- package/script/helpers/normalizeWorkspacePath.js +107 -0
- package/script/helpers/toResolvedArtifactPath.d.ts +8 -5
- package/script/helpers/toResolvedArtifactPath.js +11 -7
- package/script/helpers/toWorkspacePath.d.ts +3 -3
- package/script/helpers/toWorkspacePath.js +5 -5
- package/script/mod.d.ts +1 -0
- package/script/mod.js +1 -0
- package/script/oas/discriminator/Discriminator.d.ts +3 -0
- package/script/oas/discriminator/Discriminator.js +7 -0
- package/script/oas/document/Document.d.ts +7 -0
- package/script/oas/document/Document.js +8 -0
- package/script/oas/example/Example.d.ts +10 -1
- package/script/oas/example/Example.js +16 -0
- package/script/oas/mediaType/MediaType.d.ts +12 -0
- package/script/oas/mediaType/MediaType.js +24 -0
- package/script/oas/parameter/Parameter.d.ts +2 -1
- package/script/oas/parameter/Parameter.js +5 -2
- package/script/oas/parameter/parameter-types.d.ts +10 -2
- package/script/oas/parameter/parameter-types.js +3 -1
- package/script/oas/response/Response.d.ts +6 -1
- package/script/oas/response/Response.js +8 -0
- package/script/oas/securitySchemes/SecurityScheme.d.ts +47 -4
- package/script/oas/securitySchemes/SecurityScheme.js +46 -1
- package/script/oas/securitySchemes/security-scheme-types.d.ts +21 -0
- package/script/oas/server/Server.d.ts +8 -2
- package/script/oas/server/Server.js +10 -1
- package/script/oas/tag/Tag.d.ts +9 -0
- package/script/oas/tag/Tag.js +9 -0
- package/script/parse/toOasDialect.d.ts +8 -7
- package/script/parse/toOasDialect.js +4 -2
- package/script/parse/v3-0/methods.d.ts +11 -0
- package/script/parse/v3-0/methods.js +20 -0
- package/script/parse/v3-0/operation/toOperationsV3.js +5 -5
- package/script/parse/v3-0/parameter/toParameterV3.d.ts +4 -2
- package/script/parse/v3-0/parameter/toParameterV3.js +17 -3
- package/script/parse/v3-0/securitySchemes/toSecuritySchemes.js +49 -37
- package/script/parse/v3-0/webhook/toWebhooksV3.js +5 -5
- package/script/parse/v3-1/methods.d.ts +11 -0
- package/script/parse/v3-1/methods.js +20 -0
- package/script/parse/v3-1/operation/toOperationsV3.js +5 -5
- package/script/parse/v3-1/parameter/toParameterV3.d.ts +4 -2
- package/script/parse/v3-1/parameter/toParameterV3.js +17 -3
- package/script/parse/v3-1/securitySchemes/toSecuritySchemes.js +49 -37
- package/script/parse/v3-1/webhook/toWebhooksV3.js +5 -5
- package/script/parse/v3-2/_helpers/parseDefault.d.ts +43 -0
- package/script/parse/v3-2/_helpers/parseDefault.js +43 -0
- package/script/parse/v3-2/_helpers/parseEnum.d.ts +13 -0
- package/script/parse/v3-2/_helpers/parseEnum.js +27 -0
- package/script/parse/v3-2/_helpers/parseExample.d.ts +41 -0
- package/script/parse/v3-2/_helpers/parseExample.js +41 -0
- package/script/parse/v3-2/_helpers/parseNullable.d.ts +141 -0
- package/script/parse/v3-2/_helpers/parseNullable.js +144 -0
- package/script/parse/v3-2/_merge-all-of/check-array-item-type-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-array-item-type-conflicts.js +13 -0
- package/script/parse/v3-2/_merge-all-of/check-at-least-one-type-match.d.ts +4 -0
- package/script/parse/v3-2/_merge-all-of/check-at-least-one-type-match.js +9 -0
- package/script/parse/v3-2/_merge-all-of/check-enum-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-enum-conflicts.js +15 -0
- package/script/parse/v3-2/_merge-all-of/check-format-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-format-conflicts.js +9 -0
- package/script/parse/v3-2/_merge-all-of/check-number-constraints-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-number-constraints-conflicts.js +15 -0
- package/script/parse/v3-2/_merge-all-of/check-read-only-write-only-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-read-only-write-only-conflicts.js +9 -0
- package/script/parse/v3-2/_merge-all-of/check-type-conflicts.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/check-type-conflicts.js +9 -0
- package/script/parse/v3-2/_merge-all-of/cross-product.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/cross-product.js +7 -0
- package/script/parse/v3-2/_merge-all-of/decompose-intersection.d.ts +6 -0
- package/script/parse/v3-2/_merge-all-of/decompose-intersection.js +31 -0
- package/script/parse/v3-2/_merge-all-of/decompose-union.d.ts +12 -0
- package/script/parse/v3-2/_merge-all-of/decompose-union.js +73 -0
- package/script/parse/v3-2/_merge-all-of/generic-merge.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/generic-merge.js +16 -0
- package/script/parse/v3-2/_merge-all-of/is-equal.d.ts +1 -0
- package/script/parse/v3-2/_merge-all-of/is-equal.js +23 -0
- package/script/parse/v3-2/_merge-all-of/merge-array-constraints.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/merge-array-constraints.js +80 -0
- package/script/parse/v3-2/_merge-all-of/merge-boolean-constraints.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-boolean-constraints.js +43 -0
- package/script/parse/v3-2/_merge-all-of/merge-enum-values.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-enum-values.js +68 -0
- package/script/parse/v3-2/_merge-all-of/merge-integer-constraints.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-integer-constraints.js +77 -0
- package/script/parse/v3-2/_merge-all-of/merge-intersection.d.ts +8 -0
- package/script/parse/v3-2/_merge-all-of/merge-intersection.js +20 -0
- package/script/parse/v3-2/_merge-all-of/merge-number-constraints.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-number-constraints.js +77 -0
- package/script/parse/v3-2/_merge-all-of/merge-object-constraints.d.ts +5 -0
- package/script/parse/v3-2/_merge-all-of/merge-object-constraints.js +65 -0
- package/script/parse/v3-2/_merge-all-of/merge-properties.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/merge-properties.js +29 -0
- package/script/parse/v3-2/_merge-all-of/merge-required.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-required.js +15 -0
- package/script/parse/v3-2/_merge-all-of/merge-string-constraints.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/merge-string-constraints.js +91 -0
- package/script/parse/v3-2/_merge-all-of/merge-union.d.ts +15 -0
- package/script/parse/v3-2/_merge-all-of/merge-union.js +58 -0
- package/script/parse/v3-2/_merge-all-of/merge.d.ts +2 -0
- package/script/parse/v3-2/_merge-all-of/merge.js +159 -0
- package/script/parse/v3-2/_merge-all-of/nullable-merge.d.ts +3 -0
- package/script/parse/v3-2/_merge-all-of/nullable-merge.js +17 -0
- package/script/parse/v3-2/_merge-all-of/types.d.ts +14 -0
- package/script/parse/v3-2/_merge-all-of/types.js +38 -0
- package/script/parse/v3-2/array/toArray.d.ts +80 -0
- package/script/parse/v3-2/array/toArray.js +203 -0
- package/script/parse/v3-2/boolean/toBoolean.d.ts +78 -0
- package/script/parse/v3-2/boolean/toBoolean.js +177 -0
- package/script/parse/v3-2/components/toComponentsV3.d.ts +14 -0
- package/script/parse/v3-2/components/toComponentsV3.js +47 -0
- package/script/parse/v3-2/contact/toContactV3.d.ts +5 -0
- package/script/parse/v3-2/contact/toContactV3.js +22 -0
- package/script/parse/v3-2/discriminator/toDiscriminatorV3.d.ts +14 -0
- package/script/parse/v3-2/discriminator/toDiscriminatorV3.js +25 -0
- package/script/parse/v3-2/document/toDocumentFieldsV3.d.ts +16 -0
- package/script/parse/v3-2/document/toDocumentFieldsV3.js +37 -0
- package/script/parse/v3-2/example/toExamplesV3.d.ts +77 -0
- package/script/parse/v3-2/example/toExamplesV3.js +149 -0
- package/script/parse/v3-2/externalDocs/toExternalDocs.d.ts +10 -0
- package/script/parse/v3-2/externalDocs/toExternalDocs.js +52 -0
- package/script/parse/v3-2/header/toHeadersV3.d.ts +18 -0
- package/script/parse/v3-2/header/toHeadersV3.js +51 -0
- package/script/parse/v3-2/info/toInfoV3.d.ts +10 -0
- package/script/parse/v3-2/info/toInfoV3.js +27 -0
- package/script/parse/v3-2/integer/toInteger.d.ts +21 -0
- package/script/parse/v3-2/integer/toInteger.js +153 -0
- package/script/parse/v3-2/license/toLicenseV3.d.ts +5 -0
- package/script/parse/v3-2/license/toLicenseV3.js +21 -0
- package/script/parse/v3-2/link/toLinksV3.d.ts +16 -0
- package/script/parse/v3-2/link/toLinksV3.js +44 -0
- package/script/parse/v3-2/mediaType/toMediaTypeItemV3.d.ts +323 -0
- package/script/parse/v3-2/mediaType/toMediaTypeItemV3.js +381 -0
- package/script/parse/v3-2/methods.d.ts +17 -0
- package/script/parse/v3-2/methods.js +25 -0
- package/script/parse/v3-2/number/toNumber.d.ts +10 -0
- package/script/parse/v3-2/number/toNumber.js +152 -0
- package/script/parse/v3-2/object/toAdditionalPropertiesV3.d.ts +11 -0
- package/script/parse/v3-2/object/toAdditionalPropertiesV3.js +14 -0
- package/script/parse/v3-2/object/toObject.d.ts +10 -0
- package/script/parse/v3-2/object/toObject.js +94 -0
- package/script/parse/v3-2/operation/toOperationsV3.d.ts +25 -0
- package/script/parse/v3-2/operation/toOperationsV3.js +134 -0
- package/script/parse/v3-2/parameter/toParameterV3.d.ts +39 -0
- package/script/parse/v3-2/parameter/toParameterV3.js +191 -0
- package/script/parse/v3-2/parameter/warnQuerystringConflictsV3.d.ts +22 -0
- package/script/parse/v3-2/parameter/warnQuerystringConflictsV3.js +43 -0
- package/script/parse/v3-2/pathItem/dropAdditionalOperationsV3.d.ts +17 -0
- package/script/parse/v3-2/pathItem/dropAdditionalOperationsV3.js +38 -0
- package/script/parse/v3-2/pathItem/toPathItemV3.d.ts +23 -0
- package/script/parse/v3-2/pathItem/toPathItemV3.js +50 -0
- package/script/parse/v3-2/ref/toRefV31.d.ts +19 -0
- package/script/parse/v3-2/ref/toRefV31.js +14 -0
- package/script/parse/v3-2/requestBody/toRequestBodiesV3.d.ts +18 -0
- package/script/parse/v3-2/requestBody/toRequestBodiesV3.js +49 -0
- package/script/parse/v3-2/response/toResponseV3.d.ts +29 -0
- package/script/parse/v3-2/response/toResponseV3.js +62 -0
- package/script/parse/v3-2/schema/toSchemasV3.d.ts +29 -0
- package/script/parse/v3-2/schema/toSchemasV3.js +518 -0
- package/script/parse/v3-2/securityRequirement/toSecurityRequirement.d.ts +9 -0
- package/script/parse/v3-2/securityRequirement/toSecurityRequirement.js +13 -0
- package/script/parse/v3-2/securitySchemes/toSecuritySchemes.d.ts +17 -0
- package/script/parse/v3-2/securitySchemes/toSecuritySchemes.js +189 -0
- package/script/parse/v3-2/server/toServerV3.d.ts +26 -0
- package/script/parse/v3-2/server/toServerV3.js +37 -0
- package/script/parse/v3-2/serverVariable/toServerVariableV3.d.ts +22 -0
- package/script/parse/v3-2/serverVariable/toServerVariableV3.js +36 -0
- package/script/parse/v3-2/specificationExtensions/toSpecificationExtensionsV3.d.ts +14 -0
- package/script/parse/v3-2/specificationExtensions/toSpecificationExtensionsV3.js +30 -0
- package/script/parse/v3-2/string/toString.d.ts +146 -0
- package/script/parse/v3-2/string/toString.js +249 -0
- package/script/parse/v3-2/tag/toTagsV3.d.ts +22 -0
- package/script/parse/v3-2/tag/toTagsV3.js +83 -0
- package/script/parse/v3-2/union/toUnion.d.ts +12 -0
- package/script/parse/v3-2/union/toUnion.js +72 -0
- package/script/parse/v3-2/unknown/toUnknown.d.ts +10 -0
- package/script/parse/v3-2/unknown/toUnknown.js +23 -0
- package/script/parse/v3-2/webhook/toWebhooksV3.d.ts +48 -0
- package/script/parse/v3-2/webhook/toWebhooksV3.js +144 -0
- package/script/types/Method.d.ts +7 -4
- package/script/types/Method.js +17 -4
- package/script/types/Preview.d.ts +2 -1
- package/script/types/Settings.js +7 -9
- package/script/types/SkmtcDocument.d.ts +6 -6
- package/esm/deps/jsr.io/@std/path/1.1.6/extname.d.ts +0 -24
- package/esm/deps/jsr.io/@std/path/1.1.6/extname.js +0 -31
- package/esm/deps/jsr.io/@std/path/1.1.6/normalize.d.ts +0 -25
- package/esm/deps/jsr.io/@std/path/1.1.6/normalize.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.js +0 -83
- package/script/deps/jsr.io/@std/path/1.1.6/extname.d.ts +0 -24
- package/script/deps/jsr.io/@std/path/1.1.6/extname.js +0 -34
- package/script/deps/jsr.io/@std/path/1.1.6/normalize.d.ts +0 -25
- package/script/deps/jsr.io/@std/path/1.1.6/normalize.js +0 -35
- package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +0 -17
- package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.js +0 -86
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { toOptionalResponsesV3 } from '../response/toResponseV3.js';
|
|
2
|
+
import { toHeadersV3 } from '../header/toHeadersV3.js';
|
|
3
|
+
import { toLinksV3 } from '../link/toLinksV3.js';
|
|
4
|
+
import { toOptionalSchemasV3 } from '../schema/toSchemasV3.js';
|
|
5
|
+
import { toOptionalParametersV3 } from '../parameter/toParameterV3.js';
|
|
6
|
+
import { toExamplesV3 } from '../example/toExamplesV3.js';
|
|
7
|
+
import { toRequestBodiesV3 } from '../requestBody/toRequestBodiesV3.js';
|
|
8
|
+
import { OasComponents } from '../../../oas/components/Components.js';
|
|
9
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
10
|
+
import { toSecuritySchemesV3 } from '../securitySchemes/toSecuritySchemes.js';
|
|
11
|
+
export const toComponentsV3 = ({ components, stackTrail, context }) => {
|
|
12
|
+
if (!components) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
// `mediaTypes` is resolved where it is referenced, inside
|
|
16
|
+
// `toMediaTypeItemsV3`, so it is read here only to keep it off `skipped`.
|
|
17
|
+
const { schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links, mediaTypes: _mediaTypes, ...skipped } = components;
|
|
18
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
19
|
+
skipped,
|
|
20
|
+
parent: components,
|
|
21
|
+
context,
|
|
22
|
+
stackTrail,
|
|
23
|
+
parentType: 'components'
|
|
24
|
+
});
|
|
25
|
+
const fields = {
|
|
26
|
+
schemas: stackTrail.trace('schemas', st => toOptionalSchemasV3({ schemas, stackTrail: st, context })),
|
|
27
|
+
responses: stackTrail.trace('responses', st => toOptionalResponsesV3({ responses, stackTrail: st, context })),
|
|
28
|
+
parameters: stackTrail.trace('parameters', st => toOptionalParametersV3({ parameters, stackTrail: st, context })),
|
|
29
|
+
examples: toExamplesV3({
|
|
30
|
+
examples,
|
|
31
|
+
example: undefined,
|
|
32
|
+
exampleKey: 'TEMP',
|
|
33
|
+
stackTrail,
|
|
34
|
+
context
|
|
35
|
+
}),
|
|
36
|
+
requestBodies: stackTrail.trace('requestBodies', st => toRequestBodiesV3({ requestBodies, stackTrail: st, context })),
|
|
37
|
+
headers: stackTrail.trace('headers', st => toHeadersV3({ headers, stackTrail: st, context })),
|
|
38
|
+
securitySchemes: stackTrail.trace('securitySchemes', st => toSecuritySchemesV3({ securitySchemes, stackTrail: st, context })),
|
|
39
|
+
links: stackTrail.trace('links', st => toLinksV3({ links, stackTrail: st, context })),
|
|
40
|
+
extensionFields
|
|
41
|
+
};
|
|
42
|
+
return new OasComponents(fields);
|
|
43
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { OasContact } from '../../../oas/contact/Contact.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
export declare const toContactV3: (contact: OpenAPIV3.ContactObject, stackTrail: StackTrail, context: ParseContextType) => OasContact;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
2
|
+
import { OasContact } from '../../../oas/contact/Contact.js';
|
|
3
|
+
export const toContactV3 = (contact, stackTrail, context) => {
|
|
4
|
+
const { name, url, email, ...skipped } = contact;
|
|
5
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
6
|
+
skipped,
|
|
7
|
+
parent: contact,
|
|
8
|
+
context,
|
|
9
|
+
stackTrail,
|
|
10
|
+
parentType: 'contact'
|
|
11
|
+
});
|
|
12
|
+
return new OasContact({
|
|
13
|
+
name,
|
|
14
|
+
url,
|
|
15
|
+
email,
|
|
16
|
+
extensionFields
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { OasDiscriminator } from '../../../oas/discriminator/Discriminator.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
/** A 3.2 Discriminator Object: the 3.0 shape plus `defaultMapping`. */
|
|
6
|
+
export type DiscriminatorObjectV32 = OpenAPIV3.DiscriminatorObject & {
|
|
7
|
+
defaultMapping?: string;
|
|
8
|
+
};
|
|
9
|
+
export type ToDiscriminatorV3Args = {
|
|
10
|
+
discriminator: DiscriminatorObjectV32 | undefined;
|
|
11
|
+
stackTrail: StackTrail;
|
|
12
|
+
context: ParseContextType;
|
|
13
|
+
};
|
|
14
|
+
export declare const toDiscriminatorV3: ({ discriminator, stackTrail, context }: ToDiscriminatorV3Args) => OasDiscriminator | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OasDiscriminator } from '../../../oas/discriminator/Discriminator.js';
|
|
2
|
+
import { isEmpty } from '../../../helpers/isEmpty.js';
|
|
3
|
+
export const toDiscriminatorV3 = ({ discriminator, stackTrail, context }) => {
|
|
4
|
+
if (!discriminator) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
const { propertyName, mapping, defaultMapping, ...skipped } = discriminator;
|
|
8
|
+
if (!isEmpty(skipped)) {
|
|
9
|
+
context.logSkippedFields({
|
|
10
|
+
skipped,
|
|
11
|
+
parent: discriminator,
|
|
12
|
+
parentType: 'discriminator',
|
|
13
|
+
stackTrail
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return new OasDiscriminator({
|
|
17
|
+
propertyName,
|
|
18
|
+
mapping,
|
|
19
|
+
defaultMapping
|
|
20
|
+
});
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { type WebhooksObject } from '../webhook/toWebhooksV3.js';
|
|
4
|
+
import type { DocumentFields } from '../../../oas/document/Document.js';
|
|
5
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
6
|
+
export type ToDocumentV3Args = {
|
|
7
|
+
documentObject: Omit<OpenAPIV3.Document, 'paths'> & {
|
|
8
|
+
paths?: OpenAPIV3.PathsObject;
|
|
9
|
+
webhooks?: WebhooksObject;
|
|
10
|
+
/** The document's own URI (3.2) */
|
|
11
|
+
$self?: string;
|
|
12
|
+
};
|
|
13
|
+
stackTrail: StackTrail;
|
|
14
|
+
context: ParseContextType;
|
|
15
|
+
};
|
|
16
|
+
export declare const toDocumentFieldsV3: ({ documentObject, stackTrail, context }: ToDocumentV3Args) => DocumentFields;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { toTagsV3 } from '../tag/toTagsV3.js';
|
|
2
|
+
import { toOperationsV3 } from '../operation/toOperationsV3.js';
|
|
3
|
+
import { toWebhooksV3 } from '../webhook/toWebhooksV3.js';
|
|
4
|
+
import { toComponentsV3 } from '../components/toComponentsV3.js';
|
|
5
|
+
import { toInfoV3 } from '../info/toInfoV3.js';
|
|
6
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
7
|
+
import { toOptionalServersV3 } from '../server/toServerV3.js';
|
|
8
|
+
import { toSecurityRequirementsV3 } from '../securityRequirement/toSecurityRequirement.js';
|
|
9
|
+
import { toExternalDocs } from '../externalDocs/toExternalDocs.js';
|
|
10
|
+
export const toDocumentFieldsV3 = ({ documentObject, stackTrail, context }) => {
|
|
11
|
+
const { openapi, $self, info, paths, components, tags, servers, security, externalDocs, webhooks, ...skipped } = documentObject;
|
|
12
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
13
|
+
skipped,
|
|
14
|
+
parent: documentObject,
|
|
15
|
+
context,
|
|
16
|
+
stackTrail,
|
|
17
|
+
parentType: 'document'
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
openapi,
|
|
21
|
+
$self,
|
|
22
|
+
info: stackTrail.trace('info', st => toInfoV3({ info, stackTrail: st, context })),
|
|
23
|
+
servers: stackTrail.trace('servers', st => toOptionalServersV3({ servers, stackTrail: st, context })),
|
|
24
|
+
operations: stackTrail.trace('paths', st => toOperationsV3({ paths, stackTrail: st, context })),
|
|
25
|
+
webhooks: stackTrail.trace('webhooks', st => toWebhooksV3({ webhooks, stackTrail: st, context })),
|
|
26
|
+
components: stackTrail.trace('components', st => toComponentsV3({ components, stackTrail: st, context })),
|
|
27
|
+
tags: stackTrail.trace('tags', st => toTagsV3({ tags, stackTrail: st, context })),
|
|
28
|
+
security: stackTrail.trace('security', st => toSecurityRequirementsV3({ security, stackTrail: st, context })),
|
|
29
|
+
extensionFields,
|
|
30
|
+
externalDocs: stackTrail.trace('externalDocs', st => toExternalDocs({ externalDocs, stackTrail: st, context }))
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
// stackTrail.trace('info', (x) => formatNumber(x))
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
import { OasExample } from '../../../oas/example/Example.js';
|
|
4
|
+
import type { OasRef } from '../../../oas/ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
6
|
+
/** A 3.2 Example Object: the 3.0 shape plus `dataValue` and `serializedValue`. */
|
|
7
|
+
export type ExampleObjectV32 = OpenAPIV3.ExampleObject & {
|
|
8
|
+
dataValue?: unknown;
|
|
9
|
+
serializedValue?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ToExampleSimpleV3Args = {
|
|
12
|
+
/**
|
|
13
|
+
* The example value itself. The singular `example` field of a media type,
|
|
14
|
+
* parameter or header is a LITERAL value — not an Example Object — so it
|
|
15
|
+
* carries no `summary`, `description` or `externalValue` to read.
|
|
16
|
+
*/
|
|
17
|
+
example: unknown;
|
|
18
|
+
/** The stack trail for tracing */
|
|
19
|
+
stackTrail: StackTrail;
|
|
20
|
+
/** Parse context for tracing and error handling */
|
|
21
|
+
context: ParseContextType;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Creates a simple OAS example from a value.
|
|
25
|
+
*
|
|
26
|
+
* Wraps a literal example value as an {@link OasExample}. Used for the singular
|
|
27
|
+
* `example` field, where only the value exists.
|
|
28
|
+
*
|
|
29
|
+
* @param args - Arguments containing the example value
|
|
30
|
+
* @returns OasExample object with the provided value
|
|
31
|
+
*/
|
|
32
|
+
export declare const toExampleSimpleV3: ({ example }: ToExampleSimpleV3Args) => OasExample | OasRef<"example">;
|
|
33
|
+
/**
|
|
34
|
+
* Arguments for processing OpenAPI v3 examples into OAS example objects.
|
|
35
|
+
*
|
|
36
|
+
* Handles both single example and examples collection scenarios,
|
|
37
|
+
* with context for tracing and error handling.
|
|
38
|
+
*/
|
|
39
|
+
export type ToExamplesV3Args = {
|
|
40
|
+
/** The singular `example` field — a literal value, not an Example Object */
|
|
41
|
+
example: unknown;
|
|
42
|
+
/** Collection of named examples (OpenAPI v3 format) */
|
|
43
|
+
examples: Record<string, ExampleObjectV32 | OpenAPIV3.ReferenceObject> | undefined;
|
|
44
|
+
/** Key name for the example context */
|
|
45
|
+
exampleKey: string;
|
|
46
|
+
/** The stack trail for tracing */
|
|
47
|
+
stackTrail: StackTrail;
|
|
48
|
+
/** Parse context for tracing and error handling */
|
|
49
|
+
context: ParseContextType;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Processes OpenAPI v3 examples into OAS example objects.
|
|
53
|
+
*
|
|
54
|
+
* Handles both single example and examples collection scenarios,
|
|
55
|
+
* converting them to the internal OAS representation. Provides
|
|
56
|
+
* warnings when both formats are specified simultaneously.
|
|
57
|
+
*
|
|
58
|
+
* @param args - Arguments containing example data and context
|
|
59
|
+
* @returns Record of processed examples, or undefined if no examples
|
|
60
|
+
*/
|
|
61
|
+
export declare const toExamplesV3: ({ example, examples, exampleKey, stackTrail, context }: ToExamplesV3Args) => Record<string, OasExample | OasRef<"example">> | undefined;
|
|
62
|
+
export type ToExampleV3Args = {
|
|
63
|
+
example: ExampleObjectV32 | OpenAPIV3.ReferenceObject;
|
|
64
|
+
stackTrail: StackTrail;
|
|
65
|
+
context: ParseContextType;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Processes a single OpenAPI v3 example into an OAS example object.
|
|
69
|
+
*
|
|
70
|
+
* Converts OpenAPI v3 example objects or references into the internal
|
|
71
|
+
* OAS representation, handling both direct examples and $ref references.
|
|
72
|
+
* Processes specification extensions and maintains all example metadata.
|
|
73
|
+
*
|
|
74
|
+
* @param args - Arguments containing the example and parsing context
|
|
75
|
+
* @returns OasExample object or reference to an example
|
|
76
|
+
*/
|
|
77
|
+
export declare const toExampleV3: ({ example, stackTrail, context }: ToExampleV3Args) => OasExample | OasRef<"example">;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { isRef } from '../../../helpers/refFns.js';
|
|
2
|
+
import { toRefV31 } from '../ref/toRefV31.js';
|
|
3
|
+
import { OasExample } from '../../../oas/example/Example.js';
|
|
4
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a simple OAS example from a value.
|
|
7
|
+
*
|
|
8
|
+
* Wraps a literal example value as an {@link OasExample}. Used for the singular
|
|
9
|
+
* `example` field, where only the value exists.
|
|
10
|
+
*
|
|
11
|
+
* @param args - Arguments containing the example value
|
|
12
|
+
* @returns OasExample object with the provided value
|
|
13
|
+
*/
|
|
14
|
+
export const toExampleSimpleV3 = ({ example }) => {
|
|
15
|
+
const fields = { value: example };
|
|
16
|
+
return new OasExample(fields);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Processes OpenAPI v3 examples into OAS example objects.
|
|
20
|
+
*
|
|
21
|
+
* Handles both single example and examples collection scenarios,
|
|
22
|
+
* converting them to the internal OAS representation. Provides
|
|
23
|
+
* warnings when both formats are specified simultaneously.
|
|
24
|
+
*
|
|
25
|
+
* @param args - Arguments containing example data and context
|
|
26
|
+
* @returns Record of processed examples, or undefined if no examples
|
|
27
|
+
*/
|
|
28
|
+
export const toExamplesV3 = ({ example, examples, exampleKey, stackTrail, context }) => {
|
|
29
|
+
// An empty map is declared but carries nothing, so it cannot be the richer
|
|
30
|
+
// field — letting it win would discard the singular in favour of no examples
|
|
31
|
+
// at all.
|
|
32
|
+
const namedExamples = examples && Object.keys(examples).length > 0 ? examples : undefined;
|
|
33
|
+
// `example` is a literal, so test presence rather than truthiness — `false`,
|
|
34
|
+
// `0` and `''` are all valid example values.
|
|
35
|
+
if (example !== undefined && examples !== undefined) {
|
|
36
|
+
context.logIssue({
|
|
37
|
+
key: 'example',
|
|
38
|
+
level: 'warning',
|
|
39
|
+
message: `Both example and examples are defined for ${exampleKey}; using ${namedExamples ? 'examples' : 'example'}`,
|
|
40
|
+
parent: examples,
|
|
41
|
+
stackTrail,
|
|
42
|
+
type: 'EXAMPLE_AND_EXAMPLES_DEFINED'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// The spec makes the two mutually exclusive, so reaching here with both is
|
|
46
|
+
// malformed input. Prefer `examples`: it is the richer field — many entries,
|
|
47
|
+
// each with a summary and description — and the singular carries nothing it
|
|
48
|
+
// cannot express, so this discards strictly less.
|
|
49
|
+
if (namedExamples) {
|
|
50
|
+
return stackTrail.trace('examples', st => {
|
|
51
|
+
const output = {};
|
|
52
|
+
const entries = Object.entries(namedExamples);
|
|
53
|
+
for (const [key, value] of entries) {
|
|
54
|
+
output[key] = st.trace(key, st2 => toExampleV3({ example: value, stackTrail: st2, context }));
|
|
55
|
+
}
|
|
56
|
+
return output;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (example !== undefined) {
|
|
60
|
+
return {
|
|
61
|
+
[exampleKey]: stackTrail.trace('example', st => toExampleSimpleV3({ example, stackTrail: st, context }))
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Processes a single OpenAPI v3 example into an OAS example object.
|
|
68
|
+
*
|
|
69
|
+
* Converts OpenAPI v3 example objects or references into the internal
|
|
70
|
+
* OAS representation, handling both direct examples and $ref references.
|
|
71
|
+
* Processes specification extensions and maintains all example metadata.
|
|
72
|
+
*
|
|
73
|
+
* @param args - Arguments containing the example and parsing context
|
|
74
|
+
* @returns OasExample object or reference to an example
|
|
75
|
+
*/
|
|
76
|
+
export const toExampleV3 = ({ example, stackTrail, context }) => {
|
|
77
|
+
if (isRef(example)) {
|
|
78
|
+
return toRefV31({ ref: example, refType: 'example', stackTrail, context });
|
|
79
|
+
}
|
|
80
|
+
// `externalValue` is the alternative to `value` — an example too large or too
|
|
81
|
+
// awkward to inline. Leaving it in `skipped` both loses it and reports a
|
|
82
|
+
// standard field as an unexpected property.
|
|
83
|
+
const { summary, description, value, dataValue, serializedValue, externalValue, ...skipped } = example;
|
|
84
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
85
|
+
skipped,
|
|
86
|
+
parent: example,
|
|
87
|
+
context,
|
|
88
|
+
stackTrail,
|
|
89
|
+
parentType: 'example'
|
|
90
|
+
});
|
|
91
|
+
const kept = toKeptValueFields({
|
|
92
|
+
present: { dataValue, value, serializedValue, externalValue },
|
|
93
|
+
example,
|
|
94
|
+
stackTrail,
|
|
95
|
+
context
|
|
96
|
+
});
|
|
97
|
+
return new OasExample({
|
|
98
|
+
summary,
|
|
99
|
+
description,
|
|
100
|
+
value: kept.has('value') ? value : undefined,
|
|
101
|
+
dataValue: kept.has('dataValue') ? dataValue : undefined,
|
|
102
|
+
serializedValue: kept.has('serializedValue') ? serializedValue : undefined,
|
|
103
|
+
externalValue: kept.has('externalValue') ? externalValue : undefined,
|
|
104
|
+
extensionFields
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
/** The value fields in the order they are kept when two conflict. */
|
|
108
|
+
const valueFieldPrecedence = [
|
|
109
|
+
'dataValue',
|
|
110
|
+
'value',
|
|
111
|
+
'serializedValue',
|
|
112
|
+
'externalValue'
|
|
113
|
+
];
|
|
114
|
+
/** The fields the 3.2 spec forbids next to each value field. */
|
|
115
|
+
const valueFieldExclusions = {
|
|
116
|
+
dataValue: ['value'],
|
|
117
|
+
value: ['dataValue', 'serializedValue', 'externalValue'],
|
|
118
|
+
serializedValue: ['value', 'externalValue'],
|
|
119
|
+
externalValue: ['value', 'serializedValue']
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Picks the value fields to keep. A field that conflicts with one already
|
|
123
|
+
* kept is logged as `INVALID_EXAMPLE` and dropped.
|
|
124
|
+
*/
|
|
125
|
+
const toKeptValueFields = ({ present, example, stackTrail, context }) => {
|
|
126
|
+
return valueFieldPrecedence
|
|
127
|
+
.filter(field => present[field] !== undefined)
|
|
128
|
+
.reduce((kept, field) => {
|
|
129
|
+
const conflict = valueFieldExclusions[field].find(other => kept.has(other));
|
|
130
|
+
if (conflict === undefined) {
|
|
131
|
+
return new Set([...kept, field]);
|
|
132
|
+
}
|
|
133
|
+
context.logIssue({
|
|
134
|
+
key: field,
|
|
135
|
+
level: 'warning',
|
|
136
|
+
message: `Example has both '${conflict}' and '${field}', which are mutually exclusive; keeping '${conflict}'`,
|
|
137
|
+
parent: example,
|
|
138
|
+
stackTrail,
|
|
139
|
+
type: 'INVALID_EXAMPLE'
|
|
140
|
+
});
|
|
141
|
+
return kept;
|
|
142
|
+
}, new Set());
|
|
143
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OasExternalDocs } from '../../../oas/externalDocs/ExternalDocs.js';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
export type ToExternalDocsArgs = {
|
|
6
|
+
externalDocs: OpenAPIV3.ExternalDocumentationObject | undefined;
|
|
7
|
+
stackTrail: StackTrail;
|
|
8
|
+
context: ParseContextType;
|
|
9
|
+
};
|
|
10
|
+
export declare const toExternalDocs: ({ externalDocs, stackTrail }: ToExternalDocsArgs) => OasExternalDocs | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OasExternalDocs } from '../../../oas/externalDocs/ExternalDocs.js';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { oasExternalDocsData } from '../../../oas/externalDocs/externalDocsTypes.js';
|
|
4
|
+
export const toExternalDocs = ({ externalDocs, stackTrail }) => {
|
|
5
|
+
if (!externalDocs) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
if (!v.is(oasExternalDocsData, externalDocs)) {
|
|
9
|
+
v.parse(oasExternalDocsData, externalDocs);
|
|
10
|
+
}
|
|
11
|
+
return new OasExternalDocs({
|
|
12
|
+
url: externalDocs.url,
|
|
13
|
+
description: externalDocs.description
|
|
14
|
+
});
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
2
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
|
+
import { OasHeader } from '../../../oas/header/Header.js';
|
|
4
|
+
import type { OasRef } from '../../../oas/ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
6
|
+
export type ToHeadersV3Args = {
|
|
7
|
+
headers: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.HeaderObject> | undefined;
|
|
8
|
+
stackTrail: StackTrail;
|
|
9
|
+
context: ParseContextType;
|
|
10
|
+
};
|
|
11
|
+
export declare const toHeadersV3: ({ headers, stackTrail, context }: ToHeadersV3Args) => Record<string, OasHeader | OasRef<"header">> | undefined;
|
|
12
|
+
export type ToHeaderV3Args = {
|
|
13
|
+
header: OpenAPIV3.ReferenceObject | OpenAPIV3.HeaderObject;
|
|
14
|
+
/** The header's name, used to key a singular `example` */
|
|
15
|
+
name: string;
|
|
16
|
+
stackTrail: StackTrail;
|
|
17
|
+
context: ParseContextType;
|
|
18
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { toExamplesV3 } from '../example/toExamplesV3.js';
|
|
2
|
+
import { toRefV31 } from '../ref/toRefV31.js';
|
|
3
|
+
import { toOptionalSchemaV3 } from '../schema/toSchemasV3.js';
|
|
4
|
+
import { isRef } from '../../../helpers/refFns.js';
|
|
5
|
+
import { toOptionalMediaTypeItemsV3 } from '../mediaType/toMediaTypeItemV3.js';
|
|
6
|
+
import { OasHeader } from '../../../oas/header/Header.js';
|
|
7
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
8
|
+
export const toHeadersV3 = ({ headers, stackTrail, context }) => {
|
|
9
|
+
if (!headers) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
const output = {};
|
|
13
|
+
const entries = Object.entries(headers);
|
|
14
|
+
for (const [key, value] of entries) {
|
|
15
|
+
output[key] = stackTrail.trace(key, st => toHeaderV3({ header: value, name: key, stackTrail: st, context }));
|
|
16
|
+
}
|
|
17
|
+
return output;
|
|
18
|
+
};
|
|
19
|
+
const toHeaderV3 = ({ header, name, stackTrail, context }) => {
|
|
20
|
+
if (isRef(header)) {
|
|
21
|
+
return toRefV31({ ref: header, refType: 'header', stackTrail, context });
|
|
22
|
+
}
|
|
23
|
+
const { description, required, deprecated, schema, example, examples, content, ...skipped } = header;
|
|
24
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
25
|
+
skipped,
|
|
26
|
+
parent: header,
|
|
27
|
+
context,
|
|
28
|
+
stackTrail,
|
|
29
|
+
parentType: 'header'
|
|
30
|
+
});
|
|
31
|
+
const fields = {
|
|
32
|
+
description,
|
|
33
|
+
required,
|
|
34
|
+
deprecated,
|
|
35
|
+
schema: stackTrail.trace('schema', st => toOptionalSchemaV3({ schema, stackTrail: st, context })),
|
|
36
|
+
examples: toExamplesV3({
|
|
37
|
+
examples,
|
|
38
|
+
example,
|
|
39
|
+
exampleKey: name,
|
|
40
|
+
stackTrail,
|
|
41
|
+
context
|
|
42
|
+
}),
|
|
43
|
+
content: stackTrail.trace('content', st => toOptionalMediaTypeItemsV3({ content, stackTrail: st, context })),
|
|
44
|
+
extensionFields
|
|
45
|
+
};
|
|
46
|
+
return new OasHeader(fields);
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { OasInfo } from '../../../oas/info/Info.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
export type ToInfoV3Args = {
|
|
6
|
+
info: OpenAPIV3.InfoObject;
|
|
7
|
+
stackTrail: StackTrail;
|
|
8
|
+
context: ParseContextType;
|
|
9
|
+
};
|
|
10
|
+
export declare const toInfoV3: ({ info, stackTrail, context }: ToInfoV3Args) => OasInfo;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OasInfo } from '../../../oas/info/Info.js';
|
|
2
|
+
import { toContactV3 } from '../contact/toContactV3.js';
|
|
3
|
+
import { toLicenseV3 } from '../license/toLicenseV3.js';
|
|
4
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
5
|
+
export const toInfoV3 = ({ info, stackTrail, context }) => {
|
|
6
|
+
const { title, description, termsOfService, contact, license, version, ...skipped } = info;
|
|
7
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
8
|
+
skipped,
|
|
9
|
+
parent: info,
|
|
10
|
+
context,
|
|
11
|
+
stackTrail,
|
|
12
|
+
parentType: 'info'
|
|
13
|
+
});
|
|
14
|
+
return new OasInfo({
|
|
15
|
+
title,
|
|
16
|
+
description,
|
|
17
|
+
termsOfService,
|
|
18
|
+
contact: contact ? toContactV3(contact, stackTrail, context) : undefined,
|
|
19
|
+
license: license ? toLicenseV3(license, stackTrail, context) : undefined,
|
|
20
|
+
version,
|
|
21
|
+
extensionFields
|
|
22
|
+
});
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { OasInteger } from '../../../oas/integer/Integer.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
export type ToIntegerArgs = {
|
|
6
|
+
value: OpenAPIV3.SchemaObject;
|
|
7
|
+
stackTrail: StackTrail;
|
|
8
|
+
context: ParseContextType;
|
|
9
|
+
};
|
|
10
|
+
export declare const toInteger: ({ value, stackTrail, context }: ToIntegerArgs) => OasInteger;
|
|
11
|
+
type ToParsedIntegerArgs<Nullable extends boolean | undefined> = {
|
|
12
|
+
value: Omit<OpenAPIV3.SchemaObject, 'nullable' | 'example' | 'enums' | 'default'>;
|
|
13
|
+
stackTrail: StackTrail;
|
|
14
|
+
context: ParseContextType;
|
|
15
|
+
nullable: Nullable;
|
|
16
|
+
example: Nullable extends true ? number | null | undefined : number | undefined;
|
|
17
|
+
enums: Nullable extends true ? (number | null)[] | undefined : number[] | undefined;
|
|
18
|
+
defaultValue: Nullable extends true ? number | null | undefined : number | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare const toParsedInteger: <Nullable extends boolean | undefined>({ context, nullable, example, enums, defaultValue, value: valueWithoutEnums, stackTrail }: ToParsedIntegerArgs<Nullable>) => OasInteger<Nullable>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { OasInteger } from '../../../oas/integer/Integer.js';
|
|
2
|
+
import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
|
|
3
|
+
import { oasIntegerData, integerFormat } from '../../../oas/integer/integer-types.js';
|
|
4
|
+
import { parseNullable } from '../_helpers/parseNullable.js';
|
|
5
|
+
import { parseEnum } from '../_helpers/parseEnum.js';
|
|
6
|
+
import { parseExample } from '../_helpers/parseExample.js';
|
|
7
|
+
import { parseDefault } from '../_helpers/parseDefault.js';
|
|
8
|
+
import * as v from 'valibot';
|
|
9
|
+
export const toInteger = ({ value, stackTrail, context }) => {
|
|
10
|
+
const { nullable, value: valueWithoutNullable } = parseNullable({
|
|
11
|
+
value,
|
|
12
|
+
context,
|
|
13
|
+
stackTrail
|
|
14
|
+
});
|
|
15
|
+
const { example: unparsedExample, ...valueWithoutExample } = valueWithoutNullable;
|
|
16
|
+
const example = parseExample({
|
|
17
|
+
value: unparsedExample,
|
|
18
|
+
context,
|
|
19
|
+
parent: valueWithoutNullable,
|
|
20
|
+
nullable,
|
|
21
|
+
check: isInteger,
|
|
22
|
+
toMessage: item => `Removed invalid example. Expected "integer", got: ${item}`,
|
|
23
|
+
stackTrail
|
|
24
|
+
});
|
|
25
|
+
const { enum: unparsedEnums, ...valueWithoutEnums } = valueWithoutExample;
|
|
26
|
+
const enums = parseEnum({
|
|
27
|
+
value: unparsedEnums,
|
|
28
|
+
nullable,
|
|
29
|
+
parent: valueWithoutExample,
|
|
30
|
+
context,
|
|
31
|
+
check: isInteger,
|
|
32
|
+
toMessage: item => `Removed invalid enum. Expected "integer", got: ${item}`,
|
|
33
|
+
stackTrail
|
|
34
|
+
});
|
|
35
|
+
const { default: unparsedDefaultValue, ...valueWithoutDefault } = valueWithoutEnums;
|
|
36
|
+
const defaultValue = parseDefault({
|
|
37
|
+
value: unparsedDefaultValue,
|
|
38
|
+
context,
|
|
39
|
+
parent: valueWithoutEnums,
|
|
40
|
+
nullable,
|
|
41
|
+
check: isInteger,
|
|
42
|
+
toMessage: item => `Removed invalid default. Expected "integer", got: ${item}`,
|
|
43
|
+
stackTrail
|
|
44
|
+
});
|
|
45
|
+
return toParsedInteger({
|
|
46
|
+
context,
|
|
47
|
+
nullable,
|
|
48
|
+
example,
|
|
49
|
+
enums,
|
|
50
|
+
defaultValue,
|
|
51
|
+
value: valueWithoutDefault,
|
|
52
|
+
stackTrail
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export const toParsedInteger = ({ context, nullable, example, enums, defaultValue, value: valueWithoutEnums, stackTrail }) => {
|
|
56
|
+
const { format: unparsedFormat, ...valueWithoutFormat } = valueWithoutEnums;
|
|
57
|
+
const format = parseIntegerFormat({
|
|
58
|
+
format: unparsedFormat,
|
|
59
|
+
context,
|
|
60
|
+
parent: valueWithoutEnums,
|
|
61
|
+
stackTrail
|
|
62
|
+
});
|
|
63
|
+
if (!v.is(oasIntegerData, valueWithoutFormat)) {
|
|
64
|
+
v.parse(oasIntegerData, valueWithoutFormat);
|
|
65
|
+
}
|
|
66
|
+
const { type: _type, title, description, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, readOnly, writeOnly, deprecated, ...skipped } = valueWithoutFormat;
|
|
67
|
+
const extensionFields = toSpecificationExtensionsV3({
|
|
68
|
+
skipped,
|
|
69
|
+
parent: valueWithoutEnums,
|
|
70
|
+
context,
|
|
71
|
+
stackTrail,
|
|
72
|
+
parentType: 'schema:integer'
|
|
73
|
+
});
|
|
74
|
+
return context.withStackTrail(stackTrail, () => new OasInteger({
|
|
75
|
+
title,
|
|
76
|
+
description,
|
|
77
|
+
nullable,
|
|
78
|
+
format,
|
|
79
|
+
enums,
|
|
80
|
+
example,
|
|
81
|
+
multipleOf,
|
|
82
|
+
maximum,
|
|
83
|
+
exclusiveMaximum,
|
|
84
|
+
minimum,
|
|
85
|
+
exclusiveMinimum,
|
|
86
|
+
default: defaultValue,
|
|
87
|
+
readOnly,
|
|
88
|
+
writeOnly,
|
|
89
|
+
extensionFields,
|
|
90
|
+
deprecated
|
|
91
|
+
}, context));
|
|
92
|
+
};
|
|
93
|
+
const parseIntegerFormat = ({ format, context, parent, stackTrail }) => {
|
|
94
|
+
if (format === undefined) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
if (!v.is(integerFormat, format)) {
|
|
98
|
+
// `format` is an open vocabulary; a value the IR's integerFormat can't
|
|
99
|
+
// hold is dropped. Recorded at `debug` — the dropped hint is
|
|
100
|
+
// informational, not a correctness issue.
|
|
101
|
+
context.logIssue({
|
|
102
|
+
key: 'format',
|
|
103
|
+
level: 'debug',
|
|
104
|
+
message: `Invalid format: ${format}`,
|
|
105
|
+
parent,
|
|
106
|
+
stackTrail,
|
|
107
|
+
type: 'INVALID_FORMAT'
|
|
108
|
+
});
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return format;
|
|
112
|
+
};
|
|
113
|
+
const isInteger = (value) => {
|
|
114
|
+
return Number.isInteger(value);
|
|
115
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { ParseContextType } from '../../../context/parseTypes.js';
|
|
3
|
+
import { OasLicense } from '../../../oas/license/License.js';
|
|
4
|
+
import type { StackTrail } from '../../../context/StackTrail.js';
|
|
5
|
+
export declare const toLicenseV3: (license: OpenAPIV3.LicenseObject, stackTrail: StackTrail, context: ParseContextType) => OasLicense;
|