Skip to content

Support Spring Data Sort and @SortDefault #1702

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

Closed
wants to merge 2 commits into from

Conversation

daniel-shuy
Copy link

Closes #1668

Support Spring Data Sort and @SortDefault

image

I took the opportunity to refactor out the swagger annotation delegations from DataRestDelegatingMethodParameterCustom into separate classes, so that its clearer what annotation parameters are overridden.

Note that @SortDefault can be used on Pageable (not just Sort). If both @PageableDefault and @SortDefault are present on the same parameter, @SortDefault takes priority (I've implemented it to have the same behavior as Spring).

@SortDefault#value is an alias for @SortDefault#size. If both are configured, sort takes priority (I've implemented it to have the same behavior as Spring).

@bnasslahsen
Copy link
Collaborator

Thank you @daniel-shuy for your contribution.
I had to do the merge manually to resolve conflicts.
Don't hesitate to let me know if there are any other enhancements.

@shrralis
Copy link

shrralis commented Oct 14, 2023

@daniel-shuy @bnasslahsen it doesn't handle the @SortDefault.SortDefaults, does it?

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.

Support Spring Data Sort
3 participants