-
-
Notifications
You must be signed in to change notification settings - Fork 906
Serialization groups are ignored on write #4252
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
Comments
That's the first time I see spaces in group names, could this be related? 🤔 Does the problem persist after renaming them to spaceless |
@guilliamxavier , i removed the spaces yet the problem persist If i change the |
Weird indeed... (BTW I also just noticed you have the write group on id although no setter) Another random thought: could there be an interaction with the |
Yeah, no reason behind that, it just slipped in. I thought about Gedmo too, but i removed it and the problem is still there...
|
Here's the apiplatform config, just in case:
|
I have the same trouble on POST endpoints the request body have a weird behavior for POST and PUT endpoints definitions using YAML or Annotations 😭 Looks like the OpenApiFactory cant read the groups from Symfony Serializer |
Maybe related, I'm not sure: #3668 The Read/Write models are already made for the foreign object (in your case product) and skipped for the actual entity.. It seems like it only affects the api config, responses seems to be okay. |
Probably solved by 2.6.5. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
API Platform version(s) affected: 2.6
Description
I've defined a write group for my category entity which is completely ignored on POST requests. The problem persist on the documentation (openapi) page. The fields that have only read groups are being present on the POST request but the values are ignored upon send.
How to reproduce
Additional Context
The above is the example body from the POST request, which should not have the deletedAt, updatedAt, createdAt fields that are in the read group only. If i'm changing the value of any of those three, it will be ignored and the default value will be used ( in this case the current datetime)
The text was updated successfully, but these errors were encountered: