diff --git a/internal/api/v1/docs/docs.go b/internal/api/v1/docs/docs.go index c5a552c4..2513d0f0 100644 --- a/internal/api/v1/docs/docs.go +++ b/internal/api/v1/docs/docs.go @@ -684,7 +684,7 @@ const docTemplate = `{ "put": { "description": "Set file content", "consumes": [ - "application/json" + "text/plain" ], "produces": [ "application/json" @@ -792,7 +792,7 @@ const docTemplate = `{ "post": { "description": "Validate file", "consumes": [ - "application/json" + "text/plain" ], "produces": [ "application/json" diff --git a/internal/api/v1/docs/swagger.json b/internal/api/v1/docs/swagger.json index 34afc313..b69d864a 100644 --- a/internal/api/v1/docs/swagger.json +++ b/internal/api/v1/docs/swagger.json @@ -682,7 +682,7 @@ "put": { "description": "Set file content", "consumes": [ - "application/json" + "text/plain" ], "produces": [ "application/json" @@ -792,7 +792,7 @@ "post": { "description": "Validate file", "consumes": [ - "application/json" + "text/plain" ], "produces": [ "application/json" diff --git a/internal/api/v1/docs/swagger.yaml b/internal/api/v1/docs/swagger.yaml index feca6e1b..44fb9d95 100644 --- a/internal/api/v1/docs/swagger.yaml +++ b/internal/api/v1/docs/swagger.yaml @@ -399,11 +399,11 @@ definitions: - 1mo type: string x-enum-comments: - MetricsPeriod1mo: '@name MetricsPeriod1mo' - MetricsPeriod5m: '@name MetricsPeriod5m' MetricsPeriod15m: '@name MetricsPeriod15m' MetricsPeriod1d: '@name MetricsPeriod1d' MetricsPeriod1h: '@name MetricsPeriod1h' + MetricsPeriod1mo: '@name MetricsPeriod1mo' + MetricsPeriod5m: '@name MetricsPeriod5m' x-enum-varnames: - MetricsPeriod5m - MetricsPeriod15m @@ -1674,7 +1674,7 @@ paths: x-id: get put: consumes: - - application/json + - text/plain description: Set file content parameters: - description: Type @@ -1747,7 +1747,7 @@ paths: /file/validate: post: consumes: - - application/json + - text/plain description: Validate file parameters: - description: Type @@ -2031,11 +2031,11 @@ paths: name: interval type: string x-enum-comments: - MetricsPeriod15m: '@name MetricsPeriod15m' - MetricsPeriod1d: '@name MetricsPeriod1d' MetricsPeriod1h: '@name MetricsPeriod1h' MetricsPeriod1mo: '@name MetricsPeriod1mo' MetricsPeriod5m: '@name MetricsPeriod5m' + MetricsPeriod15m: '@name MetricsPeriod15m' + MetricsPeriod1d: '@name MetricsPeriod1d' x-enum-varnames: - MetricsPeriod5m - MetricsPeriod15m diff --git a/internal/api/v1/file/set.go b/internal/api/v1/file/set.go index c11b7890..8f275b42 100644 --- a/internal/api/v1/file/set.go +++ b/internal/api/v1/file/set.go @@ -15,7 +15,7 @@ type SetFileContentRequest GetFileContentRequest // @Summary Set file content // @Description Set file content // @Tags file -// @Accept json +// @Accept text/plain // @Produce json // @Param type query FileType true "Type" // @Param filename query string true "Filename" diff --git a/internal/api/v1/file/validate.go b/internal/api/v1/file/validate.go index b32d8a03..4735b8b8 100644 --- a/internal/api/v1/file/validate.go +++ b/internal/api/v1/file/validate.go @@ -20,7 +20,7 @@ type ValidateFileRequest struct { // @Summary Validate file // @Description Validate file // @Tags file -// @Accept json +// @Accept text/plain // @Produce json // @Param type query FileType true "Type" // @Param file body string true "File content"