@skmtc/core 0.0.223 → 0.0.224
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/{script → esm}/_dnt.polyfills.js +1 -2
- package/{script → esm}/_dnt.shims.js +4 -8
- package/{script → esm}/context/CoreContext.js +24 -28
- package/{script → esm}/context/GenerateContext.js +13 -17
- package/{script → esm}/context/LogStore.js +1 -5
- package/{script → esm}/context/ParseContext.js +1 -5
- package/{script → esm}/context/RenderContext.js +17 -47
- package/{script → esm}/context/Trail.js +1 -5
- package/esm/context/types.js +1 -0
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/_validate_binary_like.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/ascii85.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base32.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base58.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64url.js +3 -30
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/hex.js +4 -8
- package/esm/deps/jsr.io/@std/encoding/1.0.1/mod.js +22 -0
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/varint.js +8 -14
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/assert_path.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/basename.js +5 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/common.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/format.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/from_file_url.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/glob_to_reg_exp.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/normalize_string.js +6 -9
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/relative.js +9 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/strip_trailing_separators.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/to_file_url.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_os.js +14 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/basename.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/common.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/constants.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/dirname.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/extname.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/format.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/from_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/glob_to_regexp.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_absolute.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_glob.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join_globs.js +7 -10
- package/esm/deps/jsr.io/@std/path/1.0.0/mod.js +54 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize_glob.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/parse.js +5 -8
- package/esm/deps/jsr.io/@std/path/1.0.0/posix/_util.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/basename.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/constants.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/dirname.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/extname.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/format.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/from_file_url.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/glob_to_regexp.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/is_absolute.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join_globs.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize_glob.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/parse.js +10 -13
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/relative.js +14 -17
- package/esm/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +59 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_namespaced_path.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/relative.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/resolve.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_namespaced_path.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/types.js +1 -2
- package/esm/deps/jsr.io/@std/path/1.0.0/windows/_util.js +15 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/basename.js +11 -14
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/constants.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/dirname.js +17 -20
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/extname.js +9 -12
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/format.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/from_file_url.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/glob_to_regexp.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/is_absolute.js +9 -12
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join.js +10 -13
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join_globs.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize.js +17 -20
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize_glob.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/parse.js +16 -19
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/relative.js +16 -19
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/resolve.js +17 -43
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_namespaced_path.js +11 -14
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper.js +10 -36
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper_state.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_error.js +1 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader.js +9 -36
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader_state.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_mark.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_state.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/binary.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/bool.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/float.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/function.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/int.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/map.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/merge.js +2 -5
- package/esm/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +20 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/nil.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/omap.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/pairs.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/regexp.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/seq.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/set.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/str.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/timestamp.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/undefined.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_utils.js +15 -32
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/mod.js +4 -20
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/parse.js +5 -9
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/core.js +4 -7
- package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +15 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/extended.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/failsafe.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/json.js +6 -9
- package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +10 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/stringify.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/type.js +1 -5
- package/{script → esm}/dsl/ContentSettings.js +1 -5
- package/{script → esm}/dsl/Definition.js +4 -8
- package/{script → esm}/dsl/GeneratedValueList.js +3 -7
- package/{script → esm}/dsl/Identifier.js +8 -12
- package/{script → esm}/dsl/Import.js +2 -7
- package/esm/dsl/ModelCreator.js +1 -0
- package/{script → esm}/dsl/ModelDriver.js +14 -18
- package/esm/dsl/OperationCreator.js +1 -0
- package/{script → esm}/dsl/OperationDriver.js +11 -15
- package/esm/dsl/Stringable.js +1 -0
- package/{script → esm}/dsl/ValueBase.js +1 -5
- package/{script → esm}/dsl/base.js +5 -13
- package/esm/dsl/constants.js +1 -0
- package/{script → esm}/dsl/withConfig.js +9 -15
- package/esm/generate/generate.js +47 -0
- package/esm/generate/generateModels.js +29 -0
- package/esm/generate/generateOperations.js +35 -0
- package/{script → esm}/helpers/logStatus.js +2 -7
- package/esm/helpers/naming.js +25 -0
- package/esm/helpers/refFns.js +24 -0
- package/esm/helpers/strings.js +6 -0
- package/{script → esm}/helpers/verifyType.js +1 -4
- package/esm/mod.js +61 -0
- package/{script → esm}/oas/array/Array.js +2 -6
- package/esm/oas/array/array-types.js +17 -0
- package/esm/oas/array/toArray.js +20 -0
- package/{script → esm}/oas/boolean/Boolean.js +2 -6
- package/esm/oas/boolean/boolean-types.js +8 -0
- package/esm/oas/boolean/toBoolean.js +10 -0
- package/{script → esm}/oas/components/Components.js +2 -6
- package/esm/oas/components/toComponentsV3.js +44 -0
- package/esm/oas/contact/contact-types.js +7 -0
- package/{script → esm}/oas/discriminator/Discriminator.js +2 -6
- package/esm/oas/discriminator/discriminator-types.js +6 -0
- package/esm/oas/discriminator/toDiscriminatorV3.js +11 -0
- package/{script → esm}/oas/document/Document.js +2 -6
- package/esm/oas/document/toDocumentV3.js +24 -0
- package/{script → esm}/oas/example/Example.js +2 -6
- package/esm/oas/example/example-types.js +9 -0
- package/esm/oas/example/toExamplesV3.js +45 -0
- package/{script → esm}/oas/header/Header.js +2 -6
- package/esm/oas/header/toHeadersV3.js +42 -0
- package/{script → esm}/oas/info/Info.js +2 -6
- package/{script → esm}/oas/info/toInfoV3.js +3 -7
- package/{script → esm}/oas/integer/Integer.js +2 -6
- package/esm/oas/integer/integer-types.js +18 -0
- package/esm/oas/integer/toInteger.js +13 -0
- package/{script → esm}/oas/intersection/Intersection.js +2 -6
- package/esm/oas/intersection/intersection-types.js +12 -0
- package/esm/oas/intersection/toIntersection.js +22 -0
- package/esm/oas/license/license-types.js +7 -0
- package/esm/oas/markdown/markdown-types.js +2 -0
- package/{script → esm}/oas/mediaType/MediaType.js +2 -6
- package/esm/oas/mediaType/mediaType-types.js +12 -0
- package/esm/oas/mediaType/toMediaTypeItemV3.js +37 -0
- package/esm/oas/null/null-types.js +8 -0
- package/{script → esm}/oas/number/Number.js +2 -6
- package/esm/oas/number/number-types.js +14 -0
- package/esm/oas/number/toNumber.js +10 -0
- package/{script → esm}/oas/object/Object.js +4 -8
- package/esm/oas/object/object-types.js +27 -0
- package/esm/oas/object/toAdditionalPropertiesV3.js +14 -0
- package/esm/oas/object/toObject.js +23 -0
- package/{script → esm}/oas/operation/Operation.js +2 -6
- package/{script → esm}/oas/operation/toOperationsV3.js +13 -18
- package/{script → esm}/oas/parameter/Parameter.js +2 -6
- package/esm/oas/parameter/parameter-types.js +38 -0
- package/{script → esm}/oas/parameter/toParameterV3.js +22 -28
- package/{script → esm}/oas/pathItem/PathItem.js +2 -6
- package/esm/oas/pathItem/toPathItemV3.js +15 -0
- package/{script → esm}/oas/ref/Ref.js +6 -10
- package/esm/oas/ref/ref-types.js +54 -0
- package/esm/oas/ref/toRefV31.js +11 -0
- package/{script → esm}/oas/requestBody/RequestBody.js +2 -6
- package/esm/oas/requestBody/toRequestBodiesV3.js +46 -0
- package/{script → esm}/oas/response/Response.js +2 -6
- package/esm/oas/response/toResponseV3.js +35 -0
- package/esm/oas/schema/Schema.js +1 -0
- package/esm/oas/schema/schema-types.js +23 -0
- package/esm/oas/schema/toSchemasV3.js +60 -0
- package/{script → esm}/oas/string/String.js +2 -6
- package/esm/oas/string/string-types.js +29 -0
- package/esm/oas/string/toString.js +11 -0
- package/{script → esm}/oas/tag/Tag.js +2 -6
- package/esm/oas/tag/toTagsV3.js +14 -0
- package/{script → esm}/oas/union/Union.js +2 -6
- package/esm/oas/union/toUnion.js +22 -0
- package/esm/oas/union/union-types.js +12 -0
- package/{script → esm}/oas/unknown/Unknown.js +2 -6
- package/esm/oas/unknown/toUnknown.js +9 -0
- package/esm/oas/unknown/unknown-types.js +8 -0
- package/{script → esm}/oas/void/Void.js +4 -8
- package/{script → esm}/oas-elements/OasBase.js +1 -5
- package/esm/package.json +3 -0
- package/esm/parse/parse.js +16 -0
- package/{script → esm}/schemas/client.js +2 -4
- package/{script → esm}/server/createServer.js +24 -51
- package/esm/types/Brand.js +1 -0
- package/{script → esm}/types/CustomValue.js +3 -8
- package/esm/types/GeneratedValue.js +1 -0
- package/{script → esm}/types/GenerationType.js +1 -2
- package/esm/types/GeneratorKeys.js +13 -0
- package/esm/types/Method.js +31 -0
- package/esm/types/Modifiers.js +1 -0
- package/esm/types/RefName.js +1 -0
- package/esm/types/Settings.js +42 -0
- package/esm/types/TypeSystem.js +1 -0
- package/esm/types/prettierConfig.js +46 -0
- package/{script → esm}/typescript/EntityType.js +3 -7
- package/{script → esm}/typescript/FunctionParameter.js +10 -17
- package/{script → esm}/typescript/ReactRouterPathParams.js +2 -6
- package/esm/typescript/identifiers.js +7 -0
- package/esm/typescript/keyValues.js +11 -0
- package/{script → esm}/typescript/toDestructuredObject.js +1 -5
- package/{script → esm}/typescript/toOperationArg.js +7 -14
- package/esm/typescript/toOperationResponse.js +17 -0
- package/esm/typescript/toParamsObject.js +12 -0
- package/esm/typescript/toPathTemplate.js +3 -0
- package/esm/typescript/withDescription.js +3 -0
- package/package.json +8 -8
- package/script/context/types.js +0 -2
- package/script/deps/jsr.io/@std/encoding/1.0.1/mod.js +0 -38
- package/script/deps/jsr.io/@std/path/1.0.0/_common/constants.js +0 -49
- package/script/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/_common/relative.js +0 -12
- package/script/deps/jsr.io/@std/path/1.0.0/_os.js +0 -40
- package/script/deps/jsr.io/@std/path/1.0.0/mod.js +0 -70
- package/script/deps/jsr.io/@std/path/1.0.0/posix/_util.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +0 -85
- package/script/deps/jsr.io/@std/path/1.0.0/windows/_util.js +0 -20
- package/script/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +0 -39
- package/script/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +0 -18
- package/script/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +0 -18
- package/script/dsl/ModelCreator.js +0 -2
- package/script/dsl/OperationCreator.js +0 -2
- package/script/dsl/Stringable.js +0 -2
- package/script/dsl/constants.js +0 -4
- package/script/generate/generate.js +0 -75
- package/script/generate/generateModels.js +0 -56
- package/script/generate/generateOperations.js +0 -62
- package/script/helpers/naming.js +0 -33
- package/script/helpers/refFns.js +0 -30
- package/script/helpers/strings.js +0 -11
- package/script/mod.js +0 -77
- package/script/oas/array/array-types.js +0 -20
- package/script/oas/array/toArray.js +0 -24
- package/script/oas/boolean/boolean-types.js +0 -11
- package/script/oas/boolean/toBoolean.js +0 -14
- package/script/oas/components/toComponentsV3.js +0 -48
- package/script/oas/contact/contact-types.js +0 -10
- package/script/oas/discriminator/discriminator-types.js +0 -9
- package/script/oas/discriminator/toDiscriminatorV3.js +0 -15
- package/script/oas/document/toDocumentV3.js +0 -28
- package/script/oas/example/example-types.js +0 -12
- package/script/oas/example/toExamplesV3.js +0 -51
- package/script/oas/header/toHeadersV3.js +0 -46
- package/script/oas/integer/integer-types.js +0 -21
- package/script/oas/integer/toInteger.js +0 -17
- package/script/oas/intersection/intersection-types.js +0 -15
- package/script/oas/intersection/toIntersection.js +0 -26
- package/script/oas/license/license-types.js +0 -10
- package/script/oas/markdown/markdown-types.js +0 -5
- package/script/oas/mediaType/mediaType-types.js +0 -15
- package/script/oas/mediaType/toMediaTypeItemV3.js +0 -43
- package/script/oas/null/null-types.js +0 -11
- package/script/oas/number/number-types.js +0 -17
- package/script/oas/number/toNumber.js +0 -14
- package/script/oas/object/object-types.js +0 -30
- package/script/oas/object/toAdditionalPropertiesV3.js +0 -18
- package/script/oas/object/toObject.js +0 -27
- package/script/oas/parameter/parameter-types.js +0 -41
- package/script/oas/pathItem/toPathItemV3.js +0 -19
- package/script/oas/ref/ref-types.js +0 -57
- package/script/oas/ref/toRefV31.js +0 -15
- package/script/oas/requestBody/toRequestBodiesV3.js +0 -51
- package/script/oas/response/toResponseV3.js +0 -41
- package/script/oas/schema/Schema.js +0 -2
- package/script/oas/schema/schema-types.js +0 -26
- package/script/oas/schema/toSchemasV3.js +0 -67
- package/script/oas/string/string-types.js +0 -32
- package/script/oas/string/toString.js +0 -15
- package/script/oas/tag/toTagsV3.js +0 -18
- package/script/oas/union/toUnion.js +0 -26
- package/script/oas/union/union-types.js +0 -15
- package/script/oas/unknown/toUnknown.js +0 -13
- package/script/oas/unknown/unknown-types.js +0 -11
- package/script/package.json +0 -3
- package/script/parse/parse.js +0 -20
- package/script/types/Brand.js +0 -2
- package/script/types/GeneratedValue.js +0 -2
- package/script/types/GeneratorKeys.js +0 -19
- package/script/types/Method.js +0 -34
- package/script/types/Modifiers.js +0 -2
- package/script/types/RefName.js +0 -2
- package/script/types/Settings.js +0 -45
- package/script/types/TypeSystem.js +0 -2
- package/script/types/prettierConfig.js +0 -49
- package/script/typescript/identifiers.js +0 -12
- package/script/typescript/keyValues.js +0 -15
- package/script/typescript/toOperationResponse.js +0 -21
- package/script/typescript/toParamsObject.js +0 -16
- package/script/typescript/toPathTemplate.js +0 -7
- package/script/typescript/withDescription.js +0 -7
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toExampleV3 = exports.toExamplesV3 = exports.toExampleSimpleV3 = void 0;
|
|
4
|
-
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
5
|
-
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
6
|
-
const Example_js_1 = require("./Example.js");
|
|
7
|
-
const toExampleSimpleV3 = ({ example, trail, context }) => {
|
|
8
|
-
const fields = {
|
|
9
|
-
value: example,
|
|
10
|
-
summary: undefined,
|
|
11
|
-
description: undefined
|
|
12
|
-
};
|
|
13
|
-
return new Example_js_1.OasExample({ fields, trail, skipped: {}, context });
|
|
14
|
-
};
|
|
15
|
-
exports.toExampleSimpleV3 = toExampleSimpleV3;
|
|
16
|
-
const toExamplesV3 = ({ example, examples, exampleKey, trail, context }) => {
|
|
17
|
-
if (example && examples) {
|
|
18
|
-
console.warn(JSON.stringify({
|
|
19
|
-
trail: trail.toString(),
|
|
20
|
-
message: `Both example and examples are defined for ${exampleKey}`
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
if (example) {
|
|
24
|
-
return {
|
|
25
|
-
[exampleKey]: (0, exports.toExampleSimpleV3)({ example, trail, context })
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
if (examples) {
|
|
29
|
-
return Object.fromEntries(Object.entries(examples).map(([key, value]) => {
|
|
30
|
-
return [
|
|
31
|
-
key,
|
|
32
|
-
(0, exports.toExampleV3)({ example: value, trail: trail.add(key), context })
|
|
33
|
-
];
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
return undefined;
|
|
37
|
-
};
|
|
38
|
-
exports.toExamplesV3 = toExamplesV3;
|
|
39
|
-
const toExampleV3 = ({ example, trail, context }) => {
|
|
40
|
-
if ((0, refFns_js_1.isRef)(example)) {
|
|
41
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: example, refType: 'example', trail, context });
|
|
42
|
-
}
|
|
43
|
-
const { summary, description, value, ...skipped } = example;
|
|
44
|
-
const fields = {
|
|
45
|
-
summary,
|
|
46
|
-
description,
|
|
47
|
-
value
|
|
48
|
-
};
|
|
49
|
-
return new Example_js_1.OasExample({ fields, trail, skipped, context });
|
|
50
|
-
};
|
|
51
|
-
exports.toExampleV3 = toExampleV3;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toHeadersV3 = void 0;
|
|
4
|
-
const toExamplesV3_js_1 = require("../example/toExamplesV3.js");
|
|
5
|
-
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
6
|
-
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
7
|
-
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
8
|
-
const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
9
|
-
const Header_js_1 = require("./Header.js");
|
|
10
|
-
const toHeadersV3 = ({ headers, trail, context }) => {
|
|
11
|
-
if (!headers) {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
return Object.fromEntries(Object.entries(headers).map(([key, value]) => {
|
|
15
|
-
return [
|
|
16
|
-
key,
|
|
17
|
-
toHeaderV3({ header: value, trail: trail.add(key), context })
|
|
18
|
-
];
|
|
19
|
-
}));
|
|
20
|
-
};
|
|
21
|
-
exports.toHeadersV3 = toHeadersV3;
|
|
22
|
-
const toHeaderV3 = ({ header, trail, context }) => {
|
|
23
|
-
if ((0, refFns_js_1.isRef)(header)) {
|
|
24
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: header, refType: 'header', trail, context });
|
|
25
|
-
}
|
|
26
|
-
const { description, required, deprecated, schema, example, examples, content, ...skipped } = header;
|
|
27
|
-
const fields = {
|
|
28
|
-
description,
|
|
29
|
-
required,
|
|
30
|
-
deprecated,
|
|
31
|
-
schema: (0, toSchemasV3_js_1.toOptionalSchemaV3)({ schema, trail: trail.add('schema'), context }),
|
|
32
|
-
examples: (0, toExamplesV3_js_1.toExamplesV3)({
|
|
33
|
-
examples,
|
|
34
|
-
example,
|
|
35
|
-
exampleKey: `TEMP`,
|
|
36
|
-
trail,
|
|
37
|
-
context
|
|
38
|
-
}),
|
|
39
|
-
content: (0, toMediaTypeItemV3_js_1.toOptionalMediaTypeItemsV3)({
|
|
40
|
-
content,
|
|
41
|
-
trail: trail.add('content'),
|
|
42
|
-
context
|
|
43
|
-
})
|
|
44
|
-
};
|
|
45
|
-
return new Header_js_1.OasHeader({ fields, trail, skipped, context });
|
|
46
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasIntegerData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.oasIntegerData = zod_1.z
|
|
6
|
-
.object({
|
|
7
|
-
title: zod_1.z.string().optional(),
|
|
8
|
-
description: zod_1.z.string().optional(),
|
|
9
|
-
default: zod_1.z.number().int().optional(),
|
|
10
|
-
format: zod_1.z.union([zod_1.z.literal('int32'), zod_1.z.literal('int64')]).optional(),
|
|
11
|
-
enum: zod_1.z.array(zod_1.z.number()).optional(),
|
|
12
|
-
type: zod_1.z.literal('integer'),
|
|
13
|
-
nullable: zod_1.z.boolean().optional()
|
|
14
|
-
// Add soon
|
|
15
|
-
// multipleOf: z.number().optional(),
|
|
16
|
-
// maximum: z.number().optional(),
|
|
17
|
-
// exclusiveMaximum: z.boolean().optional(),
|
|
18
|
-
// minimum: z.number().optional(),
|
|
19
|
-
// exclusiveMinimum: z.boolean().optional()
|
|
20
|
-
})
|
|
21
|
-
.passthrough();
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toInteger = void 0;
|
|
4
|
-
const Integer_js_1 = require("./Integer.js");
|
|
5
|
-
const integer_types_js_1 = require("./integer-types.js");
|
|
6
|
-
const toInteger = ({ value, trail, context }) => {
|
|
7
|
-
const { type: _type, title, description, nullable, format, enum: enums, ...skipped } = integer_types_js_1.oasIntegerData.parse(value);
|
|
8
|
-
const fields = {
|
|
9
|
-
title,
|
|
10
|
-
description,
|
|
11
|
-
nullable,
|
|
12
|
-
format,
|
|
13
|
-
enums
|
|
14
|
-
};
|
|
15
|
-
return new Integer_js_1.OasInteger({ fields, trail, skipped, context });
|
|
16
|
-
};
|
|
17
|
-
exports.toInteger = toInteger;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasIntersectionData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
6
|
-
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
7
|
-
const discriminator_types_js_1 = require("../discriminator/discriminator-types.js");
|
|
8
|
-
exports.oasIntersectionData = zod_1.z.object({
|
|
9
|
-
oasType: zod_1.z.literal('schema'),
|
|
10
|
-
type: zod_1.z.literal('intersection'),
|
|
11
|
-
title: zod_1.z.string().optional(),
|
|
12
|
-
description: zod_1.z.string().optional(),
|
|
13
|
-
members: zod_1.z.lazy(() => zod_1.z.array(zod_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]))),
|
|
14
|
-
discriminator: discriminator_types_js_1.oasDiscriminatorData.optional()
|
|
15
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toIntersection = void 0;
|
|
4
|
-
const Intersection_js_1 = require("./Intersection.js");
|
|
5
|
-
const toDiscriminatorV3_js_1 = require("../discriminator/toDiscriminatorV3.js");
|
|
6
|
-
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
7
|
-
const toIntersection = ({ value, members, trail, context }) => {
|
|
8
|
-
const { discriminator, title, description, nullable, ...skipped } = value;
|
|
9
|
-
const fields = {
|
|
10
|
-
title,
|
|
11
|
-
description,
|
|
12
|
-
nullable,
|
|
13
|
-
discriminator: (0, toDiscriminatorV3_js_1.toDiscriminatorV3)({
|
|
14
|
-
discriminator,
|
|
15
|
-
trail: trail.add('allOf').add('discriminator'),
|
|
16
|
-
context
|
|
17
|
-
}),
|
|
18
|
-
members: members.map((item, index) => (0, toSchemasV3_js_1.toSchemaV3)({
|
|
19
|
-
schema: item,
|
|
20
|
-
trail: trail.add('allOf').add(`${index}`),
|
|
21
|
-
context
|
|
22
|
-
}))
|
|
23
|
-
};
|
|
24
|
-
return new Intersection_js_1.OasIntersection({ fields, trail, skipped, context });
|
|
25
|
-
};
|
|
26
|
-
exports.toIntersection = toIntersection;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasLicenseData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.oasLicenseData = zod_1.z.object({
|
|
6
|
-
oasType: zod_1.z.literal('license'),
|
|
7
|
-
name: zod_1.z.string(),
|
|
8
|
-
url: zod_1.z.string().optional(),
|
|
9
|
-
identifier: zod_1.z.string().optional()
|
|
10
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasMediaTypeData = void 0;
|
|
4
|
-
const example_types_js_1 = require("../example/example-types.js");
|
|
5
|
-
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
6
|
-
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
7
|
-
const zod_1 = require("zod");
|
|
8
|
-
exports.oasMediaTypeData = zod_1.z.object({
|
|
9
|
-
oasType: zod_1.z.literal('mediaType'),
|
|
10
|
-
mediaType: zod_1.z.string(),
|
|
11
|
-
schema: zod_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]).optional(),
|
|
12
|
-
// example: z.any().optional(),
|
|
13
|
-
examples: zod_1.z.record(zod_1.z.union([example_types_js_1.oasExampleData, ref_types_js_1.oasExampleRefData])).optional()
|
|
14
|
-
// encoding: z.lazy(() => z.record(encoding).optional())
|
|
15
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toOptionalMediaTypeItemsV3 = exports.toMediaTypeItemsV3 = exports.toMediaTypeItemV3 = void 0;
|
|
4
|
-
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
5
|
-
const toExamplesV3_js_1 = require("../example/toExamplesV3.js");
|
|
6
|
-
const MediaType_js_1 = require("./MediaType.js");
|
|
7
|
-
const toMediaTypeItemV3 = ({ mediaTypeItem, mediaType, trail, context }) => {
|
|
8
|
-
const { schema, example, examples, ...skipped } = mediaTypeItem;
|
|
9
|
-
const fields = {
|
|
10
|
-
mediaType,
|
|
11
|
-
schema: (0, toSchemasV3_js_1.toOptionalSchemaV3)({ schema, trail: trail.add('schema'), context }),
|
|
12
|
-
examples: (0, toExamplesV3_js_1.toExamplesV3)({
|
|
13
|
-
example,
|
|
14
|
-
examples,
|
|
15
|
-
exampleKey: mediaType,
|
|
16
|
-
trail: trail.add('examples'),
|
|
17
|
-
context
|
|
18
|
-
})
|
|
19
|
-
};
|
|
20
|
-
return new MediaType_js_1.OasMediaType({ fields, trail, skipped, context });
|
|
21
|
-
};
|
|
22
|
-
exports.toMediaTypeItemV3 = toMediaTypeItemV3;
|
|
23
|
-
const toMediaTypeItemsV3 = ({ content, trail, context }) => {
|
|
24
|
-
return Object.fromEntries(Object.entries(content).map(([mediaType, value]) => {
|
|
25
|
-
return [
|
|
26
|
-
mediaType,
|
|
27
|
-
(0, exports.toMediaTypeItemV3)({
|
|
28
|
-
mediaTypeItem: value,
|
|
29
|
-
mediaType,
|
|
30
|
-
trail: trail.add(mediaType),
|
|
31
|
-
context
|
|
32
|
-
})
|
|
33
|
-
];
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
exports.toMediaTypeItemsV3 = toMediaTypeItemsV3;
|
|
37
|
-
const toOptionalMediaTypeItemsV3 = ({ content, trail, context }) => {
|
|
38
|
-
if (!content) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
return (0, exports.toMediaTypeItemsV3)({ content, trail, context });
|
|
42
|
-
};
|
|
43
|
-
exports.toOptionalMediaTypeItemsV3 = toOptionalMediaTypeItemsV3;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasNullData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.oasNullData = zod_1.z.object({
|
|
6
|
-
oasType: zod_1.z.literal('schema'),
|
|
7
|
-
title: zod_1.z.string().optional(),
|
|
8
|
-
description: zod_1.z.string().optional(),
|
|
9
|
-
default: zod_1.z.null().optional(),
|
|
10
|
-
type: zod_1.z.literal('null')
|
|
11
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasNumberData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.oasNumberData = zod_1.z.object({
|
|
6
|
-
oasType: zod_1.z.literal('schema'),
|
|
7
|
-
title: zod_1.z.string().optional(),
|
|
8
|
-
description: zod_1.z.string().optional(),
|
|
9
|
-
default: zod_1.z.number().optional(),
|
|
10
|
-
type: zod_1.z.literal('number')
|
|
11
|
-
// Add soon
|
|
12
|
-
// multipleOf: z.number().optional(),
|
|
13
|
-
// maximum: z.number().optional(),
|
|
14
|
-
// exclusiveMaximum: z.boolean().optional(),
|
|
15
|
-
// minimum: z.number().optional(),
|
|
16
|
-
// exclusiveMinimum: z.boolean().optional()
|
|
17
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toNumber = void 0;
|
|
4
|
-
const Number_js_1 = require("./Number.js");
|
|
5
|
-
const toNumber = ({ value, trail, context }) => {
|
|
6
|
-
const { type: _type, title, description, nullable, ...skipped } = value;
|
|
7
|
-
const fields = {
|
|
8
|
-
title,
|
|
9
|
-
description,
|
|
10
|
-
nullable
|
|
11
|
-
};
|
|
12
|
-
return new Number_js_1.OasNumber({ fields, trail, skipped, context });
|
|
13
|
-
};
|
|
14
|
-
exports.toNumber = toNumber;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasObjectData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
6
|
-
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
7
|
-
exports.oasObjectData = zod_1.z.object({
|
|
8
|
-
oasType: zod_1.z.literal('schema'),
|
|
9
|
-
type: zod_1.z.literal('object'),
|
|
10
|
-
title: zod_1.z.string().optional(),
|
|
11
|
-
description: zod_1.z.string().optional(),
|
|
12
|
-
default: zod_1.z.object({}).optional(),
|
|
13
|
-
// Add soon
|
|
14
|
-
// maxProperties: z.number().optional(),
|
|
15
|
-
// Add soon
|
|
16
|
-
// minProperties: z.number().optional(),
|
|
17
|
-
properties: zod_1.z.lazy(() => {
|
|
18
|
-
return zod_1.z.record(zod_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData])).optional();
|
|
19
|
-
}),
|
|
20
|
-
// Add soon
|
|
21
|
-
// patternProperties: z.lazy(() => z.record(jsonSchema4).optional()),
|
|
22
|
-
required: zod_1.z.array(zod_1.z.string()).optional(),
|
|
23
|
-
// allOf: z.lazy(() => z.array(oasObject).optional()),
|
|
24
|
-
// Use oneOf instead of anyOf
|
|
25
|
-
// anyOf: z.lazy(() => z.array(jsonSchema4).optional()),
|
|
26
|
-
// oneOf: z.lazy(() => z.array(oasObject).optional()),
|
|
27
|
-
additionalProperties: zod_1.z.lazy(() => {
|
|
28
|
-
return zod_1.z.union([zod_1.z.boolean(), schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]).optional();
|
|
29
|
-
})
|
|
30
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toAdditionalPropertiesV3 = void 0;
|
|
4
|
-
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
5
|
-
const toAdditionalPropertiesV3 = ({ additionalProperties, trail, context }) => {
|
|
6
|
-
if (typeof additionalProperties === 'boolean') {
|
|
7
|
-
return additionalProperties;
|
|
8
|
-
}
|
|
9
|
-
if (additionalProperties === undefined) {
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
return (0, toSchemasV3_js_1.toSchemaV3)({
|
|
13
|
-
schema: additionalProperties,
|
|
14
|
-
trail,
|
|
15
|
-
context
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.toAdditionalPropertiesV3 = toAdditionalPropertiesV3;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toObject = void 0;
|
|
4
|
-
const Object_js_1 = require("./Object.js");
|
|
5
|
-
const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
|
|
6
|
-
const toAdditionalPropertiesV3_js_1 = require("./toAdditionalPropertiesV3.js");
|
|
7
|
-
const toObject = ({ value, trail, context }) => {
|
|
8
|
-
const { type: _type, title, description, properties, required, additionalProperties, nullable, ...skipped } = value;
|
|
9
|
-
const fields = {
|
|
10
|
-
title,
|
|
11
|
-
description,
|
|
12
|
-
nullable,
|
|
13
|
-
properties: (0, toSchemasV3_js_1.toOptionalSchemasV3)({
|
|
14
|
-
schemas: properties,
|
|
15
|
-
trail: trail.add('properties'),
|
|
16
|
-
context
|
|
17
|
-
}),
|
|
18
|
-
required,
|
|
19
|
-
additionalProperties: (0, toAdditionalPropertiesV3_js_1.toAdditionalPropertiesV3)({
|
|
20
|
-
additionalProperties,
|
|
21
|
-
trail: trail.add('additionalProperties'),
|
|
22
|
-
context
|
|
23
|
-
})
|
|
24
|
-
};
|
|
25
|
-
return new Object_js_1.OasObject({ fields, trail, skipped, context });
|
|
26
|
-
};
|
|
27
|
-
exports.toObject = toObject;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasParameterData = exports.oasParameterStyle = exports.oasParameterLocation = void 0;
|
|
4
|
-
const example_types_js_1 = require("../example/example-types.js");
|
|
5
|
-
const markdown_types_js_1 = require("../markdown/markdown-types.js");
|
|
6
|
-
const mediaType_types_js_1 = require("../mediaType/mediaType-types.js");
|
|
7
|
-
const ref_types_js_1 = require("../ref/ref-types.js");
|
|
8
|
-
const schema_types_js_1 = require("../schema/schema-types.js");
|
|
9
|
-
const zod_1 = require("zod");
|
|
10
|
-
exports.oasParameterLocation = zod_1.z.enum([
|
|
11
|
-
'query',
|
|
12
|
-
'header',
|
|
13
|
-
'path',
|
|
14
|
-
'cookie'
|
|
15
|
-
]);
|
|
16
|
-
exports.oasParameterStyle = zod_1.z.enum([
|
|
17
|
-
'matrix',
|
|
18
|
-
'label',
|
|
19
|
-
'form',
|
|
20
|
-
'simple',
|
|
21
|
-
'spaceDelimited',
|
|
22
|
-
'pipeDelimited',
|
|
23
|
-
'deepObject'
|
|
24
|
-
]);
|
|
25
|
-
exports.oasParameterData = zod_1.z.object({
|
|
26
|
-
oasType: zod_1.z.literal('parameter'),
|
|
27
|
-
// Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.
|
|
28
|
-
// example: z.any().optional(),
|
|
29
|
-
allowReserved: zod_1.z.boolean().optional(),
|
|
30
|
-
allowEmptyValue: zod_1.z.boolean().optional(),
|
|
31
|
-
content: zod_1.z.record(mediaType_types_js_1.oasMediaTypeData).optional(),
|
|
32
|
-
deprecated: zod_1.z.boolean().optional(),
|
|
33
|
-
description: markdown_types_js_1.markdown.optional(),
|
|
34
|
-
examples: zod_1.z.record(zod_1.z.union([example_types_js_1.oasExampleData, ref_types_js_1.oasExampleRefData])).optional(),
|
|
35
|
-
explode: zod_1.z.boolean(),
|
|
36
|
-
location: exports.oasParameterLocation,
|
|
37
|
-
name: zod_1.z.string(),
|
|
38
|
-
required: zod_1.z.boolean().optional(),
|
|
39
|
-
schema: zod_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]).optional(),
|
|
40
|
-
style: exports.oasParameterStyle
|
|
41
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toPathItemV3 = void 0;
|
|
4
|
-
const toParameterV3_js_1 = require("../parameter/toParameterV3.js");
|
|
5
|
-
const PathItem_js_1 = require("./PathItem.js");
|
|
6
|
-
const toPathItemV3 = ({ pathItem, trail, context }) => {
|
|
7
|
-
const { summary, description, parameters, ...skipped } = pathItem;
|
|
8
|
-
const fields = {
|
|
9
|
-
summary,
|
|
10
|
-
description,
|
|
11
|
-
parameters: (0, toParameterV3_js_1.toParameterListV3)({
|
|
12
|
-
parameters,
|
|
13
|
-
trail: trail.add('parameters'),
|
|
14
|
-
context
|
|
15
|
-
})
|
|
16
|
-
};
|
|
17
|
-
return new PathItem_js_1.OasPathItem({ fields, trail, context, skipped });
|
|
18
|
-
};
|
|
19
|
-
exports.toPathItemV3 = toPathItemV3;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasRefData = exports.oasHeaderRefData = exports.oasRequestBodyRefData = exports.oasExampleRefData = exports.oasParameterRefData = exports.oasResponseRefData = exports.oasSchemaRefData = void 0;
|
|
4
|
-
const markdown_types_js_1 = require("../markdown/markdown-types.js");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
exports.oasSchemaRefData = zod_1.z.object({
|
|
7
|
-
oasType: zod_1.z.literal('ref'),
|
|
8
|
-
refType: zod_1.z.enum(['schema']),
|
|
9
|
-
$ref: zod_1.z.string(),
|
|
10
|
-
summary: zod_1.z.string().optional(),
|
|
11
|
-
description: markdown_types_js_1.markdown.optional()
|
|
12
|
-
});
|
|
13
|
-
exports.oasResponseRefData = zod_1.z.object({
|
|
14
|
-
oasType: zod_1.z.literal('ref'),
|
|
15
|
-
refType: zod_1.z.enum(['response']),
|
|
16
|
-
$ref: zod_1.z.string(),
|
|
17
|
-
summary: zod_1.z.string().optional(),
|
|
18
|
-
description: markdown_types_js_1.markdown.optional()
|
|
19
|
-
});
|
|
20
|
-
exports.oasParameterRefData = zod_1.z.object({
|
|
21
|
-
oasType: zod_1.z.literal('ref'),
|
|
22
|
-
refType: zod_1.z.enum(['parameter']),
|
|
23
|
-
$ref: zod_1.z.string(),
|
|
24
|
-
summary: zod_1.z.string().optional(),
|
|
25
|
-
description: markdown_types_js_1.markdown.optional()
|
|
26
|
-
});
|
|
27
|
-
exports.oasExampleRefData = zod_1.z.object({
|
|
28
|
-
oasType: zod_1.z.literal('ref'),
|
|
29
|
-
refType: zod_1.z.enum(['example']),
|
|
30
|
-
$ref: zod_1.z.string(),
|
|
31
|
-
summary: zod_1.z.string().optional(),
|
|
32
|
-
description: markdown_types_js_1.markdown.optional()
|
|
33
|
-
});
|
|
34
|
-
exports.oasRequestBodyRefData = zod_1.z.object({
|
|
35
|
-
oasType: zod_1.z.literal('ref'),
|
|
36
|
-
refType: zod_1.z.enum(['requestBody']),
|
|
37
|
-
$ref: zod_1.z.string(),
|
|
38
|
-
summary: zod_1.z.string().optional(),
|
|
39
|
-
description: markdown_types_js_1.markdown.optional()
|
|
40
|
-
});
|
|
41
|
-
exports.oasHeaderRefData = zod_1.z.object({
|
|
42
|
-
oasType: zod_1.z.literal('ref'),
|
|
43
|
-
refType: zod_1.z.enum(['header']),
|
|
44
|
-
$ref: zod_1.z.string(),
|
|
45
|
-
summary: zod_1.z.string().optional(),
|
|
46
|
-
description: markdown_types_js_1.markdown.optional()
|
|
47
|
-
});
|
|
48
|
-
// OasPathItemRefData
|
|
49
|
-
exports.oasRefData = zod_1.z.union([
|
|
50
|
-
exports.oasSchemaRefData,
|
|
51
|
-
exports.oasResponseRefData,
|
|
52
|
-
exports.oasParameterRefData,
|
|
53
|
-
exports.oasExampleRefData,
|
|
54
|
-
exports.oasRequestBodyRefData,
|
|
55
|
-
exports.oasHeaderRefData
|
|
56
|
-
// oasPathItemRefData
|
|
57
|
-
]);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toRefV31 = void 0;
|
|
4
|
-
const Ref_js_1 = require("./Ref.js");
|
|
5
|
-
const toRefV31 = ({ ref, refType, trail, context }) => {
|
|
6
|
-
const { $ref, summary, description, ...skipped } = ref;
|
|
7
|
-
const fields = {
|
|
8
|
-
refType,
|
|
9
|
-
$ref,
|
|
10
|
-
summary,
|
|
11
|
-
description
|
|
12
|
-
};
|
|
13
|
-
return new Ref_js_1.OasRef({ fields, trail, context, skipped });
|
|
14
|
-
};
|
|
15
|
-
exports.toRefV31 = toRefV31;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toRequestBodiesV3 = exports.toRequestBodyV3 = void 0;
|
|
4
|
-
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
5
|
-
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
6
|
-
const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
7
|
-
const RequestBody_js_1 = require("./RequestBody.js");
|
|
8
|
-
const toRequestBodyV3 = ({ requestBody, trail, context }) => {
|
|
9
|
-
if (!requestBody) {
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
if ((0, refFns_js_1.isRef)(requestBody)) {
|
|
13
|
-
return (0, toRefV31_js_1.toRefV31)({
|
|
14
|
-
ref: requestBody,
|
|
15
|
-
refType: 'requestBody',
|
|
16
|
-
trail,
|
|
17
|
-
context
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
const { description, content, required, ...skipped } = requestBody;
|
|
21
|
-
const fields = {
|
|
22
|
-
description,
|
|
23
|
-
content: (0, toMediaTypeItemV3_js_1.toMediaTypeItemsV3)({
|
|
24
|
-
content,
|
|
25
|
-
trail: trail.add('content'),
|
|
26
|
-
context
|
|
27
|
-
}),
|
|
28
|
-
required
|
|
29
|
-
};
|
|
30
|
-
return new RequestBody_js_1.OasRequestBody({ fields, trail, skipped, context });
|
|
31
|
-
};
|
|
32
|
-
exports.toRequestBodyV3 = toRequestBodyV3;
|
|
33
|
-
const toRequestBodiesV3 = ({ requestBodies, trail, context }) => {
|
|
34
|
-
if (!requestBodies) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
const entries = Object.entries(requestBodies)
|
|
38
|
-
.map(([key, value]) => {
|
|
39
|
-
return [
|
|
40
|
-
key,
|
|
41
|
-
(0, exports.toRequestBodyV3)({
|
|
42
|
-
requestBody: value,
|
|
43
|
-
trail: trail.add(key),
|
|
44
|
-
context
|
|
45
|
-
})
|
|
46
|
-
];
|
|
47
|
-
})
|
|
48
|
-
.filter(([, value]) => Boolean(value));
|
|
49
|
-
return Object.fromEntries(entries);
|
|
50
|
-
};
|
|
51
|
-
exports.toRequestBodiesV3 = toRequestBodiesV3;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toResponseV3 = exports.toOptionalResponsesV3 = exports.toResponsesV3 = void 0;
|
|
4
|
-
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
5
|
-
const toHeadersV3_js_1 = require("../header/toHeadersV3.js");
|
|
6
|
-
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
7
|
-
const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
8
|
-
const Response_js_1 = require("./Response.js");
|
|
9
|
-
const toResponsesV3 = ({ responses, trail, context }) => {
|
|
10
|
-
return Object.fromEntries(Object.entries(responses).map(([key, value]) => {
|
|
11
|
-
return [
|
|
12
|
-
key,
|
|
13
|
-
(0, exports.toResponseV3)({ response: value, trail: trail.add(key), context })
|
|
14
|
-
];
|
|
15
|
-
}));
|
|
16
|
-
};
|
|
17
|
-
exports.toResponsesV3 = toResponsesV3;
|
|
18
|
-
const toOptionalResponsesV3 = ({ responses, trail, context }) => {
|
|
19
|
-
if (!responses) {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
return (0, exports.toResponsesV3)({ responses, trail, context });
|
|
23
|
-
};
|
|
24
|
-
exports.toOptionalResponsesV3 = toOptionalResponsesV3;
|
|
25
|
-
const toResponseV3 = ({ response, trail, context }) => {
|
|
26
|
-
if ((0, refFns_js_1.isRef)(response)) {
|
|
27
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: response, refType: 'response', trail, context });
|
|
28
|
-
}
|
|
29
|
-
const { description, headers, content, ...skipped } = response;
|
|
30
|
-
const fields = {
|
|
31
|
-
description,
|
|
32
|
-
headers: (0, toHeadersV3_js_1.toHeadersV3)({ headers, trail: trail.add('headers'), context }),
|
|
33
|
-
content: (0, toMediaTypeItemV3_js_1.toOptionalMediaTypeItemsV3)({
|
|
34
|
-
content,
|
|
35
|
-
trail: trail.add('content'),
|
|
36
|
-
context
|
|
37
|
-
})
|
|
38
|
-
};
|
|
39
|
-
return new Response_js_1.OasResponse({ fields, trail, skipped, context });
|
|
40
|
-
};
|
|
41
|
-
exports.toResponseV3 = toResponseV3;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.oasSchemaData = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const array_types_js_1 = require("../array/array-types.js");
|
|
6
|
-
const boolean_types_js_1 = require("../boolean/boolean-types.js");
|
|
7
|
-
const null_types_js_1 = require("../null/null-types.js");
|
|
8
|
-
const unknown_types_js_1 = require("../unknown/unknown-types.js");
|
|
9
|
-
const union_types_js_1 = require("../union/union-types.js");
|
|
10
|
-
const integer_types_js_1 = require("../integer/integer-types.js");
|
|
11
|
-
const number_types_js_1 = require("../number/number-types.js");
|
|
12
|
-
const intersection_types_js_1 = require("../intersection/intersection-types.js");
|
|
13
|
-
const string_types_js_1 = require("../string/string-types.js");
|
|
14
|
-
const object_types_js_1 = require("../object/object-types.js");
|
|
15
|
-
exports.oasSchemaData = zod_1.z.union([
|
|
16
|
-
object_types_js_1.oasObjectData,
|
|
17
|
-
array_types_js_1.oasArrayData,
|
|
18
|
-
boolean_types_js_1.oasBooleanData,
|
|
19
|
-
string_types_js_1.oasStringData,
|
|
20
|
-
number_types_js_1.oasNumberData,
|
|
21
|
-
null_types_js_1.oasNullData,
|
|
22
|
-
integer_types_js_1.oasIntegerData,
|
|
23
|
-
union_types_js_1.oasUnionData,
|
|
24
|
-
intersection_types_js_1.oasIntersectionData,
|
|
25
|
-
unknown_types_js_1.oasUnknownData
|
|
26
|
-
]);
|