-
-
Notifications
You must be signed in to change notification settings - Fork 528
Spring Data Rest: Wrong response schema after POST,PUT,PATCH operations #1068
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
Labels
bug
Something isn't working
Comments
Your analysis is correct. |
This was referenced Mar 8, 2021
This was referenced Mar 16, 2021
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
For POST,PUT,PATCH operations, Spring Data Rest returns the entity in the response body. For a given entity A, the generated api-doc specifies
RepresentationModelA
rather thanEntityModelA
as the returned schema. While EntityModelA contains all properties of the entity, RepresentationModelA defines only the_links
, hence does not represent what Spring Data Rest returns.To Reproduce
Example entity:
Example Repository:
Excerpt from api-docs:
Expected behavior
The schema in the api-doc should match the actual data structure returned by Spring Data Rest. It is appropriately represented by EntityModelA but not RepresentationModelA.
The text was updated successfully, but these errors were encountered: