Closed soumilbaldota closed 3 months ago
Thanks for raising this, @soumilbaldota. Coincidentally, I am facing the same issue
Well, the typia.json.assertStringify()
function does not serialize surplus properties that are not registered in the TypeScript type.
Is there any special reason that you need the typia.json.assertEqualStringify()
function?
@samchon I am using a library that gives somewhat polymorphic responses based on the input but may have some data that I don't want the clients to receive. Hence I want to validate if there are any extra properties, I want to throw acceptable errors when encountering such things.
I repeat that, @TypedRoute()
makes client not to receive any surplur properties.
@TypedRoute
converts to only explicitly typed properties in the DTO structure.
I am attempting to use TypedRoute with assertEqual instead of the default assert in a Nest.js application. I need a more complete list of errors and what was wrong in the body of the response compared to my schema. It seems that there is no typia.assertEqualsStringify() function available in typia.
How can I successfully achieve this? with some workaround? Thank you.