Skip to content
Advertisement

Api-platform PUT operation with denormalization_context groups on an itemOperations not working

I have 2 entities:

I wanted to retrieve only words for itemOperation and not for collectionOperations so i added a group GET "item_words.read" and for PUT denormalization_context.

It is perfectly working for GET operation, for some reason the PUT operation is not giving me the “words” subresource.

GET :

enter image description here

PUT :

enter image description here

Here is my code :

Item

JavaScript

and Word

JavaScript

Advertisement

Answer

After digging for a while , to make it works the "method" must be present on the operation

He is the working annotation

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement