This was a pretty interesting week, it was more about what I didn't do rather than what I did do.
What I Did
I started this week with the goal of implementing the reference keywords, more specifically $id and $anchor .
Unlike most of the keywords I've worked on lately, this required some serious foundational changes.
Schema Registration
In order to reference schemas, the schemas need to be saved somewhere, so a schema registry was added, as well as a couple of functions for interacting with that schema registry ( registerSchema , unregisterSchema , etc.).
Schema Compilation
Keywords like $id and $anchor don't work during the evaluation process, but rather they're supposed to work before the evaluation process ever starts, as a result, a schema compilation process (also known as schema loading and schema pre-processing) is introduced, where the schema is traversed, keywords like $id and $anchor are searched for, and the schema registry is updated based on their values.
This schema compilation process…