Mashery Interactive form is not recognizing my array parameter in the query section, how do I solve this?

15 Views Asked by At

I am using Tibco Mashery and passing a parameter of array type. When I define the parameter in Body of Request using io-Doc, Mashery Interactive form shows "Add item" option and let me enter items of the array one by one. But when I use the same definition in query section, interactive form shows me only one field.

This is the parameter definition

 "alert_ids": {
               "description": "An array.",
               "type": "array",
               "items": {
                  "type": "string",
               },
               "default": [],
               "required": false,
               "collectionFormat": "csv",
               "location": "query"
               }

I am trying to pass the items of the array to backend API in the following format in the URL

alert_ids[]=154&alert_ids[]=738

but when I enter [154, 738], Mashery turns it to

alert_ids=%5B154%2C+738%5D

The endpoint fails.

0

There are 0 best solutions below