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

fix(openapi): fix sort criteria parameter #12090

Merged

Conversation

RyanHolstien
Copy link
Collaborator

@RyanHolstien RyanHolstien commented Dec 10, 2024

  • Changes the field in the OpenAPIV3Generator to target the correct string list field
  • Deprecates the old sort field
  • Adds default behavior for both sortCriteria and sortOrder

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@RyanHolstien RyanHolstien self-assigned this Dec 10, 2024
@github-actions github-actions bot added the devops PR or Issue related to DataHub backend & deployment label Dec 10, 2024
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Dec 10, 2024
@@ -570,19 +570,15 @@ private static void addExtraParameters(final Components components) {
"SortBy" + MODEL_VERSION,
new Parameter()
.in(NAME_QUERY)
.name("sort")
.name("sortCriteria")
Copy link
Collaborator

Choose a reason for hiding this comment

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

need a note in the release notes section for this

Copy link
Collaborator

Choose a reason for hiding this comment

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

breaking change

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, the API controller still supports "sort", however client sdks using the spec will break the programmatic apis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It technically doesn't remove the deprecated parameter so if you were previously sending in a single string here it would not break with these changes. It only affects the documentation and OpenAPI spec. Will add a note nonetheless.

Copy link
Collaborator

@david-leifker david-leifker left a comment

Choose a reason for hiding this comment

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

pending release note

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Dec 10, 2024
@RyanHolstien RyanHolstien merged commit 59dd8be into datahub-project:master Dec 11, 2024
40 of 41 checks passed
@RyanHolstien RyanHolstien deleted the fix/sortCriteriaOpenAPI branch December 11, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants