Details
-
Improvement
-
Resolution: Fixed
-
Major
-
17.10.0
-
None
-
Unknown
-
Description
When a page's xobjects are modified through the REST API, the resulting page version always has an empty version comment, and deleting an xobject always creates a major version. Only the page resource lets the caller set the version comment (<comment> in the <page> body).
As a consequence, a client that edits object properties (for example a documentation page's structured fields) cannot explain the change in the page history, and a client deleting an object cannot mark it as a minor edit.
Current behavior
- PUT /wikis/<wiki>/spaces/<space>/pages/<page>/objects/<class>/<n>/properties/<prop> (ObjectPropertyResourceImpl): doc.save("", minorRevision)
- PUT /wikis/<wiki>/spaces/<space>/pages/<page>/objects/<class>/<n> (ObjectResourceImpl#updateObject): doc.save("", minorRevision)
- POST /wikis/<wiki>/spaces/<space>/pages/<page>/objects (ObjectsResourceImpl): doc.save("", minorRevision)
- DELETE /wikis/<wiki>/spaces/<space>/pages/<page>/objects/<class>/<n> (ObjectResourceImpl#deleteObject): doc.save(), no minorRevision parameter and no comment
The minorRevision query parameter was added to the first three in XWIKI-15120.
Proposal
- Add an optional comment query parameter to the object and object property write endpoints (PUT/POST/DELETE), used as the version comment.
- Support minorRevision on the object DELETE endpoint, like on the other object endpoints.
Attachments
Issue Links
- relates to
-
XWIKI-15120 Add an option to the REST API to save changes as minor revision
-
- Closed
-