Skip to content
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

Update isajson schema to draft 07 #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

HLWeil
Copy link

@HLWeil HLWeil commented Dec 14, 2022

In some fields, the isajson schema is too strict to pass validation for the example files provided here: https://github.com/ISA-tools/ISAdatasets/tree/master/json

This is because of two types of fields, namely the @id fields and the date fields.

  • @id fields are defined in the schemas to only validate against strings of format uri, which expects full uris like http://example.org/wiki/Main_Page. In contrast to this, ids like "#sample/sample-N-0.2-aliquot2" are used, which seems sensible to do but fails the validation. Using the format specification uri-reference instead of uri could soften this up, but requires json schema draft 06.
  • @date fields are defined in the schemas to only validate against strings of format date-time, which expects full date and time information like 2020-05-04T02:15:00.0Z but fails when just specifying the date. I propose to use an any-of between date-time and date, which requires json schema draft 07.

In this PR are my requested changes, upping the json schema draft version and using the aforementioned string format specification changes.

The example files also contain other errors causing the validation to fail, but these are actual format errors like empty strings when a URI should be given. I will open up an issue there

@terazus
Copy link

terazus commented Dec 19, 2022

Hello @HLWeil,
Thank you very much for the pull request.
I agree with everything. My only minor concern is that we should using oneOf instead of anyOf for the different date formats.
We will also update the ISA api accordingly is this changes are okay for you.
Medium term we also intend on creating a decidated repository for the ISA schemas so that we can release and version them indenpendently from the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants