fixed swagger documentation for search endpoint

see #622
This commit is contained in:
Bernhard B 2024-11-29 22:21:31 +01:00
parent b530fbb860
commit db97de3d81
4 changed files with 6 additions and 4 deletions

View File

@ -1724,7 +1724,7 @@ func (a *Api) SendStopTyping(c *gin.Context) {
// @Param numbers query []string true "Numbers to check" collectionFormat(multi) // @Param numbers query []string true "Numbers to check" collectionFormat(multi)
// @Success 200 {object} []SearchResponse // @Success 200 {object} []SearchResponse
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Router /v1/search [get] // @Router /v1/search/{number} [get]
func (a *Api) SearchForNumbers(c *gin.Context) { func (a *Api) SearchForNumbers(c *gin.Context) {
query := c.Request.URL.Query() query := c.Request.URL.Query()
if _, ok := query["numbers"]; !ok { if _, ok := query["numbers"]; !ok {

View File

@ -1699,7 +1699,7 @@ const docTemplate = `{
} }
} }
}, },
"/v1/search": { "/v1/search/{number}": {
"get": { "get": {
"description": "Check if one or more phone numbers are registered with the Signal Service.", "description": "Check if one or more phone numbers are registered with the Signal Service.",
"consumes": [ "consumes": [
@ -2715,6 +2715,8 @@ var SwaggerInfo = &swag.Spec{
Description: "This is the Signal Cli REST API documentation.", Description: "This is the Signal Cli REST API documentation.",
InfoInstanceName: "swagger", InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate, SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
} }
func init() { func init() {

View File

@ -1696,7 +1696,7 @@
} }
} }
}, },
"/v1/search": { "/v1/search/{number}": {
"get": { "get": {
"description": "Check if one or more phone numbers are registered with the Signal Service.", "description": "Check if one or more phone numbers are registered with the Signal Service.",
"consumes": [ "consumes": [

View File

@ -1534,7 +1534,7 @@ paths:
summary: Verify a registered phone number. summary: Verify a registered phone number.
tags: tags:
- Devices - Devices
/v1/search: /v1/search/{number}:
get: get:
consumes: consumes:
- application/json - application/json