Skip to content

practical questions about schema #333

@gmabey

Description

@gmabey
  1. should all keys identified in a schema JSON file be required to have the same namespace? (all characters before the first ":")
  2. should the name of the schema file be required to identify that namespace? If so then sigmf-schema.json would be renamed core-schema.json, for example. Is there a better way to definitely indicate the namespace of a schema? Or maybe a requirement that implies sigmf-core-schema.json, sigmf-antenna-schema.json.
  3. can a key have more than one : in it?
  4. I understand [1] that there's no convention within the JSON schema to indicate a version number. That leaves the "$schema" field, which could have a version number embedded in it, as does that value in antenna-schema.json. This implies that the "version" field in the spec could change to "schema" which would inherently include a name and a version. If you buy into that, then perhaps the "name" field should change to "namespace" ...

One conundrum I'm experiencing (that is motivating these questions) is that I attempted to validate a .sigmf-meta file against antenna-schema.json and it failed, because antenna:model is required. That's fine, but I see a need to correlate an item in "core:extensions" with a specific .json file, so that they can be selectively applied.

If we agree that the namespace should be part of the schema filename, then I wonder whether there's a good reason for containing the community extensions within subdirectories. That is, if the file name contains the namespace, then that ought to be good enough for uniqueness. Any other information regarding the author or origin of the schema should probably be contained in "description", no?

[1] https://stackoverflow.com/questions/61077293/is-there-a-standard-for-specifying-a-version-for-json-schema

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