I'm trying to create swagger.json file that consists get and post methods api. as a requirement for the get method, I need to pass multiple parameters to get method url string like http://localhost:3000/api/get?name=ajay&age=24&nationality=india
and string parameters for get method are not constant. so I tried to create get method parameters as object in swagger UI and so that it can parse that json object and add those json parameters to the url. however it is not working as expected. can anyone help me to achieve above requirement.
"/get": {
"get": {
"tags": [
"query"
],
"description": "Query Function",
"parameters": [
{
"name": "query",
"in": "body",
"type":"object",
"description": "query or body parameters should be passed as defined in the function.",
"schema": {
"$ref": "#/definitions/query"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "query successfull..",
"schema": {
"$ref": "#/definitions/query"
}
}
}
}