typia 4.0.0 → 4.0.1-dev.20230605

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.
Files changed (89) hide show
  1. package/lib/programmers/ApplicationProgrammer.js +1 -1
  2. package/lib/programmers/internal/application_alias.d.ts +5 -0
  3. package/lib/programmers/internal/{application_definition.js → application_alias.js} +10 -10
  4. package/lib/programmers/internal/application_alias.js.map +1 -0
  5. package/lib/programmers/internal/application_array.js +19 -41
  6. package/lib/programmers/internal/application_array.js.map +1 -1
  7. package/lib/programmers/internal/application_native.js +3 -3
  8. package/lib/programmers/internal/application_object.js +5 -5
  9. package/lib/programmers/internal/application_schema.js +4 -4
  10. package/lib/programmers/internal/application_schema.js.map +1 -1
  11. package/lib/programmers/internal/application_tuple.js +8 -30
  12. package/lib/programmers/internal/application_tuple.js.map +1 -1
  13. package/lib/schemas/IJsonComponents.d.ts +1 -12
  14. package/lib/schemas/IJsonSchema.d.ts +1 -1
  15. package/package.json +1 -1
  16. package/src/IRandomGenerator.ts +34 -34
  17. package/src/factories/IdentifierFactory.ts +65 -65
  18. package/src/factories/MetadataCollection.ts +254 -254
  19. package/src/factories/MetadataFactory.ts +40 -40
  20. package/src/factories/MetadataTagFactory.ts +300 -300
  21. package/src/factories/internal/metadata/emplace_metadata_array.ts +34 -34
  22. package/src/factories/internal/metadata/emplace_metadata_definition.ts +35 -35
  23. package/src/factories/internal/metadata/emplace_metadata_object.ts +142 -142
  24. package/src/factories/internal/metadata/emplace_metadata_tuple.ts +50 -50
  25. package/src/factories/internal/metadata/explore_metadata.ts +66 -66
  26. package/src/factories/internal/metadata/iterate_metadata.ts +77 -77
  27. package/src/factories/internal/metadata/iterate_metadata_array.ts +25 -25
  28. package/src/factories/internal/metadata/iterate_metadata_collection.ts +130 -130
  29. package/src/factories/internal/metadata/iterate_metadata_definition.ts +30 -30
  30. package/src/factories/internal/metadata/iterate_metadata_object.ts +49 -49
  31. package/src/factories/internal/metadata/iterate_metadata_sort.ts +68 -68
  32. package/src/factories/internal/metadata/iterate_metadata_tuple.ts +24 -24
  33. package/src/factories/internal/metadata/iterate_metadata_union.ts +68 -68
  34. package/src/metadata/IMetadata.ts +27 -27
  35. package/src/metadata/IMetadataAlias.ts +12 -12
  36. package/src/metadata/IMetadataApplication.ts +7 -7
  37. package/src/metadata/IMetadataArray.ts +10 -10
  38. package/src/metadata/IMetadataCollection.ts +11 -11
  39. package/src/metadata/IMetadataDictionary.ts +14 -14
  40. package/src/metadata/IMetadataObject.ts +18 -18
  41. package/src/metadata/IMetadataProperty.ts +11 -11
  42. package/src/metadata/IMetadataTuple.ts +10 -10
  43. package/src/metadata/Metadata.ts +585 -585
  44. package/src/metadata/MetadataAlias.ts +61 -61
  45. package/src/metadata/MetadataArray.ts +52 -52
  46. package/src/metadata/MetadataObject.ts +114 -114
  47. package/src/metadata/MetadataProperty.ts +64 -64
  48. package/src/metadata/MetadataTuple.ts +53 -53
  49. package/src/programmers/ApplicationProgrammer.ts +55 -55
  50. package/src/programmers/AssertProgrammer.ts +291 -291
  51. package/src/programmers/CheckerProgrammer.ts +1182 -1182
  52. package/src/programmers/CloneProgrammer.ts +595 -595
  53. package/src/programmers/FeatureProgrammer.ts +495 -495
  54. package/src/programmers/IsProgrammer.ts +250 -250
  55. package/src/programmers/LiteralsProgrammer.ts +66 -66
  56. package/src/programmers/PruneProgrammer.ts +550 -550
  57. package/src/programmers/RandomProgrammer.ts +589 -589
  58. package/src/programmers/StringifyProgrammer.ts +990 -990
  59. package/src/programmers/ValidateProgrammer.ts +313 -313
  60. package/src/programmers/helpers/FunctionImporeter.ts +78 -78
  61. package/src/programmers/helpers/RandomJoiner.ts +173 -173
  62. package/src/programmers/helpers/UnionExplorer.ts +301 -301
  63. package/src/programmers/helpers/UnionPredicator.ts +81 -81
  64. package/src/programmers/helpers/disable_function_importer_declare.ts +26 -26
  65. package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +1 -1
  66. package/src/programmers/internal/{application_definition.ts → application_alias.ts} +45 -45
  67. package/src/programmers/internal/application_array.ts +30 -64
  68. package/src/programmers/internal/application_boolean.ts +15 -15
  69. package/src/programmers/internal/application_constant.ts +26 -26
  70. package/src/programmers/internal/application_default.ts +17 -17
  71. package/src/programmers/internal/application_native.ts +39 -39
  72. package/src/programmers/internal/application_number.ts +74 -74
  73. package/src/programmers/internal/application_object.ts +167 -167
  74. package/src/programmers/internal/application_schema.ts +156 -164
  75. package/src/programmers/internal/application_tuple.ts +47 -77
  76. package/src/programmers/internal/check_union_array_like.ts +329 -329
  77. package/src/programmers/internal/feature_object_entries.ts +63 -63
  78. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +16 -16
  79. package/src/schemas/IJsonApplication.ts +8 -8
  80. package/src/schemas/IJsonComponents.ts +34 -45
  81. package/src/schemas/IJsonSchema.ts +134 -134
  82. package/src/transformers/CallExpressionTransformer.ts +179 -179
  83. package/src/transformers/FileTransformer.ts +47 -47
  84. package/src/transformers/features/miscellaneous/ApplicationTransformer.ts +104 -104
  85. package/src/transformers/features/miscellaneous/MetadataTransformer.ts +53 -53
  86. package/src/utils/ArrayUtil.ts +45 -45
  87. package/src/utils/RandomGenerator.ts +81 -81
  88. package/lib/programmers/internal/application_definition.d.ts +0 -5
  89. package/lib/programmers/internal/application_definition.js.map +0 -1
