hdmf-dev / hdmf-common-schema

Specifications for pre-defined data structures provided by HDMF.
Other
3 stars 7 forks source link

Add schema validation test #76

Closed rly closed 3 months ago

rly commented 11 months ago

Will need to modify https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/nwb.schema.json and see https://github.com/NeurodataWithoutBorders/nwb-schema/pull/379/files

sneakers-the-rat commented 8 months ago

I have something that might help with this - I transcribed the docs for the schema language into a linkml model https://github.com/p2p-ld/nwb-linkml/blob/dev/nwb_schema_language/src/nwb_schema_language/schema/nwb_schema_language.yaml

and that generates a JSON schema: https://github.com/p2p-ld/nwb-linkml/blob/dev/nwb_schema_language/project/jsonschema/nwb_schema_language.schema.json

and as far as I can tell that's as strict as the json schema. Happy to share custody of that repo since it's a faithful transcription of the schema language (ie. separate from any more opinionated translation i've done of the schemas themselves) and it could be a useful complement to hdmf.spec

rly commented 3 months ago

Fixed by #77.

Thanks @sneakers-the-rat for the suggestion and pointers. I think for now, we'll stick with the ones we have, but what you made will certainly be useful as we consider adopting linkml and want to make sure we do not add/remove support for features during the transition.