You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the YAML schema is essentially dictated programmatically by the Ops Indexer. If we had an external schema file it could be used by existing tools for validation and versioning of Op YAML. There are many advantages to this, not least that we wouldn't have to maintain code for this validation logic.
See this branch for a Python script that is able to validate YAML. It's only tangentially related, but is nice to pair with any schema. Unfortunately, the schema library does not support validation against a YAML schema as far as I can tell - @ctrueden suggested looking at Yamale as an alternative.
Activity
hinerm commentedon May 15, 2024
I think for YAML, schema's can just be a file with the expected fields and types. Here's an example from ChatGPT:

But there are questions.. like how are optional/required keys differentiated?
Also worth reading about converting to JSON and validating there
gselzer commentedon May 17, 2024
See this branch for a Python script that is able to validate YAML. It's only tangentially related, but is nice to pair with any schema. Unfortunately, the schema library does not support validation against a YAML schema as far as I can tell - @ctrueden suggested looking at Yamale as an alternative.