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

Add search and Doi versions APIs to Swagger #22

Merged
merged 4 commits into from
Jul 30, 2024
Merged

Conversation

coverbeck
Copy link
Collaborator

@coverbeck coverbeck commented May 8, 2024

Description
These APIs are necessary to find Zenodo DOIs referencing GitHub repos.

The first endpoint searches. If there multiple versions of the DOI, the search API only returns one version. Which brings us to the second endpoint, that retrieves all versions of a DOI. That would let us assign them to the corresponding Dockstore versions.

Corresponding (draft) PR for the web service at dockstore/dockstore#5880. Regardless of whether we decide to implement that feature, this should be safe.

Review Instructions
Review will be covered in the Dockstore PR.

Issue
dockstore/dockstore#5745

Security and Privacy

If there are any concerns that require extra attention from the security team, highlight them here.

e.g. Does this change...

  • Any user data we collect, or data location?
  • Access control, authentication or authorization?
  • Encryption features?

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that you pass the basic style checks and unit tests by running mvn clean install
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • Follow the existing JPA patterns for queries, using named parameters, to avoid SQL injection
  • If you are changing dependencies, check the Snyk status check or the dashboard to ensure you are not introducing new high/critical vulnerabilities
  • Assume that inputs to the API can be malicious, and sanitize and/or check for Denial of Service type values, e.g., massive sizes
  • Do not serve user-uploaded binary images through the Dockstore API
  • Ensure that endpoints that only allow privileged access enforce that with the @RolesAllowed annotation
  • Do not create cookies, although this may change in the future
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

@coverbeck coverbeck self-assigned this May 8, 2024
@coverbeck coverbeck changed the title Add search and doi details to Swagger Add search and Doi versions APIs to Swagger May 8, 2024
@@ -524,13 +524,73 @@ paths:
- preview
produces:
- application/json
parameters:
- in: query
name: q
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q really?
Assume this is correct since they had to define it

Copy link
Collaborator Author

@coverbeck coverbeck May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters:
- in: path
name: recordId
type: integer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs define it as a string although I think we've been using integers for IDs elsewhere too

@coverbeck coverbeck force-pushed the feature/5745/search branch from 5c32042 to ae14cff Compare May 30, 2024 21:38
@coverbeck coverbeck merged commit 28e9461 into main Jul 30, 2024
2 checks passed
@coverbeck coverbeck deleted the feature/5745/search branch July 30, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants