is-express-schema-valid
is-express-schema-valid copied to clipboard
validate function has side-effects
I'm using my schemas not only for validation but also to create API docs. Unfortunately, calling validate(schema)
adds a title
property to the schema object which is naturally passed as a reference.
An even bigger problem however is that this will overwrite properties called title
and therefore break validation.