From db97de3d81a1d0e0e9bd9d94f1913b0f02c245c9 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Fri, 29 Nov 2024 22:21:31 +0100 Subject: [PATCH] fixed swagger documentation for search endpoint see #622 --- src/api/api.go | 2 +- src/docs/docs.go | 4 +++- src/docs/swagger.json | 2 +- src/docs/swagger.yaml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/api.go b/src/api/api.go index 4ac3419..62a2664 100644 --- a/src/api/api.go +++ b/src/api/api.go @@ -1724,7 +1724,7 @@ func (a *Api) SendStopTyping(c *gin.Context) { // @Param numbers query []string true "Numbers to check" collectionFormat(multi) // @Success 200 {object} []SearchResponse // @Failure 400 {object} Error -// @Router /v1/search [get] +// @Router /v1/search/{number} [get] func (a *Api) SearchForNumbers(c *gin.Context) { query := c.Request.URL.Query() if _, ok := query["numbers"]; !ok { diff --git a/src/docs/docs.go b/src/docs/docs.go index eb01da6..bf16429 100644 --- a/src/docs/docs.go +++ b/src/docs/docs.go @@ -1699,7 +1699,7 @@ const docTemplate = `{ } } }, - "/v1/search": { + "/v1/search/{number}": { "get": { "description": "Check if one or more phone numbers are registered with the Signal Service.", "consumes": [ @@ -2715,6 +2715,8 @@ var SwaggerInfo = &swag.Spec{ Description: "This is the Signal Cli REST API documentation.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/src/docs/swagger.json b/src/docs/swagger.json index cc79997..71dab60 100644 --- a/src/docs/swagger.json +++ b/src/docs/swagger.json @@ -1696,7 +1696,7 @@ } } }, - "/v1/search": { + "/v1/search/{number}": { "get": { "description": "Check if one or more phone numbers are registered with the Signal Service.", "consumes": [ diff --git a/src/docs/swagger.yaml b/src/docs/swagger.yaml index 34fefb8..9876554 100644 --- a/src/docs/swagger.yaml +++ b/src/docs/swagger.yaml @@ -1534,7 +1534,7 @@ paths: summary: Verify a registered phone number. tags: - Devices - /v1/search: + /v1/search/{number}: get: consumes: - application/json