POST .../rID?setdefaultversionid=5 (let's assume the new epoch=2)
PUT .../rID - same as previous PUT
The 2nd PUT will succeed because the epoch values (2) will match. However, we've now updated Version 5 with Version 2's attributes. Which could be what they wanted in some cases, but in this case it was an accident.
Couple of options:
make epoch a Resource global epoch value that changes when anything in the Resource (including Versions) changes
check that the incoming json's "versionid" is the same as the current "versionid"
Problem:
The 2nd PUT will succeed because the epoch values (2) will match. However, we've now updated Version 5 with Version 2's attributes. Which could be what they wanted in some cases, but in this case it was an accident.
Couple of options: