Closed aentwist closed 1 week ago
@aentwist Yes, this is a design choice. This reminds you that JSON Schemas do not deny additional properties by default.
You can remove it by using additionalProperties: false
, or unevaluatedProperties: false
.
Thank you for the fantastic answer. I appreciate it.
This goes against TS, I'd prefer objects of known and well-defined types to not accept additional fields that don't exist. If I wanted a subtype I'd explicitly declare it. What was the design choice with this?