Skip to content

Conversation

ondrejkrpec
Copy link
Contributor

@ondrejkrpec ondrejkrpec commented Nov 8, 2024

Hello,

I would like to propose a new annotation: @SortAsQueryParam. This annotation allows the use of the Sort object in query parameters. Currently, the project supports using the Pageable object in query parameters through the @PageableAsQueryParam annotation.

However, there isn't an easy way to utilize the Sort object independently without involving pagination. This limitation means that developers who need sorting capabilities without pagination have to implement workarounds.

By introducing the @SortAsQueryParam annotation, we can provide users with a straightforward option to include sorting in their API endpoints without the need for pagination. This enhancement will offer greater flexibility and convenience for those who require sorting functionality on its own.

Thank you for considering this proposal.

@bnasslahsen
Copy link
Collaborator

@ondrejkrpec,

Thanks for your contribution to the project!

@bnasslahsen bnasslahsen merged commit ee2dfc4 into springdoc:main Nov 23, 2024
1 check passed
mpleine pushed a commit to mpleine/springdoc-openapi that referenced this pull request May 17, 2025
…rt-as-query-param

Add SortAsQueryParam annotation
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.

2 participants