PUT operation does not reaplce whole object

Api Platform has implemented PATCH starting with version 2.5
According the documentation PUT is doing what it really should, replacing whole object in database with the one sent in request.

But in my implementation it doesnt look like that.
I am using Symfony5, Api-platform 2.5.7 and MongoDB.

But both PATCH and PUT endpoints are doing the same thing – updating what is sent and ignoring if something was not sent.
So question is, is PUT still implemented incorrectly (doing partial updates) or is there a setting/header/something which should be set to other than default value to make it work?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *