@skmtc/core 0.0.599 → 0.0.600
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
|
@@ -35,6 +35,15 @@ class OasNumber {
|
|
|
35
35
|
writable: true,
|
|
36
36
|
value: void 0
|
|
37
37
|
});
|
|
38
|
+
/**
|
|
39
|
+
* The default value of the number.
|
|
40
|
+
*/
|
|
41
|
+
Object.defineProperty(this, "default", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: void 0
|
|
46
|
+
});
|
|
38
47
|
/**
|
|
39
48
|
* A description of the number.
|
|
40
49
|
*/
|
|
@@ -69,11 +78,82 @@ class OasNumber {
|
|
|
69
78
|
writable: true,
|
|
70
79
|
value: void 0
|
|
71
80
|
});
|
|
81
|
+
/**
|
|
82
|
+
* An array of allowed values for the number.
|
|
83
|
+
*/
|
|
84
|
+
Object.defineProperty(this, "enums", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
value: void 0
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* The format of the number.
|
|
92
|
+
*/
|
|
93
|
+
Object.defineProperty(this, "format", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
configurable: true,
|
|
96
|
+
writable: true,
|
|
97
|
+
value: void 0
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* The multiple of the number.
|
|
101
|
+
*/
|
|
102
|
+
Object.defineProperty(this, "multipleOf", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
configurable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
value: void 0
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* The maximum value of the number.
|
|
110
|
+
*/
|
|
111
|
+
Object.defineProperty(this, "maximum", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
configurable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
value: void 0
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* Whether the maximum value is exclusive.
|
|
119
|
+
*/
|
|
120
|
+
Object.defineProperty(this, "exclusiveMaximum", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
configurable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
value: void 0
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* The minimum value of the number.
|
|
128
|
+
*/
|
|
129
|
+
Object.defineProperty(this, "minimum", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
configurable: true,
|
|
132
|
+
writable: true,
|
|
133
|
+
value: void 0
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* Whether the minimum value is exclusive.
|
|
137
|
+
*/
|
|
138
|
+
Object.defineProperty(this, "exclusiveMinimum", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
configurable: true,
|
|
141
|
+
writable: true,
|
|
142
|
+
value: void 0
|
|
143
|
+
});
|
|
72
144
|
this.title = fields.title;
|
|
73
145
|
this.description = fields.description;
|
|
74
146
|
this.nullable = fields.nullable;
|
|
147
|
+
this.default = fields.default;
|
|
75
148
|
this.extensionFields = fields.extensionFields;
|
|
76
149
|
this.example = fields.example;
|
|
150
|
+
this.enums = fields.enums;
|
|
151
|
+
this.format = fields.format;
|
|
152
|
+
this.multipleOf = fields.multipleOf;
|
|
153
|
+
this.maximum = fields.maximum;
|
|
154
|
+
this.exclusiveMaximum = fields.exclusiveMaximum;
|
|
155
|
+
this.minimum = fields.minimum;
|
|
156
|
+
this.exclusiveMinimum = fields.exclusiveMinimum;
|
|
77
157
|
}
|
|
78
158
|
isRef() {
|
|
79
159
|
return false;
|
|
@@ -91,7 +171,14 @@ class OasNumber {
|
|
|
91
171
|
title: this.title,
|
|
92
172
|
description: this.description,
|
|
93
173
|
nullable: this.nullable,
|
|
94
|
-
example: this.example
|
|
174
|
+
example: this.example,
|
|
175
|
+
enum: this.enums,
|
|
176
|
+
format: this.format,
|
|
177
|
+
multipleOf: this.multipleOf,
|
|
178
|
+
maximum: this.maximum,
|
|
179
|
+
exclusiveMaximum: this.exclusiveMaximum,
|
|
180
|
+
minimum: this.minimum,
|
|
181
|
+
exclusiveMinimum: this.exclusiveMinimum
|
|
95
182
|
};
|
|
96
183
|
}
|
|
97
184
|
}
|
|
@@ -1,10 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const numberFormat: v.UnionSchema<[v.LiteralSchema<"float", undefined>, v.LiteralSchema<"double", undefined>], undefined>;
|
|
3
|
+
export declare const oasNumberData: v.ObjectSchema<{
|
|
4
|
+
readonly type: v.LiteralSchema<"number", undefined>;
|
|
5
|
+
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
7
|
+
readonly default: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
8
|
+
readonly format: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"float", undefined>, v.LiteralSchema<"double", undefined>], undefined>, undefined>;
|
|
9
|
+
readonly enum: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
10
|
+
readonly nullable: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
11
|
+
readonly example: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
12
|
+
readonly multipleOf: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
13
|
+
readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
14
|
+
readonly exclusiveMaximum: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
15
|
+
readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
16
|
+
readonly exclusiveMinimum: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
17
|
+
}, undefined>;
|
|
3
18
|
export type OasNumberData = {
|
|
4
|
-
|
|
19
|
+
type: 'number';
|
|
5
20
|
title?: string;
|
|
6
21
|
description?: string;
|
|
7
22
|
default?: number;
|
|
8
|
-
|
|
23
|
+
format?: 'float' | 'double';
|
|
24
|
+
enum?: number[];
|
|
25
|
+
nullable?: boolean;
|
|
26
|
+
example?: number;
|
|
27
|
+
multipleOf?: number;
|
|
28
|
+
maximum?: number;
|
|
29
|
+
exclusiveMaximum?: boolean;
|
|
30
|
+
minimum?: number;
|
|
31
|
+
exclusiveMinimum?: boolean;
|
|
9
32
|
};
|
|
10
33
|
//# sourceMappingURL=number-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"number-types.d.ts","sourceRoot":"","sources":["../../../src/oas/number/number-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,YAAY,uGAAqD,CAAA;AAE9E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;aAcxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}
|
|
@@ -1,17 +1,43 @@
|
|
|
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.oasNumberData = void 0;
|
|
4
|
-
const
|
|
5
|
-
exports.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
exports.oasNumberData = exports.numberFormat = void 0;
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
28
|
+
exports.numberFormat = v.union([v.literal('float'), v.literal('double')]);
|
|
29
|
+
exports.oasNumberData = v.object({
|
|
30
|
+
type: v.literal('number'),
|
|
31
|
+
title: v.optional(v.string()),
|
|
32
|
+
description: v.optional(v.string()),
|
|
33
|
+
default: v.optional(v.number()),
|
|
34
|
+
format: v.optional(exports.numberFormat),
|
|
35
|
+
enum: v.optional(v.array(v.number())),
|
|
36
|
+
nullable: v.optional(v.boolean()),
|
|
37
|
+
example: v.optional(v.number()),
|
|
38
|
+
multipleOf: v.optional(v.number()),
|
|
39
|
+
maximum: v.optional(v.number()),
|
|
40
|
+
exclusiveMaximum: v.optional(v.boolean()),
|
|
41
|
+
minimum: v.optional(v.number()),
|
|
42
|
+
exclusiveMinimum: v.optional(v.boolean())
|
|
17
43
|
});
|
|
@@ -2,9 +2,9 @@ import type { OpenAPIV3 } from 'openapi-types';
|
|
|
2
2
|
import type { ParseContext } from '../../context/ParseContext.js';
|
|
3
3
|
import { OasNumber } from './Number.js';
|
|
4
4
|
type ToNumberArgs = {
|
|
5
|
-
value: OpenAPIV3.
|
|
5
|
+
value: OpenAPIV3.SchemaObject;
|
|
6
6
|
context: ParseContext;
|
|
7
7
|
};
|
|
8
|
-
export declare const toNumber: ({
|
|
8
|
+
export declare const toNumber: ({ context, value }: ToNumberArgs) => OasNumber;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=toNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAQvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA2B3D,CAAA"}
|
|
@@ -1,20 +1,89 @@
|
|
|
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.toNumber = void 0;
|
|
4
27
|
const Number_js_1 = require("./Number.js");
|
|
5
28
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
6
|
-
const
|
|
7
|
-
|
|
29
|
+
const v = __importStar(require("valibot"));
|
|
30
|
+
const number_types_js_1 = require("./number-types.js");
|
|
31
|
+
const parseNullable_js_1 = require("../_helpers/parseNullable.js");
|
|
32
|
+
const parseExample_js_1 = require("../_helpers/parseExample.js");
|
|
33
|
+
const parseEnum_js_1 = require("../_helpers/parseEnum.js");
|
|
34
|
+
const parseFormat_js_1 = require("../_helpers/parseFormat.js");
|
|
35
|
+
const toNumber = ({ context, value }) => {
|
|
36
|
+
const { nullable, value: valueWithoutNullable } = (0, parseNullable_js_1.parseNullable)({
|
|
37
|
+
value,
|
|
38
|
+
context
|
|
39
|
+
});
|
|
40
|
+
const { example, value: valueWithoutExample } = (0, parseExample_js_1.parseExample)({
|
|
41
|
+
value: valueWithoutNullable,
|
|
42
|
+
nullable,
|
|
43
|
+
valibotSchema: v.number(),
|
|
44
|
+
context
|
|
45
|
+
});
|
|
46
|
+
const { enum: enums, value: valueWithoutEnums } = (0, parseEnum_js_1.parseEnum)({
|
|
47
|
+
value: valueWithoutExample,
|
|
48
|
+
nullable,
|
|
49
|
+
valibotSchema: v.number(),
|
|
50
|
+
context
|
|
51
|
+
});
|
|
52
|
+
return toParsedNumber({
|
|
53
|
+
context,
|
|
54
|
+
nullable,
|
|
55
|
+
example,
|
|
56
|
+
enums,
|
|
57
|
+
value: valueWithoutEnums
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.toNumber = toNumber;
|
|
61
|
+
const toParsedNumber = ({ context, nullable, example, enums, value: valueWithoutEnums }) => {
|
|
62
|
+
const { format, value: valueWithoutFormat } = (0, parseFormat_js_1.parseFormat)({
|
|
63
|
+
value: valueWithoutEnums,
|
|
64
|
+
valibotSchema: number_types_js_1.numberFormat,
|
|
65
|
+
context
|
|
66
|
+
});
|
|
67
|
+
const { type: _type, title, description, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, default: defaultValue, ...skipped } = v.parse(number_types_js_1.oasNumberData, valueWithoutFormat);
|
|
8
68
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
9
69
|
skipped,
|
|
10
|
-
|
|
70
|
+
parent: valueWithoutEnums,
|
|
71
|
+
context,
|
|
72
|
+
parentType: 'schema:number'
|
|
11
73
|
});
|
|
12
74
|
return new Number_js_1.OasNumber({
|
|
13
75
|
title,
|
|
14
76
|
description,
|
|
15
77
|
nullable,
|
|
78
|
+
default: defaultValue,
|
|
16
79
|
extensionFields,
|
|
17
|
-
example
|
|
80
|
+
example,
|
|
81
|
+
enums,
|
|
82
|
+
format,
|
|
83
|
+
multipleOf,
|
|
84
|
+
maximum,
|
|
85
|
+
exclusiveMaximum,
|
|
86
|
+
minimum,
|
|
87
|
+
exclusiveMinimum
|
|
18
88
|
});
|
|
19
89
|
};
|
|
20
|
-
exports.toNumber = toNumber;
|
|
@@ -3,15 +3,22 @@ import type { OasRef } from '../ref/Ref.js';
|
|
|
3
3
|
import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
4
4
|
import type { CustomValue } from '../../types/CustomValue.js';
|
|
5
5
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
6
|
-
export type OasObjectFields = {
|
|
6
|
+
export type OasObjectFields<Nullable extends boolean | undefined> = {
|
|
7
7
|
title?: string;
|
|
8
8
|
description?: string;
|
|
9
9
|
properties?: Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
|
|
10
10
|
required?: string[] | undefined;
|
|
11
|
+
default?: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
|
|
11
12
|
additionalProperties?: boolean | OasSchema | OasRef<'schema'> | undefined;
|
|
12
|
-
nullable
|
|
13
|
+
nullable: Nullable;
|
|
14
|
+
maxProperties?: number;
|
|
15
|
+
minProperties?: number;
|
|
16
|
+
enums?: Nullable extends true ? (Record<string, unknown> | null)[] | undefined : Record<string, unknown>[] | undefined;
|
|
13
17
|
extensionFields?: Record<string, unknown>;
|
|
14
|
-
example?: Record<string, unknown
|
|
18
|
+
example?: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
writeOnly?: boolean;
|
|
21
|
+
deprecated?: boolean;
|
|
15
22
|
};
|
|
16
23
|
export type AddPropertyArgs = {
|
|
17
24
|
name: string;
|
|
@@ -23,7 +30,7 @@ export type AddPropertyArgs = {
|
|
|
23
30
|
*
|
|
24
31
|
* Objects have fixed, named fields. Records have any number of fields that do not have predefined names.
|
|
25
32
|
*/
|
|
26
|
-
export declare class OasObject {
|
|
33
|
+
export declare class OasObject<Nullable extends boolean | undefined = boolean | undefined> {
|
|
27
34
|
/**
|
|
28
35
|
* Object is part the 'schema' set which is used
|
|
29
36
|
* to define data types in an OpenAPI document.
|
|
@@ -44,11 +51,11 @@ export declare class OasObject {
|
|
|
44
51
|
/**
|
|
45
52
|
* Indicates whether value can be null.
|
|
46
53
|
*/
|
|
47
|
-
nullable:
|
|
54
|
+
nullable: Nullable;
|
|
48
55
|
/**
|
|
49
56
|
* A record which maps property names of the object to their schemas.
|
|
50
57
|
*/
|
|
51
|
-
properties: Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
|
|
58
|
+
properties: Nullable extends true ? Record<string, OasSchema | OasRef<'schema'> | CustomValue> | null | undefined : Record<string, OasSchema | OasRef<'schema'> | CustomValue> | undefined;
|
|
52
59
|
/**
|
|
53
60
|
* An array of required property names.
|
|
54
61
|
*/
|
|
@@ -64,10 +71,19 @@ export declare class OasObject {
|
|
|
64
71
|
/**
|
|
65
72
|
* An example of the object.
|
|
66
73
|
*/
|
|
67
|
-
example: Record<string, unknown> | undefined;
|
|
68
|
-
|
|
74
|
+
example: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* The default value of the object.
|
|
77
|
+
*/
|
|
78
|
+
default: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
|
|
79
|
+
maxProperties?: number;
|
|
80
|
+
minProperties?: number;
|
|
81
|
+
readOnly?: boolean;
|
|
82
|
+
writeOnly?: boolean;
|
|
83
|
+
deprecated?: boolean;
|
|
84
|
+
constructor(fields: OasObjectFields<Nullable>);
|
|
69
85
|
/** Creates new empty OasObject */
|
|
70
|
-
static empty(): OasObject
|
|
86
|
+
static empty(): OasObject<false>;
|
|
71
87
|
/**
|
|
72
88
|
* Adds a new property to the object.
|
|
73
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,MAAM,MAAM,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAAG,SAAS,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACvC,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAA;IACzE,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,QAAQ,SAAS,IAAI,GACzB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,GAC9C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,SAAS,CAAA;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,GAAG,SAAS,CAAA;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,qBAAa,SAAS,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;IAC/E;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,WAAoB;IACxB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAA;IAClB;;OAEG;IACH,UAAU,EAAE,QAAQ,SAAS,IAAI,GAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,GAC7E,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAAG,SAAS,CAAA;IAC1E;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC9B;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAA;IAExE,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACpD;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACvC;;OAEG;IACH,OAAO,EAAE,QAAQ,SAAS,IAAI,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;gBACR,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC;IAgB7C,kCAAkC;IAClC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC;IAQhC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,SAAS;IAmBnE;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAkBvC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAIxB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CA8B3E"}
|
|
@@ -101,6 +101,45 @@ class OasObject {
|
|
|
101
101
|
writable: true,
|
|
102
102
|
value: void 0
|
|
103
103
|
});
|
|
104
|
+
/**
|
|
105
|
+
* The default value of the object.
|
|
106
|
+
*/
|
|
107
|
+
Object.defineProperty(this, "default", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: void 0
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(this, "maxProperties", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true,
|
|
117
|
+
value: void 0
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(this, "minProperties", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
configurable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
value: void 0
|
|
124
|
+
});
|
|
125
|
+
Object.defineProperty(this, "readOnly", {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
configurable: true,
|
|
128
|
+
writable: true,
|
|
129
|
+
value: void 0
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(this, "writeOnly", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
configurable: true,
|
|
134
|
+
writable: true,
|
|
135
|
+
value: void 0
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(this, "deprecated", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
configurable: true,
|
|
140
|
+
writable: true,
|
|
141
|
+
value: void 0
|
|
142
|
+
});
|
|
104
143
|
this.title = fields.title;
|
|
105
144
|
this.description = fields.description;
|
|
106
145
|
this.properties = fields.properties;
|
|
@@ -109,10 +148,16 @@ class OasObject {
|
|
|
109
148
|
this.nullable = fields.nullable;
|
|
110
149
|
this.extensionFields = fields.extensionFields;
|
|
111
150
|
this.example = fields.example;
|
|
151
|
+
this.default = fields.default;
|
|
152
|
+
this.maxProperties = fields.maxProperties;
|
|
153
|
+
this.minProperties = fields.minProperties;
|
|
154
|
+
this.readOnly = fields.readOnly;
|
|
155
|
+
this.deprecated = fields.deprecated;
|
|
112
156
|
}
|
|
113
157
|
/** Creates new empty OasObject */
|
|
114
158
|
static empty() {
|
|
115
159
|
return new OasObject({
|
|
160
|
+
nullable: false,
|
|
116
161
|
properties: {},
|
|
117
162
|
required: []
|
|
118
163
|
});
|
|
@@ -189,10 +234,15 @@ class OasObject {
|
|
|
189
234
|
]))
|
|
190
235
|
: undefined,
|
|
191
236
|
required: this.required,
|
|
237
|
+
maxProperties: this.maxProperties,
|
|
238
|
+
minProperties: this.minProperties,
|
|
192
239
|
additionalProperties: (0, ts_pattern_1.match)(this.additionalProperties)
|
|
193
240
|
.with(ts_pattern_1.P.nullish, () => false)
|
|
194
241
|
.with(ts_pattern_1.P.boolean, value => value)
|
|
195
|
-
.otherwise(value => value.toJsonSchema(options))
|
|
242
|
+
.otherwise(value => value.toJsonSchema(options)),
|
|
243
|
+
readOnly: this.readOnly,
|
|
244
|
+
writeOnly: this.writeOnly,
|
|
245
|
+
deprecated: this.deprecated
|
|
196
246
|
};
|
|
197
247
|
}
|
|
198
248
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as v from 'valibot';
|
|
2
2
|
import { type OasSchemaData } from '../schema/schema-types.js';
|
|
3
3
|
import { type OasSchemaRefData } from '../ref/ref-types.js';
|
|
4
|
-
export declare const oasObjectData:
|
|
4
|
+
export declare const oasObjectData: v.GenericSchema<OasObjectData>;
|
|
5
5
|
export type OasObjectData = {
|
|
6
|
-
oasType: 'schema';
|
|
7
6
|
type: 'object';
|
|
8
7
|
title?: string;
|
|
9
8
|
description?: string;
|
|
10
9
|
default?: Record<string, unknown>;
|
|
10
|
+
deprecated?: boolean;
|
|
11
|
+
maxProperties?: number;
|
|
12
|
+
minProperties?: number;
|
|
11
13
|
properties?: Record<string, OasSchemaData | OasSchemaRefData>;
|
|
12
14
|
required?: string[];
|
|
13
15
|
additionalProperties?: boolean | OasSchemaData | OasSchemaRefData;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
writeOnly?: boolean;
|
|
14
18
|
};
|
|
15
19
|
//# sourceMappingURL=object-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-types.d.ts","sourceRoot":"","sources":["../../../src/oas/object/object-types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"object-types.d.ts","sourceRoot":"","sources":["../../../src/oas/object/object-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,qBAAqB,CAAA;AAE7E,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAwBvD,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAA;IAC7D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,gBAAgB,CAAA;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA"}
|
|
@@ -1,30 +1,49 @@
|
|
|
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.oasObjectData = void 0;
|
|
4
|
-
const
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
5
28
|
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
6
29
|
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
7
|
-
exports.oasObjectData =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return zod_openapi_1.z.record(zod_openapi_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData])).optional();
|
|
19
|
-
}),
|
|
30
|
+
exports.oasObjectData = v.object({
|
|
31
|
+
type: v.literal('object'),
|
|
32
|
+
title: v.optional(v.string()),
|
|
33
|
+
description: v.optional(v.string()),
|
|
34
|
+
default: v.optional(v.object({})),
|
|
35
|
+
deprecated: v.optional(v.boolean()),
|
|
36
|
+
maxProperties: v.optional(v.number()),
|
|
37
|
+
minProperties: v.optional(v.number()),
|
|
38
|
+
properties: v.optional(v.record(v.string(), v.union([v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData]))),
|
|
39
|
+
readOnly: v.optional(v.boolean()),
|
|
40
|
+
writeOnly: v.optional(v.boolean()),
|
|
20
41
|
// Add soon
|
|
21
42
|
// patternProperties: z.lazy(() => z.record(jsonSchema4).optional()),
|
|
22
|
-
required:
|
|
43
|
+
required: v.optional(v.array(v.string())),
|
|
23
44
|
// allOf: z.lazy(() => z.array(oasObject).optional()),
|
|
24
45
|
// Use oneOf instead of anyOf
|
|
25
46
|
// anyOf: z.lazy(() => z.array(jsonSchema4).optional()),
|
|
26
47
|
// oneOf: z.lazy(() => z.array(oasObject).optional()),
|
|
27
|
-
additionalProperties:
|
|
28
|
-
return zod_openapi_1.z.union([zod_openapi_1.z.boolean(), schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]).optional();
|
|
29
|
-
})
|
|
48
|
+
additionalProperties: v.optional(v.union([v.boolean(), v.lazy(() => schema_types_js_1.oasSchemaData), ref_types_js_1.oasSchemaRefData]))
|
|
30
49
|
});
|
|
@@ -2,7 +2,7 @@ import type { OpenAPIV3 } from 'openapi-types';
|
|
|
2
2
|
import type { ParseContext } from '../../context/ParseContext.js';
|
|
3
3
|
import { OasObject } from './Object.js';
|
|
4
4
|
type ToObjectArgs = {
|
|
5
|
-
value: OpenAPIV3.
|
|
5
|
+
value: OpenAPIV3.SchemaObject;
|
|
6
6
|
context: ParseContext;
|
|
7
7
|
};
|
|
8
8
|
export declare const toObject: ({ value, context }: ToObjectArgs) => OasObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AASvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA2B3D,CAAA"}
|