-
Notifications
You must be signed in to change notification settings - Fork 31
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
372 search by orcid #393
372 search by orcid #393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should work, but I'm not sure we want to support ORCID search via the q
param. An orcid
param seems clearer to me. Thoughts on that, @pleary?
One thing that definitely needs to happen here is v2 implementation.
For the implementation, I was going off the GET request example posted in the linked community post here https://forum.inaturalist.org/t/search-users-by-orcid/37362 |
I'm OK with having the Let me know if you're having trouble navigating the V2 configuration which involves more code than V1, but also generates its own documentation along the way. The endpoint is described in the V2 path, implemented in the V2 controller, and parameters defined in the openapi request schema. Thanks! |
@pleary Thanks for the review! Yeah I can update the v2 users endpoint as well |
This looks good to me. Thanks! |
For future reference, we have an .eslintrc file in the project root, and I'd recommend getting your text editor working with an automatic linter so you can see if any code formatting violated any of the rules in the config. There were a few spacing issues here that I fixed in a follow-up commit. I also added a pattern validator for the V2 orcid parameter since we know that the orcid will have to have a very particular format to work. |
@pleary that is good to know and will add the ESLint validation as a set to my future development. TBH I code in vim and don't have any ESLint plugins installed. |
Comment on @pleary's commit should it be of use here: ed4f0c8#commitcomment-125768601 |
Allow users to search by ORCID #372
I tested this by directly inserting a row into provider_authorizations and was able to get a successful return when I provided the entire orcid (provider_uid) to the search endpoint
Added integrations tests as well