Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT/PATCH does not consider custom Jackson field naming strategy [DATAREST-556] #931

Closed
spring-projects-issues opened this issue May 26, 2015 · 1 comment
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 26, 2015

Michael Phlebas opened DATAREST-556 and commented

  1. git clone https://github.com/spring-guides/gs-accessing-data-rest.git
  2. use spring.jackson.property-naming-strategy=PASCAL_CASE_TO_CAMEL_CASE
  3. PUT/PATCH fails.

org.springframework.data.rest.webmvc.json.DomainObjectReader:170 will remove valid property names required by the objectMapper later on.

If one posts camelCase properties instead, the objectMapper will ignore them.

Possible fix is to simply not remove properties so eagerly (Line 170) and let the objectMapper decide.


Affects: 2.2.2 (Evans SR2)

Referenced from: commits 1e223bd, 018fa22, a07697e

Backported to: 2.3.1 (Fowler SR1), 2.2.3 (Evans SR3)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 26, 2015

Oliver Drotbohm commented

Good catch! I've revised the property handling in DomainObjectMerger and ported the fix back to Evans and Fowler maintenance branches. Snapshots available, feel free to give them a spin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants