
Announcements
As the title suggests I am attempting to pass JSON content through a parameter. I understand that this feature might not be implemented since, although I can define a parameter in Swagger, it does not appear outside the Swagger Editor with string parameters.
Here is my parameter schema:
in: body
schema:
type: object
properties:
field_40: {type: object, description: Address}
Here is the content for field_40:
{
"latitude": "-32.7",
"longitude": "151.6",
"street": "Street",
"city": "City,
"state": "State",
"country": "Country",
"zip": "3257"
}
This is the result of my field as it is wrapped in string tags:
"field_40_raw": "{\"latitude\":\"-32.7\",\"longitude\":\"151.6\",\"street\":\"Street\",\"city\":\"City\",\"state\":\"State\",\"country\":\"Country\",\"zip\":\"3257\"}",
If I attempt to remove the string tag manually I receive this error:
{
"error": {
"code": 500,
"message": "Unable to parse body as JObject.",
I understand that it may not be possible to accomplish what I am attempting, however, I did notice that much of the Policy Template documentation seems to imply that you can modify the JSON content of parameters. If this is possible then surely it must be possible to send the data as a JSON object.
I solved the problem.
Turns out the Test tab does not accept objects as an example.
However, the live version does. I went into my flow and saved a new version after changing the parameter type in the Swagger editor to object, it then started to accept JSON objects.