Skip to content
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

Coerce DOI to URL in amendment file #155

Open
jar398 opened this issue Aug 22, 2016 · 1 comment
Open

Coerce DOI to URL in amendment file #155

jar398 opened this issue Aug 22, 2016 · 1 comment

Comments

@jar398
Copy link
Member

jar398 commented Aug 22, 2016

I see:

"sources": [
{
"source": "10.3897/zookeys.528.6001", 
"source_type": "Link (DOI) to publication"
}
], 

Just as everywhere else in the system, the DOI should be coerced to a URL:

This could be done in the curator app, but we get more leverage if it's done in phylesystem-api or peyotl.

jimallman added a commit that referenced this issue Sep 28, 2016
This is done when fetching, adding, or updating a taxonomic amendment
via the API (so it "repairs" old amendments on the fly). Addresses #155.
@jar398
Copy link
Member Author

jar398 commented Sep 30, 2016

I have changed my mind. I think the coercion is better done in the curator app. This is just one among many possible type or structure coercions, and I don't think the back end is the place to be doing such DWIMish things. It would be a slippery slope and would make the interface spec quite complicated. But they're fine in the curator app, which is responsible for preparing documents in a form suitable for storage.

If validation fails, e.g. if a field requiring a URL doesn't contain a URL, the document shouldn't be stored.

Sorry to have led you astray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants