is-express-schema-valid icon indicating copy to clipboard operation
is-express-schema-valid copied to clipboard

validate function has side-effects

Open pstadler opened this issue 8 years ago • 0 comments

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.

pstadler avatar Jan 16 '17 18:01 pstadler