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
"parameters": [{"name": "non_empty_list","in": "query","description": "Just a list of ints","required": true,"schema": {"type": "array","minItems": 1,"items": {"type": "integer","format": "int32"}}}],
Is your feature request related to a problem?
Kind of, I'm not sure if this is a bug or a feature request but for my project we have the concept of lists and nonempty lists and I was hoping to add some way to distinguish between the 2 on my OpenAPI spec. I saw here https://swagger.io/docs/specification/data-models/data-types/ the minItems property and the statement that Without minItems, an empty array is considered valid. So I was hoping to be able to set minItems to 1 then if you tried not having that it would fail (much like when you have a required parameter and don't set a value for it)
Describe the solution you'd like
I would like to see that if your array doesn't meet the minimum or maximum items requirements that a failure message is displayed in the UI, or at least some indicator that it didn't work.
Additional context
Example of what happens when you don't fulfill the "required" property and run Execute. I was thinking something like that but saying "The array expects a minimum of X elements but no more than Y and Z were provided" something along those lines.
The text was updated successfully, but these errors were encountered:
One other thing I'll mention is that this also seems to be the case with the uniqueItems property for arrays that it isn't getting validated as well. Not sure if that warrants another ticket or not but thought I would mention it because I feel that should also do some validation.
Content & configuration
Swagger/OpenAPI definition:
Is your feature request related to a problem?
Kind of, I'm not sure if this is a bug or a feature request but for my project we have the concept of lists and nonempty lists and I was hoping to add some way to distinguish between the 2 on my OpenAPI spec. I saw here https://swagger.io/docs/specification/data-models/data-types/ the
minItems
property and the statement thatWithout minItems, an empty array is considered valid.
So I was hoping to be able to set minItems to 1 then if you tried not having that it would fail (much like when you have a required parameter and don't set a value for it)Describe the solution you'd like
I would like to see that if your array doesn't meet the minimum or maximum items requirements that a failure message is displayed in the UI, or at least some indicator that it didn't work.
Additional context
Example of what happens when you don't fulfill the "required" property and run Execute. I was thinking something like that but saying "The array expects a minimum of X elements but no more than Y and Z were provided" something along those lines.
The text was updated successfully, but these errors were encountered: