Closed wwags33 closed 5 months ago
But with the other way around, leaving additionalProperties undefined and passing it through a validator and most parsers would retain the properties instead of stripping them like Zod, so I'm not sure there's a clear answer here
Ive thought about it and it makes sense, but it since it's a breaking change I will probably put it behind an option. Not sure if I have time to put it in the upcoming release though, we'll see
Hi, I wrote a branch with an option to allow this, Its my first time submitting a PR to someone else's repo, so I'm not sure what the correct way to do so is...
My objects pass zod parse, but they are failing ajv validation due to additionalProperties being false on all objects the schema.
I would expect the additionalProperties to be false if the zod definition included strict on each object:
In this case, zod parse would match the validation behavior.
Instead I am required to add .passthrough() to all objects in the schema to get similar parse/validate functionality.