-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Closed
Description
Currently Swagger 2.0 support specs like that:
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"paths": {
"/{foo}": {
"parameters": [
{
"name": "foo",
"in": "path",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"get": {
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
By default collectionFormat
is csv
and this create problems with interpreting strings like 'a,b,c,d'.
Should it be interpreted like:
[
["a","b","c","d"]
]
Or maybe like this:
[
["a", "b"],
["c", "d"]
]
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.
Metadata
Metadata
Assignees
Labels
No labels