Spotted some examples that we're incorrect so I've written some checks to parse the JSON examples and validate them against a schema.
Using pytest, I've used paramatised tests to invoke the test for each markdown file in the repo. Then used commonmark to parse the markdown file into AST, traversed the AST for code blocks and then validated the ones that are JSON as Refract. The schema is not created here, it is already reviewed and from https://github.com/refractproject/refract-spec/blob/061ebe58af83f0cca84f33c69fb22f654826ef06/formats/json-refract-schema.json, I realise it probably doesn't belong there anymore, welcome to any suggestions on some alternative structure.
Spotted some examples that we're incorrect so I've written some checks to parse the JSON examples and validate them against a schema.
Using pytest, I've used paramatised tests to invoke the test for each markdown file in the repo. Then used commonmark to parse the markdown file into AST, traversed the AST for code blocks and then validated the ones that are JSON as Refract. The schema is not created here, it is already reviewed and from https://github.com/refractproject/refract-spec/blob/061ebe58af83f0cca84f33c69fb22f654826ef06/formats/json-refract-schema.json, I realise it probably doesn't belong there anymore, welcome to any suggestions on some alternative structure.