Open saggiyogesh opened 6 years ago
Hi, I will add support for strict
-option of mongoose-schema (https://mongoosejs.com/docs/guide.html#strict)
In case when strict
equals "throw"
the json schema will get additionalProperties: false
(the same behavior will be repeated for all nested mongoose schemas, but it could be overrided in the nested schema).
It is also possible that the global flag could be added to define default behavior).
Hi. Thanks for considering it. For time being I've forked the repo & implemented this.
up
Hi, didn't find any docs / example related to
additionalProperties
. By default, MongoDB keeps this as true.How can make it
additionalProperties: false
globally, so that child objects are also validated.Is this possible