Stoplight
6 months agoCommunity Manager
Array Query Parameters Prevent Mocking
Originally posted by user brad.samuels to the Stoplight Community on 10/26/2022 at 19:59 ET.
Hi, for some reason whenever I add a query parameter as an array, I cannot successfully submit a mock request. It appears with the error of "Cannot use param value {value}. JSON array expected". In principle, I understand what this means, but the Mock only provides a dropdown (which is already unusual for an array) to select one response. Is there a way I can fix the mock request for:
- More accurate validation (being a query parameter, it wouldn't make sense to be a JSON array as opposed to ?propertyTypes=house,unit
- Allow multiple values to be inputted to the field (since it is an array)