-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add/hdruk/2.2 #24
Add/hdruk/2.2 #24
Conversation
|
||
| title | is_list | is_optional | required | type | | ||
|:-------------------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Dataset identifier | False | True | True | ["Uuidv4[{'maxLength': 36, 'minLength': 36, 'pattern': '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$', 'type': 'string'}]", "Url[{'anyOf': [{'format': 'uri', 'minLength': 1, 'type': 'string'}, {'type': 'null'}]}]", 'null'] | |
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.
What does it mean if a field is both optional
and required
?
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.
nice spot. Will look into this. We(I) have defined the identifier as:
identifier: Union[Uuidv4, Optional[Url]]
in the 2.1.2
schema that this inherits.
It's got confused as Optional[type]
is short-hand for Union[type,None]
So the identifier is effectively Union[Uuidv4,Url,None]
which would effectively make it not required.
We wanted this because the identifier gets generated by us, i.e. the pid
of a dataset. So we would overwrite whatever someone puts in as an identifier of their schema.
Will try to fix in subsequent schemas and review if this happens elsewhere
No description provided.