[MGNLREST-141] properties endpoint throws 400 for every PUT request Created: 01/Nov/17 Updated: 17/Mar/20 |
|
| Status: | Open |
| Project: | Magnolia REST Framework |
| Component/s: | services |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Richard Gange | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||
| Description |
|
Using the PUT for properties endpoint never works as the value array is always empty on the server side. Take the example: curl http://localhost:8080/magnoliaAuthor/.rest/properties/v1/website/travel \ -H "Content-Type: application/json" \ -X PUT -i \ --user superuser:superuser \ --data \ '{ "name": "windowTitle", "value": [ "Magnolia CMS - Travel Home" ] }' When I debug the call I see that the bad request comes from: if (!multiple && valueStrings.size() != 1) { return Response.status(Response.Status.BAD_REQUEST).build(); } valueStrings is always of size 0. |
| Comments |
| Comment by Richard Gange [ 17/Mar/20 ] |
|
It should be mentioned that it's possible to workaround this issue by simply using the Nodes endpoint to update properties. |