Closed codycooperross closed 9 months ago
nameIdentifier ORCID identifiers ending with a / are not rendered in JSON when converting from XML.
/
ORCID identifiers ending with a / appear in JSON when converting from XML.
nameIdentifier ORCID identifiers ending with a / do not appear in JSON at all.
Submit the following XML via API:
<contributors> <contributor contributorType="ContactPerson"> <contributorName nameType="Personal">ExampleFamilyName, ExampleGivenName</contributorName> <givenName>ExampleGivenName</givenName> <familyName>ExampleFamilyName</familyName> <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="https://orcid.org">https://orcid.org/0000-0001-5727-2427/</nameIdentifier> <affiliation/> </contributor>
The attribute will appear as the following in the REST API and DataCite JSON:
"contributors": [ { "name": "ExampleFamilyName, ExampleGivenName", "nameType": "Personal", "givenName": "ExampleGivenName", "familyName": "ExampleFamilyName", "contributorType": "ContactPerson", "nameIdentifiers": [ { "schemeUri": "https://orcid.org", "nameIdentifierScheme": "ORCID" } ] },
The validate_orcid method in bolognese does not allow a trailing slash in the regex.
validate_orcid
Describe the bug
nameIdentifier ORCID identifiers ending with a
/
are not rendered in JSON when converting from XML.Expected Behaviour
ORCID identifiers ending with a
/
appear in JSON when converting from XML.Current Behaviour
nameIdentifier ORCID identifiers ending with a
/
do not appear in JSON at all.Steps to Reproduce
Submit the following XML via API:
The attribute will appear as the following in the REST API and DataCite JSON:
Context (Environment)
Screenshots
Further details
Proposal
Hypothesis
The
validate_orcid
method in bolognese does not allow a trailing slash in the regex.Possible Implementation