From 1e56ba9308588c80295263f609609542c75eb255 Mon Sep 17 00:00:00 2001 From: Patrick Schork <354473+pschork@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:31:57 -0700 Subject: [PATCH] swagger docs --- disperser/dataapi/docs/docs.go | 25 +++++++++++++++++++++++++ disperser/dataapi/docs/swagger.json | 25 +++++++++++++++++++++++++ disperser/dataapi/docs/swagger.yaml | 16 ++++++++++++++++ disperser/dataapi/server.go | 4 ++-- 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/disperser/dataapi/docs/docs.go b/disperser/dataapi/docs/docs.go index 9beee4052..c0309acca 100644 --- a/disperser/dataapi/docs/docs.go +++ b/disperser/dataapi/docs/docs.go @@ -528,6 +528,31 @@ const docTemplate = `{ } } }, + "/operators-info/hostinfo-scan": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "OperatorsInfo" + ], + "summary": "Active operator semver report", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dataapi.OperatorPortCheckResponse" + } + }, + "500": { + "description": "error: Server error", + "schema": { + "$ref": "#/definitions/dataapi.ErrorResponse" + } + } + } + } + }, "/operators-info/port-check": { "get": { "produces": [ diff --git a/disperser/dataapi/docs/swagger.json b/disperser/dataapi/docs/swagger.json index a106eec62..7d2f25c04 100644 --- a/disperser/dataapi/docs/swagger.json +++ b/disperser/dataapi/docs/swagger.json @@ -524,6 +524,31 @@ } } }, + "/operators-info/hostinfo-scan": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "OperatorsInfo" + ], + "summary": "Active operator semver report", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dataapi.OperatorPortCheckResponse" + } + }, + "500": { + "description": "error: Server error", + "schema": { + "$ref": "#/definitions/dataapi.ErrorResponse" + } + } + } + } + }, "/operators-info/port-check": { "get": { "produces": [ diff --git a/disperser/dataapi/docs/swagger.yaml b/disperser/dataapi/docs/swagger.yaml index ccf985794..0d96f891b 100644 --- a/disperser/dataapi/docs/swagger.yaml +++ b/disperser/dataapi/docs/swagger.yaml @@ -578,6 +578,22 @@ paths: is a query parameter with a default value of 14 and max value of 30. tags: - OperatorsInfo + /operators-info/hostinfo-scan: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/dataapi.OperatorPortCheckResponse' + "500": + description: 'error: Server error' + schema: + $ref: '#/definitions/dataapi.ErrorResponse' + summary: Active operator semver report + tags: + - OperatorsInfo /operators-info/port-check: get: parameters: diff --git a/disperser/dataapi/server.go b/disperser/dataapi/server.go index 7be4a286b..6c46c3acd 100644 --- a/disperser/dataapi/server.go +++ b/disperser/dataapi/server.go @@ -813,8 +813,8 @@ func (s *server) OperatorPortCheck(c *gin.Context) { // @Summary Active operator semver report // @Tags OperatorsInfo // @Produce json -// @Success 200 {object} OperatorPortCheckResponse -// @Failure 500 {object} ErrorResponse "error: Server error" +// @Success 200 {object} OperatorPortCheckResponse +// @Failure 500 {object} ErrorResponse "error: Server error" // @Router /operators-info/hostinfo-scan [get] func (s *server) SemverReport(c *gin.Context) { timer := prometheus.NewTimer(prometheus.ObserverFunc(func(f float64) {