-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Multidimensional arrays as parameters. #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Link to parent #565 |
Done in #804 |
@fehguy I don't actually see this in the specification ... where do we forbid this (which would be the corresponding structure to what @IvanGoncharov posted)? parameters:
- in: path
name: foo
schema:
type: array
items:
type: array
items:
type: string
example: 'a,b,c,d'
required: true |
we don't forbid this, we support it by allowing a schema object as the type for the parameter. |
The original issue said
While the original code was not actually valid in OpenAPI 2.0, I think, its transformed version is valid in OpenAPI 3.0-RC0 due to the introduction of schemas for parameters. Now there isn't a So for There doesn't even seem to be a way of using different styles for both levels of array (which could solve this potentially). So I think the issue is still open. |
Currently Swagger 2.0 support specs like that:
By default
collectionFormat
iscsv
and this create problems with interpreting strings like 'a,b,c,d'.Should it be interpreted like:
Or maybe like this:
It should be forbidden to create nested arrays with same
collectionFormat
.This change will prevent undefined behaviour situation and could be done in
2.0
as bugfix.JSON Schema couldn't enforce such constraints, but it could be specified in spec.
The text was updated successfully, but these errors were encountered: