You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing endpoints that accept array-type query parameters in an Imported/synced OpenAPI definition, there is currently no way to send the same query parameter key multiple times.
Many APIs represent arrays in URLS by repeating the parameter name:
GET /hubs/{id}/purchases/?productIds=abc-123&productIds=def-456&productIds=ghi-768
In the current Scalar API client UI, there is no mechanism to:
Add a duplicate query parameter key
Input multiple values for an array-type query parameter
Viable solution
When a query parameter is defined, in the OpenAPI spec as type: array, then client UI should allow the user to add multiple values for that parameter - either through:
An "Add item" / "+" button next to array-type query params
A comma-seperated or multi-line input that serializes into repeated keys (e.g. ?ids=a&ids=b)
A tag/chip input where each chip represents one value in the repeated param list
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there
Situation
When testing endpoints that accept array-type query parameters in an Imported/synced OpenAPI definition, there is currently no way to send the same query parameter key multiple times.
Many APIs represent arrays in URLS by repeating the parameter name:
In the current Scalar API client UI, there is no mechanism to:
Viable solution
When a query parameter is defined, in the OpenAPI spec as
type: array, then client UI should allow the user to add multiple values for that parameter - either through:?ids=a&ids=b)Relevant OpenAPI spec example:
{ ... "parameters": [ { "name": "ProductIds", "in": "query", "schema": { "type": "array", "items": { "type": "string", "format": "uuid" } } }, { "name": "hubid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] ... }Beta Was this translation helpful? Give feedback.
All reactions