diff --git a/benchmark/package.json b/benchmark/package.json index 81707653d1..82918ab109 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.11.2.tgz" + "typia": "../typia-6.11.4.tgz" } } \ No newline at end of file diff --git a/errors/package.json b/errors/package.json index a232fa3670..83ad0d188b 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-6.11.2.tgz" + "typia": "../typia-6.11.4.tgz" } } \ No newline at end of file diff --git a/package.json b/package.json index 6e577e9011..ef1b8297cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.11.3", + "version": "6.11.4", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/src/programmers/internal/application_array.ts b/src/programmers/internal/application_array.ts index 2d59995961..a4b1e5aeb2 100644 --- a/src/programmers/internal/application_array.ts +++ b/src/programmers/internal/application_array.ts @@ -29,16 +29,19 @@ export const application_array = array.tags, ); if (array.type.recursive === true) { - const out = () => [{ $ref }]; - const $ref: string = `#/components/schemas/${array.type.name}`; - if (components.schemas?.[$ref] !== undefined) return out(); + const out = () => [ + { + $ref: `#/components/schemas/${array.type.name}`, + }, + ]; + if (components.schemas?.[array.type.name] !== undefined) return out(); components.schemas ??= {}; - components.schemas[$ref] ??= {}; + components.schemas[array.type.name] ??= {}; const oneOf: ArraySchema[] = factory(); Object.assign( - components.schemas[$ref]!, + components.schemas[array.type.name]!, oneOf.length === 1 ? oneOf[0] : { oneOf }, ); return out(); diff --git a/test-esm/package.json b/test-esm/package.json index 79226a514f..2a24a0d4d5 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-6.11.2.tgz" + "typia": "../typia-6.11.4.tgz" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 54cbb64fc4..66ba2191d9 100644 --- a/test/package.json +++ b/test/package.json @@ -52,6 +52,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.11.2.tgz" + "typia": "../typia-6.11.4.tgz" } } \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRepeatedNullable.json b/test/schemas/json/v3_0/ArrayRepeatedNullable.json index ede12f2abc..aced6dbef8 100644 --- a/test/schemas/json/v3_0/ArrayRepeatedNullable.json +++ b/test/schemas/json/v3_0/ArrayRepeatedNullable.json @@ -17,7 +17,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedNullable": { + "ArrayArrayRepeatedNullable": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedNullable" diff --git a/test/schemas/json/v3_0/ArrayRepeatedRequired.json b/test/schemas/json/v3_0/ArrayRepeatedRequired.json index a77819bd3c..6c2c13e7d2 100644 --- a/test/schemas/json/v3_0/ArrayRepeatedRequired.json +++ b/test/schemas/json/v3_0/ArrayRepeatedRequired.json @@ -15,7 +15,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedRequired": { + "ArrayArrayRepeatedRequired": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedRequired" diff --git a/test/schemas/json/v3_0/ArrayRepeatedUnion.json b/test/schemas/json/v3_0/ArrayRepeatedUnion.json index 9b0248a89b..cfeffa232a 100644 --- a/test/schemas/json/v3_0/ArrayRepeatedUnion.json +++ b/test/schemas/json/v3_0/ArrayRepeatedUnion.json @@ -27,7 +27,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedUnion": { + "ArrayArrayRepeatedUnion": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedUnion" diff --git a/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json b/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json index 72c599404f..ff19a74870 100644 --- a/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json +++ b/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json @@ -60,7 +60,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedUnionWithTuple": { + "ArrayArrayRepeatedUnionWithTuple": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple" diff --git a/test/schemas/json/v3_1/ArrayRepeatedNullable.json b/test/schemas/json/v3_1/ArrayRepeatedNullable.json index 1306db6379..ad9b85c6e6 100644 --- a/test/schemas/json/v3_1/ArrayRepeatedNullable.json +++ b/test/schemas/json/v3_1/ArrayRepeatedNullable.json @@ -18,7 +18,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedNullable": { + "ArrayArrayRepeatedNullable": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedNullable" diff --git a/test/schemas/json/v3_1/ArrayRepeatedRequired.json b/test/schemas/json/v3_1/ArrayRepeatedRequired.json index f64295cc7b..f6107cdd56 100644 --- a/test/schemas/json/v3_1/ArrayRepeatedRequired.json +++ b/test/schemas/json/v3_1/ArrayRepeatedRequired.json @@ -15,7 +15,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedRequired": { + "ArrayArrayRepeatedRequired": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedRequired" diff --git a/test/schemas/json/v3_1/ArrayRepeatedUnion.json b/test/schemas/json/v3_1/ArrayRepeatedUnion.json index d80b6bdc28..d4d77411a6 100644 --- a/test/schemas/json/v3_1/ArrayRepeatedUnion.json +++ b/test/schemas/json/v3_1/ArrayRepeatedUnion.json @@ -27,7 +27,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedUnion": { + "ArrayArrayRepeatedUnion": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedUnion" diff --git a/test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json b/test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json index fcf22cdf4d..2e329f7ad6 100644 --- a/test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json +++ b/test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json @@ -54,7 +54,7 @@ } ] }, - "#/components/schemas/ArrayArrayRepeatedUnionWithTuple": { + "ArrayArrayRepeatedUnionWithTuple": { "type": "array", "items": { "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple"