[BUG] validate function sometimes return error with `expected` value being incorrect
Bug Report
📝 Summary
Write a short summary of the bug in here.
- Typia Version: 4.1.2
- Expected behavior:
The expected value when validation fails should contain correct and descriptive type
{
expected: "(Circular)",
path: "$input.property"
value: " "
}
- Actual behavior:
Currently, expected property can include values like __type.o2 or Array<_type>.o1 which doesn't exactly tell me what these types actually are.
Similar for description:
"The value at this path is `undefined`.\n\nPlease fill the `Array<__type>.o6` typed value next time."
These happens mainly in really complex types with nested structures with circular references.
⏯ Playground Link
https://typia.io/playground/?script=JYWwDg9gTgLgBDAnmYBDANHA3g1BzAZzgF84AzKCEOAIiRVRoG4AoF4AOxgFMozUAxtzgBhYFAEBXADaoo2FnDhhKYXkgBcCpUoBuqaZO5aCMKJzzpFOnqa1ZrOuASrcYACwtaOkkACNeRxIgsQkZOS1QqVkoa2IWePYuXn4hOABJAFluf15tZVV1REjxaLkrJSycgKgtKtzYxIEIDlM4EGq8gF4EZDQAOn1pYAATVB4AHnqagD4ACgclFQg1WGL8vQMjLQB2CptuO2x4pXjiAEpWFmbWiGlufukIPAXrDoaEy6A
see:
{
path: "$input.property.property",
expected: "__type",
value: undefined,
description: "The value at this path is `undefined`.\n\nPlease fill the `__type` typed value next time."
}
I suggest we use some descriptive name, for example grab Identifier Circular or for .value and .test.something we just use their type.
Will clear at https://github.com/samchon/typia/issues/1669 mission.