-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doi registrant code is too restrictive in the schema #910
Comments
That seems to be a valid point. The original reg exp we used is from here: https://www.regextester.com/93795 |
I will definitely cook up a PR. I have been exploring DOIs more while working on the scientific extension in stac-utils/pystac#199. e.g. https://gist.github.com/schwehr/22ce6080eb9e730ef04fccfa25072e3a I am wondering if anyone has valid DOIs that fail to validate? |
With the CrossRef article in mind, I have relaxed the DOI regex to |
Relaxed the regular expression for DOIs in the scientific extension #910
In extensions/scientific/json-schema/schema.json
This is too narrow:
[0-9]{4,}
https://www.doi.org/overview/DOI_article_ELIS3.pdf
https://www.doi.org/doi_handbook/2_Numbering.html#2.2.2
So my best guess at what the doi regex should be is this based on the
alphanumeric
statement in the pdf.So this should be a valid doi if the prefix was registered:
10.123abc.foo.bar/issn.1476-4687/this/is/nuts
I'm not sure what the suffix part of the pattern will match:
(?:(?![%\"#? ])\\S)+)
https://json-schema.org/understanding-json-schema/reference/regular_expressions.html
The text was updated successfully, but these errors were encountered: