Closed pkarman closed 8 years ago
fails too many tests this way. will re-open with reverse logic (keeping original behavior by default).
@pkarman I second your opinion that we need a proper strict
mode.
I posted again on #103 where this was extensively discussed and also referenced your PR.
@cec thanks. I hadn't realized there was such a history here. I implemented this PR in complete ignorance (though it is interesting I chose basically the same implementation as mentioned in #103).
This PR is closed though; I reimplemented in #296
Perhaps it will help if I add an example of the schema we are testing.
@pkarman I'm sure that adding a schema will help others see the arguments behind this proposal, which I agree with completely.
I will join the discussion on #296 , which now I understand to be the one receiving some attention. I'll post an example schema of mine too.
Thank you!
We want to test if example JSON adheres to the schema, esp for required and additionalProperties. However, the current
:strict
behavior is too strict.The current behavior of
:strict
turns on an implied required for all properties. This PR makes that implicit requirement explicit, and off by default.To get the current behavior, this PR would require:
instead of simply
:strict => true
.