Skip to content

Page<T> page number not decoded correctly #237

@JAMDev49

Description

@JAMDev49

Using spring-cloud-openfeign version 2.1.3-RELEASE

It appears that the jackson mixin for Page is not quite correct
PageJacksonModule.java#L67
and
PageJacksonModule.java#L85

both use "page" as the JsonProperty but I believe it should be "number"

Here is an example of the default output of a Page from a restcontroller ( content removed )

{ "content": [ ], "pageable": { "sort": { "sorted": false, "unsorted": true, "empty": true }, "pageSize": 20, "pageNumber": 1, "offset": 20, "paged": true, "unpaged": false }, "totalElements": 403, "last": false, "totalPages": 21, "sort": { "sorted": false, "unsorted": true, "empty": true }, "first": false, "numberOfElements": 20, "size": 20, "number": 1, "empty": false }

Happy to submit a PR if my theory is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions