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
In API platform 2 there was a DataTransformers concept and an ability to create DataTransformer which took raw $data argument from the Request BEFORE the validation. It gave an ability to load missing Request fields from db entity.
Now at API Platform 3 it's recomended to use StateProcessors intead of DataProviders. BUT! $data argument of StateProcessor::__invoke is passed AFTER the validation. So if Request has some missing fields and those fields are NotBlank-constrained there validation exception raised and StateProcessor isn't called at all!
Please tell me how can i implement partial PATCH undr API plaform 3 ?
How can I load missing fields from db for incomplete PATH request?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In API platform 2 there was a DataTransformers concept and an ability to create DataTransformer which took raw $data argument from the Request BEFORE the validation. It gave an ability to load missing Request fields from db entity.
Now at API Platform 3 it's recomended to use StateProcessors intead of DataProviders. BUT! $data argument of StateProcessor::__invoke is passed AFTER the validation. So if Request has some missing fields and those fields are NotBlank-constrained there validation exception raised and StateProcessor isn't called at all!
Please tell me how can i implement partial PATCH undr API plaform 3 ?
How can I load missing fields from db for incomplete PATH request?
Beta Was this translation helpful? Give feedback.
All reactions