You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have one simple need: A user should be able to call an endpoint to reset his password.
(Note: I could have been something totally different, but let's stick to this use case)
I have tried many thing to be the closest possible to API Platform. I mean, I want to use all the feature
of API Platform: de-serialization, validation, error management, documation, etc.
So I end up to write the following code that works, but I think we can do better.
A simple DTO, with validation and declared as an ApiRessource
I had hard time to find a working solution. I tried with some events without success (always an issue because it's not a real entity) and finally with a controller. It was not easy to find the custom attribute to use. I had to open all listener to understand how it really works.
Hello.
I have one simple need: A user should be able to call an endpoint to reset his password.
(Note: I could have been something totally different, but let's stick to this use case)
I have tried many thing to be the closest possible to API Platform. I mean, I want to use all the feature
of API Platform: de-serialization, validation, error management, documation, etc.
So I end up to write the following code that works, but I think we can do better.
A simple DTO, with validation and declared as an ApiRessource
Then, I had to write the associated controller:
So basically it works but:
kernel.viewinstead ofkernel.request? #1538Could we do something to improve this experience ?
Anyway, thanks a lot for this project