typia 9.7.1 → 9.7.2
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/lib/AssertionGuard.d.mts +27 -25
- package/lib/AssertionGuard.d.ts +27 -25
- package/lib/CamelCase.d.mts +1 -1
- package/lib/CamelCase.d.ts +1 -1
- package/lib/IRandomGenerator.d.mts +44 -42
- package/lib/IRandomGenerator.d.ts +44 -42
- package/lib/IReadableURLSearchParams.d.mts +2 -2
- package/lib/IReadableURLSearchParams.d.ts +2 -2
- package/lib/PascalCase.d.mts +1 -1
- package/lib/PascalCase.d.ts +1 -1
- package/lib/Primitive.d.mts +20 -22
- package/lib/Primitive.d.ts +20 -22
- package/lib/Resolved.d.mts +16 -18
- package/lib/Resolved.d.ts +16 -18
- package/lib/SnakeCase.d.mts +3 -2
- package/lib/SnakeCase.d.ts +3 -2
- package/lib/TypeGuardError.d.mts +88 -61
- package/lib/TypeGuardError.d.ts +88 -61
- package/lib/TypeGuardError.js +40 -29
- package/lib/TypeGuardError.js.map +1 -1
- package/lib/TypeGuardError.mjs +70 -48
- package/lib/factories/MetadataCollection.js +4 -12
- package/lib/factories/MetadataCollection.js.map +1 -1
- package/lib/factories/MetadataCollection.mjs +4 -12
- package/lib/factories/MetadataCommentTagFactory.js +5 -15
- package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
- package/lib/factories/MetadataCommentTagFactory.mjs +5 -15
- package/lib/factories/MetadataFactory.js +1 -3
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.mjs +1 -3
- package/lib/factories/ProtobufFactory.js +1 -3
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/ProtobufFactory.mjs +1 -3
- package/lib/functional.d.mts +196 -195
- package/lib/functional.d.ts +196 -195
- package/lib/functional.js +18 -54
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs +18 -54
- package/lib/http.d.mts +303 -319
- package/lib/http.d.ts +303 -319
- package/lib/http.js +26 -78
- package/lib/http.js.map +1 -1
- package/lib/http.mjs +26 -78
- package/lib/internal/_ProtobufReader.d.mts +3 -9
- package/lib/internal/_ProtobufReader.d.ts +3 -9
- package/lib/internal/_ProtobufReader.js.map +1 -1
- package/lib/internal/_ProtobufReader.mjs +3 -9
- package/lib/internal/_ProtobufSizer.d.mts +4 -12
- package/lib/internal/_ProtobufSizer.d.ts +4 -12
- package/lib/internal/_ProtobufSizer.js.map +1 -1
- package/lib/internal/_ProtobufSizer.mjs +4 -12
- package/lib/internal/_ProtobufWriter.d.mts +5 -15
- package/lib/internal/_ProtobufWriter.d.ts +5 -15
- package/lib/internal/_ProtobufWriter.js.map +1 -1
- package/lib/internal/_ProtobufWriter.mjs +5 -15
- package/lib/internal/_jsonStringifyString.d.mts +4 -4
- package/lib/internal/_jsonStringifyString.d.ts +4 -4
- package/lib/internal/_jsonStringifyString.js +4 -4
- package/lib/internal/_jsonStringifyString.mjs +4 -4
- package/lib/json.d.mts +174 -195
- package/lib/json.d.ts +174 -195
- package/lib/json.js +16 -48
- package/lib/json.js.map +1 -1
- package/lib/json.mjs +16 -48
- package/lib/llm.d.mts +275 -192
- package/lib/llm.d.ts +275 -192
- package/lib/llm.js +4 -12
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs +4 -12
- package/lib/misc.d.mts +149 -172
- package/lib/misc.d.ts +149 -172
- package/lib/misc.js +17 -51
- package/lib/misc.js.map +1 -1
- package/lib/misc.mjs +17 -51
- package/lib/module.d.mts +263 -275
- package/lib/module.d.ts +263 -275
- package/lib/module.js +18 -54
- package/lib/module.js.map +1 -1
- package/lib/module.mjs +18 -54
- package/lib/notations.d.mts +153 -174
- package/lib/notations.d.ts +153 -174
- package/lib/notations.js +24 -72
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs +24 -72
- package/lib/programmers/FeatureProgrammer.d.mts +19 -41
- package/lib/programmers/FeatureProgrammer.d.ts +19 -41
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.js +3 -9
- package/lib/programmers/ImportProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.mjs +3 -9
- package/lib/programmers/RandomProgrammer.js +6 -0
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.mjs +6 -0
- package/lib/programmers/helpers/ProtobufWire.d.mts +13 -13
- package/lib/programmers/helpers/ProtobufWire.d.ts +13 -13
- package/lib/programmers/internal/check_array_length.js +2 -6
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_array_length.mjs +2 -6
- package/lib/programmers/internal/check_bigint.js +2 -6
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_bigint.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_key.js +2 -6
- package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_key.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_properties.js +3 -9
- package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_properties.mjs +3 -9
- package/lib/programmers/internal/check_everything.js +1 -3
- package/lib/programmers/internal/check_everything.js.map +1 -1
- package/lib/programmers/internal/check_everything.mjs +1 -3
- package/lib/programmers/internal/check_native.js +2 -6
- package/lib/programmers/internal/check_native.js.map +1 -1
- package/lib/programmers/internal/check_native.mjs +2 -6
- package/lib/programmers/internal/check_number.js +2 -6
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_number.mjs +2 -6
- package/lib/programmers/internal/check_object.js +2 -6
- package/lib/programmers/internal/check_object.js.map +1 -1
- package/lib/programmers/internal/check_object.mjs +2 -6
- package/lib/programmers/internal/check_string.js +2 -6
- package/lib/programmers/internal/check_string.js.map +1 -1
- package/lib/programmers/internal/check_string.mjs +2 -6
- package/lib/programmers/internal/check_template.js +1 -3
- package/lib/programmers/internal/check_template.js.map +1 -1
- package/lib/programmers/internal/check_template.mjs +1 -3
- package/lib/programmers/internal/check_union_array_like.js +1 -3
- package/lib/programmers/internal/check_union_array_like.js.map +1 -1
- package/lib/programmers/internal/check_union_array_like.mjs +1 -3
- package/lib/programmers/internal/decode_union_object.js +2 -6
- package/lib/programmers/internal/decode_union_object.js.map +1 -1
- package/lib/programmers/internal/decode_union_object.mjs +2 -6
- package/lib/programmers/internal/feature_object_entries.js +1 -3
- package/lib/programmers/internal/feature_object_entries.js.map +1 -1
- package/lib/programmers/internal/feature_object_entries.mjs +1 -3
- package/lib/programmers/internal/json_schema_escaped.js +2 -6
- package/lib/programmers/internal/json_schema_escaped.js.map +1 -1
- package/lib/programmers/internal/json_schema_escaped.mjs +2 -6
- package/lib/programmers/internal/json_schema_object.js +3 -9
- package/lib/programmers/internal/json_schema_object.js.map +1 -1
- package/lib/programmers/internal/json_schema_object.mjs +3 -9
- package/lib/programmers/internal/metadata_to_pattern.js +1 -3
- package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
- package/lib/programmers/internal/metadata_to_pattern.mjs +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js.map +1 -1
- package/lib/programmers/internal/postfix_of_tuple.mjs +1 -3
- package/lib/programmers/internal/prune_object_properties.js +1 -3
- package/lib/programmers/internal/prune_object_properties.js.map +1 -1
- package/lib/programmers/internal/prune_object_properties.mjs +1 -3
- package/lib/programmers/internal/stringify_dynamic_properties.js +2 -6
- package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_dynamic_properties.mjs +2 -6
- package/lib/programmers/internal/stringify_native.js +1 -3
- package/lib/programmers/internal/stringify_native.js.map +1 -1
- package/lib/programmers/internal/stringify_native.mjs +1 -3
- package/lib/programmers/internal/stringify_regular_properties.js +2 -6
- package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_regular_properties.mjs +2 -6
- package/lib/programmers/internal/template_to_pattern.js +1 -3
- package/lib/programmers/internal/template_to_pattern.js.map +1 -1
- package/lib/programmers/internal/template_to_pattern.mjs +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js.map +1 -1
- package/lib/programmers/internal/wrap_metadata_rest_tuple.mjs +1 -3
- package/lib/programmers/json/JsonStringifyProgrammer.js +2 -2
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonStringifyProgrammer.mjs +2 -2
- package/lib/protobuf.d.mts +290 -297
- package/lib/protobuf.d.ts +290 -297
- package/lib/protobuf.js +17 -51
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs +17 -51
- package/lib/reflect.d.mts +2 -4
- package/lib/reflect.d.ts +2 -4
- package/lib/reflect.js +1 -3
- package/lib/reflect.js.map +1 -1
- package/lib/reflect.mjs +1 -3
- package/lib/schemas/json/IJsonApplication.d.mts +4 -4
- package/lib/schemas/json/IJsonApplication.d.ts +4 -4
- package/lib/schemas/json/IJsonSchemaCollection.d.mts +73 -56
- package/lib/schemas/json/IJsonSchemaCollection.d.ts +73 -56
- package/lib/schemas/json/IJsonSchemaUnit.d.mts +83 -70
- package/lib/schemas/json/IJsonSchemaUnit.d.ts +83 -70
- package/lib/schemas/metadata/Metadata.d.mts +1 -3
- package/lib/schemas/metadata/Metadata.d.ts +1 -3
- package/lib/schemas/metadata/Metadata.js +9 -27
- package/lib/schemas/metadata/Metadata.js.map +1 -1
- package/lib/schemas/metadata/Metadata.mjs +9 -27
- package/lib/schemas/metadata/MetadataAliasType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.js +3 -9
- package/lib/schemas/metadata/MetadataAliasType.js.map +1 -1
- package/lib/schemas/metadata/MetadataAliasType.mjs +3 -9
- package/lib/schemas/metadata/MetadataApplication.d.mts +1 -3
- package/lib/schemas/metadata/MetadataApplication.d.ts +1 -3
- package/lib/schemas/metadata/MetadataApplication.js +2 -6
- package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
- package/lib/schemas/metadata/MetadataApplication.mjs +2 -6
- package/lib/schemas/metadata/MetadataArray.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArray.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArray.js +1 -3
- package/lib/schemas/metadata/MetadataArray.js.map +1 -1
- package/lib/schemas/metadata/MetadataArray.mjs +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.js +3 -9
- package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
- package/lib/schemas/metadata/MetadataArrayType.mjs +3 -9
- package/lib/schemas/metadata/MetadataAtomic.js +1 -3
- package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
- package/lib/schemas/metadata/MetadataAtomic.mjs +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.mts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.ts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.js +3 -9
- package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
- package/lib/schemas/metadata/MetadataEscaped.mjs +3 -9
- package/lib/schemas/metadata/MetadataFunction.d.mts +1 -3
- package/lib/schemas/metadata/MetadataFunction.d.ts +1 -3
- package/lib/schemas/metadata/MetadataFunction.js +2 -6
- package/lib/schemas/metadata/MetadataFunction.js.map +1 -1
- package/lib/schemas/metadata/MetadataFunction.mjs +2 -6
- package/lib/schemas/metadata/MetadataObject.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObject.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObject.js +1 -3
- package/lib/schemas/metadata/MetadataObject.js.map +1 -1
- package/lib/schemas/metadata/MetadataObject.mjs +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.js +5 -15
- package/lib/schemas/metadata/MetadataObjectType.js.map +1 -1
- package/lib/schemas/metadata/MetadataObjectType.mjs +6 -18
- package/lib/schemas/metadata/MetadataParameter.js +1 -3
- package/lib/schemas/metadata/MetadataParameter.js.map +1 -1
- package/lib/schemas/metadata/MetadataParameter.mjs +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.mts +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.ts +1 -3
- package/lib/schemas/metadata/MetadataProperty.js +3 -9
- package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
- package/lib/schemas/metadata/MetadataProperty.mjs +3 -9
- package/lib/schemas/metadata/MetadataTemplate.js +1 -3
- package/lib/schemas/metadata/MetadataTemplate.js.map +1 -1
- package/lib/schemas/metadata/MetadataTemplate.mjs +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.mts +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.ts +1 -3
- package/lib/schemas/metadata/MetadataTuple.js +2 -6
- package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
- package/lib/schemas/metadata/MetadataTuple.mjs +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
- package/lib/schemas/metadata/MetadataTupleType.mjs +3 -9
- package/lib/tags/Constant.d.mts +16 -16
- package/lib/tags/Constant.d.ts +16 -16
- package/lib/tags/ContentMediaType.d.mts +7 -7
- package/lib/tags/ContentMediaType.d.ts +7 -7
- package/lib/tags/Default.d.mts +19 -19
- package/lib/tags/Default.d.ts +19 -19
- package/lib/tags/Example.d.mts +18 -18
- package/lib/tags/Example.d.ts +18 -18
- package/lib/tags/Examples.d.mts +23 -23
- package/lib/tags/Examples.d.ts +23 -23
- package/lib/tags/ExclusiveMaximum.d.mts +8 -5
- package/lib/tags/ExclusiveMaximum.d.ts +8 -5
- package/lib/tags/ExclusiveMinimum.d.mts +8 -5
- package/lib/tags/ExclusiveMinimum.d.ts +8 -5
- package/lib/tags/Format.d.mts +12 -8
- package/lib/tags/Format.d.ts +12 -8
- package/lib/tags/JsonSchemaPlugin.d.mts +20 -18
- package/lib/tags/JsonSchemaPlugin.d.ts +20 -18
- package/lib/tags/MaxItems.d.mts +9 -9
- package/lib/tags/MaxItems.d.ts +9 -9
- package/lib/tags/MaxLength.d.mts +6 -5
- package/lib/tags/MaxLength.d.ts +6 -5
- package/lib/tags/Maximum.d.mts +9 -7
- package/lib/tags/Maximum.d.ts +9 -7
- package/lib/tags/MinItems.d.mts +9 -9
- package/lib/tags/MinItems.d.ts +9 -9
- package/lib/tags/MinLength.d.mts +6 -5
- package/lib/tags/MinLength.d.ts +6 -5
- package/lib/tags/Minimum.d.mts +9 -7
- package/lib/tags/Minimum.d.ts +9 -7
- package/lib/tags/MultipleOf.d.mts +10 -7
- package/lib/tags/MultipleOf.d.ts +10 -7
- package/lib/tags/Pattern.d.mts +7 -4
- package/lib/tags/Pattern.d.ts +7 -4
- package/lib/tags/Sequence.d.mts +19 -17
- package/lib/tags/Sequence.d.ts +19 -17
- package/lib/tags/TagBase.d.mts +21 -28
- package/lib/tags/TagBase.d.ts +21 -28
- package/lib/tags/Type.d.mts +12 -11
- package/lib/tags/Type.d.ts +12 -11
- package/lib/tags/UniqueItems.d.mts +10 -9
- package/lib/tags/UniqueItems.d.ts +10 -9
- package/lib/tags/internal/FormatCheatSheet.d.mts +1 -3
- package/lib/tags/internal/FormatCheatSheet.d.ts +1 -3
- package/lib/tags/internal/FormatCheatSheet.js +1 -3
- package/lib/tags/internal/FormatCheatSheet.js.map +1 -1
- package/lib/tags/internal/FormatCheatSheet.mjs +1 -3
- package/lib/transformers/ITransformOptions.d.mts +27 -19
- package/lib/transformers/ITransformOptions.d.ts +27 -19
- package/lib/transformers/ImportTransformer.js +5 -10
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/ImportTransformer.mjs +5 -10
- package/lib/transformers/NoTransformConfigurationError.js +1 -3
- package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
- package/lib/transformers/NoTransformConfigurationError.mjs +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +1 -3
- package/lib/typings/Equal.d.mts +6 -6
- package/lib/typings/Equal.d.ts +6 -6
- package/package.json +2 -1
- package/src/AssertionGuard.ts +27 -25
- package/src/CamelCase.ts +1 -1
- package/src/IRandomGenerator.ts +44 -42
- package/src/IReadableURLSearchParams.ts +2 -2
- package/src/PascalCase.ts +1 -1
- package/src/Primitive.ts +20 -22
- package/src/Resolved.ts +16 -18
- package/src/SnakeCase.ts +3 -2
- package/src/TypeGuardError.ts +101 -64
- package/src/factories/MetadataCollection.ts +4 -12
- package/src/factories/MetadataCommentTagFactory.ts +8 -24
- package/src/factories/MetadataFactory.ts +1 -3
- package/src/factories/ProtobufFactory.ts +1 -3
- package/src/functional.ts +214 -249
- package/src/http.ts +329 -397
- package/src/internal/_ProtobufReader.ts +3 -9
- package/src/internal/_ProtobufSizer.ts +4 -12
- package/src/internal/_ProtobufWriter.ts +5 -15
- package/src/internal/_jsonStringifyString.ts +4 -4
- package/src/json.ts +190 -243
- package/src/llm.ts +279 -204
- package/src/misc.ts +166 -223
- package/src/module.ts +281 -329
- package/src/notations.ts +177 -246
- package/src/programmers/FeatureProgrammer.ts +19 -41
- package/src/programmers/ImportProgrammer.ts +3 -9
- package/src/programmers/RandomProgrammer.ts +6 -1
- package/src/programmers/helpers/ProtobufWire.ts +13 -13
- package/src/programmers/internal/check_array_length.ts +2 -6
- package/src/programmers/internal/check_bigint.ts +2 -6
- package/src/programmers/internal/check_dynamic_key.ts +2 -6
- package/src/programmers/internal/check_dynamic_properties.ts +3 -9
- package/src/programmers/internal/check_everything.ts +1 -3
- package/src/programmers/internal/check_native.ts +2 -6
- package/src/programmers/internal/check_number.ts +2 -6
- package/src/programmers/internal/check_object.ts +3 -9
- package/src/programmers/internal/check_string.ts +2 -6
- package/src/programmers/internal/check_template.ts +1 -3
- package/src/programmers/internal/check_union_array_like.ts +2 -6
- package/src/programmers/internal/decode_union_object.ts +3 -9
- package/src/programmers/internal/feature_object_entries.ts +1 -3
- package/src/programmers/internal/json_schema_escaped.ts +2 -6
- package/src/programmers/internal/json_schema_object.ts +4 -12
- package/src/programmers/internal/metadata_to_pattern.ts +1 -3
- package/src/programmers/internal/postfix_of_tuple.ts +1 -3
- package/src/programmers/internal/prune_object_properties.ts +1 -3
- package/src/programmers/internal/stringify_dynamic_properties.ts +2 -6
- package/src/programmers/internal/stringify_native.ts +1 -3
- package/src/programmers/internal/stringify_regular_properties.ts +2 -6
- package/src/programmers/internal/template_to_pattern.ts +1 -3
- package/src/programmers/internal/wrap_metadata_rest_tuple.ts +1 -3
- package/src/programmers/json/JsonStringifyProgrammer.ts +2 -2
- package/src/protobuf.ts +307 -348
- package/src/reflect.ts +3 -7
- package/src/schemas/json/IJsonApplication.ts +4 -4
- package/src/schemas/json/IJsonSchemaCollection.ts +73 -56
- package/src/schemas/json/IJsonSchemaUnit.ts +83 -70
- package/src/schemas/metadata/IMetadataTypeTag.ts +1 -3
- package/src/schemas/metadata/Metadata.ts +9 -27
- package/src/schemas/metadata/MetadataAliasType.ts +3 -9
- package/src/schemas/metadata/MetadataApplication.ts +2 -6
- package/src/schemas/metadata/MetadataArray.ts +1 -3
- package/src/schemas/metadata/MetadataArrayType.ts +3 -9
- package/src/schemas/metadata/MetadataAtomic.ts +1 -3
- package/src/schemas/metadata/MetadataEscaped.ts +3 -9
- package/src/schemas/metadata/MetadataFunction.ts +2 -6
- package/src/schemas/metadata/MetadataObject.ts +1 -3
- package/src/schemas/metadata/MetadataObjectType.ts +6 -18
- package/src/schemas/metadata/MetadataParameter.ts +1 -3
- package/src/schemas/metadata/MetadataProperty.ts +3 -9
- package/src/schemas/metadata/MetadataTemplate.ts +1 -3
- package/src/schemas/metadata/MetadataTuple.ts +2 -6
- package/src/schemas/metadata/MetadataTupleType.ts +3 -9
- package/src/tags/Constant.ts +16 -16
- package/src/tags/ContentMediaType.ts +7 -7
- package/src/tags/Default.ts +19 -19
- package/src/tags/Example.ts +18 -18
- package/src/tags/Examples.ts +23 -23
- package/src/tags/ExclusiveMaximum.ts +8 -5
- package/src/tags/ExclusiveMinimum.ts +8 -5
- package/src/tags/Format.ts +12 -8
- package/src/tags/JsonSchemaPlugin.ts +20 -18
- package/src/tags/MaxItems.ts +9 -9
- package/src/tags/MaxLength.ts +6 -5
- package/src/tags/Maximum.ts +9 -7
- package/src/tags/MinItems.ts +9 -9
- package/src/tags/MinLength.ts +6 -5
- package/src/tags/Minimum.ts +9 -7
- package/src/tags/MultipleOf.ts +10 -7
- package/src/tags/Pattern.ts +7 -4
- package/src/tags/Sequence.ts +19 -17
- package/src/tags/TagBase.ts +21 -28
- package/src/tags/Type.ts +12 -11
- package/src/tags/UniqueItems.ts +10 -9
- package/src/tags/internal/FormatCheatSheet.ts +1 -3
- package/src/transformers/ITransformOptions.ts +27 -19
- package/src/transformers/ImportTransformer.ts +5 -10
- package/src/transformers/NoTransformConfigurationError.ts +1 -3
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
- package/src/typings/Equal.ts +6 -6
package/lib/protobuf.js
CHANGED
|
@@ -18,105 +18,71 @@ exports.createIsEncode = createIsEncode;
|
|
|
18
18
|
exports.createAssertEncode = createAssertEncode;
|
|
19
19
|
exports.createValidateEncode = createValidateEncode;
|
|
20
20
|
const NoTransformConfigurationError_1 = require("./transformers/NoTransformConfigurationError");
|
|
21
|
-
/**
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
21
|
+
/** @internal */
|
|
24
22
|
function message() {
|
|
25
23
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.message");
|
|
26
24
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
25
|
+
/** @internal */
|
|
30
26
|
function decode() {
|
|
31
27
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.decode");
|
|
32
28
|
}
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
29
|
+
/** @internal */
|
|
36
30
|
function assertDecode() {
|
|
37
31
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.assertDecode");
|
|
38
32
|
}
|
|
39
|
-
/**
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
33
|
+
/** @internal */
|
|
42
34
|
function isDecode() {
|
|
43
35
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.isDecode");
|
|
44
36
|
}
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
37
|
+
/** @internal */
|
|
48
38
|
function validateDecode() {
|
|
49
39
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.validateDecode");
|
|
50
40
|
}
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
41
|
+
/** @internal */
|
|
54
42
|
function encode() {
|
|
55
43
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.encode");
|
|
56
44
|
}
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
45
|
+
/** @internal */
|
|
60
46
|
function assertEncode() {
|
|
61
47
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.assertEncode");
|
|
62
48
|
}
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
49
|
+
/** @internal */
|
|
66
50
|
function isEncode() {
|
|
67
51
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.isEncode");
|
|
68
52
|
}
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
53
|
+
/** @internal */
|
|
72
54
|
function validateEncode() {
|
|
73
55
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.validateEncode");
|
|
74
56
|
}
|
|
75
|
-
/**
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
57
|
+
/** @internal */
|
|
78
58
|
function createDecode() {
|
|
79
59
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createDecode");
|
|
80
60
|
}
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
61
|
+
/** @internal */
|
|
84
62
|
function createIsDecode() {
|
|
85
63
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createIsDecode");
|
|
86
64
|
}
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
65
|
+
/** @internal */
|
|
90
66
|
function createAssertDecode() {
|
|
91
67
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createAssertDecode");
|
|
92
68
|
}
|
|
93
|
-
/**
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
69
|
+
/** @internal */
|
|
96
70
|
function createValidateDecode() {
|
|
97
71
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createValidateDecode");
|
|
98
72
|
}
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
73
|
+
/** @internal */
|
|
102
74
|
function createEncode() {
|
|
103
75
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createEncode");
|
|
104
76
|
}
|
|
105
|
-
/**
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
77
|
+
/** @internal */
|
|
108
78
|
function createIsEncode() {
|
|
109
79
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createIsEncode");
|
|
110
80
|
}
|
|
111
|
-
/**
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
81
|
+
/** @internal */
|
|
114
82
|
function createAssertEncode() {
|
|
115
83
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createAssertEncode");
|
|
116
84
|
}
|
|
117
|
-
/**
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
85
|
+
/** @internal */
|
|
120
86
|
function createValidateEncode() {
|
|
121
87
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("protobuf.createValidateEncode");
|
|
122
88
|
}
|
package/lib/protobuf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protobuf.js","sourceRoot":"","sources":["../src/protobuf.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"protobuf.js","sourceRoot":"","sources":["../src/protobuf.ts"],"names":[],"mappings":";;AA2DA,0BAEC;AAoED,wBAEC;AAyED,oCAEC;AAiED,4BAEC;AAmED,wCAEC;AAmCD,wBAEC;AA6ED,oCAEC;AAqED,4BAEC;AAyED,wCAEC;AAyBD,oCAEC;AAsBD,wCAEC;AA4BD,gDAEC;AAwBD,oDAIC;AAsBD,oCAEC;AAsBD,wCAEC;AA4BD,gDAEC;AAwBD,oDAIC;AAnzBD,gGAA6F;AA0D7F,gBAAgB;AAChB,SAAgB,OAAO;IACrB,IAAA,6DAA6B,EAAC,kBAAkB,CAAC,CAAC;AACpD,CAAC;AAmED,gBAAgB;AAChB,SAAgB,MAAM;IACpB,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AACnD,CAAC;AAwED,gBAAgB;AAChB,SAAgB,YAAY;IAC1B,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AAgED,gBAAgB;AAChB,SAAgB,QAAQ;IACtB,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAkED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAkCD,gBAAgB;AAChB,SAAgB,MAAM;IACpB,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AACnD,CAAC;AA4ED,gBAAgB;AAChB,SAAgB,YAAY;IAC1B,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AAoED,gBAAgB;AAChB,SAAgB,QAAQ;IACtB,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAwED,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAwBD,gBAAgB;AAChB,SAAgB,YAAY;IAC1B,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AAqBD,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AA2BD,gBAAgB;AAChB,SAAgB,kBAAkB;IAChC,IAAA,6DAA6B,EAAC,6BAA6B,CAAC,CAAC;AAC/D,CAAC;AAuBD,gBAAgB;AAChB,SAAgB,oBAAoB;IAGlC,IAAA,6DAA6B,EAAC,+BAA+B,CAAC,CAAC;AACjE,CAAC;AAqBD,gBAAgB;AAChB,SAAgB,YAAY;IAC1B,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AAqBD,gBAAgB;AAChB,SAAgB,cAAc;IAC5B,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AA2BD,gBAAgB;AAChB,SAAgB,kBAAkB;IAChC,IAAA,6DAA6B,EAAC,6BAA6B,CAAC,CAAC;AAC/D,CAAC;AAuBD,gBAAgB;AAChB,SAAgB,oBAAoB;IAGlC,IAAA,6DAA6B,EAAC,+BAA+B,CAAC,CAAC;AACjE,CAAC"}
|
package/lib/protobuf.mjs
CHANGED
|
@@ -1,104 +1,70 @@
|
|
|
1
1
|
import { NoTransformConfigurationError } from './transformers/NoTransformConfigurationError.mjs';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
3
|
+
/** @internal */
|
|
6
4
|
function message() {
|
|
7
5
|
NoTransformConfigurationError("protobuf.message");
|
|
8
6
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
7
|
+
/** @internal */
|
|
12
8
|
function decode() {
|
|
13
9
|
NoTransformConfigurationError("protobuf.decode");
|
|
14
10
|
}
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
11
|
+
/** @internal */
|
|
18
12
|
function assertDecode() {
|
|
19
13
|
NoTransformConfigurationError("protobuf.assertDecode");
|
|
20
14
|
}
|
|
21
|
-
/**
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
15
|
+
/** @internal */
|
|
24
16
|
function isDecode() {
|
|
25
17
|
NoTransformConfigurationError("protobuf.isDecode");
|
|
26
18
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
19
|
+
/** @internal */
|
|
30
20
|
function validateDecode() {
|
|
31
21
|
NoTransformConfigurationError("protobuf.validateDecode");
|
|
32
22
|
}
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
23
|
+
/** @internal */
|
|
36
24
|
function encode() {
|
|
37
25
|
NoTransformConfigurationError("protobuf.encode");
|
|
38
26
|
}
|
|
39
|
-
/**
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
27
|
+
/** @internal */
|
|
42
28
|
function assertEncode() {
|
|
43
29
|
NoTransformConfigurationError("protobuf.assertEncode");
|
|
44
30
|
}
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
31
|
+
/** @internal */
|
|
48
32
|
function isEncode() {
|
|
49
33
|
NoTransformConfigurationError("protobuf.isEncode");
|
|
50
34
|
}
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
35
|
+
/** @internal */
|
|
54
36
|
function validateEncode() {
|
|
55
37
|
NoTransformConfigurationError("protobuf.validateEncode");
|
|
56
38
|
}
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
39
|
+
/** @internal */
|
|
60
40
|
function createDecode() {
|
|
61
41
|
NoTransformConfigurationError("protobuf.createDecode");
|
|
62
42
|
}
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
43
|
+
/** @internal */
|
|
66
44
|
function createIsDecode() {
|
|
67
45
|
NoTransformConfigurationError("protobuf.createIsDecode");
|
|
68
46
|
}
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
47
|
+
/** @internal */
|
|
72
48
|
function createAssertDecode() {
|
|
73
49
|
NoTransformConfigurationError("protobuf.createAssertDecode");
|
|
74
50
|
}
|
|
75
|
-
/**
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
51
|
+
/** @internal */
|
|
78
52
|
function createValidateDecode() {
|
|
79
53
|
NoTransformConfigurationError("protobuf.createValidateDecode");
|
|
80
54
|
}
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
55
|
+
/** @internal */
|
|
84
56
|
function createEncode() {
|
|
85
57
|
NoTransformConfigurationError("protobuf.createEncode");
|
|
86
58
|
}
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
59
|
+
/** @internal */
|
|
90
60
|
function createIsEncode() {
|
|
91
61
|
NoTransformConfigurationError("protobuf.createIsEncode");
|
|
92
62
|
}
|
|
93
|
-
/**
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
63
|
+
/** @internal */
|
|
96
64
|
function createAssertEncode() {
|
|
97
65
|
NoTransformConfigurationError("protobuf.createAssertEncode");
|
|
98
66
|
}
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
67
|
+
/** @internal */
|
|
102
68
|
function createValidateEncode() {
|
|
103
69
|
NoTransformConfigurationError("protobuf.createValidateEncode");
|
|
104
70
|
}
|
package/lib/reflect.d.mts
CHANGED
|
@@ -10,10 +10,9 @@ import { IMetadataApplication } from "./schemas/metadata/IMetadataApplication";
|
|
|
10
10
|
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
11
11
|
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
12
12
|
*
|
|
13
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
13
14
|
* @template Types Tuple of target types
|
|
14
15
|
* @returns Metadata application
|
|
15
|
-
*
|
|
16
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
17
16
|
*/
|
|
18
17
|
export declare function metadata(): never;
|
|
19
18
|
/**
|
|
@@ -25,10 +24,9 @@ export declare function metadata(): never;
|
|
|
25
24
|
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
26
25
|
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
27
26
|
*
|
|
27
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
28
28
|
* @template Types Tuple of target types
|
|
29
29
|
* @returns Metadata application
|
|
30
|
-
*
|
|
31
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
32
30
|
*/
|
|
33
31
|
export declare function metadata<Types extends unknown[]>(): IMetadataApplication;
|
|
34
32
|
export declare function name<T, Regular extends boolean = false>(): string;
|
package/lib/reflect.d.ts
CHANGED
|
@@ -10,10 +10,9 @@ import { IMetadataApplication } from "./schemas/metadata/IMetadataApplication";
|
|
|
10
10
|
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
11
11
|
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
12
12
|
*
|
|
13
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
13
14
|
* @template Types Tuple of target types
|
|
14
15
|
* @returns Metadata application
|
|
15
|
-
*
|
|
16
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
17
16
|
*/
|
|
18
17
|
export declare function metadata(): never;
|
|
19
18
|
/**
|
|
@@ -25,10 +24,9 @@ export declare function metadata(): never;
|
|
|
25
24
|
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
26
25
|
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
27
26
|
*
|
|
27
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
28
28
|
* @template Types Tuple of target types
|
|
29
29
|
* @returns Metadata application
|
|
30
|
-
*
|
|
31
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
32
30
|
*/
|
|
33
31
|
export declare function metadata<Types extends unknown[]>(): IMetadataApplication;
|
|
34
32
|
export declare function name<T, Regular extends boolean = false>(): string;
|
package/lib/reflect.js
CHANGED
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.metadata = metadata;
|
|
4
4
|
exports.name = name;
|
|
5
5
|
const NoTransformConfigurationError_1 = require("./transformers/NoTransformConfigurationError");
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
6
|
+
/** @internal */
|
|
9
7
|
function metadata() {
|
|
10
8
|
(0, NoTransformConfigurationError_1.NoTransformConfigurationError)("reflect.metadata");
|
|
11
9
|
}
|
package/lib/reflect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../src/reflect.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../src/reflect.ts"],"names":[],"mappings":";;AAqCA,4BAEC;AAID,oBAEC;AA3CD,gGAA6F;AAkC7F,gBAAgB;AAChB,SAAgB,QAAQ;IACtB,IAAA,6DAA6B,EAAC,kBAAkB,CAAC,CAAC;AACpD,CAAC;AAID,SAAgB,IAAI;IAClB,IAAA,6DAA6B,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC"}
|
package/lib/reflect.mjs
CHANGED
|
@@ -2,12 +2,12 @@ import { IJsonSchemaCollection } from "./IJsonSchemaCollection";
|
|
|
2
2
|
/**
|
|
3
3
|
* Collection of JSON schemas.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
6
|
+
* @deprecated Use {@link IJsonSchemaCollection} instead please. This interface
|
|
7
|
+
* type would be changed to {@link ILlmApplication} like structure in the
|
|
8
|
+
* future version (maybe next v8 major update).
|
|
8
9
|
* @template Version Version of the OpenAPI specification.
|
|
9
10
|
* @template Types Original TypeScript types used in the JSON schemas.
|
|
10
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
11
11
|
*/
|
|
12
12
|
export type IJsonApplication = IJsonSchemaCollection;
|
|
13
13
|
export declare namespace IJsonApplication {
|
|
@@ -2,12 +2,12 @@ import { IJsonSchemaCollection } from "./IJsonSchemaCollection";
|
|
|
2
2
|
/**
|
|
3
3
|
* Collection of JSON schemas.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
6
|
+
* @deprecated Use {@link IJsonSchemaCollection} instead please. This interface
|
|
7
|
+
* type would be changed to {@link ILlmApplication} like structure in the
|
|
8
|
+
* future version (maybe next v8 major update).
|
|
8
9
|
* @template Version Version of the OpenAPI specification.
|
|
9
10
|
* @template Types Original TypeScript types used in the JSON schemas.
|
|
10
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
11
11
|
*/
|
|
12
12
|
export type IJsonApplication = IJsonSchemaCollection;
|
|
13
13
|
export declare namespace IJsonApplication {
|
|
@@ -3,37 +3,43 @@ import type { OpenApi, OpenApiV3 } from "@samchon/openapi";
|
|
|
3
3
|
* Collection of JSON schemas with OpenAPI specification support.
|
|
4
4
|
*
|
|
5
5
|
* `IJsonSchemaCollection` represents a comprehensive collection of JSON schemas
|
|
6
|
-
* that can be generated from TypeScript types using the `typia.json.schemas()`
|
|
7
|
-
* This interface supports both OpenAPI v3.0 and v3.1 specifications,
|
|
8
|
-
* to automatically generate appropriate schema definitions
|
|
6
|
+
* that can be generated from TypeScript types using the `typia.json.schemas()`
|
|
7
|
+
* function. This interface supports both OpenAPI v3.0 and v3.1 specifications,
|
|
8
|
+
* with the ability to automatically generate appropriate schema definitions
|
|
9
|
+
* based on the specified version.
|
|
9
10
|
*
|
|
10
11
|
* The collection includes:
|
|
11
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* - Generated JSON schemas array containing schema definitions for the specified
|
|
14
|
+
* types
|
|
12
15
|
* - Reusable components that can be referenced across different schemas
|
|
13
|
-
* - Version-specific formatting that adheres to either OpenAPI v3.0 or v3.1
|
|
16
|
+
* - Version-specific formatting that adheres to either OpenAPI v3.0 or v3.1
|
|
17
|
+
* standards
|
|
14
18
|
*
|
|
15
19
|
* Key differences between versions:
|
|
16
|
-
* - OpenAPI v3.0: Uses {@link OpenApiV3.IJsonSchema} format with limited tuple support
|
|
17
|
-
* - OpenAPI v3.1: Uses {@link OpenApi.IJsonSchema} format with full JSON Schema Draft 2020-12 compatibility
|
|
18
20
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* back to the source TypeScript definitions.
|
|
21
|
+
* - OpenAPI v3.0: Uses {@link OpenApiV3.IJsonSchema} format with limited tuple
|
|
22
|
+
* support
|
|
23
|
+
* - OpenAPI v3.1: Uses {@link OpenApi.IJsonSchema} format with full JSON Schema
|
|
24
|
+
* Draft 2020-12 compatibility
|
|
24
25
|
*
|
|
26
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
25
27
|
* @example
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Generate schemas for OpenAPI v3.1 (default)
|
|
30
|
+
* const schemas = typia.json.schemas<[User, Product]>();
|
|
31
|
+
* // Type: IJsonSchemaCollection<"3.1", [User, Product]>
|
|
30
32
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* // Generate schemas for OpenAPI v3.0 (Swagger compatibility)
|
|
34
|
+
* const swaggerSchemas = typia.json.schemas<[User, Product], "3.0">();
|
|
35
|
+
* // Type: IJsonSchemaCollection<"3.0", [User, Product]>
|
|
36
|
+
* ```;
|
|
35
37
|
*
|
|
36
|
-
* @
|
|
38
|
+
* @template Version The OpenAPI specification version to target ("3.0" or
|
|
39
|
+
* "3.1"). Defaults to "3.1" for enhanced JSON Schema compatibility.
|
|
40
|
+
* @template Types Array of original TypeScript types that were analyzed to
|
|
41
|
+
* generate the JSON schemas. This provides type safety and traceability back
|
|
42
|
+
* to the source TypeScript definitions.
|
|
37
43
|
*/
|
|
38
44
|
export type IJsonSchemaCollection<Version extends "3.0" | "3.1" = "3.1", Types = unknown[]> = Version extends "3.0" ? IJsonSchemaCollection.IV3_0<Types> : IJsonSchemaCollection.IV3_1<Types>;
|
|
39
45
|
export declare namespace IJsonSchemaCollection {
|
|
@@ -41,54 +47,59 @@ export declare namespace IJsonSchemaCollection {
|
|
|
41
47
|
* JSON Schema collection formatted for OpenAPI v3.0 specification.
|
|
42
48
|
*
|
|
43
49
|
* This interface represents a collection of JSON schemas that comply with
|
|
44
|
-
* OpenAPI v3.0 standards, which are compatible with Swagger tools and
|
|
45
|
-
*
|
|
46
|
-
*
|
|
50
|
+
* OpenAPI v3.0 standards, which are compatible with Swagger tools and legacy
|
|
51
|
+
* OpenAPI implementations. OpenAPI v3.0 has some limitations compared to
|
|
52
|
+
* v3.1, particularly around tuple types and pattern properties.
|
|
47
53
|
*
|
|
48
54
|
* Key characteristics of v3.0:
|
|
55
|
+
*
|
|
49
56
|
* - Cannot express tuple types natively (falls back to array representations)
|
|
50
57
|
* - Cannot express pattern properties in object schemas
|
|
51
58
|
* - Uses nullable property instead of union with null type
|
|
52
59
|
* - Limited JSON Schema Draft compatibility (based on Draft 4)
|
|
53
60
|
*
|
|
54
|
-
* @template Types Array of original TypeScript types used to generate the
|
|
55
|
-
*
|
|
56
|
-
*
|
|
61
|
+
* @template Types Array of original TypeScript types used to generate the
|
|
62
|
+
* schemas. This provides compile-time type information about what types
|
|
63
|
+
* were analyzed during schema generation.
|
|
57
64
|
*/
|
|
58
65
|
interface IV3_0<Types = unknown[]> {
|
|
59
66
|
/**
|
|
60
67
|
* OpenAPI specification version identifier.
|
|
61
68
|
*
|
|
62
|
-
* Always set to "3.0" to indicate this collection uses OpenAPI v3.0
|
|
63
|
-
*
|
|
69
|
+
* Always set to "3.0" to indicate this collection uses OpenAPI v3.0 schema
|
|
70
|
+
* format and constraints.
|
|
64
71
|
*/
|
|
65
72
|
version: "3.0";
|
|
66
73
|
/**
|
|
67
74
|
* Array of generated JSON schemas.
|
|
68
75
|
*
|
|
69
|
-
* Contains the actual JSON schema definitions generated from the input
|
|
70
|
-
* Each schema in this array corresponds to one of the
|
|
71
|
-
* template parameter. The schemas follow
|
|
72
|
-
* references to components defined in
|
|
76
|
+
* Contains the actual JSON schema definitions generated from the input
|
|
77
|
+
* TypeScript types. Each schema in this array corresponds to one of the
|
|
78
|
+
* types specified in the `Types` template parameter. The schemas follow
|
|
79
|
+
* OpenAPI v3.0 format and may contain references to components defined in
|
|
80
|
+
* the {@link components} property.
|
|
73
81
|
*
|
|
74
|
-
* Schema references typically use the format: `{ "$ref":
|
|
82
|
+
* Schema references typically use the format: `{ "$ref":
|
|
83
|
+
* "#/components/schemas/TypeName" }`
|
|
75
84
|
*/
|
|
76
85
|
schemas: OpenApiV3.IJsonSchema[];
|
|
77
86
|
/**
|
|
78
87
|
* Reusable schema components for OpenAPI v3.0.
|
|
79
88
|
*
|
|
80
|
-
* Contains reusable schema definitions, security schemes, and other
|
|
81
|
-
* that can be referenced from the main schemas. This follows the
|
|
82
|
-
* components structure and enables schema reuse and
|
|
89
|
+
* Contains reusable schema definitions, security schemes, and other
|
|
90
|
+
* components that can be referenced from the main schemas. This follows the
|
|
91
|
+
* OpenAPI v3.0 components structure and enables schema reuse and
|
|
92
|
+
* modularity.
|
|
83
93
|
*
|
|
84
94
|
* Components include:
|
|
85
|
-
*
|
|
86
|
-
* -
|
|
87
|
-
* -
|
|
88
|
-
* -
|
|
89
|
-
* -
|
|
90
|
-
* -
|
|
91
|
-
* -
|
|
95
|
+
*
|
|
96
|
+
* - Schemas: Named type definitions that can be referenced via $ref
|
|
97
|
+
* - SecuritySchemes: Authentication and authorization schemes
|
|
98
|
+
* - Parameters: Reusable parameter definitions
|
|
99
|
+
* - RequestBodies: Reusable request body definitions
|
|
100
|
+
* - Responses: Reusable response definitions
|
|
101
|
+
* - Headers: Reusable header definitions
|
|
102
|
+
* - Examples: Reusable example definitions
|
|
92
103
|
*/
|
|
93
104
|
components: OpenApiV3.IComponents;
|
|
94
105
|
/**
|
|
@@ -100,6 +111,7 @@ export declare namespace IJsonSchemaCollection {
|
|
|
100
111
|
* and undefined to prevent it from appearing in serialized JSON output.
|
|
101
112
|
*
|
|
102
113
|
* This enables:
|
|
114
|
+
*
|
|
103
115
|
* - Compile-time type checking against the original types
|
|
104
116
|
* - IDE intellisense and autocompletion
|
|
105
117
|
* - Type-safe schema validation and usage
|
|
@@ -111,38 +123,40 @@ export declare namespace IJsonSchemaCollection {
|
|
|
111
123
|
*
|
|
112
124
|
* This interface represents a collection of JSON schemas that comply with
|
|
113
125
|
* OpenAPI v3.1 standards, which provide enhanced JSON Schema compatibility
|
|
114
|
-
* and support for modern JSON Schema features. OpenAPI v3.1 is based on
|
|
115
|
-
*
|
|
126
|
+
* and support for modern JSON Schema features. OpenAPI v3.1 is based on JSON
|
|
127
|
+
* Schema Draft 2020-12 and offers significant improvements over v3.0.
|
|
116
128
|
*
|
|
117
129
|
* Key advantages of v3.1:
|
|
130
|
+
*
|
|
118
131
|
* - Full tuple type support with prefixItems
|
|
119
132
|
* - Pattern properties support for dynamic object keys
|
|
120
133
|
* - Proper null type handling via union types
|
|
121
134
|
* - Enhanced JSON Schema Draft 2020-12 compatibility
|
|
122
135
|
* - Better const, enum, and validation support
|
|
123
136
|
*
|
|
124
|
-
* @template Types Array of original TypeScript types used to generate the
|
|
125
|
-
*
|
|
126
|
-
*
|
|
137
|
+
* @template Types Array of original TypeScript types used to generate the
|
|
138
|
+
* schemas. This provides compile-time type information about what types
|
|
139
|
+
* were analyzed during schema generation.
|
|
127
140
|
*/
|
|
128
141
|
interface IV3_1<Types = unknown[]> {
|
|
129
142
|
/**
|
|
130
143
|
* OpenAPI specification version identifier.
|
|
131
144
|
*
|
|
132
|
-
* Always set to "3.1" to indicate this collection uses OpenAPI v3.1
|
|
133
|
-
*
|
|
145
|
+
* Always set to "3.1" to indicate this collection uses OpenAPI v3.1 schema
|
|
146
|
+
* format with enhanced JSON Schema compatibility.
|
|
134
147
|
*/
|
|
135
148
|
version: "3.1";
|
|
136
149
|
/**
|
|
137
150
|
* Reusable schema components for OpenAPI v3.1.
|
|
138
151
|
*
|
|
139
152
|
* Contains reusable schema definitions and other components following the
|
|
140
|
-
* OpenAPI v3.1 specification. This structure is similar to v3.0 but
|
|
141
|
-
* enhanced JSON Schema features and improved type definitions.
|
|
153
|
+
* OpenAPI v3.1 specification. This structure is similar to v3.0 but
|
|
154
|
+
* supports enhanced JSON Schema features and improved type definitions.
|
|
142
155
|
*
|
|
143
156
|
* Components include:
|
|
144
|
-
*
|
|
145
|
-
* -
|
|
157
|
+
*
|
|
158
|
+
* - Schemas: Named type definitions with enhanced JSON Schema support
|
|
159
|
+
* - SecuritySchemes: Authentication and authorization schemes
|
|
146
160
|
*
|
|
147
161
|
* The emended OpenAPI v3.1 format used here removes ambiguous expressions
|
|
148
162
|
* and standardizes certain patterns for better tooling compatibility.
|
|
@@ -154,6 +168,7 @@ export declare namespace IJsonSchemaCollection {
|
|
|
154
168
|
* Contains JSON schema definitions that take advantage of OpenAPI v3.1's
|
|
155
169
|
* enhanced capabilities. These schemas can express more complex TypeScript
|
|
156
170
|
* types accurately, including:
|
|
171
|
+
*
|
|
157
172
|
* - Tuple types using prefixItems
|
|
158
173
|
* - Union types with proper null handling
|
|
159
174
|
* - Complex nested object structures
|
|
@@ -168,9 +183,11 @@ export declare namespace IJsonSchemaCollection {
|
|
|
168
183
|
*
|
|
169
184
|
* This optional property stores the original TypeScript types that were
|
|
170
185
|
* used to generate the JSON schemas. It provides compile-time type safety
|
|
171
|
-
* and enables better development experience without affecting runtime
|
|
186
|
+
* and enables better development experience without affecting runtime
|
|
187
|
+
* behavior.
|
|
172
188
|
*
|
|
173
189
|
* Benefits include:
|
|
190
|
+
*
|
|
174
191
|
* - Strong typing connection to original TypeScript definitions
|
|
175
192
|
* - Enhanced IDE support and autocompletion
|
|
176
193
|
* - Compile-time validation of schema usage
|