OpenAPI Query Array #38387
-
I'm trying to have GET method which should have a list of numbers as query parameters. Problem is that quarkus is not resolving this "http://localhost:8080/list?ids[]=5&ids[]=2&ids[]=3" which should be valid openapi query based on my search. The OpenAPI specs: "/list" : {
"get" : {
"tags" : [ "List Resource" ],
"summary" : "List all resources by ids",
"operationId" : "list_by_ids",
"parameters" : [ {
"name" : "ids",
"in" : "query",
"schema" : {
"type" : "array",
"items" : {
"format" : "int64",
"type" : "integer"
}
}
} ],
"responses" : {
"200" : {
"description" : "List of resources",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Resource"
}
}
}
}
},
"403" : {
"description" : "Not Allowed"
},
"401" : {
"description" : "Not Authorized"
}
},
"security" : [ {
"SecurityScheme" : [ ]
} ]
}
},
The code from which this is generated:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
/cc @EricWittmann (openapi), @MikeEdgar (openapi), @phillip-kruger (openapi) |
Beta Was this translation helpful? Give feedback.
-
@zZHorizonZz have you tried without the braces in the parameter names of the request?
This should make the parameter name match what is specified in the Java method parameter |
Beta Was this translation helpful? Give feedback.
Maybe you could try and add an "overload" of the REST method that is hidden from the OpenAPI spec?