Fix #1324: Add @JsonAlias support to SimplePageable for SNAKE_CASE co…#1325
Fix #1324: Add @JsonAlias support to SimplePageable for SNAKE_CASE co…#1325weslyvinicius wants to merge 2 commits intospring-cloud:mainfrom
Conversation
spencergibb
left a comment
There was a problem hiding this comment.
Please add a test that verifies the fix.
|
Thanks for the review! I've added tests to verify the fix. The tests follow the same pattern as the existing ones in Test methods added:
Test resource files added (in
All tests pass and verify that the |
|
Please sign your commits so the DCO passes |
|
Is this also a problem in the 4.3.x branch? If so please make the PR against that branch |
…NAKE_CASE compatibility Signed-off-by: weslyvinicius <weslyvinicius@hotmail.com>
Signed-off-by: weslyvinicius <weslyvinicius@hotmail.com>
15c9f5b to
4e026b2
Compare
Hi @ryanjbaxter, Thanks for the heads-up! I've fixed the DCO issue. I added the
|
|
See #1325 (comment) |
Yes, the issue is also present in the 4.3.x branch. |
|
Closing in favor of #1329. We will merge forward to main. |
Fixes #1324
When a global
PropertyNamingStrategies.SNAKE_CASEis configured, deserialization ofPage<T>fails becauseSimplePageableonly accepted camelCase property names.This PR adds
@JsonProperty+@JsonAliasto the constructor parameters, supporting:pageNumber/page_number/page-number/pagenumberpageSize/page_size/page-size/pagesizeTested with the reproduction case provided in the issue (global SNAKE_CASE + WireMock returning snake_case JSON).