ajv
ajv copied to clipboard
strictRequired should allow properties from parent schemas
What issue does this pull request resolve? https://github.com/ajv-validator/ajv/issues/1950
What changes did you make?
- Extra tests to prove behavior
- Tweak keyword execution order to ensure properties -> subschema
- Clone
it
context when passing to subschema
Is there anything that requires more attention while reviewing? I'm assuming tests should already be covering important cases, and those all pass.
But I guess there could be some concern about maintaining order of keyword validations?
https://ajv.js.org/guide/modifying-data.html
the order of evaluation of keywords, while consistent between validations and not dependent on how schema object is created, is neither documented nor guaranteed
Although even if order did "break" something that appears to within the semver "contract" of AJV?