spring-projects / spring-projects/spring-data-commons

Pagination / Sort support in http interface client

Open
#3,046 4 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

It would be great if http interface clients had support for:

  • Page as a response type
  • Pageable / Sort as request parameters
interface FooClient {
  @GetExchange("/foos")
  public fun getFoos(
    pageRequest: Pageable,
  ): Page<Foo>
}

This would bring feature parity for what is supported in controllers today. I believe spring openfeign clients support this as well

Original: https://github.com/spring-projects/spring-framework/issues/32286

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Spring Framework HTTP interface client reference and the original issue, then compare the requested behavior with controller pagination and Spring OpenFeign support. Review the Pageable, Sort, and Page types mentioned in the issue and establish coverage for request parameters and Page responses; done means both forms work for HTTP interface clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, spring
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.