-
Notifications
You must be signed in to change notification settings - Fork 50
Schema update for relational data #1709
base: master
Are you sure you want to change the base?
Schema update for relational data #1709
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main issue here is the 'profile' property in the schema should refer back to the main schema. Otherwise there are 2+ profile schemas to maintain.
}, | ||
"profile": { | ||
"type": "object", | ||
"additionalProperties": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you 'ref' back to the main schema here? This object should confirm to the profile schema, and can contain relationships itself which isn't represented here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, hadn't realised a relationship could contain another relationship. I can't work out how to refer back to the main schema, but I have added a relationships section at the bottom, which seems to work. Not ideal to have fields, constraints and relationships defined twice though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do something like this?
...
"profile": {
"$ref": "#/"
}
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. From how I understand it you have to have some initial entries in the schema first, then they can refer to definitions below. I don't think you can effectively go straight to the definitions. I tried the above anyhow but it didn't work for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed @sl-slaing, our aim is to not change the profile format itself and to fix this in the schema. We also don't want to have fields, constraints and relationships defined in two places. The Recursion section of the JSON Schema Reference should help, just can't figure it out at the moment.
Co-authored-by: Simon Laing <[email protected]>
…c/datahelix into schema_update
Description
Extend the scope of the JSON schema to include validation of the relationships section of the profile (which is described here).
Changes
Additional notes
Couldn't work out how to do validation of extents.
Issue
Resolves #1708