Open Geksanit opened 8 months ago
This can be easily done by wrapping each generated type
into io-ts' exact
.
On the other hand, it is desirable sometimes to pass extra fields to the server, for example for features like "custom data" where the system objects can be extended with customer-specific fields.
Looks like this should be controlled by the additionalProperties
parameter in schemas, WDYT?
https://www.apimatic.io/openapi/additionalproperties
problem: If I send the payload with extra fields, then I get an error in the rest. rest does not expect extra fields.
I propose to prohibit extra fields, i.e. disable polymorphism.