kit-data-manager / kit-data-manager/Metadata-Schemas-for-Materials-Science
"required": ["email", "orcid"] in user_description may be disfunctional
- Dominant language
- No language data
- Stars
- 10
- Forks
- 6
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Currently this is the contact definition in user_description.json
```
"contact": {
"type": "array",
"items": {
"oneOf": [
{
"required": [
"email", "orcid"
],
"title": "Email",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "(Optional) - Email Address"
}
}
},
{
"title": "ORCID",
"type": "object",
"properties": {
"orcid": {
"type": "string",
"description": "(Optional) - ORCID URL",
"pattern": "^https://orcid\\.org/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[X0-9]{1}$"
}
}
}
]
}
}
```
It looks like the following json files are valid:
```
{
"userName": "Peter",
"role": "Team Leader"
}
```
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
]
}
```
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
{"email": "some@thing.com"}
]
}
```
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
{"orcid": "https://orcid.org/0000-0002-1825-0097"}
]
}
```
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
{"email": "some@thing.com"},
{"orcid": "https://orcid.org/0000-0002-1825-0097"}
]
}
```
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
{"orcid": "https://orcid.org/0000-0002-1825-0097"},
{}
]
}
```
invalid:
```
{
"userName": "Peter",
"role": "Team Leader",
"contact": [
{"email": "some@thing.com", "orcid": "https://orcid.org/0000-0002-1825-0097"}
]
}
```
I am not exactly sure what the intention behind the required statement is. In case it should disallow an empty contact array (which I would find reasonable) or a contact array with an empty element, or even a missing contact, it fails to do so
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with user_description.json and inspect the contact schema against the valid and invalid examples in the issue. Clarify which contact-array and object cases are intended to pass or fail, then update the schema so validation matches that decision and recheck every listed example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100