mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:38:50 +02:00
fix(api): wrong "accept" type in file set and validate API
This commit is contained in:
@@ -684,7 +684,7 @@ const docTemplate = `{
|
|||||||
"put": {
|
"put": {
|
||||||
"description": "Set file content",
|
"description": "Set file content",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"text/plain"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
@@ -792,7 +792,7 @@ const docTemplate = `{
|
|||||||
"post": {
|
"post": {
|
||||||
"description": "Validate file",
|
"description": "Validate file",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"text/plain"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|||||||
@@ -682,7 +682,7 @@
|
|||||||
"put": {
|
"put": {
|
||||||
"description": "Set file content",
|
"description": "Set file content",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"text/plain"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
@@ -792,7 +792,7 @@
|
|||||||
"post": {
|
"post": {
|
||||||
"description": "Validate file",
|
"description": "Validate file",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"text/plain"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|||||||
@@ -399,11 +399,11 @@ definitions:
|
|||||||
- 1mo
|
- 1mo
|
||||||
type: string
|
type: string
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
|
||||||
MetricsPeriod5m: '@name MetricsPeriod5m'
|
|
||||||
MetricsPeriod15m: '@name MetricsPeriod15m'
|
MetricsPeriod15m: '@name MetricsPeriod15m'
|
||||||
MetricsPeriod1d: '@name MetricsPeriod1d'
|
MetricsPeriod1d: '@name MetricsPeriod1d'
|
||||||
MetricsPeriod1h: '@name MetricsPeriod1h'
|
MetricsPeriod1h: '@name MetricsPeriod1h'
|
||||||
|
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
||||||
|
MetricsPeriod5m: '@name MetricsPeriod5m'
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- MetricsPeriod5m
|
- MetricsPeriod5m
|
||||||
- MetricsPeriod15m
|
- MetricsPeriod15m
|
||||||
@@ -1674,7 +1674,7 @@ paths:
|
|||||||
x-id: get
|
x-id: get
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- text/plain
|
||||||
description: Set file content
|
description: Set file content
|
||||||
parameters:
|
parameters:
|
||||||
- description: Type
|
- description: Type
|
||||||
@@ -1747,7 +1747,7 @@ paths:
|
|||||||
/file/validate:
|
/file/validate:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- text/plain
|
||||||
description: Validate file
|
description: Validate file
|
||||||
parameters:
|
parameters:
|
||||||
- description: Type
|
- description: Type
|
||||||
@@ -2031,11 +2031,11 @@ paths:
|
|||||||
name: interval
|
name: interval
|
||||||
type: string
|
type: string
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
MetricsPeriod15m: '@name MetricsPeriod15m'
|
|
||||||
MetricsPeriod1d: '@name MetricsPeriod1d'
|
|
||||||
MetricsPeriod1h: '@name MetricsPeriod1h'
|
MetricsPeriod1h: '@name MetricsPeriod1h'
|
||||||
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
MetricsPeriod1mo: '@name MetricsPeriod1mo'
|
||||||
MetricsPeriod5m: '@name MetricsPeriod5m'
|
MetricsPeriod5m: '@name MetricsPeriod5m'
|
||||||
|
MetricsPeriod15m: '@name MetricsPeriod15m'
|
||||||
|
MetricsPeriod1d: '@name MetricsPeriod1d'
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- MetricsPeriod5m
|
- MetricsPeriod5m
|
||||||
- MetricsPeriod15m
|
- MetricsPeriod15m
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type SetFileContentRequest GetFileContentRequest
|
|||||||
// @Summary Set file content
|
// @Summary Set file content
|
||||||
// @Description Set file content
|
// @Description Set file content
|
||||||
// @Tags file
|
// @Tags file
|
||||||
// @Accept json
|
// @Accept text/plain
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param type query FileType true "Type"
|
// @Param type query FileType true "Type"
|
||||||
// @Param filename query string true "Filename"
|
// @Param filename query string true "Filename"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type ValidateFileRequest struct {
|
|||||||
// @Summary Validate file
|
// @Summary Validate file
|
||||||
// @Description Validate file
|
// @Description Validate file
|
||||||
// @Tags file
|
// @Tags file
|
||||||
// @Accept json
|
// @Accept text/plain
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param type query FileType true "Type"
|
// @Param type query FileType true "Type"
|
||||||
// @Param file body string true "File content"
|
// @Param file body string true "File content"
|
||||||
|
|||||||
Reference in New Issue
Block a user