NASA-PDS / doi-ui

The web interface for the PDS DOI Service providing the ability management PDS archive DOIs. See the DOI Service for more details on the available capabilities. https://nasa-pds.github.io/doi-service/
Apache License 2.0
0 stars 4 forks source link

When submitting a DOI, if the identifier is an integer the submission fails #128

Closed tloubrieu-jpl closed 2 years ago

tloubrieu-jpl commented 2 years ago

🐛 Describe the bug

See screenshot:

Screen Shot 2022-03-31 at 4 50 48 PM

The error when clicking on submit is:

Submission Error: InputFormatException
Description: Unable to parse DOI objects from provided json file "/var/folders/nx/k6m8glmn385d9tp9dj_6whxh0000gq/T/labels_9wqogkve.json" Reason: JSON record at index 0 does not conform to the DataCite Schema, reason(s): identifiers/0/identifier: {'_text': 20151} is not of type 'string'
Please address the error then try again.

The json send to the API is wrong: {"data":{"id":"10.17189/20151","type":"dois","attributes":{"doi":"10.17189/20151","suffix":{"_text":20151},"identifiers":[{"identifier":{"_text":20151},"identifierType":"IAD ID"},{"identifier":"urn:nasa:pds:insight_cameras::1.0","identifierType":"Site ID"}],"creators":[{"nameType":"Personal","name":"J. Maki"},{"nameType":"Personal","name":"P. Zamani"},{"nameType":"Personal","name":"H. Abarca"},{"nameType":"Personal","name":"R. Deen"}],"titles":[{"title":"InSight Cameras Bundle","lang":"en"}],"publisher":"NASA Planetary Data System","publicationYear":"2019","contributors":[{"nameType":"Organizational","name":"Planetary Data System: PDS Cartography and Imaging Sciences Discipline Node","contributorType":"DataCurator"}],"types":{"resourceTypeGeneral":"Collection","resourceType":"PDS4 Bundle"},"url":"https://pds.jpl.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0","created":"2020-05-07T22:12:05.000000Z","updated":"2020-05-07T22:12:05.000000Z","state":"findable","language":"en","schemaVersion":"http://datacite.org/schema/kernel-4","subjects":[{"subject":"Wavelet analysis"}]}}}

Where it says: "suffix":{"_text":20151} it should be "suffix": "20151" or 20151

and

"identifier":{"_text":20151} it should be "identifier": "20151"

📜 To Reproduce

Steps to reproduce the behavior:

  1. Submit for review a DOI which identifier is an integer

🕵️ Expected behavior

The DOI should be accepted for review.

📚 Version of Software Used

🩺 Test Data / Additional context

🏞Screenshots

🖥 System Info


🦄 Related requirements

⚙️ Engineering Details