fixed swagger documentation for search endpoint

see #50
This commit is contained in:
Bernhard B
2022-01-03 15:21:29 +01:00
parent 43747af9d4
commit 8e2403bee4
4 changed files with 18 additions and 10 deletions

View File

@@ -1062,7 +1062,7 @@ func (a *Api) SendStopTyping(c *gin.Context) {
// @Accept json
// @Produce json
// @Param numbers query []string true "Numbers to check" collectionFormat(multi)
// @Success 204 {object} SearchResponse
// @Success 200 {object} []SearchResponse
// @Failure 400 {object} Error
// @Router /v1/search [get]
func (a *Api) SearchForNumbers(c *gin.Context) {

View File

@@ -940,10 +940,13 @@ var doc = `{
}
],
"responses": {
"204": {
"description": "No Content",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.SearchResponse"
"type": "array",
"items": {
"$ref": "#/definitions/api.SearchResponse"
}
}
},
"400": {

View File

@@ -925,10 +925,13 @@
}
],
"responses": {
"204": {
"description": "No Content",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.SearchResponse"
"type": "array",
"items": {
"$ref": "#/definitions/api.SearchResponse"
}
}
},
"400": {

View File

@@ -799,10 +799,12 @@ paths:
produces:
- application/json
responses:
"204":
description: No Content
"200":
description: OK
schema:
$ref: '#/definitions/api.SearchResponse'
items:
$ref: '#/definitions/api.SearchResponse'
type: array
"400":
description: Bad Request
schema: