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

Refresh openapi.yaml to reflect parameter capabilities #1229

Merged
merged 22 commits into from
Aug 23, 2024

Conversation

KellyStathis
Copy link
Collaborator

@KellyStathis KellyStathis commented Aug 22, 2024

Purpose

The purpose of this update is to refresh openapi.yaml (which powers https://support.datacite.org/reference/introduction) to reflect the full capabilities of our filter parameters for retrieving information, with a focus on the /dois endpoint. Better documentation of these parameters supports users in discovering their functionality.

closes: #1188

Approach

This update:

  • Changes the type for the year date parameters (created, registered, published) to a string with a regex pattern because these parameters support multiple years, for example 2024,2023.
  • Indicates when parameters allow multiple comma-separated values, either via the description or through an array with an enum.
    • Note that this should be accurate for /dois and others but I did not review all endpoints.
  • Adds the publisher parameter to /dois.
  • Adds the page[size] param where it was missing from provider-prefixes.
  • Removes the value governmentAgency from member_types (this was a typo as it is one of our organization types).
  • Removes the state parameter from /prefixes/totals because this is ignored.
  • Refactors several enums and parameters and components for consistency and more efficient updates.
  • Improves parameter descriptions for clarity and consistency.
  • Adds example values for some parameters.

Open Questions and Pre-Merge TODOs

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

…to support multiple selections (comma-separated)
@KellyStathis KellyStathis marked this pull request as ready for review August 22, 2024 22:53
@KellyStathis
Copy link
Collaborator Author

I also opened #1230 with some more ideas for future work, particularly for DOI registration/updates.

@codycooperross codycooperross merged commit 0b9ee44 into master Aug 23, 2024
13 checks passed
@codycooperross codycooperross deleted the 202408_openapi_updates branch August 23, 2024 15:49
@KellyStathis
Copy link
Collaborator Author

Thanks for the review @digitaldogsbody and @codycooperross! I refreshed the docs on ReadMe: https://support.datacite.org/reference/get_dois

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

Successfully merging this pull request may close these issues.

3 participants