From d266c75fff1ed3caaa3714e5c5e393b801ceb6e0 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Wed, 30 Mar 2022 13:46:25 +0300 Subject: [PATCH] keywords as list instead of array --- CHANGELOG.md | 1 + metadata_backend/helpers/schemas/datacite.json | 8 ++------ metadata_backend/helpers/schemas/folders.json | 8 ++------ tests/test_files/doi/test_doi.json | 5 +---- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f7cde3a6..5eb14dcf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - JSON schemas #332 - introduce `keywords` required for Metax in `doiInfo` - dataset `description` and study `studyAbstract` are now mandatory +- `keywords` will be comma separated values, that will require splitting when adding to Metax API ### Fixed diff --git a/metadata_backend/helpers/schemas/datacite.json b/metadata_backend/helpers/schemas/datacite.json index 0e205c93c..045c7fd0f 100644 --- a/metadata_backend/helpers/schemas/datacite.json +++ b/metadata_backend/helpers/schemas/datacite.json @@ -163,13 +163,9 @@ "uniqueItems": true }, "keywords": { - "type": "array", + "type": "string", "title": "Keywords", - "description": "A keyword or tag describing the resources. It is recommended to use a controlled vocabulary, ontology or classification when choosing keywords. At least one keyword is required.", - "items": { - "minLength": 1, - "type": "string" - } + "description": "A list of keywords or tags describing the resources. It is recommended to use a controlled vocabulary, ontology or classification when choosing keywords. Multiple keywords can be added, separating them by comma." }, "contributors": { "type": "array", diff --git a/metadata_backend/helpers/schemas/folders.json b/metadata_backend/helpers/schemas/folders.json index 968e6aaba..1b1bfb711 100644 --- a/metadata_backend/helpers/schemas/folders.json +++ b/metadata_backend/helpers/schemas/folders.json @@ -213,13 +213,9 @@ "uniqueItems": true }, "keywords": { - "type": "array", + "type": "string", "title": "Keywords", - "description": "A keyword or tag describing the resources. It is recommended to use a controlled vocabulary, ontology or classification when choosing keywords. At least one keyword is required.", - "items": { - "minLength": 1, - "type": "string" - } + "description": "A list of keywords or tags describing the resources. It is recommended to use a controlled vocabulary, ontology or classification when choosing keywords. Multiple keywords can be added, separating them by comma." }, "contributors": { "type": "array", diff --git a/tests/test_files/doi/test_doi.json b/tests/test_files/doi/test_doi.json index 17fa355a7..b2b0469ab 100644 --- a/tests/test_files/doi/test_doi.json +++ b/tests/test_files/doi/test_doi.json @@ -22,10 +22,7 @@ "subjectScheme": "Fields of Science and Technology (FOS)" } ], - "keywords": [ - "test", - "keyword" - ], + "keywords": "test,keyword", "contributors": [ { "name": "Contributor, Test",