| The two REST endpoints that create something answer 201 Created with a body built from the request rather than from the page they just wrote, so a client is told values the wiki does not hold. Creation is template-driven, and a property the caller leaves out keeps the default its template gives it. Since the response is built from the posted representation, every such default is reported as null. Steps to reproduce
- POST /rest/wikis/xwiki/releasenotes/XWiki/8.3/changes with a body carrying a title and no importance.
Actual result The response body says "importance": null, while the page it created stores the importance ChangeTemplate gives a change, which is 1 (Medium) since RN-117. Expected result The response describes the change that was created, its importance included. Also POST /rest/wikis/xwiki/releasenotes has the same shape, so it under-reports every value the release note manager supplies — in particular the product, which comes from the wiki configuration when the caller posts none. These endpoints exist to be called by an agent creating release notes, which is precisely a client that trusts the 201 body and records from it. Both endpoints are fixed together. |