spring-projects / spring-projects/spring-data-rest
Paging and sorting missing header meta data [DATAREST-101]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Raul Vieira opened DATAREST-101 and commented
I'm not able to determine the total count or total number pages using the PagingAndSortingRepository. According to the wiki I would expect to receive these headers:
x-springdata-meta-total-count: 125
x-springdata-meta-current-page: 1
x-springdata-meta-total-pages: 7
What I do receive is page data in my JSON response that looks like this:
...
"page" : {
"size" : 2,
"totalElements" : 4,
"totalPages" : 2,
"number" : 2
}
...
Reference URL: https://github.com/SpringSource/spring-data-rest/wiki/Paging-and-Sorting
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Paging and Sorting wiki reference and the code that builds the PagingAndSortingRepository response. Reproduce the reported response and trace whether the documented x-springdata-meta-* headers are emitted; done means the headers expose total count, current page, and total pages consistently with the page metadata, with a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100