As I stated last time, this was a pretty short week.
I only added one thing to the validator, which is evaluation phases.
The idea is simple, not all keywords are created equal, some need to be processed earlier (like $schema and $id), while some need to be processed later (like the unevaluated keywords). So I've introduced evaluation phases to support this behavior.
Each draft object now has a PHASE_ORDER property, which is an array of phases (where a phase is just an enum string), each keyword has a specific phase assigned to it, the ValidationContext.evaluate function doesn't just go through all the entries of the schema object in their written order anymore, but rather, it goes through them based on the phases in the PHASE_ORDER array, allowing for different keywords to be evaluated in different phases.
The code can be found on GitHub
Top comments (0)