From d09e601b8a7f9f780ba0711e84b664448ece90b2 Mon Sep 17 00:00:00 2001 From: Patrick Schork Date: Fri, 26 Apr 2024 14:05:19 -0700 Subject: [PATCH] Update swagger docs --- disperser/dataapi/docs/docs.go | 22 +++++++++++++++++++++- disperser/dataapi/docs/swagger.json | 22 +++++++++++++++++++++- disperser/dataapi/docs/swagger.yaml | 15 ++++++++++++++- disperser/dataapi/server.go | 2 +- 4 files changed, 57 insertions(+), 4 deletions(-) diff --git a/disperser/dataapi/docs/docs.go b/disperser/dataapi/docs/docs.go index c1878a8a1d..a924e415a0 100644 --- a/disperser/dataapi/docs/docs.go +++ b/disperser/dataapi/docs/docs.go @@ -492,7 +492,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dataapi.ServiceAvailabilityResponse" + "$ref": "#/definitions/dataapi.OperatorPortCheckResponse" } }, "400": { @@ -720,6 +720,26 @@ const docTemplate = `{ } } }, + "dataapi.OperatorPortCheckResponse": { + "type": "object", + "properties": { + "disperser_online": { + "type": "boolean" + }, + "disperser_socket": { + "type": "string" + }, + "operator_id": { + "type": "string" + }, + "retriever_online": { + "type": "boolean" + }, + "retriever_socket": { + "type": "string" + } + } + }, "dataapi.OperatorsNonsigningPercentage": { "type": "object", "properties": { diff --git a/disperser/dataapi/docs/swagger.json b/disperser/dataapi/docs/swagger.json index 786c4614d6..3add78eab2 100644 --- a/disperser/dataapi/docs/swagger.json +++ b/disperser/dataapi/docs/swagger.json @@ -488,7 +488,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/dataapi.ServiceAvailabilityResponse" + "$ref": "#/definitions/dataapi.OperatorPortCheckResponse" } }, "400": { @@ -716,6 +716,26 @@ } } }, + "dataapi.OperatorPortCheckResponse": { + "type": "object", + "properties": { + "disperser_online": { + "type": "boolean" + }, + "disperser_socket": { + "type": "string" + }, + "operator_id": { + "type": "string" + }, + "retriever_online": { + "type": "boolean" + }, + "retriever_socket": { + "type": "string" + } + } + }, "dataapi.OperatorsNonsigningPercentage": { "type": "object", "properties": { diff --git a/disperser/dataapi/docs/swagger.yaml b/disperser/dataapi/docs/swagger.yaml index a6b906e181..f89e18cb32 100644 --- a/disperser/dataapi/docs/swagger.yaml +++ b/disperser/dataapi/docs/swagger.yaml @@ -138,6 +138,19 @@ definitions: total_unsigned_batches: type: integer type: object + dataapi.OperatorPortCheckResponse: + properties: + disperser_online: + type: boolean + disperser_socket: + type: string + operator_id: + type: string + retriever_online: + type: boolean + retriever_socket: + type: string + type: object dataapi.OperatorsNonsigningPercentage: properties: data: @@ -539,7 +552,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/dataapi.ServiceAvailabilityResponse' + $ref: '#/definitions/dataapi.OperatorPortCheckResponse' "400": description: 'error: Bad request' schema: diff --git a/disperser/dataapi/server.go b/disperser/dataapi/server.go index 6f16b487b3..1fe1fa1432 100644 --- a/disperser/dataapi/server.go +++ b/disperser/dataapi/server.go @@ -676,7 +676,7 @@ func (s *server) FetchDeregisteredOperators(c *gin.Context) { // @Tags OperatorsInfo // @Produce json // @Param operator_id query string true "Operator ID" -// @Success 200 {object} ServiceAvailabilityResponse +// @Success 200 {object} OperatorPortCheckResponse // @Failure 400 {object} ErrorResponse "error: Bad request" // @Failure 404 {object} ErrorResponse "error: Not found" // @Failure 500 {object} ErrorResponse "error: Server error"