Details
-
Task
-
Resolution: Done
-
Neutral
-
None
-
None
-
None
-
None
-
-
Empty show more show less
-
Empty show more show less
-
CM & OC 7
-
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:
- In the rest client app, you can only define parameters as strings
- There is no way to define parameters as lists in yaml
- You can specify the body in the yaml as a string and add there the parameters that are not a string
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]"
Checklists
Acceptance criteria