Skip to content

Associate CSB JSON documents with a particular schema version #14

Description

@selimnairb

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions