Replies: 6 comments
-
Well I'm a bit in a hurry so I managed to fix it on my behalf, though I'm borrowing ApiPlatform internal stuff :\
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't understand the issue. The |
Beta Was this translation helpful? Give feedback.
-
Hi teohhanhui! So my point is that API operation normalization context attributes should be available in request attributes collection regardless of operation HTTP method, at least to identify that current request is handled by api-platform with specific serialization / deserialization rules. |
Beta Was this translation helpful? Give feedback.
-
You should use the |
Beta Was this translation helpful? Give feedback.
-
Yup I'm using RequestAttributesExtractor and it would be nice to remove @internal. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Hi!
This issue is related to b1590b8
commited by @teohhanhui, help would be appreciated dude.
This line https://github.com/api-platform/core/blame/master/src/EventListener/ReadListener.php#L66 is preventing building of full request attributes normalization context parameters.
I'm depending on
$request->attributes->set('_api_normalization_context', $normalizationContext);
which is set further bellow.What is the reason to skip setup of normalization context when POST and collection_operation_name is set?
I'm using custom controllers here and there for handling POST requests and using deserializer group from request attributes when injecting DTO objects in controller action method (using Request ParamConverter).
Thanks for your input!
Beta Was this translation helpful? Give feedback.
All reactions