For some rest resource, there are two fields connected. There is, if one field is POST/PUT it gets the value of the other field.
In this example we have a amount and amountWithVat(with tax or Value Added Tax). If you POST or PUT a null for amountWithVat the default value will be from amount.
Example 1 POST amount=150 amountWithVAT=null GET amount=150 amountWithVAT=150 Example 2 POST amount=150 amountWithVAT=170 GET amount=150 amountWithVAT=170 PUT amount=200 amountWithVAT=null GET amount=200 amountWithVAT=200
For me this does not feel intuitive, but from the view of a front end developer this could make sense. Personally I would rather enforce this by forbidding POST/PUT nulls.
Are there any guidelines or best practices which go against this?