Architecture #20190
closedMake consistant id+revision format accross rule, directive, techniques in API
Description
For now, we have two format for revison in rules/directives/techniques for GET details API:
- when the object is the one requested, we output in the id
field only the uid part, and in a second revision
field, we have the revision; that second field is optionnal and not given when the revision is head;
- when we reference other objects, we use a uid+revision
format, for exemple in the directive list of rules.
- when we give ID as an input (in GET, of POST), we use various format (@GET .../{id}?revision=... ; POST .../id -d {"revision":"..."} ; etc).
Here, we want to homogeneize to:
- an id field is always in the format `uid+revision`, be it in input or output; the revision part is optionnal and when omitted (in input of outpu), it means "last revision of the object";
- when we GET
details about an object, the revision
field is always in the response and contain the returned revision (as seen by our revision base) of the object. When the requested id doesn't have a revision
part, then revision
is the current revision of the object.