From d73a193e25baebce74ca312fb2883955e76f4898 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 30 Jul 2024 17:31:17 +0900 Subject: [PATCH] Enhance `MetadataObject.isLiteral()` function. --- benchmark/package.json | 2 +- errors/package.json | 2 +- package.json | 6 +- packages/typescript-json/package.json | 4 +- src/programmers/IsProgrammer.ts | 2 +- .../internal/application_escaped.ts | 2 +- .../application_union_discriminator.ts | 2 +- .../internal/application_v30_object.ts | 2 +- .../internal/application_v31_object.ts | 3 +- .../internal/application_v31_schema.ts | 21 +++--- .../json/JsonStringifyProgrammer.ts | 2 +- src/schemas/metadata/MetadataConstantValue.ts | 4 + src/schemas/metadata/MetadataObject.ts | 35 +++------ test-esm/package.json | 2 +- test/package.json | 2 +- test/schemas/json/v3_0/ObjectLiteralType.json | 44 +++++------ test/schemas/json/v3_0/UltimateUnion.json | 47 ++++++------ test/schemas/json/v3_1/ObjectLiteralType.json | 40 +++++----- test/schemas/json/v3_1/UltimateUnion.json | 41 +++++----- .../metadata/ConstantConstEnumeration.json | 20 +++-- .../reflect/metadata/ConstantEnumeration.json | 20 +++-- .../reflect/metadata/UltimateUnion.json | 75 ++++++++++++++++--- website/package.json | 2 +- 23 files changed, 221 insertions(+), 159 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index 46ae33ed06..2318b0d949 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -72,6 +72,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.6.0.tgz" + "typia": "../typia-6.6.1.tgz" } } \ No newline at end of file diff --git a/errors/package.json b/errors/package.json index d4aa4b4252..476546f2da 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-6.6.0.tgz" + "typia": "../typia-6.6.1.tgz" } } \ No newline at end of file diff --git a/package.json b/package.json index daee82295f..65547f4586 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.6.0", + "version": "6.6.1", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -67,7 +67,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "@samchon/openapi": "^0.4.2", + "@samchon/openapi": "^0.4.3", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", @@ -92,7 +92,7 @@ "rollup": "^4.18.0", "suppress-warnings": "^1.0.2", "ts-node": "^10.9.2", - "typescript": "^5.5.3" + "typescript": "^5.5.4" }, "stackblitz": { "startCommand": "npm install && npm run test" diff --git a/packages/typescript-json/package.json b/packages/typescript-json/package.json index 05fbbadce7..5a2b4e7350 100644 --- a/packages/typescript-json/package.json +++ b/packages/typescript-json/package.json @@ -1,6 +1,6 @@ { "name": "typescript-json", - "version": "6.6.0", + "version": "6.6.1", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -63,7 +63,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "typia": "6.6.0" + "typia": "6.6.1" }, "peerDependencies": { "typescript": ">=4.8.0 <5.6.0" diff --git a/src/programmers/IsProgrammer.ts b/src/programmers/IsProgrammer.ts index d54be30ada..c495e75f22 100644 --- a/src/programmers/IsProgrammer.ts +++ b/src/programmers/IsProgrammer.ts @@ -135,7 +135,7 @@ export namespace IsProgrammer { // ONLY WHEN OBJECT WITH SOME ATOMIC PROPERTIES const obj: MetadataObject = target.objects[0]!; if ( - obj._Is_simple(explore.from === "top" ? 0 : 1) && + obj.isPlain(explore.from === "top" ? 0 : 1) && (equals === false || OptionPredicator.undefined(project.options) === false) ) diff --git a/src/programmers/internal/application_escaped.ts b/src/programmers/internal/application_escaped.ts index d5cc2925a5..0e2a070156 100644 --- a/src/programmers/internal/application_escaped.ts +++ b/src/programmers/internal/application_escaped.ts @@ -18,7 +18,7 @@ export const application_escaped = const string: StringSchema | undefined = is_string(output) ? output : is_one_of(output) - ? output.oneOf.find(is_string) + ? (output.oneOf.find(is_string) as StringSchema) : undefined; if ( string !== undefined && diff --git a/src/programmers/internal/application_union_discriminator.ts b/src/programmers/internal/application_union_discriminator.ts index df882c29da..08a5f3a296 100644 --- a/src/programmers/internal/application_union_discriminator.ts +++ b/src/programmers/internal/application_union_discriminator.ts @@ -10,7 +10,7 @@ export const application_union_discriminator = ( if ( meta.size() === 0 || meta.size() !== meta.objects.length || - meta.objects.some((o) => o._Is_literal()) === true + meta.objects.some((o) => o.isLiteral()) === true ) return undefined; const specialized: UnionPredicator.ISpecialized[] = UnionPredicator.object( diff --git a/src/programmers/internal/application_v30_object.ts b/src/programmers/internal/application_v30_object.ts index 408840835f..636518d325 100644 --- a/src/programmers/internal/application_v30_object.ts +++ b/src/programmers/internal/application_v30_object.ts @@ -21,7 +21,7 @@ export const application_v30_object = ( nullable: boolean, ): OpenApiV3.IJsonSchema.IReference | OpenApiV3.IJsonSchema.IObject => { - if (obj._Is_literal() === true) + if (obj.isLiteral() === true) return create_object_schema(components)(obj)(nullable); const key: string = `${obj.name}${nullable ? ".Nullable" : ""}`; diff --git a/src/programmers/internal/application_v31_object.ts b/src/programmers/internal/application_v31_object.ts index 36c4034fa8..3d211497ba 100644 --- a/src/programmers/internal/application_v31_object.ts +++ b/src/programmers/internal/application_v31_object.ts @@ -21,8 +21,7 @@ export const application_v31_object = ( obj: MetadataObject, ): OpenApi.IJsonSchema.IReference | OpenApi.IJsonSchema.IObject => { - if (obj._Is_literal() === true) - return create_object_schema(components)(obj); + if (obj.isLiteral() === true) return create_object_schema(components)(obj); const key: string = obj.name; const $ref: string = `#/components/schemas/${key}`; diff --git a/src/programmers/internal/application_v31_schema.ts b/src/programmers/internal/application_v31_schema.ts index 4afde0ce8e..32929c91c4 100644 --- a/src/programmers/internal/application_v31_schema.ts +++ b/src/programmers/internal/application_v31_schema.ts @@ -51,11 +51,11 @@ export const application_v31_schema = if (meta.escaped !== null) application_escaped(application_v31_schema(false)(components)({}))( meta.escaped, - ).forEach(insert); + ).forEach(insert as any); // ATOMIC TYPES if (meta.templates.length && AtomicPredicator.template(meta)) - application_templates(meta).map(insert); + application_templates(meta).map(insert as any); for (const constant of meta.constants) if (constant.type === "bigint") throw new TypeError(NO_BIGINT); else if (AtomicPredicator.constant(meta)(constant.type) === false) @@ -63,15 +63,18 @@ export const application_v31_schema = else application_v31_constant(constant).map(insert); for (const a of meta.atomics) if (a.type === "bigint") throw new TypeError(NO_BIGINT); - else if (a.type === "boolean") application_boolean(a).forEach(insert); - else if (a.type === "number") application_number(a).forEach(insert); - else if (a.type === "string") application_string(a).forEach(insert); + else if (a.type === "boolean") + application_boolean(a).forEach(insert as any); + else if (a.type === "number") + application_number(a).forEach(insert as any); + else if (a.type === "string") + application_string(a).forEach(insert as any); // ARRAY for (const array of meta.arrays) application_array(application_v31_schema(false)(components)({}))( components, - )(array).forEach(insert); + )(array).forEach(insert as any); // TUPLE for (const tuple of meta.tuples) @@ -94,7 +97,7 @@ export const application_v31_schema = type: "boolean", tags: [], }), - )[0]!, + )[0]! as any, ); else if (type === "number") insert( @@ -103,7 +106,7 @@ export const application_v31_schema = type: "number", tags: [], }), - )[0]!, + )[0]! as any, ); else if (type === "string") insert( @@ -112,7 +115,7 @@ export const application_v31_schema = type: "string", tags: [], }), - )[0]!, + )[0]! as any, ); } else insert(application_v31_native(components)(native)); if (meta.sets.length) insert(application_v31_native(components)(`Set`)); diff --git a/src/programmers/json/JsonStringifyProgrammer.ts b/src/programmers/json/JsonStringifyProgrammer.ts index d6ca47faa0..fadb9804c0 100644 --- a/src/programmers/json/JsonStringifyProgrammer.ts +++ b/src/programmers/json/JsonStringifyProgrammer.ts @@ -395,7 +395,7 @@ export namespace JsonStringifyProgrammer { value: () => meta.isParentResolved() === false && meta.objects.length === 1 && - meta.objects[0]!._Is_simple(explore.from === "top" ? 0 : 1) + meta.objects[0]!.isPlain(explore.from === "top" ? 0 : 1) ? (() => { const obj: MetadataObject = meta.objects[0]!; const entries: IExpressionEntry[] = diff --git a/src/schemas/metadata/MetadataConstantValue.ts b/src/schemas/metadata/MetadataConstantValue.ts index a2646c52c7..3266ae2893 100644 --- a/src/schemas/metadata/MetadataConstantValue.ts +++ b/src/schemas/metadata/MetadataConstantValue.ts @@ -28,6 +28,8 @@ export class MetadataConstantValue { return MetadataConstantValue.create({ value: typeof json.value === "bigint" ? BigInt(json.value) : json.value, tags: json.tags, + description: json.description, + jsDocTags: json.jsDocTags, }); } @@ -40,6 +42,8 @@ export class MetadataConstantValue { value: typeof this.value === "bigint" ? this.value.toString() : this.value, tags: this.tags, + description: this.description, + jsDocTags: this.jsDocTags, }; } } diff --git a/src/schemas/metadata/MetadataObject.ts b/src/schemas/metadata/MetadataObject.ts index 058bf78378..e10ebe4192 100644 --- a/src/schemas/metadata/MetadataObject.ts +++ b/src/schemas/metadata/MetadataObject.ts @@ -71,20 +71,7 @@ export class MetadataObject { }); } - /** - * @internal - */ - public _Messagable(): boolean { - return ( - this.properties.length >= 1 && - this.properties.every((p) => p.key.isSoleLiteral()) - ); - } - - /** - * @internal - */ - public _Is_simple(level: number = 0): boolean { + public isPlain(level: number = 0): boolean { return ( this.recursive === false && this.properties.length < 10 && @@ -97,23 +84,21 @@ export class MetadataObject { (property.value.atomics.length === 1 || (level < 1 && property.value.objects.length === 1 && - property.value.objects[0]!._Is_simple(level + 1))), + property.value.objects[0]!.isPlain(level + 1))), ) ); } - /** - * @internal - */ - public _Is_literal(): boolean { + public isLiteral(): boolean { return (this.literal_ ??= (() => { if (this.recursive === true) return false; - else if (this.name === "__type") return true; - else if (this.name.startsWith("__type.o") === false) return false; - - const last: string = this.name.substr("__type.o".length); - const value: number = Number(last); - return isNaN(value) === false && Number.isInteger(value); + return ( + this.name === "__type" || + this.name === "__object" || + this.name.startsWith("__type.") || + this.name.startsWith("__object.") || + this.name.includes("readonly [") + ); })()); } diff --git a/test-esm/package.json b/test-esm/package.json index d6d4555df6..cafa592ea3 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-6.6.0.tgz" + "typia": "../typia-6.6.1.tgz" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index d2dc0c30a5..b34ade671a 100644 --- a/test/package.json +++ b/test/package.json @@ -51,6 +51,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.6.0.tgz" + "typia": "../typia-6.6.1.tgz" } } \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectLiteralType.json b/test/schemas/json/v3_0/ObjectLiteralType.json index c30d88e27e..430f7f767d 100644 --- a/test/schemas/json/v3_0/ObjectLiteralType.json +++ b/test/schemas/json/v3_0/ObjectLiteralType.json @@ -1,32 +1,26 @@ { "version": "3.0", - "components": { - "schemas": { - "__object": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "age": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "age" - ] - } - } - }, + "components": {}, "schemas": [ { - "$ref": "#/components/schemas/__object" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "nullable": false, + "required": [ + "id", + "name", + "age" + ] } ] } \ No newline at end of file diff --git a/test/schemas/json/v3_0/UltimateUnion.json b/test/schemas/json/v3_0/UltimateUnion.json index aeaa136581..8c308a2442 100644 --- a/test/schemas/json/v3_0/UltimateUnion.json +++ b/test/schemas/json/v3_0/UltimateUnion.json @@ -473,10 +473,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ], "title": "Additional items", @@ -572,10 +572,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ], "title": "Additional properties' info", @@ -684,10 +684,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ] }, @@ -721,9 +721,22 @@ ], "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." }, - "OpenApi.IJsonSchema.IUnknown": { + "OpenApi.IJsonSchema.INull": { "type": "object", "properties": { + "default": { + "type": "null", + "title": "Default value", + "description": "Default value." + }, + "type": { + "type": "string", + "enum": [ + "null" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, "title": { "type": "string", "title": "Title of the schema", @@ -741,19 +754,14 @@ } }, "nullable": false, - "description": "Unknown, `any` type." + "required": [ + "type" + ], + "description": "Null type." }, - "OpenApi.IJsonSchema.INull": { + "OpenApi.IJsonSchema.IUnknown": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "null" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, "title": { "type": "string", "title": "Title of the schema", @@ -771,10 +779,7 @@ } }, "nullable": false, - "required": [ - "type" - ], - "description": "Null type." + "description": "Unknown, `any` type." }, "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { "type": "object", diff --git a/test/schemas/json/v3_1/ObjectLiteralType.json b/test/schemas/json/v3_1/ObjectLiteralType.json index 8ba192af6d..65d68881d9 100644 --- a/test/schemas/json/v3_1/ObjectLiteralType.json +++ b/test/schemas/json/v3_1/ObjectLiteralType.json @@ -1,31 +1,27 @@ { "version": "3.1", "components": { - "schemas": { - "__object": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "age": { - "type": "number" - } - }, - "required": [ - "id", - "name", - "age" - ] - } - } + "schemas": {} }, "schemas": [ { - "$ref": "#/components/schemas/__object" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] } ] } \ No newline at end of file diff --git a/test/schemas/json/v3_1/UltimateUnion.json b/test/schemas/json/v3_1/UltimateUnion.json index 1c2e3b049f..8896b9947f 100644 --- a/test/schemas/json/v3_1/UltimateUnion.json +++ b/test/schemas/json/v3_1/UltimateUnion.json @@ -447,10 +447,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ], "title": "Additional items", @@ -542,10 +542,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ], "title": "Additional properties' info", @@ -649,10 +649,10 @@ "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" }, { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" } ] }, @@ -685,9 +685,19 @@ ], "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." }, - "OpenApi.IJsonSchema.IUnknown": { + "OpenApi.IJsonSchema.INull": { "type": "object", "properties": { + "default": { + "type": "null", + "title": "Default value", + "description": "Default value." + }, + "type": { + "const": "null", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, "title": { "type": "string", "title": "Title of the schema", @@ -704,16 +714,14 @@ "description": "Whether the type is deprecated or not." } }, - "description": "Unknown, `any` type." + "required": [ + "type" + ], + "description": "Null type." }, - "OpenApi.IJsonSchema.INull": { + "OpenApi.IJsonSchema.IUnknown": { "type": "object", "properties": { - "type": { - "const": "null", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, "title": { "type": "string", "title": "Title of the schema", @@ -730,10 +738,7 @@ "description": "Whether the type is deprecated or not." } }, - "required": [ - "type" - ], - "description": "Null type." + "description": "Unknown, `any` type." }, "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { "type": "object", diff --git a/test/schemas/reflect/metadata/ConstantConstEnumeration.json b/test/schemas/reflect/metadata/ConstantConstEnumeration.json index 3dcb296f6a..97fd5b2fe5 100644 --- a/test/schemas/reflect/metadata/ConstantConstEnumeration.json +++ b/test/schemas/reflect/metadata/ConstantConstEnumeration.json @@ -44,15 +44,21 @@ "values": [ { "value": 0, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": 1, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": 2, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] } ] }, @@ -61,11 +67,15 @@ "values": [ { "value": "Three", - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": "Four", - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] } ] } diff --git a/test/schemas/reflect/metadata/ConstantEnumeration.json b/test/schemas/reflect/metadata/ConstantEnumeration.json index e4692bad29..30c8dda15e 100644 --- a/test/schemas/reflect/metadata/ConstantEnumeration.json +++ b/test/schemas/reflect/metadata/ConstantEnumeration.json @@ -44,15 +44,21 @@ "values": [ { "value": 0, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": 1, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": 2, - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] } ] }, @@ -61,11 +67,15 @@ "values": [ { "value": "Three", - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] }, { "value": "Four", - "tags": [] + "tags": [], + "description": null, + "jsDocTags": [] } ] } diff --git a/test/schemas/reflect/metadata/UltimateUnion.json b/test/schemas/reflect/metadata/UltimateUnion.json index 4c1e410dd6..ea19b388bf 100644 --- a/test/schemas/reflect/metadata/UltimateUnion.json +++ b/test/schemas/reflect/metadata/UltimateUnion.json @@ -378,8 +378,8 @@ "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], @@ -2922,8 +2922,8 @@ "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], @@ -3504,8 +3504,8 @@ "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], @@ -4083,8 +4083,8 @@ "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], @@ -4916,6 +4916,57 @@ { "name": "OpenApi.IJsonSchema.INull", "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functional": false, + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "default" + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": true, + "nullable": true, + "functional": false, + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": "Default value.", + "jsDocTags": [] + }, { "key": { "any": false, @@ -7558,8 +7609,8 @@ "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], @@ -7597,8 +7648,8 @@ "OpenApi.IJsonSchema.ITuple", "OpenApi.IJsonSchema.IObject", "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IUnknown", - "OpenApi.IJsonSchema.INull" + "OpenApi.IJsonSchema.INull", + "OpenApi.IJsonSchema.IUnknown" ], "aliases": [], "natives": [], diff --git a/website/package.json b/website/package.json index 60059ed5c8..53d69b1d91 100644 --- a/website/package.json +++ b/website/package.json @@ -37,7 +37,7 @@ "tgrid": "^1.0.2", "tstl": "^3.0.0", "typescript": "^5.5.4", - "typia": "^6.6.0" + "typia": "^6.6.1" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0",