@@ -1,74 +1,74 @@
1
- import { IJsonSchema } from "../../module";
2
- import { application_default } from "./application_default";
3
-
4
- /**
5
- * @internal
6
- */
7
- export const application_number = (
8
- attribute: IJsonSchema.IAttribute,
9
- ): IJsonSchema.INumber | IJsonSchema.IInteger => {
10
- const output: IJsonSchema.INumber | IJsonSchema.IInteger = {
11
- ...attribute,
12
- type: "number" as "number" | "integer",
13
- };
14
- for (const tag of attribute["x-typia-metaTags"] ?? []) {
15
- // CHECK TYPE
16
- if (
17
- tag.kind === "type" &&
18
- (tag.value === "int" ||
19
- tag.value === "uint" ||
20
- tag.value === "{int}" ||
21
- tag.value === "{uint}")
22
- )
23
- output.type = "integer";
24
- // RANGE TAG
25
- else if (tag.kind === "minimum") output.minimum = tag.value;
26
- else if (tag.kind === "maximum") output.maximum = tag.value;
27
- else if (tag.kind === "exclusiveMinimum") {
28
- output.minimum = tag.value;
29
- output.exclusiveMinimum = true;
30
- } else if (tag.kind === "exclusiveMaximum") {
31
- output.maximum = tag.value;
32
- output.exclusiveMaximum = true;
33
- }
34
- // MULTIPLE-OF
35
- else if (tag.kind === "multipleOf") output.multipleOf = tag.value;
36
- }
37
-
38
- // WHEN UNSIGNED INT
39
- if (
40
- output.type === "integer" &&
41
- (attribute["x-typia-metaTags"] ?? []).find(
42
- (tag) => tag.kind === "type" && tag.value === "uint",
43
- )
44
- )
45
- if (
46
- output.minimum === undefined ||
47
- (output.exclusiveMaximum !== true && output.minimum < 0)
48
- )
49
- output.minimum = 0;
50
- else if (output.exclusiveMinimum === true && output.minimum < -1) {
51
- output.maximum = 0;
52
- delete output.exclusiveMinimum;
53
- }
54
-
55
- // DEFAULT CONFIGURATION
56
- output.default = application_default(attribute)((str) => {
57
- const value: number = Number(str);
58
- const conditions: boolean[] = [!Number.isNaN(value)];
59
- if (output.minimum !== undefined)
60
- if (output.exclusiveMinimum === true)
61
- conditions.push(value > output.minimum);
62
- else conditions.push(value >= output.minimum);
63
- if (output.maximum !== undefined)
64
- if (output.exclusiveMaximum === true)
65
- conditions.push(value < output.maximum);
66
- else conditions.push(value <= output.maximum);
67
- if (output.multipleOf !== undefined)
68
- conditions.push(value % output.multipleOf === 0);
69
- return conditions.every((cond) => cond);
70
- })((str) => Number(str));
71
-
72
- // RETURNS
73
- return output;
74
- };
1
+ import { IJsonSchema } from "../../module";
2
+ import { application_default } from "./application_default";
3
+
4
+ /**
5
+ * @internal
6
+ */
7
+ export const application_number = (
8
+ attribute: IJsonSchema.IAttribute,
9
+ ): IJsonSchema.INumber | IJsonSchema.IInteger => {
10
+ const output: IJsonSchema.INumber | IJsonSchema.IInteger = {
11
+ ...attribute,
12
+ type: "number" as "number" | "integer",
13
+ };
14
+ for (const tag of attribute["x-typia-metaTags"] ?? []) {
15
+ // CHECK TYPE
16
+ if (
17
+ tag.kind === "type" &&
18
+ (tag.value === "int" ||
19
+ tag.value === "uint" ||
20
+ tag.value === "{int}" ||
21
+ tag.value === "{uint}")
22
+ )
23
+ output.type = "integer";
24
+ // RANGE TAG
25
+ else if (tag.kind === "minimum") output.minimum = tag.value;
26
+ else if (tag.kind === "maximum") output.maximum = tag.value;
27
+ else if (tag.kind === "exclusiveMinimum") {
28
+ output.minimum = tag.value;
29
+ output.exclusiveMinimum = true;
30
+ } else if (tag.kind === "exclusiveMaximum") {
31
+ output.maximum = tag.value;
32
+ output.exclusiveMaximum = true;
33
+ }
34
+ // MULTIPLE-OF
35
+ else if (tag.kind === "multipleOf") output.multipleOf = tag.value;
36
+ }
37
+
38
+ // WHEN UNSIGNED INT
39
+ if (
40
+ output.type === "integer" &&
41
+ (attribute["x-typia-metaTags"] ?? []).find(
42
+ (tag) => tag.kind === "type" && tag.value === "uint",
43
+ )
44
+ )
45
+ if (
46
+ output.minimum === undefined ||
47
+ (output.exclusiveMaximum !== true && output.minimum < 0)
48
+ )
49
+ output.minimum = 0;
50
+ else if (output.exclusiveMinimum === true && output.minimum < -1) {
51
+ output.maximum = 0;
52
+ delete output.exclusiveMinimum;
53
+ }
54
+
55
+ // DEFAULT CONFIGURATION
56
+ output.default = application_default(attribute)((str) => {
57
+ const value: number = Number(str);
58
+ const conditions: boolean[] = [!Number.isNaN(value)];
59
+ if (output.minimum !== undefined)
60
+ if (output.exclusiveMinimum === true)
61
+ conditions.push(value > output.minimum);
62
+ else conditions.push(value >= output.minimum);
63
+ if (output.maximum !== undefined)
64
+ if (output.exclusiveMaximum === true)
65
+ conditions.push(value < output.maximum);
66
+ else conditions.push(value <= output.maximum);
67
+ if (output.multipleOf !== undefined)
68
+ conditions.push(value % output.multipleOf === 0);
69
+ return conditions.every((cond) => cond);
70
+ })((str) => Number(str));
71
+
72
+ // RETURNS
73
+ return output;
74
+ };
@@ -1,167 +1,167 @@
1
- import { CommentFactory } from "../../factories/CommentFactory";
2
-
3
- import { IJsDocTagInfo } from "../../metadata/IJsDocTagInfo";
4
- import { Metadata } from "../../metadata/Metadata";
5
- import { MetadataObject } from "../../metadata/MetadataObject";
6
- import { IJsonComponents } from "../../schemas/IJsonComponents";
7
-
8
- import { PatternUtil } from "../../utils/PatternUtil";
9
-
10
- import { IJsonSchema } from "../../module";
11
- import { ApplicationProgrammer } from "../ApplicationProgrammer";
12
- import { JSON_COMPONENTS_PREFIX } from "./JSON_SCHEMA_PREFIX";
13
- import { application_schema } from "./application_schema";
14
- import { metadata_to_pattern } from "./metadata_to_pattern";
15
-
16
- /**
17
- * @internal
18
- */
19
- export const application_object =
20
- (options: ApplicationProgrammer.IOptions) =>
21
- (components: IJsonComponents) =>
22
- (obj: MetadataObject) =>
23
- (
24
- nullable: boolean,
25
- ): IJsonSchema.IReference | IJsonSchema.IRecursiveReference => {
26
- const key: string =
27
- options.purpose === "ajv"
28
- ? obj.name
29
- : `${obj.name}${nullable ? ".Nullable" : ""}`;
30
- const $id: string = `${JSON_COMPONENTS_PREFIX}/objects/${key}`;
31
- const out = () =>
32
- options.purpose === "ajv" && obj.recursive
33
- ? { $recursiveRef: $id }
34
- : { $ref: $id };
35
-
36
- // TEMPORARY ASSIGNMENT
37
- if (components.objects?.[key] !== undefined) return out();
38
- components.objects ??= {};
39
- components.objects[key] = {} as any;
40
-
41
- // ITERATE PROPERTIES
42
- const properties: Record<string, any> = {};
43
- const extraMeta: ISuperfluous = {
44
- patternProperties: {},
45
- additionalProperties: undefined,
46
- };
47
- const required: string[] = [];
48
-
49
- for (const property of obj.properties) {
50
- if (
51
- property.value.functional === true &&
52
- property.value.nullable === false &&
53
- property.value.required === true &&
54
- property.value.size() === 0
55
- )
56
- continue;
57
-
58
- const key: string | null = property.key.getSoleLiteral();
59
- const schema: IJsonSchema | null = application_schema(options)(
60
- true,
61
- )(components)(property.value)({
62
- deprecated:
63
- !!property.jsDocTags.find(
64
- (tag) => tag.name === "deprecated",
65
- ) || undefined,
66
- title: (() => {
67
- const info: IJsDocTagInfo | undefined =
68
- property.jsDocTags.find((tag) => tag.name === "title");
69
- return info?.text?.length
70
- ? CommentFactory.merge(info.text)
71
- : undefined;
72
- })(),
73
- description: property.description ?? undefined,
74
- "x-typia-metaTags": property.tags.length
75
- ? property.tags
76
- : undefined,
77
- "x-typia-jsDocTags": property.jsDocTags.length
78
- ? property.jsDocTags
79
- : undefined,
80
- "x-typia-required": property.value.required,
81
- "x-typia-optional": property.value.optional,
82
- });
83
-
84
- if (schema === null) continue;
85
- else if (key !== null) {
86
- properties[key] = schema;
87
- if (property.value.required === true) required.push(key);
88
- } else {
89
- const pattern: string = metadata_to_pattern(true)(property.key);
90
- if (pattern === PatternUtil.STRING)
91
- extraMeta.additionalProperties = [property.value, schema];
92
- else
93
- extraMeta.patternProperties[pattern] = [
94
- property.value,
95
- schema,
96
- ];
97
- }
98
- }
99
-
100
- const extraProps = {
101
- additionalProperties: extraMeta.additionalProperties?.[1],
102
- patternProperties: (() => {
103
- if (Object.keys(extraMeta.patternProperties).length === 0)
104
- return undefined;
105
- const output: Record<string, IJsonSchema> = {};
106
- for (const [key, value] of Object.entries(
107
- extraMeta.patternProperties,
108
- ))
109
- output[key] = value[1];
110
- return output;
111
- })(),
112
- };
113
- const schema: IJsonComponents.IObject = {
114
- $id: options.purpose === "ajv" ? $id : undefined,
115
- $recursiveAnchor:
116
- (options.purpose === "ajv" && obj.recursive) || undefined,
117
- type: "object",
118
- properties,
119
- nullable: options.purpose === "swagger" ? nullable : undefined,
120
- required: required.length ? required : undefined,
121
- description: obj.description,
122
- "x-typia-jsDocTags": obj.jsDocTags,
123
- ...(options.purpose === "ajv"
124
- ? extraProps
125
- : {
126
- // swagger can't express patternProperties
127
- "x-typia-additionalProperties":
128
- extraProps.additionalProperties,
129
- "x-typia-patternProperties": extraProps.patternProperties,
130
- additionalProperties:
131
- join(options)(components)(extraMeta),
132
- }),
133
- };
134
- components.objects[key] = schema;
135
- return out();
136
- };
137
-
138
- const join =
139
- (options: ApplicationProgrammer.IOptions) =>
140
- (components: IJsonComponents) =>
141
- (extra: ISuperfluous): IJsonSchema | undefined => {
142
- // LIST UP METADATA
143
- const elements: [Metadata, IJsonSchema][] = Object.values(
144
- extra.patternProperties || {},
145
- );
146
- if (extra.additionalProperties)
147
- elements.push(extra.additionalProperties);
148
-
149
- // SHORT RETURN
150
- if (elements.length === 0) return undefined;
151
- else if (elements.length === 1) return elements[0]![1]!;
152
-
153
- // MERGE METADATA AND GENERATE VULNERABLE SCHEMA
154
- const meta: Metadata = elements
155
- .map((tuple) => tuple[0])
156
- .reduce((x, y) => Metadata.merge(x, y));
157
- return (
158
- application_schema(options)(true)(components)(meta)({
159
- "x-typia-required": false,
160
- }) ?? undefined
161
- );
162
- };
163
-
164
- interface ISuperfluous {
165
- additionalProperties?: [Metadata, IJsonSchema];
166
- patternProperties: Record<string, [Metadata, IJsonSchema]>;
167
- }
1
+ import { CommentFactory } from "../../factories/CommentFactory";
2
+
3
+ import { IJsDocTagInfo } from "../../metadata/IJsDocTagInfo";
4
+ import { Metadata } from "../../metadata/Metadata";
5
+ import { MetadataObject } from "../../metadata/MetadataObject";
6
+ import { IJsonComponents } from "../../schemas/IJsonComponents";
7
+
8
+ import { PatternUtil } from "../../utils/PatternUtil";
9
+
10
+ import { IJsonSchema } from "../../module";
11
+ import { ApplicationProgrammer } from "../ApplicationProgrammer";
12
+ import { JSON_COMPONENTS_PREFIX } from "./JSON_SCHEMA_PREFIX";
13
+ import { application_schema } from "./application_schema";
14
+ import { metadata_to_pattern } from "./metadata_to_pattern";
15
+
16
+ /**
17
+ * @internal
18
+ */
19
+ export const application_object =
20
+ (options: ApplicationProgrammer.IOptions) =>
21
+ (components: IJsonComponents) =>
22
+ (obj: MetadataObject) =>
23
+ (
24
+ nullable: boolean,
25
+ ): IJsonSchema.IReference | IJsonSchema.IRecursiveReference => {
26
+ const key: string =
27
+ options.purpose === "ajv"
28
+ ? obj.name
29
+ : `${obj.name}${nullable ? ".Nullable" : ""}`;
30
+ const $id: string = `${JSON_COMPONENTS_PREFIX}/schemas/${key}`;
31
+ const out = () =>
32
+ options.purpose === "ajv" && obj.recursive
33
+ ? { $recursiveRef: $id }
34
+ : { $ref: $id };
35
+
36
+ // TEMPORARY ASSIGNMENT
37
+ if (components.schemas?.[key] !== undefined) return out();
38
+ components.schemas ??= {};
39
+ components.schemas[key] = {} as any;
40
+
41
+ // ITERATE PROPERTIES
42
+ const properties: Record<string, any> = {};
43
+ const extraMeta: ISuperfluous = {
44
+ patternProperties: {},
45
+ additionalProperties: undefined,
46
+ };
47
+ const required: string[] = [];
48
+
49
+ for (const property of obj.properties) {
50
+ if (
51
+ property.value.functional === true &&
52
+ property.value.nullable === false &&
53
+ property.value.required === true &&
54
+ property.value.size() === 0
55
+ )
56
+ continue;
57
+
58
+ const key: string | null = property.key.getSoleLiteral();
59
+ const schema: IJsonSchema | null = application_schema(options)(
60
+ true,
61
+ )(components)(property.value)({
62
+ deprecated:
63
+ !!property.jsDocTags.find(
64
+ (tag) => tag.name === "deprecated",
65
+ ) || undefined,
66
+ title: (() => {
67
+ const info: IJsDocTagInfo | undefined =
68
+ property.jsDocTags.find((tag) => tag.name === "title");
69
+ return info?.text?.length
70
+ ? CommentFactory.merge(info.text)
71
+ : undefined;
72
+ })(),
73
+ description: property.description ?? undefined,
74
+ "x-typia-metaTags": property.tags.length
75
+ ? property.tags
76
+ : undefined,
77
+ "x-typia-jsDocTags": property.jsDocTags.length
78
+ ? property.jsDocTags
79
+ : undefined,
80
+ "x-typia-required": property.value.required,
81
+ "x-typia-optional": property.value.optional,
82
+ });
83
+
84
+ if (schema === null) continue;
85
+ else if (key !== null) {
86
+ properties[key] = schema;
87
+ if (property.value.required === true) required.push(key);
88
+ } else {
89
+ const pattern: string = metadata_to_pattern(true)(property.key);
90
+ if (pattern === PatternUtil.STRING)
91
+ extraMeta.additionalProperties = [property.value, schema];
92
+ else
93
+ extraMeta.patternProperties[pattern] = [
94
+ property.value,
95
+ schema,
96
+ ];
97
+ }
98
+ }
99
+
100
+ const extraProps = {
101
+ additionalProperties: extraMeta.additionalProperties?.[1],
102
+ patternProperties: (() => {
103
+ if (Object.keys(extraMeta.patternProperties).length === 0)
104
+ return undefined;
105
+ const output: Record<string, IJsonSchema> = {};
106
+ for (const [key, value] of Object.entries(
107
+ extraMeta.patternProperties,
108
+ ))
109
+ output[key] = value[1];
110
+ return output;
111
+ })(),
112
+ };
113
+ const schema: IJsonComponents.IObject = {
114
+ $id: options.purpose === "ajv" ? $id : undefined,
115
+ $recursiveAnchor:
116
+ (options.purpose === "ajv" && obj.recursive) || undefined,
117
+ type: "object",
118
+ properties,
119
+ nullable: options.purpose === "swagger" ? nullable : undefined,
120
+ required: required.length ? required : undefined,
121
+ description: obj.description,
122
+ "x-typia-jsDocTags": obj.jsDocTags,
123
+ ...(options.purpose === "ajv"
124
+ ? extraProps
125
+ : {
126
+ // swagger can't express patternProperties
127
+ "x-typia-additionalProperties":
128
+ extraProps.additionalProperties,
129
+ "x-typia-patternProperties": extraProps.patternProperties,
130
+ additionalProperties:
131
+ join(options)(components)(extraMeta),
132
+ }),
133
+ };
134
+ components.schemas[key] = schema;
135
+ return out();
136
+ };
137
+
138
+ const join =
139
+ (options: ApplicationProgrammer.IOptions) =>
140
+ (components: IJsonComponents) =>
141
+ (extra: ISuperfluous): IJsonSchema | undefined => {
142
+ // LIST UP METADATA
143
+ const elements: [Metadata, IJsonSchema][] = Object.values(
144
+ extra.patternProperties || {},
145
+ );
146
+ if (extra.additionalProperties)
147
+ elements.push(extra.additionalProperties);
148
+
149
+ // SHORT RETURN
150
+ if (elements.length === 0) return undefined;
151
+ else if (elements.length === 1) return elements[0]![1]!;
152
+
153
+ // MERGE METADATA AND GENERATE VULNERABLE SCHEMA
154
+ const meta: Metadata = elements
155
+ .map((tuple) => tuple[0])
156
+ .reduce((x, y) => Metadata.merge(x, y));
157
+ return (
158
+ application_schema(options)(true)(components)(meta)({
159
+ "x-typia-required": false,
160
+ }) ?? undefined
161
+ );
162
+ };
163
+
164
+ interface ISuperfluous {
165
+ additionalProperties?: [Metadata, IJsonSchema];
166
+ patternProperties: Record<string, [Metadata, IJsonSchema]>;
167
+ }