-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10543 from IQSS/10169-JSON-schema-validation
Improved JSON Schema validation for datasets
- Loading branch information
Showing
9 changed files
with
667 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Improved JSON Schema validation for datasets | ||
|
||
Enhanced JSON schema validation with checks for required and allowed child objects, type checking for field types including `primitive`, `compound` and `controlledVocabulary`. More user-friendly error messages to help pinpoint the issues in the dataset JSON. See [Retrieve a Dataset JSON Schema for a Collection](https://guides.dataverse.org/en/6.3/api/native-api.html#retrieve-a-dataset-json-schema-for-a-collection) in the API Guide and PR #10543. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"datasetVersion": { | ||
"license": { | ||
"name": "CC0 1.0", | ||
"uri": "http://creativecommons.org/publicdomain/zero/1.0" | ||
}, | ||
"metadataBlocks": { | ||
"citation": { | ||
"fields": [ | ||
{ | ||
"value": "HTML & More", | ||
"typeClass": "primitive", | ||
"multiple": false, | ||
"typeName": "title" | ||
}, | ||
{ | ||
"value": [ | ||
{ | ||
"authorName": { | ||
"value": "Markup, Marty", | ||
"typeClass": "primitive", | ||
"multiple": false, | ||
"typeName": "authorName" | ||
}, | ||
"authorAffiliation": { | ||
"value": "W4C", | ||
"typeClass": "primitive", | ||
"multiple": false, | ||
"typeName": "authorAffiliation" | ||
} | ||
} | ||
], | ||
"typeClass": "compound", | ||
"multiple": true, | ||
"typeName": "author" | ||
}, | ||
{ | ||
"value": [ | ||
{ | ||
"datasetContactEmail": { | ||
"typeClass": "primitive", | ||
"multiple": false, | ||
"typeName": "datasetContactEmail", | ||
"value": "markup@mailinator.com" | ||
}, | ||
"datasetContactName": { | ||
"typeClass": "primitive", | ||
"multiple": false, | ||
"typeName": "datasetContactName", | ||
"value": "Markup, Marty" | ||
} | ||
} | ||
], | ||
"typeClass": "compound", | ||
"multiple": true, | ||
"typeName": "datasetContact" | ||
}, | ||
{ | ||
"value": [ | ||
{ | ||
"dsDescriptionValue": { | ||
"value": "BEGIN<br></br>END", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"typeName": "dsDescriptionValue" | ||
}, | ||
"dsDescriptionDate": { | ||
"typeName": "dsDescriptionDate", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "2021-07-13" | ||
} | ||
} | ||
], | ||
"typeClass": "compound", | ||
"multiple": true, | ||
"typeName": "dsDescription" | ||
}, | ||
{ | ||
"value": [ | ||
"Medicine, Health and Life Sciences" | ||
], | ||
"typeClass": "controlledVocabulary", | ||
"multiple": true, | ||
"typeName": "subject" | ||
}, | ||
{ | ||
"typeName": "language", | ||
"multiple": true, | ||
"typeClass": "controlledVocabulary", | ||
"value": [ | ||
"English", | ||
"Afar", | ||
"aar" | ||
] | ||
} | ||
], | ||
"displayName": "Citation Metadata" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.