@skmtc/core 0.0.599 → 0.0.601
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/context/ParseContext.d.ts +41 -2
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +54 -7
- package/esm/context/types.d.ts +1 -0
- package/esm/context/types.d.ts.map +1 -1
- package/esm/dsl/model/toModelConfig.d.ts +3 -3
- package/esm/dsl/model/toModelConfig.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.d.ts +2 -2
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.js +3 -3
- package/esm/dsl/model/types.d.ts +2 -2
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationConfig.d.ts +3 -3
- package/esm/dsl/operation/toOperationConfig.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationConfig.js +3 -3
- package/esm/dsl/operation/toOperationInsertable.d.ts +2 -2
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationInsertable.js +3 -3
- package/esm/dsl/operation/types.d.ts +2 -2
- package/esm/dsl/operation/types.d.ts.map +1 -1
- package/esm/helpers/refFns.d.ts +3 -0
- package/esm/helpers/refFns.d.ts.map +1 -1
- package/esm/helpers/refFns.js +12 -4
- package/esm/helpers/tracer.d.ts.map +1 -1
- package/esm/helpers/tracer.js +9 -3
- package/esm/mod.d.ts +0 -3
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +0 -3
- package/esm/oas/_helpers/parseDefault.d.ts +16 -0
- package/esm/oas/_helpers/parseDefault.d.ts.map +1 -0
- package/esm/oas/_helpers/parseDefault.js +16 -0
- package/esm/oas/_helpers/parseEnum.d.ts +16 -0
- package/esm/oas/_helpers/parseEnum.d.ts.map +1 -0
- package/esm/oas/_helpers/parseEnum.js +16 -0
- package/esm/oas/_helpers/parseExample.d.ts +16 -0
- package/esm/oas/_helpers/parseExample.d.ts.map +1 -0
- package/esm/oas/_helpers/parseExample.js +16 -0
- package/esm/oas/_helpers/parseFormat.d.ts +15 -0
- package/esm/oas/_helpers/parseFormat.d.ts.map +1 -0
- package/esm/oas/_helpers/parseFormat.js +16 -0
- package/esm/oas/_helpers/parseNullable.d.ts +12 -0
- package/esm/oas/_helpers/parseNullable.d.ts.map +1 -0
- package/esm/oas/_helpers/parseNullable.js +16 -0
- package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-array-item-type-conflicts.js +9 -0
- package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
- package/esm/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-at-least-one-type-match.js +5 -0
- package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-enum-conflicts.js +11 -0
- package/esm/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-format-conflicts.js +5 -0
- package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-number-constraints-conflicts.js +11 -0
- package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-read-only-write-only-conflicts.js +5 -0
- package/esm/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
- package/esm/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/check-type-conflicts.js +5 -0
- package/esm/oas/_merge-all-of/cross-product.d.ts +3 -0
- package/esm/oas/_merge-all-of/cross-product.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/cross-product.js +3 -0
- package/esm/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
- package/esm/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/decompose-intersection.js +27 -0
- package/esm/oas/_merge-all-of/decompose-union.d.ts +13 -0
- package/esm/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/decompose-union.js +52 -0
- package/esm/oas/_merge-all-of/generic-merge.d.ts +4 -0
- package/esm/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/generic-merge.js +12 -0
- package/esm/oas/_merge-all-of/is-equal.d.ts +2 -0
- package/esm/oas/_merge-all-of/is-equal.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/is-equal.js +19 -0
- package/esm/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
- package/esm/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-array-constraints.js +44 -0
- package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-boolean-constraints.js +7 -0
- package/esm/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-enum-values.js +32 -0
- package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-integer-constraints.js +41 -0
- package/esm/oas/_merge-all-of/merge-intersection.d.ts +9 -0
- package/esm/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-intersection.js +16 -0
- package/esm/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-number-constraints.js +41 -0
- package/esm/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
- package/esm/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-object-constraints.js +28 -0
- package/esm/oas/_merge-all-of/merge-properties.d.ts +3 -0
- package/esm/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-properties.js +25 -0
- package/esm/oas/_merge-all-of/merge-required.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-required.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-required.js +10 -0
- package/esm/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
- package/esm/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-string-constraints.js +55 -0
- package/esm/oas/_merge-all-of/merge-union.d.ts +16 -0
- package/esm/oas/_merge-all-of/merge-union.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge-union.js +53 -0
- package/esm/oas/_merge-all-of/merge.d.ts +3 -0
- package/esm/oas/_merge-all-of/merge.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/merge.js +148 -0
- package/esm/oas/_merge-all-of/types.d.ts +15 -0
- package/esm/oas/_merge-all-of/types.d.ts.map +1 -0
- package/esm/oas/_merge-all-of/types.js +2 -0
- package/esm/oas/array/Array.d.ts +29 -9
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +46 -1
- package/esm/oas/array/array-types.d.ts +16 -3
- package/esm/oas/array/array-types.d.ts.map +1 -1
- package/esm/oas/array/array-types.js +11 -14
- package/esm/oas/array/toArray.d.ts +9 -0
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +58 -4
- package/esm/oas/boolean/Boolean.d.ts +19 -9
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +23 -1
- package/esm/oas/boolean/boolean-types.d.ts +4 -4
- package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
- package/esm/oas/boolean/boolean-types.js +7 -7
- package/esm/oas/boolean/toBoolean.d.ts +10 -1
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +47 -2
- package/esm/oas/components/Components.d.ts +4 -0
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +4 -0
- package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
- package/esm/oas/components/toComponentsV3.js +9 -2
- package/esm/oas/contact/toContactV3.d.ts.map +1 -1
- package/esm/oas/contact/toContactV3.js +3 -1
- package/esm/oas/discriminator/Discriminator.d.ts +2 -0
- package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/esm/oas/discriminator/Discriminator.js +7 -0
- package/esm/oas/discriminator/discriminator-types.d.ts +6 -2
- package/esm/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/esm/oas/discriminator/discriminator-types.js +5 -5
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/esm/oas/discriminator/toDiscriminatorV3.js +6 -6
- package/esm/oas/document/Document.d.ts +4 -0
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +7 -0
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/esm/oas/document/toDocumentFieldsV3.js +6 -2
- package/esm/oas/example/example-types.d.ts +7 -2
- package/esm/oas/example/example-types.d.ts.map +1 -1
- package/esm/oas/example/example-types.js +6 -6
- package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
- package/esm/oas/example/toExamplesV3.js +6 -1
- package/esm/oas/header/toHeadersV3.js +6 -1
- package/esm/oas/info/toInfoV3.d.ts.map +1 -1
- package/esm/oas/info/toInfoV3.js +3 -1
- package/esm/oas/integer/Integer.d.ts +41 -11
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +67 -1
- package/esm/oas/integer/integer-types.d.ts +24 -3
- package/esm/oas/integer/integer-types.d.ts.map +1 -1
- package/esm/oas/integer/integer-types.js +18 -19
- package/esm/oas/integer/toInteger.d.ts +9 -1
- package/esm/oas/integer/toInteger.d.ts.map +1 -1
- package/esm/oas/integer/toInteger.js +45 -5
- package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
- package/esm/oas/license/toLicenseV3.js +3 -1
- package/esm/oas/markdown/markdown-types.d.ts +2 -2
- package/esm/oas/markdown/markdown-types.d.ts.map +1 -1
- package/esm/oas/markdown/markdown-types.js +2 -2
- package/esm/oas/mediaType/mediaType-types.d.ts +12 -2
- package/esm/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/esm/oas/mediaType/mediaType-types.js +6 -6
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.js +3 -1
- package/esm/oas/number/Number.d.ts +49 -9
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +88 -1
- package/esm/oas/number/number-types.d.ts +27 -4
- package/esm/oas/number/number-types.d.ts.map +1 -1
- package/esm/oas/number/number-types.js +16 -13
- package/esm/oas/number/toNumber.d.ts +2 -2
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +50 -4
- package/esm/oas/object/Object.d.ts +25 -9
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +51 -1
- package/esm/oas/object/object-types.d.ts +7 -3
- package/esm/oas/object/object-types.d.ts.map +1 -1
- package/esm/oas/object/object-types.js +14 -18
- package/esm/oas/object/toObject.d.ts +1 -1
- package/esm/oas/object/toObject.d.ts.map +1 -1
- package/esm/oas/object/toObject.js +44 -7
- package/esm/oas/operation/Operation.d.ts +4 -1
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +7 -0
- package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/oas/operation/toOperationsV3.js +29 -11
- package/esm/oas/parameter/parameter-types.d.ts +59 -4
- package/esm/oas/parameter/parameter-types.d.ts.map +1 -1
- package/esm/oas/parameter/parameter-types.js +28 -30
- package/esm/oas/parameter/toParameterV3.js +6 -3
- package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/esm/oas/pathItem/toPathItemV3.js +6 -1
- package/esm/oas/ref/Ref.d.ts +2 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +2 -0
- package/esm/oas/ref/ref-types.d.ts +15 -9
- package/esm/oas/ref/ref-types.d.ts.map +1 -1
- package/esm/oas/ref/ref-types.js +45 -39
- package/esm/oas/ref/toRefV31.js +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.js +3 -1
- package/esm/oas/response/toResponseV3.d.ts.map +1 -1
- package/esm/oas/response/toResponseV3.js +19 -4
- package/esm/oas/schema/Schema.d.ts +1 -2
- package/esm/oas/schema/Schema.d.ts.map +1 -1
- package/esm/oas/schema/schema-types.d.ts +3 -5
- package/esm/oas/schema/schema-types.d.ts.map +1 -1
- package/esm/oas/schema/schema-types.js +3 -7
- package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/oas/schema/toSchemasV3.js +151 -25
- package/esm/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
- package/esm/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
- package/esm/oas/securityRequirement/SecurityRequirement.js +22 -0
- package/esm/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
- package/esm/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
- package/esm/oas/securityRequirement/toSecurityRequirement.js +9 -0
- package/esm/oas/securitySchemes/SecurityScheme.d.ts +113 -0
- package/esm/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
- package/esm/oas/securitySchemes/SecurityScheme.js +204 -0
- package/esm/oas/securitySchemes/security-scheme-types.d.ts +181 -0
- package/esm/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
- package/esm/oas/securitySchemes/security-scheme-types.js +56 -0
- package/esm/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
- package/esm/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
- package/esm/oas/securitySchemes/toSecuritySchemes.js +62 -0
- package/esm/oas/server/toServerV3.d.ts.map +1 -1
- package/esm/oas/server/toServerV3.js +3 -1
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
- package/esm/oas/string/String.d.ts +21 -11
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +23 -4
- package/esm/oas/string/string-types.d.ts +30 -3
- package/esm/oas/string/string-types.d.ts.map +1 -1
- package/esm/oas/string/string-types.js +30 -32
- package/esm/oas/string/toString.d.ts +11 -2
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +51 -5
- package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
- package/esm/oas/tag/toTagsV3.js +3 -1
- package/esm/oas/union/Union.d.ts +5 -0
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +11 -0
- package/esm/oas/union/toUnion.d.ts +2 -1
- package/esm/oas/union/toUnion.d.ts.map +1 -1
- package/esm/oas/union/toUnion.js +12 -4
- package/esm/oas/union/union-types.d.ts +13 -2
- package/esm/oas/union/union-types.d.ts.map +1 -1
- package/esm/oas/union/union-types.js +8 -8
- package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
- package/esm/oas/unknown/toUnknown.js +3 -1
- package/esm/oas/unknown/unknown-types.d.ts +8 -2
- package/esm/oas/unknown/unknown-types.d.ts.map +1 -1
- package/esm/oas/unknown/unknown-types.js +7 -7
- package/esm/types/EnrichmentRequest.d.ts +2 -2
- package/esm/types/EnrichmentRequest.d.ts.map +1 -1
- package/esm/types/Manifest.d.ts +58 -276
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +23 -29
- package/esm/types/Method.d.ts +3 -5
- package/esm/types/Method.d.ts.map +1 -1
- package/esm/types/Method.js +12 -6
- package/esm/types/Preview.d.ts +46 -158
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +25 -27
- package/esm/types/Results.d.ts +3 -9
- package/esm/types/Results.d.ts.map +1 -1
- package/esm/types/Results.js +9 -9
- package/esm/types/SchemaOptions.d.ts +20 -64
- package/esm/types/SchemaOptions.d.ts.map +1 -1
- package/esm/types/SchemaOptions.js +31 -31
- package/esm/types/Settings.d.ts +97 -437
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +38 -51
- package/esm/types/TypeSystem.d.ts +1 -11
- package/esm/types/TypeSystem.d.ts.map +1 -1
- package/esm/types/prettierConfig.d.ts +25 -2
- package/esm/types/prettierConfig.d.ts.map +1 -1
- package/esm/types/prettierConfig.js +24 -30
- package/package.json +4 -6
- package/script/context/ParseContext.d.ts +41 -2
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +77 -7
- package/script/context/types.d.ts +1 -0
- package/script/context/types.d.ts.map +1 -1
- package/script/dsl/model/toModelConfig.d.ts +3 -3
- package/script/dsl/model/toModelConfig.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.d.ts +2 -2
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.js +26 -3
- package/script/dsl/model/types.d.ts +2 -2
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/toOperationConfig.d.ts +3 -3
- package/script/dsl/operation/toOperationConfig.d.ts.map +1 -1
- package/script/dsl/operation/toOperationConfig.js +26 -3
- package/script/dsl/operation/toOperationInsertable.d.ts +2 -2
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationInsertable.js +26 -3
- package/script/dsl/operation/types.d.ts +2 -2
- package/script/dsl/operation/types.d.ts.map +1 -1
- package/script/helpers/refFns.d.ts +3 -0
- package/script/helpers/refFns.d.ts.map +1 -1
- package/script/helpers/refFns.js +14 -5
- package/script/helpers/tracer.d.ts.map +1 -1
- package/script/helpers/tracer.js +9 -3
- package/script/mod.d.ts +0 -3
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +0 -3
- package/script/oas/_helpers/parseDefault.d.ts +16 -0
- package/script/oas/_helpers/parseDefault.d.ts.map +1 -0
- package/script/oas/_helpers/parseDefault.js +43 -0
- package/script/oas/_helpers/parseEnum.d.ts +16 -0
- package/script/oas/_helpers/parseEnum.d.ts.map +1 -0
- package/script/oas/_helpers/parseEnum.js +43 -0
- package/script/oas/_helpers/parseExample.d.ts +16 -0
- package/script/oas/_helpers/parseExample.d.ts.map +1 -0
- package/script/oas/_helpers/parseExample.js +43 -0
- package/script/oas/_helpers/parseFormat.d.ts +15 -0
- package/script/oas/_helpers/parseFormat.d.ts.map +1 -0
- package/script/oas/_helpers/parseFormat.js +43 -0
- package/script/oas/_helpers/parseNullable.d.ts +12 -0
- package/script/oas/_helpers/parseNullable.d.ts.map +1 -0
- package/script/oas/_helpers/parseNullable.js +43 -0
- package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-array-item-type-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-array-item-type-conflicts.js +13 -0
- package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts +5 -0
- package/script/oas/_merge-all-of/check-at-least-one-type-match.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-at-least-one-type-match.js +9 -0
- package/script/oas/_merge-all-of/check-enum-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-enum-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-enum-conflicts.js +15 -0
- package/script/oas/_merge-all-of/check-format-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-format-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-format-conflicts.js +9 -0
- package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-number-constraints-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-number-constraints-conflicts.js +15 -0
- package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-read-only-write-only-conflicts.js +9 -0
- package/script/oas/_merge-all-of/check-type-conflicts.d.ts +3 -0
- package/script/oas/_merge-all-of/check-type-conflicts.d.ts.map +1 -0
- package/script/oas/_merge-all-of/check-type-conflicts.js +9 -0
- package/script/oas/_merge-all-of/cross-product.d.ts +3 -0
- package/script/oas/_merge-all-of/cross-product.d.ts.map +1 -0
- package/script/oas/_merge-all-of/cross-product.js +7 -0
- package/script/oas/_merge-all-of/decompose-intersection.d.ts +7 -0
- package/script/oas/_merge-all-of/decompose-intersection.d.ts.map +1 -0
- package/script/oas/_merge-all-of/decompose-intersection.js +31 -0
- package/script/oas/_merge-all-of/decompose-union.d.ts +13 -0
- package/script/oas/_merge-all-of/decompose-union.d.ts.map +1 -0
- package/script/oas/_merge-all-of/decompose-union.js +56 -0
- package/script/oas/_merge-all-of/generic-merge.d.ts +4 -0
- package/script/oas/_merge-all-of/generic-merge.d.ts.map +1 -0
- package/script/oas/_merge-all-of/generic-merge.js +16 -0
- package/script/oas/_merge-all-of/is-equal.d.ts +2 -0
- package/script/oas/_merge-all-of/is-equal.d.ts.map +1 -0
- package/script/oas/_merge-all-of/is-equal.js +23 -0
- package/script/oas/_merge-all-of/merge-array-constraints.d.ts +3 -0
- package/script/oas/_merge-all-of/merge-array-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-array-constraints.js +70 -0
- package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-boolean-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-boolean-constraints.js +33 -0
- package/script/oas/_merge-all-of/merge-enum-values.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-enum-values.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-enum-values.js +58 -0
- package/script/oas/_merge-all-of/merge-integer-constraints.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-integer-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-integer-constraints.js +67 -0
- package/script/oas/_merge-all-of/merge-intersection.d.ts +9 -0
- package/script/oas/_merge-all-of/merge-intersection.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-intersection.js +20 -0
- package/script/oas/_merge-all-of/merge-number-constraints.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-number-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-number-constraints.js +67 -0
- package/script/oas/_merge-all-of/merge-object-constraints.d.ts +6 -0
- package/script/oas/_merge-all-of/merge-object-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-object-constraints.js +55 -0
- package/script/oas/_merge-all-of/merge-properties.d.ts +3 -0
- package/script/oas/_merge-all-of/merge-properties.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-properties.js +29 -0
- package/script/oas/_merge-all-of/merge-required.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-required.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-required.js +15 -0
- package/script/oas/_merge-all-of/merge-string-constraints.d.ts +4 -0
- package/script/oas/_merge-all-of/merge-string-constraints.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-string-constraints.js +81 -0
- package/script/oas/_merge-all-of/merge-union.d.ts +16 -0
- package/script/oas/_merge-all-of/merge-union.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge-union.js +58 -0
- package/script/oas/_merge-all-of/merge.d.ts +3 -0
- package/script/oas/_merge-all-of/merge.d.ts.map +1 -0
- package/script/oas/_merge-all-of/merge.js +152 -0
- package/script/oas/_merge-all-of/types.d.ts +15 -0
- package/script/oas/_merge-all-of/types.d.ts.map +1 -0
- package/script/oas/_merge-all-of/types.js +28 -0
- package/script/oas/array/Array.d.ts +29 -9
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +46 -1
- package/script/oas/array/array-types.d.ts +16 -3
- package/script/oas/array/array-types.d.ts.map +1 -1
- package/script/oas/array/array-types.js +34 -14
- package/script/oas/array/toArray.d.ts +9 -0
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +84 -6
- package/script/oas/boolean/Boolean.d.ts +19 -9
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +23 -1
- package/script/oas/boolean/boolean-types.d.ts +4 -4
- package/script/oas/boolean/boolean-types.d.ts.map +1 -1
- package/script/oas/boolean/boolean-types.js +30 -7
- package/script/oas/boolean/toBoolean.d.ts +10 -1
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +73 -4
- package/script/oas/components/Components.d.ts +4 -0
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +4 -0
- package/script/oas/components/toComponentsV3.d.ts.map +1 -1
- package/script/oas/components/toComponentsV3.js +9 -2
- package/script/oas/contact/toContactV3.d.ts.map +1 -1
- package/script/oas/contact/toContactV3.js +3 -1
- package/script/oas/discriminator/Discriminator.d.ts +2 -0
- package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/script/oas/discriminator/Discriminator.js +7 -0
- package/script/oas/discriminator/discriminator-types.d.ts +6 -2
- package/script/oas/discriminator/discriminator-types.d.ts.map +1 -1
- package/script/oas/discriminator/discriminator-types.js +28 -5
- package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/script/oas/discriminator/toDiscriminatorV3.js +6 -6
- package/script/oas/document/Document.d.ts +4 -0
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +7 -0
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/script/oas/document/toDocumentFieldsV3.js +6 -2
- package/script/oas/example/example-types.d.ts +7 -2
- package/script/oas/example/example-types.d.ts.map +1 -1
- package/script/oas/example/example-types.js +29 -6
- package/script/oas/example/toExamplesV3.d.ts.map +1 -1
- package/script/oas/example/toExamplesV3.js +6 -1
- package/script/oas/header/toHeadersV3.js +6 -1
- package/script/oas/info/toInfoV3.d.ts.map +1 -1
- package/script/oas/info/toInfoV3.js +3 -1
- package/script/oas/integer/Integer.d.ts +41 -11
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +67 -1
- package/script/oas/integer/integer-types.d.ts +24 -3
- package/script/oas/integer/integer-types.d.ts.map +1 -1
- package/script/oas/integer/integer-types.js +42 -20
- package/script/oas/integer/toInteger.d.ts +9 -1
- package/script/oas/integer/toInteger.d.ts.map +1 -1
- package/script/oas/integer/toInteger.js +70 -6
- package/script/oas/license/toLicenseV3.d.ts.map +1 -1
- package/script/oas/license/toLicenseV3.js +3 -1
- package/script/oas/markdown/markdown-types.d.ts +2 -2
- package/script/oas/markdown/markdown-types.d.ts.map +1 -1
- package/script/oas/markdown/markdown-types.js +25 -2
- package/script/oas/mediaType/mediaType-types.d.ts +12 -2
- package/script/oas/mediaType/mediaType-types.d.ts.map +1 -1
- package/script/oas/mediaType/mediaType-types.js +29 -6
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/script/oas/mediaType/toMediaTypeItemV3.js +3 -1
- package/script/oas/number/Number.d.ts +49 -9
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +88 -1
- package/script/oas/number/number-types.d.ts +27 -4
- package/script/oas/number/number-types.d.ts.map +1 -1
- package/script/oas/number/number-types.js +40 -14
- package/script/oas/number/toNumber.d.ts +2 -2
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +74 -5
- package/script/oas/object/Object.d.ts +25 -9
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +51 -1
- package/script/oas/object/object-types.d.ts +7 -3
- package/script/oas/object/object-types.d.ts.map +1 -1
- package/script/oas/object/object-types.js +37 -18
- package/script/oas/object/toObject.d.ts +1 -1
- package/script/oas/object/toObject.d.ts.map +1 -1
- package/script/oas/object/toObject.js +68 -8
- package/script/oas/operation/Operation.d.ts +4 -1
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +7 -0
- package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/script/oas/operation/toOperationsV3.js +29 -11
- package/script/oas/parameter/parameter-types.d.ts +59 -4
- package/script/oas/parameter/parameter-types.d.ts.map +1 -1
- package/script/oas/parameter/parameter-types.js +51 -30
- package/script/oas/parameter/toParameterV3.js +29 -3
- package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/script/oas/pathItem/toPathItemV3.js +6 -1
- package/script/oas/ref/Ref.d.ts +2 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +2 -0
- package/script/oas/ref/ref-types.d.ts +15 -9
- package/script/oas/ref/ref-types.d.ts.map +1 -1
- package/script/oas/ref/ref-types.js +74 -45
- package/script/oas/ref/toRefV31.js +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.js +3 -1
- package/script/oas/response/toResponseV3.d.ts.map +1 -1
- package/script/oas/response/toResponseV3.js +19 -4
- package/script/oas/schema/Schema.d.ts +1 -2
- package/script/oas/schema/Schema.d.ts.map +1 -1
- package/script/oas/schema/schema-types.d.ts +3 -5
- package/script/oas/schema/schema-types.d.ts.map +1 -1
- package/script/oas/schema/schema-types.js +26 -7
- package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/script/oas/schema/toSchemasV3.js +151 -25
- package/script/oas/securityRequirement/SecurityRequirement.d.ts +11 -0
- package/script/oas/securityRequirement/SecurityRequirement.d.ts.map +1 -0
- package/script/oas/securityRequirement/SecurityRequirement.js +26 -0
- package/script/oas/securityRequirement/toSecurityRequirement.d.ts +9 -0
- package/script/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -0
- package/script/oas/securityRequirement/toSecurityRequirement.js +13 -0
- package/script/oas/securitySchemes/SecurityScheme.d.ts +113 -0
- package/script/oas/securitySchemes/SecurityScheme.d.ts.map +1 -0
- package/script/oas/securitySchemes/SecurityScheme.js +211 -0
- package/script/oas/securitySchemes/security-scheme-types.d.ts +181 -0
- package/script/oas/securitySchemes/security-scheme-types.d.ts.map +1 -0
- package/script/oas/securitySchemes/security-scheme-types.js +82 -0
- package/script/oas/securitySchemes/toSecuritySchemes.d.ts +11 -0
- package/script/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -0
- package/script/oas/securitySchemes/toSecuritySchemes.js +89 -0
- package/script/oas/server/toServerV3.d.ts.map +1 -1
- package/script/oas/server/toServerV3.js +3 -1
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
- package/script/oas/string/String.d.ts +21 -11
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +23 -4
- package/script/oas/string/string-types.d.ts +30 -3
- package/script/oas/string/string-types.d.ts.map +1 -1
- package/script/oas/string/string-types.js +53 -32
- package/script/oas/string/toString.d.ts +11 -2
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +77 -7
- package/script/oas/tag/toTagsV3.d.ts.map +1 -1
- package/script/oas/tag/toTagsV3.js +3 -1
- package/script/oas/union/Union.d.ts +5 -0
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +11 -0
- package/script/oas/union/toUnion.d.ts +2 -1
- package/script/oas/union/toUnion.d.ts.map +1 -1
- package/script/oas/union/toUnion.js +12 -4
- package/script/oas/union/union-types.d.ts +13 -2
- package/script/oas/union/union-types.d.ts.map +1 -1
- package/script/oas/union/union-types.js +31 -8
- package/script/oas/unknown/toUnknown.d.ts.map +1 -1
- package/script/oas/unknown/toUnknown.js +3 -1
- package/script/oas/unknown/unknown-types.d.ts +8 -2
- package/script/oas/unknown/unknown-types.d.ts.map +1 -1
- package/script/oas/unknown/unknown-types.js +30 -7
- package/script/types/EnrichmentRequest.d.ts +2 -2
- package/script/types/EnrichmentRequest.d.ts.map +1 -1
- package/script/types/Manifest.d.ts +58 -276
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +45 -28
- package/script/types/Method.d.ts +3 -5
- package/script/types/Method.d.ts.map +1 -1
- package/script/types/Method.js +35 -6
- package/script/types/Preview.d.ts +46 -158
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +48 -27
- package/script/types/Results.d.ts +3 -9
- package/script/types/Results.d.ts.map +1 -1
- package/script/types/Results.js +33 -10
- package/script/types/SchemaOptions.d.ts +20 -64
- package/script/types/SchemaOptions.d.ts.map +1 -1
- package/script/types/SchemaOptions.js +54 -31
- package/script/types/Settings.d.ts +97 -437
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +61 -51
- package/script/types/TypeSystem.d.ts +1 -11
- package/script/types/TypeSystem.d.ts.map +1 -1
- package/script/types/prettierConfig.d.ts +25 -2
- package/script/types/prettierConfig.d.ts.map +1 -1
- package/script/types/prettierConfig.js +47 -30
- package/esm/oas/intersection/Intersection.d.ts +0 -30
- package/esm/oas/intersection/Intersection.d.ts.map +0 -1
- package/esm/oas/intersection/Intersection.js +0 -83
- package/esm/oas/intersection/intersection-types.d.ts +0 -14
- package/esm/oas/intersection/intersection-types.d.ts.map +0 -1
- package/esm/oas/intersection/intersection-types.js +0 -12
- package/esm/oas/intersection/toIntersection.d.ts +0 -11
- package/esm/oas/intersection/toIntersection.d.ts.map +0 -1
- package/esm/oas/intersection/toIntersection.js +0 -16
- package/esm/oas/null/null-types.d.ts +0 -10
- package/esm/oas/null/null-types.d.ts.map +0 -1
- package/esm/oas/null/null-types.js +0 -8
- package/script/oas/intersection/Intersection.d.ts +0 -30
- package/script/oas/intersection/Intersection.d.ts.map +0 -1
- package/script/oas/intersection/Intersection.js +0 -87
- package/script/oas/intersection/intersection-types.d.ts +0 -14
- package/script/oas/intersection/intersection-types.d.ts.map +0 -1
- package/script/oas/intersection/intersection-types.js +0 -15
- package/script/oas/intersection/toIntersection.d.ts +0 -11
- package/script/oas/intersection/toIntersection.d.ts.map +0 -1
- package/script/oas/intersection/toIntersection.js +0 -20
- package/script/oas/null/null-types.d.ts +0 -10
- package/script/oas/null/null-types.d.ts.map +0 -1
- package/script/oas/null/null-types.js +0 -11
|
@@ -1,57 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasRefData = exports.oasHeaderRefData = exports.oasRequestBodyRefData = exports.oasExampleRefData = exports.oasParameterRefData = exports.oasResponseRefData = exports.oasSchemaRefData = void 0;
|
|
26
|
+
exports.oasRefData = exports.oasSecuritySchemeRefData = exports.oasHeaderRefData = exports.oasRequestBodyRefData = exports.oasExampleRefData = exports.oasParameterRefData = exports.oasResponseRefData = exports.oasSchemaRefData = void 0;
|
|
4
27
|
const markdown_types_js_1 = require("../markdown/markdown-types.js");
|
|
5
|
-
const
|
|
6
|
-
exports.oasSchemaRefData =
|
|
7
|
-
oasType:
|
|
8
|
-
refType:
|
|
9
|
-
$ref:
|
|
10
|
-
summary:
|
|
11
|
-
description: markdown_types_js_1.markdown
|
|
12
|
-
});
|
|
13
|
-
exports.oasResponseRefData =
|
|
14
|
-
oasType:
|
|
15
|
-
refType:
|
|
16
|
-
$ref:
|
|
17
|
-
summary:
|
|
18
|
-
description: markdown_types_js_1.markdown
|
|
19
|
-
});
|
|
20
|
-
exports.oasParameterRefData =
|
|
21
|
-
oasType:
|
|
22
|
-
refType:
|
|
23
|
-
$ref:
|
|
24
|
-
summary:
|
|
25
|
-
description: markdown_types_js_1.markdown
|
|
26
|
-
});
|
|
27
|
-
exports.oasExampleRefData =
|
|
28
|
-
oasType:
|
|
29
|
-
refType:
|
|
30
|
-
$ref:
|
|
31
|
-
summary:
|
|
32
|
-
description: markdown_types_js_1.markdown
|
|
33
|
-
});
|
|
34
|
-
exports.oasRequestBodyRefData =
|
|
35
|
-
oasType:
|
|
36
|
-
refType:
|
|
37
|
-
$ref:
|
|
38
|
-
summary:
|
|
39
|
-
description: markdown_types_js_1.markdown
|
|
40
|
-
});
|
|
41
|
-
exports.oasHeaderRefData =
|
|
42
|
-
oasType:
|
|
43
|
-
refType:
|
|
44
|
-
$ref:
|
|
45
|
-
summary:
|
|
46
|
-
description: markdown_types_js_1.markdown
|
|
28
|
+
const v = __importStar(require("valibot"));
|
|
29
|
+
exports.oasSchemaRefData = v.object({
|
|
30
|
+
oasType: v.literal('ref'),
|
|
31
|
+
refType: v.literal('schema'),
|
|
32
|
+
$ref: v.string(),
|
|
33
|
+
summary: v.optional(v.string()),
|
|
34
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
35
|
+
});
|
|
36
|
+
exports.oasResponseRefData = v.object({
|
|
37
|
+
oasType: v.literal('ref'),
|
|
38
|
+
refType: v.literal('response'),
|
|
39
|
+
$ref: v.string(),
|
|
40
|
+
summary: v.optional(v.string()),
|
|
41
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
42
|
+
});
|
|
43
|
+
exports.oasParameterRefData = v.object({
|
|
44
|
+
oasType: v.literal('ref'),
|
|
45
|
+
refType: v.literal('parameter'),
|
|
46
|
+
$ref: v.string(),
|
|
47
|
+
summary: v.optional(v.string()),
|
|
48
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
49
|
+
});
|
|
50
|
+
exports.oasExampleRefData = v.object({
|
|
51
|
+
oasType: v.literal('ref'),
|
|
52
|
+
refType: v.literal('example'),
|
|
53
|
+
$ref: v.string(),
|
|
54
|
+
summary: v.optional(v.string()),
|
|
55
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
56
|
+
});
|
|
57
|
+
exports.oasRequestBodyRefData = v.object({
|
|
58
|
+
oasType: v.literal('ref'),
|
|
59
|
+
refType: v.literal('requestBody'),
|
|
60
|
+
$ref: v.string(),
|
|
61
|
+
summary: v.optional(v.string()),
|
|
62
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
63
|
+
});
|
|
64
|
+
exports.oasHeaderRefData = v.object({
|
|
65
|
+
oasType: v.literal('ref'),
|
|
66
|
+
refType: v.literal('header'),
|
|
67
|
+
$ref: v.string(),
|
|
68
|
+
summary: v.optional(v.string()),
|
|
69
|
+
description: v.optional(markdown_types_js_1.markdown)
|
|
70
|
+
});
|
|
71
|
+
exports.oasSecuritySchemeRefData = v.object({
|
|
72
|
+
oasType: v.literal('ref'),
|
|
73
|
+
refType: v.literal('securityScheme'),
|
|
74
|
+
$ref: v.string()
|
|
47
75
|
});
|
|
48
76
|
// OasPathItemRefData
|
|
49
|
-
exports.oasRefData =
|
|
77
|
+
exports.oasRefData = v.union([
|
|
50
78
|
exports.oasSchemaRefData,
|
|
51
79
|
exports.oasResponseRefData,
|
|
52
80
|
exports.oasParameterRefData,
|
|
53
81
|
exports.oasExampleRefData,
|
|
54
82
|
exports.oasRequestBodyRefData,
|
|
55
|
-
exports.oasHeaderRefData
|
|
83
|
+
exports.oasHeaderRefData,
|
|
84
|
+
exports.oasSecuritySchemeRefData
|
|
56
85
|
// oasPathItemRefData
|
|
57
86
|
]);
|
|
@@ -4,7 +4,7 @@ exports.toRefV31 = void 0;
|
|
|
4
4
|
const Ref_js_1 = require("./Ref.js");
|
|
5
5
|
const toRefV31 = ({ ref, refType, context }) => {
|
|
6
6
|
const { $ref, summary, description, ...skipped } = ref;
|
|
7
|
-
context.logSkippedFields(skipped);
|
|
7
|
+
context.logSkippedFields({ skipped, parent: ref, parentType: 'ref' });
|
|
8
8
|
const fields = {
|
|
9
9
|
refType,
|
|
10
10
|
$ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA4BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAYnF,CAAA"}
|
|
@@ -16,7 +16,9 @@ const toRequestBodyV3 = ({ requestBody, context }) => {
|
|
|
16
16
|
const { description, content, required, ...skipped } = requestBody;
|
|
17
17
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
18
18
|
skipped,
|
|
19
|
-
|
|
19
|
+
parent: requestBody,
|
|
20
|
+
context,
|
|
21
|
+
parentType: 'requestBody'
|
|
20
22
|
});
|
|
21
23
|
const fields = {
|
|
22
24
|
description,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAmBrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,2BAG/B,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAsBpD,CAAA"}
|
|
@@ -8,9 +8,22 @@ const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
|
8
8
|
const Response_js_1 = require("./Response.js");
|
|
9
9
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
10
10
|
const toResponsesV3 = ({ responses, context }) => {
|
|
11
|
-
return Object.fromEntries(Object.entries(responses)
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
return Object.fromEntries(Object.entries(responses)
|
|
12
|
+
.map(([key, value]) => {
|
|
13
|
+
try {
|
|
14
|
+
return [key, context.trace(key, () => (0, exports.toResponseV3)({ response: value, context }))];
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
context.logWarning({
|
|
18
|
+
key,
|
|
19
|
+
message: error instanceof Error ? error.message : 'Failed to parse response',
|
|
20
|
+
parent: value,
|
|
21
|
+
type: 'INVALID_RESPONSE'
|
|
22
|
+
});
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
.filter(item => item !== undefined));
|
|
14
27
|
};
|
|
15
28
|
exports.toResponsesV3 = toResponsesV3;
|
|
16
29
|
const toOptionalResponsesV3 = ({ responses, context }) => {
|
|
@@ -27,7 +40,9 @@ const toResponseV3 = ({ response, context }) => {
|
|
|
27
40
|
const { description, headers, content, ...skipped } = response;
|
|
28
41
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
29
42
|
skipped,
|
|
30
|
-
|
|
43
|
+
parent: response,
|
|
44
|
+
context,
|
|
45
|
+
parentType: 'response'
|
|
31
46
|
});
|
|
32
47
|
const fields = {
|
|
33
48
|
description,
|
|
@@ -7,8 +7,7 @@ import type { OasObject } from '../object/Object.js';
|
|
|
7
7
|
import type { OasString } from '../string/String.js';
|
|
8
8
|
import type { OasUnknown } from '../unknown/Unknown.js';
|
|
9
9
|
import type { OasUnion } from '../union/Union.js';
|
|
10
|
-
|
|
11
|
-
export type OasSchema = OasArray | OasBoolean | OasInteger | OasNumber | OasObject | OasString | OasUnknown | OasUnion | OasIntersection;
|
|
10
|
+
export type OasSchema = OasArray | OasBoolean | OasInteger | OasNumber | OasObject | OasString | OasUnknown | OasUnion;
|
|
12
11
|
export type ToJsonSchemaOptions = {
|
|
13
12
|
resolve: boolean;
|
|
14
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,QAAQ,CAAA;AAEZ,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as v from 'valibot';
|
|
2
2
|
import { type OasArrayData } from '../array/array-types.js';
|
|
3
3
|
import { type OasBooleanData } from '../boolean/boolean-types.js';
|
|
4
|
-
import { type OasNullData } from '../null/null-types.js';
|
|
5
4
|
import { type OasUnknownData } from '../unknown/unknown-types.js';
|
|
6
5
|
import { type OasUnionData } from '../union/union-types.js';
|
|
7
6
|
import { type OasIntegerData } from '../integer/integer-types.js';
|
|
8
7
|
import { type OasNumberData } from '../number/number-types.js';
|
|
9
|
-
import { type OasIntersectionData } from '../intersection/intersection-types.js';
|
|
10
8
|
import { type OasStringData } from '../string/string-types.js';
|
|
11
9
|
import { type OasObjectData } from '../object/object-types.js';
|
|
12
|
-
export type OasSchemaData = OasArrayData | OasBooleanData |
|
|
13
|
-
export declare const oasSchemaData:
|
|
10
|
+
export type OasSchemaData = OasArrayData | OasBooleanData | OasIntegerData | OasNumberData | OasStringData | OasObjectData | OasUnionData | OasUnknownData;
|
|
11
|
+
export declare const oasSchemaData: v.GenericSchema<OasSchemaData>;
|
|
14
12
|
//# sourceMappingURL=schema-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-types.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/schema-types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema-types.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/schema-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE7E,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,aAAa,GACb,aAAa,GACb,aAAa,GACb,YAAY,GACZ,cAAc,CAAA;AAElB,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CASvD,CAAA"}
|
|
@@ -1,26 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.oasSchemaData = void 0;
|
|
4
|
-
const
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
5
28
|
const array_types_js_1 = require("../array/array-types.js");
|
|
6
29
|
const boolean_types_js_1 = require("../boolean/boolean-types.js");
|
|
7
|
-
const null_types_js_1 = require("../null/null-types.js");
|
|
8
30
|
const unknown_types_js_1 = require("../unknown/unknown-types.js");
|
|
9
31
|
const union_types_js_1 = require("../union/union-types.js");
|
|
10
32
|
const integer_types_js_1 = require("../integer/integer-types.js");
|
|
11
33
|
const number_types_js_1 = require("../number/number-types.js");
|
|
12
|
-
const intersection_types_js_1 = require("../intersection/intersection-types.js");
|
|
13
34
|
const string_types_js_1 = require("../string/string-types.js");
|
|
14
35
|
const object_types_js_1 = require("../object/object-types.js");
|
|
15
|
-
exports.oasSchemaData =
|
|
36
|
+
exports.oasSchemaData = v.union([
|
|
16
37
|
object_types_js_1.oasObjectData,
|
|
17
|
-
array_types_js_1.oasArrayData,
|
|
38
|
+
v.lazy(() => array_types_js_1.oasArrayData),
|
|
18
39
|
boolean_types_js_1.oasBooleanData,
|
|
19
40
|
string_types_js_1.oasStringData,
|
|
20
41
|
number_types_js_1.oasNumberData,
|
|
21
|
-
null_types_js_1.oasNullData,
|
|
22
42
|
integer_types_js_1.oasIntegerData,
|
|
23
43
|
union_types_js_1.oasUnionData,
|
|
24
|
-
intersection_types_js_1.oasIntersectionData,
|
|
25
44
|
unknown_types_js_1.oasUnknownData
|
|
26
45
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAY3C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,WAAW,yBAGrB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAwB/D,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAA;IACvF,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,mBAAmB,yBAG7B,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,UAAU,wBAAyB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAmI3F,CAAA;AA+CD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,wBAG5B,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
|
|
@@ -12,16 +12,31 @@ const toBoolean_js_1 = require("../boolean/toBoolean.js");
|
|
|
12
12
|
const toString_js_1 = require("../string/toString.js");
|
|
13
13
|
const toUnknown_js_1 = require("../unknown/toUnknown.js");
|
|
14
14
|
const toUnion_js_1 = require("../union/toUnion.js");
|
|
15
|
-
const
|
|
15
|
+
const refFns_js_2 = require("../../helpers/refFns.js");
|
|
16
|
+
const merge_intersection_js_1 = require("../_merge-all-of/merge-intersection.js");
|
|
17
|
+
const merge_union_js_1 = require("../_merge-all-of/merge-union.js");
|
|
16
18
|
const toSchemasV3 = ({ schemas, context }) => {
|
|
17
|
-
return Object.fromEntries(Object.entries(schemas)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
return Object.fromEntries(Object.entries(schemas)
|
|
20
|
+
.map(([key, schema]) => {
|
|
21
|
+
try {
|
|
22
|
+
return [
|
|
23
|
+
key,
|
|
24
|
+
context.trace(key, () => {
|
|
25
|
+
return (0, exports.toSchemaV3)({ schema, context });
|
|
26
|
+
})
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
context.logWarning({
|
|
31
|
+
key,
|
|
32
|
+
message: error instanceof Error ? error.message : 'Failed to parse schema',
|
|
33
|
+
parent: schema,
|
|
34
|
+
type: 'INVALID_SCHEMA'
|
|
35
|
+
});
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.filter(item => item !== undefined));
|
|
25
40
|
};
|
|
26
41
|
exports.toSchemasV3 = toSchemasV3;
|
|
27
42
|
const toOptionalSchemasV3 = ({ schemas, context }) => {
|
|
@@ -40,23 +55,42 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
40
55
|
// schema.nullable = true
|
|
41
56
|
// }
|
|
42
57
|
return (0, ts_pattern_1.match)(schema)
|
|
43
|
-
.with({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
.with({ allOf: ts_pattern_1.P.array() }, schema => {
|
|
59
|
+
return context.trace('allOf', () => {
|
|
60
|
+
const merged = (0, merge_intersection_js_1.mergeIntersection)({
|
|
61
|
+
schema,
|
|
62
|
+
getRef: (0, refFns_js_2.toGetRef)(context.documentObject)
|
|
63
|
+
});
|
|
64
|
+
return (0, exports.toSchemaV3)({ schema: merged, context });
|
|
65
|
+
});
|
|
48
66
|
})
|
|
49
|
-
.with({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
.with({ oneOf: ts_pattern_1.P.array() }, oneOf => {
|
|
68
|
+
return context.trace('oneOf', () => {
|
|
69
|
+
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
70
|
+
schema: oneOf,
|
|
71
|
+
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
72
|
+
groupType: 'oneOf'
|
|
73
|
+
});
|
|
74
|
+
if (!('oneOf' in merged) || !Array.isArray(merged.oneOf)) {
|
|
75
|
+
throw new Error('Missing "oneOf" array');
|
|
76
|
+
}
|
|
77
|
+
const { oneOf: members, ...value } = merged;
|
|
78
|
+
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'oneOf', context });
|
|
79
|
+
});
|
|
54
80
|
})
|
|
55
|
-
.with({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
81
|
+
.with({ anyOf: ts_pattern_1.P.array() }, anyOf => {
|
|
82
|
+
return context.trace('anyOf', () => {
|
|
83
|
+
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
84
|
+
schema: anyOf,
|
|
85
|
+
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
86
|
+
groupType: 'anyOf'
|
|
87
|
+
});
|
|
88
|
+
if (!('anyOf' in merged) || !Array.isArray(merged.anyOf)) {
|
|
89
|
+
throw new Error('Missing "anyOf" array');
|
|
90
|
+
}
|
|
91
|
+
const { anyOf: members, ...value } = merged;
|
|
92
|
+
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'anyOf', context });
|
|
93
|
+
});
|
|
60
94
|
})
|
|
61
95
|
.with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, context }))
|
|
62
96
|
.with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, context }))
|
|
@@ -64,9 +98,101 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
64
98
|
.with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, context }))
|
|
65
99
|
.with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, context }))
|
|
66
100
|
.with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, context }))
|
|
67
|
-
.otherwise(value =>
|
|
101
|
+
.otherwise(value => {
|
|
102
|
+
if (possibleObject(value)) {
|
|
103
|
+
context.logWarningNoKey({
|
|
104
|
+
message: 'Object has "properties" property, but is missing type="object" property',
|
|
105
|
+
parent: value,
|
|
106
|
+
type: 'MISSING_OBJECT_TYPE'
|
|
107
|
+
});
|
|
108
|
+
return (0, toObject_js_1.toObject)({
|
|
109
|
+
value: {
|
|
110
|
+
...value,
|
|
111
|
+
type: 'object'
|
|
112
|
+
},
|
|
113
|
+
context
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (possibleArray(value)) {
|
|
117
|
+
context.logWarningNoKey({
|
|
118
|
+
message: 'Object has "items" property, but is missing type="array" property',
|
|
119
|
+
parent: value,
|
|
120
|
+
type: 'MISSING_ARRAY_TYPE'
|
|
121
|
+
});
|
|
122
|
+
return (0, toArray_js_1.toArray)({
|
|
123
|
+
value: {
|
|
124
|
+
...value,
|
|
125
|
+
type: 'array'
|
|
126
|
+
// Adding cast here since {} is a valid value for items
|
|
127
|
+
},
|
|
128
|
+
context
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (possibleBoolean(value)) {
|
|
132
|
+
context.logWarningNoKey({
|
|
133
|
+
message: 'Object has a boolean "default" or "example" property, but is missing type="boolean" property',
|
|
134
|
+
parent: value,
|
|
135
|
+
type: 'MISSING_BOOLEAN_TYPE'
|
|
136
|
+
});
|
|
137
|
+
return (0, toBoolean_js_1.toBoolean)({
|
|
138
|
+
value: {
|
|
139
|
+
...value,
|
|
140
|
+
type: 'boolean'
|
|
141
|
+
},
|
|
142
|
+
context
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (possibleString(value)) {
|
|
146
|
+
context.logWarningNoKey({
|
|
147
|
+
message: 'Object has a string "default" or "example" property, but is missing type="string" property',
|
|
148
|
+
parent: value,
|
|
149
|
+
type: 'MISSING_STRING_TYPE'
|
|
150
|
+
});
|
|
151
|
+
return (0, toString_js_1.toString)({
|
|
152
|
+
value: {
|
|
153
|
+
...value,
|
|
154
|
+
type: 'string'
|
|
155
|
+
},
|
|
156
|
+
context
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return (0, toUnknown_js_1.toUnknown)({ value, context });
|
|
160
|
+
});
|
|
68
161
|
};
|
|
69
162
|
exports.toSchemaV3 = toSchemaV3;
|
|
163
|
+
const possibleString = (value) => {
|
|
164
|
+
return (value &&
|
|
165
|
+
typeof value === 'object' &&
|
|
166
|
+
(('default' in value && typeof value.default === 'string') ||
|
|
167
|
+
('example' in value && typeof value.example === 'string') ||
|
|
168
|
+
('enum' in value &&
|
|
169
|
+
Array.isArray(value.enum) &&
|
|
170
|
+
value.enum.every(item => typeof item === 'string')) ||
|
|
171
|
+
('format' in value &&
|
|
172
|
+
typeof value.format === 'string' &&
|
|
173
|
+
['date', 'date-time', 'binary', 'byte'].includes(value.format))));
|
|
174
|
+
};
|
|
175
|
+
const possibleBoolean = (value) => {
|
|
176
|
+
return (value &&
|
|
177
|
+
typeof value === 'object' &&
|
|
178
|
+
(('default' in value && typeof value.default === 'boolean') ||
|
|
179
|
+
('example' in value && typeof value.example === 'boolean')));
|
|
180
|
+
};
|
|
181
|
+
const possibleArray = (value) => {
|
|
182
|
+
return (value &&
|
|
183
|
+
typeof value === 'object' &&
|
|
184
|
+
'items' in value &&
|
|
185
|
+
value.items &&
|
|
186
|
+
typeof value.items === 'object' &&
|
|
187
|
+
value.items);
|
|
188
|
+
};
|
|
189
|
+
const possibleObject = (value) => {
|
|
190
|
+
return (value &&
|
|
191
|
+
typeof value === 'object' &&
|
|
192
|
+
'properties' in value &&
|
|
193
|
+
typeof value.properties === 'object' &&
|
|
194
|
+
value.properties);
|
|
195
|
+
};
|
|
70
196
|
const toOptionalSchemaV3 = ({ schema, context }) => {
|
|
71
197
|
if (!schema) {
|
|
72
198
|
return undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
export type SecurityFields = {
|
|
3
|
+
requirement: Record<string, string[]>;
|
|
4
|
+
};
|
|
5
|
+
export declare class OasSecurityRequirement {
|
|
6
|
+
oasType: 'securityRequirement';
|
|
7
|
+
requirement: Record<string, string[]>;
|
|
8
|
+
constructor(fields: SecurityFields);
|
|
9
|
+
toJsonSchema(): OpenAPIV3.SecurityRequirementObject;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=SecurityRequirement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/SecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CACtC,CAAA;AAED,qBAAa,sBAAsB;IACjC,OAAO,EAAE,qBAAqB,CAAwB;IACtD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;gBAEzB,MAAM,EAAE,cAAc;IAIlC,YAAY,IAAI,SAAS,CAAC,yBAAyB;CAKpD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OasSecurityRequirement = void 0;
|
|
4
|
+
class OasSecurityRequirement {
|
|
5
|
+
constructor(fields) {
|
|
6
|
+
Object.defineProperty(this, "oasType", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: 'securityRequirement'
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "requirement", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
this.requirement = fields.requirement;
|
|
19
|
+
}
|
|
20
|
+
toJsonSchema() {
|
|
21
|
+
return {
|
|
22
|
+
...this.requirement
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.OasSecurityRequirement = OasSecurityRequirement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParseContext } from '../../context/ParseContext.js';
|
|
2
|
+
import { OasSecurityRequirement } from './SecurityRequirement.js';
|
|
3
|
+
type ToSecurityRequirementsV3Args = {
|
|
4
|
+
security: Record<string, string[]>[] | undefined;
|
|
5
|
+
context: ParseContext;
|
|
6
|
+
};
|
|
7
|
+
export declare const toSecurityRequirementsV3: ({ security }: ToSecurityRequirementsV3Args) => OasSecurityRequirement[] | undefined;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=toSecurityRequirement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/toSecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,wBAAwB,iBAElC,4BAA4B,KAAG,sBAAsB,EAAE,GAAG,SAQ5D,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toSecurityRequirementsV3 = void 0;
|
|
4
|
+
const SecurityRequirement_js_1 = require("./SecurityRequirement.js");
|
|
5
|
+
const toSecurityRequirementsV3 = ({ security }) => {
|
|
6
|
+
if (!security) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return security.map(requirement => {
|
|
10
|
+
return new SecurityRequirement_js_1.OasSecurityRequirement({ requirement });
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.toSecurityRequirementsV3 = toSecurityRequirementsV3;
|