-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Json Schema Definition #275
Comments
Validation is indeed an area we need help with. Are there other problems with the schema besides not having extension fields in it? |
Yes there are problem on data validation for the string and numerical fields for example the datatype does allow any string to be input and the same are true for the uint fields that do not limit the min anx max for all the scenartios. I should have a PR adding those fix by the end of the day today... My idea was to put this PR in a spec folder in this repo but I am open to suggestions. |
I think the lack of a maintained json schema has been a hole, and it should live within this repo, we'll just have to determine the cleanest way for the python package to get a copy of it (e.g. submodule this repo?). Question- for the schema associated with each extension, is there a clean way to have them in separate files? I don't think it would be sustainable to have one large schema that includes the extensions. |
To add to Marc's point on individual extension schemas, adding them to a monolithic schema is unappealing since it makes it harder for people to validate just what they care about, and more importantly to add their own schema files for their own extensions. |
You can use $ref in order to extend JSON schemas that way if you were using extensions you could include the $ref and use all of those schemas and for someone developing their own schema they can use $ref with their own subschemas to include the properties they want https://json-schema.org/understanding-json-schema/structuring.html |
There is no Json Schema https://json-schema.org/ that we could use to validate a metadata file. in this repo we can find the file in the python repo. https://github.com/sigmf/sigmf-python/blob/main/sigmf/schema-meta.json
But even in the python repo it does have problems of not actually validating the input of the data.
The solution would be to create a json schema file that would encompass preferable all the core values but also the extensions if possible.
The text was updated successfully, but these errors were encountered: