-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add doc to custom normalizer #21
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be NormalizerInterface
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well seen, since normalize and denormalize can check both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must implements" -> "must implement"
Also, there's an AbstractNormalizer
which makes things easier...
It's unclear as to what you're trying to achieve here... (Yes, I've read api-platform/core#316 but I still don't understand what this doc section is demonstrating.) |
@yelmontaser any update on this PR? |
@teohhanhui as shown in the following post api-platform/core#316, the Dunglas API does not permit to specify a serialization group in some contexts, such as having diffirents following groups that is in the resource or in the collection or simply when a user is authenticated etc. The problem of the method Have you another good easy way to do it? |
I understand that it is a bit ambiguous, but I think that the proposal @dunglas is cleaner than doing it through a controller or event. |
@yelmontaser so we should close this PR? |
@sroze close if not necessary |
I'm 👍 to merge this PR when comments of @teohhanhui will be fixed. It would be nice to also add a link to the related Symfony doc. |
@yelmonster, Do you have some time to finish this PR ? |
@Simperfit sorry I do not have time right now and the API-Platform has changed significantly since. |
Reference: api-platform/core#316