mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-21 08:39:03 +01:00
fix(api): wrong "accept" type in file set and validate API
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user