Updating a ticket in ATHENA using a PUT would not delete props that weren't sent. For example, if a ticket looked like this:
{"id":"4","price":"40","section":"A"}
and you issued a PUT /tickets/4
{"id":"4","price":"50"}
The resulting ticket would look like:
{"id":"4","price":"50","section":"A"}
Notice that "Section" remains even though it wasn't sent in the PUT
I never liked this, and I'd like to change it because it would more closely adhere to the HTTP PUT spec and make life with eligibleSellers much easier. The future:
{"id":"4","price":"40","section":"A"}
and you issued a PUT
PUT /tickets/4
{"id":"4","price":"50"}
The resulting ticket would look like:
{"id":"4","price":"50"}
Notice "section" went away because it wasn't sent.
On a practical level:
- every client (that I know of) sends the whole object on every request. So, nothing will change for them.
- The patch endpoint (just added to 1.1) allows clients to send a part of record that is applied as an update to one or more records. So, any clients that depend on the old way can still function as long as they point to /tickets/patch/{ids}
Any objections?
Gary
--
Gary Moore | gary....@fracturedatlas.org | @gsmoore
Fork us on Github: http://github.com/fracturedatlas/
Join us on IRC: ##athena on irc.freenode.net
- The patch endpoint (just added to 1.1) allows clients to send a part of record that is applied as an update to one or more records. So, any clients that depend on the old way can still function as long as they point to /tickets/patch/{ids}
Any objections?