增加文本中转功能
This commit is contained in:
@@ -78,6 +78,8 @@ definitions:
|
||||
type: object
|
||||
model.FileBatch:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
download_count:
|
||||
@@ -102,6 +104,9 @@ definitions:
|
||||
status:
|
||||
description: active / expired / deleted
|
||||
type: string
|
||||
type:
|
||||
description: file / text
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
@@ -134,6 +139,8 @@ definitions:
|
||||
type: object
|
||||
public.PickupResponse:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
download_count:
|
||||
type: integer
|
||||
expire_at:
|
||||
@@ -148,6 +155,8 @@ definitions:
|
||||
type: integer
|
||||
remark:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
public.UploadResponse:
|
||||
properties:
|
||||
@@ -158,6 +167,26 @@ definitions:
|
||||
pickup_code:
|
||||
type: string
|
||||
type: object
|
||||
public.UploadTextRequest:
|
||||
properties:
|
||||
content:
|
||||
example: 这是一段长文本内容...
|
||||
type: string
|
||||
expire_days:
|
||||
example: 7
|
||||
type: integer
|
||||
expire_type:
|
||||
example: time
|
||||
type: string
|
||||
max_downloads:
|
||||
example: 5
|
||||
type: integer
|
||||
remark:
|
||||
example: 文本备注
|
||||
type: string
|
||||
required:
|
||||
- content
|
||||
type: object
|
||||
info:
|
||||
contact:
|
||||
email: support@swagger.io
|
||||
@@ -545,6 +574,41 @@ paths:
|
||||
summary: 上传文件
|
||||
tags:
|
||||
- Public
|
||||
/api/upload/text:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 中转一段长文本内容并创建一个提取批次
|
||||
parameters:
|
||||
- description: 文本内容及配置
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/public.UploadTextRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/model.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/public.UploadResponse'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/model.Response'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/model.Response'
|
||||
summary: 发送长文本
|
||||
tags:
|
||||
- Public
|
||||
securityDefinitions:
|
||||
AdminAuth:
|
||||
description: Type "Bearer <your-jwt-token>" to authenticate.
|
||||
|
||||
Reference in New Issue
Block a user