This commit is contained in:
ljw
2024-09-24 15:16:07 +08:00
parent c5b43fae08
commit 8c2f6f0929
3 changed files with 497 additions and 9 deletions

View File

@@ -136,7 +136,7 @@ const docTemplateapi = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"地址" "地址[Personal]"
], ],
"summary": "标签添加", "summary": "标签添加",
"responses": { "responses": {
@@ -155,7 +155,7 @@ const docTemplateapi = `{
} }
} }
}, },
"/ab/peer/add/{id}": { "/ab/peer/add/{guid}": {
"post": { "post": {
"security": [ "security": [
{ {
@@ -196,6 +196,90 @@ const docTemplateapi = `{
} }
} }
} }
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "删除地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "删除地址",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/peer/update/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "更新地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "更新地址",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
} }
}, },
"/ab/peers": { "/ab/peers": {
@@ -374,7 +458,109 @@ const docTemplateapi = `{
} }
} }
}, },
"/ab/tags/{id}": { "/ab/tag/rename/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签重命名",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tag/update/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签修改颜色",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tag/{guid}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签删除",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tags/{guid}": {
"post": { "post": {
"security": [ "security": [
{ {

View File

@@ -129,7 +129,7 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"地址" "地址[Personal]"
], ],
"summary": "标签添加", "summary": "标签添加",
"responses": { "responses": {
@@ -148,7 +148,7 @@
} }
} }
}, },
"/ab/peer/add/{id}": { "/ab/peer/add/{guid}": {
"post": { "post": {
"security": [ "security": [
{ {
@@ -189,6 +189,90 @@
} }
} }
} }
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "删除地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "删除地址",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/peer/update/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "更新地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "更新地址",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
} }
}, },
"/ab/peers": { "/ab/peers": {
@@ -367,7 +451,109 @@
} }
} }
}, },
"/ab/tags/{id}": { "/ab/tag/rename/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签重命名",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tag/update/{guid}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签修改颜色",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tag/{guid}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签删除",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tags/{guid}": {
"post": { "post": {
"security": [ "security": [
{ {

View File

@@ -228,8 +228,34 @@ paths:
- BearerAuth: [] - BearerAuth: []
summary: 标签添加 summary: 标签添加
tags: tags:
- 地址 - 地址[Personal]
/ab/peer/add/{id}: /ab/peer/add/{guid}:
delete:
consumes:
- application/json
description: 删除地址
parameters:
- description: id
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 删除地址
tags:
- 地址[Personal]
post: post:
consumes: consumes:
- application/json - application/json
@@ -256,6 +282,33 @@ paths:
summary: 添加地址 summary: 添加地址
tags: tags:
- 地址[Personal] - 地址[Personal]
/ab/peer/update/{guid}:
put:
consumes:
- application/json
description: 更新地址
parameters:
- description: id
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 更新地址
tags:
- 地址[Personal]
/ab/peers: /ab/peers:
post: post:
consumes: consumes:
@@ -364,7 +417,70 @@ paths:
summary: 共享地址簿 summary: 共享地址簿
tags: tags:
- 地址[Personal] - 地址[Personal]
/ab/tags/{id}: /ab/tag/{guid}:
delete:
consumes:
- application/json
description: 标签
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 标签删除
tags:
- 地址[Personal]
/ab/tag/rename/{guid}:
put:
consumes:
- application/json
description: 标签
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 标签重命名
tags:
- 地址[Personal]
/ab/tag/update/{guid}:
put:
consumes:
- application/json
description: 标签
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 标签修改颜色
tags:
- 地址[Personal]
/ab/tags/{guid}:
post: post:
consumes: consumes:
- application/json - application/json