[MGNLRESTCL-160] DOC: Complex body objects Created: 07/May/20 Updated: 17/Jul/20 Resolved: 17/Jul/20 |
|
| Status: | Closed |
| Project: | REST Client |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Jorge Franco | Assignee: | Martin Drápela |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoR: |
Empty
|
||||
| Date of First Response: | |||||
| Epic Link: | DOC: Documentation for Magnolia 6.2 | ||||
| Sprint: | CM & OC 7 | ||||
| Story Points: | 1 | ||||
| Description |
|
Some client has problems using body with no string properties, take a look at https://jira.magnolia-cms.com/browse/HELPDESK-794
So I think we can add more information in documentation:
This is the way to send a list in a body:
restCalls:
create:
method: post
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /createPost
body: '{"userId": 1, "title": "aTitle", "list": {list}}'
defaultValues:
list: "[5]"
This is not supported:
restCalls:
create:
method: post
entityClass: com.fasterxml.jackson.databind.JsonNode
path: /createPost
body: '{"userId": 1, "title": "aTitle", "list": {list}}'
headers:
Content-Type: "application/json; charset=UTF-8"
defaultValues:
list:
- 5
Also this is not supported:
body:
userId: 1
title: aTitle
list:
- 5
# Also this not working
body:
list: "{list}" # or list: "[5]"
|
| Comments |
| Comment by Martin Drápela [ 17/Jul/20 ] |
|
Closing after "very nice! |