-
Notifications
You must be signed in to change notification settings - Fork 3
Description
There should be a way to assert that a particular JSON-encoded CSB document should be validated against a particular CSB schema version. The convention within JSON Schema usage appears to be to include a "$schema" property whose value is the URI/URL of a schema file (i.e. the value of the "$id" property defined in that JSON Schema file).
For example, a document that should be validated against version 3.1.0-2023-08 of the CSB schema could include the following property at its top level:
{
"$schema": "https://raw.githubusercontent.com/CCOMJHC/csbschema/main/csbschema/data/CSB-schema-3_1_0-2023-08.json"
...
}
$schema would be an optional, but highly recommended property to be included in JSON-encoded CSB documents. As part of work to address this issue, csbschema validation code would be updated to autodetect the schema document to use when validating a particular document. This would allow for more flexibility in processing JSON-encoded CSB documents, especially where many files from multiple observers/trusted nodes need to be processed in bulk.