Details
-
Story
-
Resolution: Fixed
-
High
-
5.0, 5.1
-
None
-
Aconcagua Sprint 3
-
1
Description
Situation in 5.0 & 5.1
Due to the dual router situation we've had in 5.1 & 5.2, it is possible to ignore the REST prefix (/api/ezp/v2) when referencing elements in REST payloads:
This will be accepted:
POST /api/ezp/v2/content/objects/42/locations HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <LocationCreate> <ParentLocation href="/content/locations/1/43" /> </LocationCreate>
While this is the correct one:
POST /api/ezp/v2/content/objects/42/locations HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <LocationCreate> <ParentLocation href="/api/ezp/v2/content/locations/1/43" /> </LocationCreate>
Our documentation in regards to this is a bit of a grey area. The spec, that acts as a reference doc, doesn't even have the concept of a prefix.
Actions
Update the spec
- add an introduction paragraph that explains this prefix, and reminds the basics of HATEOAS.
Attachments
Issue Links
- links to