Single item in array type query parameter is not converted to array
See original GitHub issueHi, I have the following query parameter
- in: query
name: publication_time
required: true
style: form
explode: true
schema:
type: array
minItems: 1
items:
type: string
When I pass muliple values like ?publication_time=someDay&publication_time=otherDay
it’s fine but when I pass a single value ?publication_time=someDay
, I get the error
{ errors:
[ { path: '.query.publication_time',
message: 'should be array',
errorCode: 'type.openapi.validation' } ] }
Am I doing something wrong? Is there another way to pass an array with a single parameter using style=form
and explode=true
?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Class transformer not converting to array of numbers
These ids are coming via API query parameters. I am using Class Transformer to transform these ids into an array of numbers. But...
Read more >how to set query params to array even if it has only one ...
but when i input ?assigned_domain=2 the param becomes a single string, how to make it an array even if it has only one...
Read more >Arrays in query params - Medium
The value of the fields parameter MUST be a comma-separated (U+002C COMMA, “,”) list that refers to the name(s) of the fields to...
Read more >Array functions for Bicep - Azure Resource Manager
Takes an array of arrays, and returns an array of subarray elements, in the original order. Subarrays are only flattened once, not recursively....
Read more >PySpark Convert String to Array Column - Spark by {Examples}
... and converting it into ArrayType. In this article, I will explain converting String to Array column using split() function on DataFrame and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wow, that’s fast 😃 Thanks
Carmine doesn’t move at the speed of light. Light moves at the speed of Carmine.