From dcc5fb99e5dff861580f2cd33b615c99be84393f Mon Sep 17 00:00:00 2001 From: Artem Poltorzhitskiy Date: Mon, 24 Jun 2024 19:56:44 +0200 Subject: [PATCH] Fix: API docs (#223) --- cmd/api/docs/swagger.json | 4 +++- cmd/api/handler/validator.go | 1 - cmd/api/main.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/api/docs/swagger.json b/cmd/api/docs/swagger.json index 042c6c37..68a357f0 100644 --- a/cmd/api/docs/swagger.json +++ b/cmd/api/docs/swagger.json @@ -1,4 +1,7 @@ { + "schemes": [ + "https" + ], "swagger": "2.0", "info": { "description": "This is docs of Celenium API.", @@ -4275,7 +4278,6 @@ "get": { "description": "List validators", "produces": [ - "application/json", "application/json" ], "tags": [ diff --git a/cmd/api/handler/validator.go b/cmd/api/handler/validator.go index 91732b22..d48d8133 100644 --- a/cmd/api/handler/validator.go +++ b/cmd/api/handler/validator.go @@ -101,7 +101,6 @@ func (req *validatorsPagination) SetDefault() { // @Param offset query integer false "Offset" mininum(1) // @Param jailed query boolean false "Return only jailed validators" // @Produce json -// @Produce json // @Success 200 {array} responses.Validator // @Failure 400 {object} Error // @Failure 500 {object} Error diff --git a/cmd/api/main.go b/cmd/api/main.go index 7057fb3a..91f1e6ad 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -23,6 +23,7 @@ var rootCmd = &cobra.Command{ // @version 1.0 // @description This is docs of Celenium API. // @host api.celenium.io +// @schemes https // @BasePath /v1 // // @query.collection.format multi