kriszyp / json-schema

JSON Schema specifications, reference schemas, and a CommonJS implementation

Home Page:http://json-schema.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

validate shouldn't mutate input

jfirebaugh opened this issue · comments

validate will mutate the input object by adding default values for missing defaults. This is unexpected and in the typical case undesired -- the name validate implies a function to check, not modify, the input.

+1, that is an odd behavior. But, when this is fixed there should be a way to get the modified object with defaults inserted - just not by it mutating the input.