You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
3.7 KiB
133 lines
3.7 KiB
openapi: "3.0.0" |
|
servers: |
|
- url: http://192.168.31.161:3000/v1 |
|
description: 测试服务器 |
|
info: |
|
title: 书签同步助手后端接口 |
|
version: 1.0.0 |
|
tags: |
|
- name: Version |
|
description: 接口版本号 |
|
- name: Bookmark |
|
description: 书签管理 |
|
paths: |
|
/version: |
|
get: |
|
operationId: getVersion |
|
summary: 获得接口版本号 |
|
tags: |
|
- Version |
|
responses: |
|
'200': |
|
description: 200 response |
|
content: |
|
application/json: |
|
schema: |
|
type: object |
|
properties: |
|
code: |
|
$ref: '#/components/schemas/ResponseCode' |
|
message: |
|
type: string |
|
description: 响应信息,响应码为非20000时表示错误信息 |
|
data: |
|
type: string |
|
description: 版本号信息 |
|
examples: |
|
20000: |
|
value: { |
|
"code": 20000, |
|
"message": "OK", |
|
"data": "1.0.0" |
|
} |
|
/bookmark: |
|
get: |
|
operationId: downloadBookmark |
|
summary: 下载服务器书签列表 |
|
tags: |
|
- Bookmark |
|
responses: |
|
'200': |
|
description: |- |
|
200 response |
|
content: |
|
application/json: |
|
schema: |
|
type: object |
|
properties: |
|
code: |
|
$ref: '#/components/schemas/ResponseCode' |
|
message: |
|
type: string |
|
description: 响应信息,响应码为非20000时表示错误信息 |
|
data: |
|
type: object |
|
properties: |
|
total: |
|
description: 书签总数 |
|
type: integer |
|
list: |
|
type: array |
|
items: |
|
$ref: '#/components/schemas/Bookmark' |
|
post: |
|
operationId: uploadBookmark |
|
summary: 上传本地书签 |
|
tags: |
|
- Bookmark |
|
requestBody: |
|
description: 书签列表 |
|
required: true |
|
content: |
|
application/json: |
|
schema: |
|
type: array |
|
items: |
|
$ref: '#/components/schemas/Bookmark' |
|
responses: |
|
'200': |
|
description: 200 response |
|
content: |
|
application/json: |
|
schema: |
|
type: object |
|
properties: |
|
code: |
|
$ref: '#/components/schemas/ResponseCode' |
|
message: |
|
type: string |
|
description: 响应信息,响应码为非20000时表示错误信息 |
|
examples: |
|
20000: |
|
value: { |
|
"code": 20000, |
|
"message": "OK" |
|
} |
|
|
|
components: |
|
schemas: |
|
ResponseCode: |
|
type: integer |
|
enum: |
|
- 20000 |
|
description: > |
|
响应码: |
|
* `20000` - 表明调用成功 |
|
Bookmark: |
|
type: object |
|
properties: |
|
id: |
|
description: 节点的唯一标识, id 在当前配置文件中是唯一的,浏览器重启后依然有效。 |
|
type: string |
|
parentId: |
|
description: 父节点的ID,根节点没有此属性 |
|
type: string |
|
index: |
|
description: 书签在父节点中的索引,根节点没有此属性 |
|
type: integer |
|
title: |
|
description: 书签标题 |
|
type: string |
|
url: |
|
description: 书签的url,书签文件夹没有此属性 |
|
type: string |