增加文本中转功能
This commit is contained in:
99
docs/docs.go
99
docs/docs.go
@@ -640,6 +640,64 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/upload/text": {
|
||||
"post": {
|
||||
"description": "中转一段长文本内容并创建一个提取批次",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Public"
|
||||
],
|
||||
"summary": "发送长文本",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "文本内容及配置",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/public.UploadTextRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/model.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/public.UploadResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -762,6 +820,9 @@ const docTemplate = `{
|
||||
"model.FileBatch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -797,6 +858,10 @@ const docTemplate = `{
|
||||
"description": "active / expired / deleted",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "file / text",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -845,6 +910,9 @@ const docTemplate = `{
|
||||
"public.PickupResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"download_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -865,6 +933,9 @@ const docTemplate = `{
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -881,6 +952,34 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"public.UploadTextRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"example": "这是一段长文本内容..."
|
||||
},
|
||||
"expire_days": {
|
||||
"type": "integer",
|
||||
"example": 7
|
||||
},
|
||||
"expire_type": {
|
||||
"type": "string",
|
||||
"example": "time"
|
||||
},
|
||||
"max_downloads": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"remark": {
|
||||
"type": "string",
|
||||
"example": "文本备注"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
Reference in New Issue
Block a user