From 13362c3385bb5ff023310021d5ac6323f1202eb4 Mon Sep 17 00:00:00 2001 From: Jian Xiao <99709935+jianoaix@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:36:23 -0700 Subject: [PATCH] Update ejection api doc (#532) --- disperser/dataapi/docs/docs.go | 2 +- disperser/dataapi/docs/swagger.json | 2 +- disperser/dataapi/docs/swagger.yaml | 2 +- disperser/dataapi/server.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/disperser/dataapi/docs/docs.go b/disperser/dataapi/docs/docs.go index 3b82026925..2146a9ce8e 100644 --- a/disperser/dataapi/docs/docs.go +++ b/disperser/dataapi/docs/docs.go @@ -16,7 +16,7 @@ const docTemplate = `{ "basePath": "{{.BasePath}}", "paths": { "/ejector/operators": { - "get": { + "post": { "produces": [ "application/json" ], diff --git a/disperser/dataapi/docs/swagger.json b/disperser/dataapi/docs/swagger.json index e6a8188c04..bdfe55cf08 100644 --- a/disperser/dataapi/docs/swagger.json +++ b/disperser/dataapi/docs/swagger.json @@ -12,7 +12,7 @@ }, "paths": { "/ejector/operators": { - "get": { + "post": { "produces": [ "application/json" ], diff --git a/disperser/dataapi/docs/swagger.yaml b/disperser/dataapi/docs/swagger.yaml index 6f5e7aaac2..5c0a05b125 100644 --- a/disperser/dataapi/docs/swagger.yaml +++ b/disperser/dataapi/docs/swagger.yaml @@ -241,7 +241,7 @@ info: version: "1" paths: /ejector/operators: - get: + post: parameters: - description: 'Lookback window for operator ejection [default: 86400]' in: query diff --git a/disperser/dataapi/server.go b/disperser/dataapi/server.go index 95b6889df4..8dd0545c4d 100644 --- a/disperser/dataapi/server.go +++ b/disperser/dataapi/server.go @@ -325,7 +325,7 @@ func (s *server) Shutdown() error { // @Failure 400 {object} ErrorResponse "error: Bad request" // @Failure 404 {object} ErrorResponse "error: Not found" // @Failure 500 {object} ErrorResponse "error: Server error" -// @Router /ejector/operators [get] +// @Router /ejector/operators [post] func (s *server) EjectOperatorsHandler(c *gin.Context) { timer := prometheus.NewTimer(prometheus.ObserverFunc(func(f float64) { s.metrics.ObserveLatency("EjectOperators", f*1000) // make milliseconds