add personal apis

This commit is contained in:
ljw
2024-09-24 14:43:27 +08:00
parent a161e3ba10
commit c485035e74
21 changed files with 1099 additions and 168 deletions

View File

@@ -155,14 +155,14 @@ const docTemplateapi = `{
}
}
},
"/ab/personal": {
"/ab/peer/add/{id}": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "个人信息",
"description": "添加地址",
"consumes": [
"application/json"
],
@@ -170,9 +170,52 @@ const docTemplateapi = `{
"application/json"
],
"tags": [
"用户"
"地址[Personal]"
],
"summary": "个人信息",
"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": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "地址列表",
"parameters": [
{
"description": "string valid",
@@ -199,6 +242,181 @@ const docTemplateapi = `{
}
}
},
"/ab/personal": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "个人地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "个人地址",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/settings": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "设置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "设置",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/shared/profiles": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "共享",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "共享地址簿",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/tags/{id}": {
"post": {
"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": {
"$ref": "#/definitions/model.TagList"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/api": {
"get": {
"security": [
@@ -389,35 +607,6 @@ const docTemplateapi = `{
}
}
},
"/oauth/login": {
"get": {
"description": "WebOauthLogin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "WebOauthLogin",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/oidc/auth": {
"post": {
"description": "OidcAuth",
@@ -882,6 +1071,26 @@ const docTemplateapi = `{
}
}
},
"model.TagList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Tag"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"response.DataResponse": {
"type": "object",
"properties": {

View File

@@ -148,14 +148,14 @@
}
}
},
"/ab/personal": {
"/ab/peer/add/{id}": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "个人信息",
"description": "添加地址",
"consumes": [
"application/json"
],
@@ -163,9 +163,52 @@
"application/json"
],
"tags": [
"用户"
"地址[Personal]"
],
"summary": "个人信息",
"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": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "地址列表",
"parameters": [
{
"description": "string valid",
@@ -192,6 +235,181 @@
}
}
},
"/ab/personal": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "个人地址",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "个人地址",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/settings": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "设置",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "设置",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/shared/profiles": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "共享",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "共享地址簿",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ab/tags/{id}": {
"post": {
"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": {
"$ref": "#/definitions/model.TagList"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/api": {
"get": {
"security": [
@@ -382,35 +600,6 @@
}
}
},
"/oauth/login": {
"get": {
"description": "WebOauthLogin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "WebOauthLogin",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/oidc/auth": {
"post": {
"description": "OidcAuth",
@@ -875,6 +1064,26 @@
}
}
},
"model.TagList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Tag"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"response.DataResponse": {
"type": "object",
"properties": {

View File

@@ -103,6 +103,19 @@ definitions:
user_id:
type: integer
type: object
model.TagList:
properties:
list:
items:
$ref: '#/definitions/model.Tag'
type: array
page:
type: integer
page_size:
type: integer
total:
type: integer
type: object
response.DataResponse:
properties:
data: {}
@@ -216,11 +229,38 @@ paths:
summary: 标签添加
tags:
- 地址
/ab/personal:
/ab/peer/add/{id}:
post:
consumes:
- application/json
description: 个人信息
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:
post:
consumes:
- application/json
description: 地址
parameters:
- description: string valid
in: body
@@ -240,9 +280,117 @@ paths:
$ref: '#/definitions/response.Response'
security:
- BearerAuth: []
summary: 个人信息
summary: 地址列表
tags:
- 用户
- 地址[Personal]
/ab/personal:
post:
consumes:
- application/json
description: 个人地址
parameters:
- description: string valid
in: body
name: string
schema:
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- BearerAuth: []
summary: 个人地址
tags:
- 地址[Personal]
/ab/settings:
post:
consumes:
- application/json
description: 设置
parameters:
- description: string valid
in: body
name: string
schema:
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- BearerAuth: []
summary: 设置
tags:
- 地址[Personal]
/ab/shared/profiles:
post:
consumes:
- application/json
description: 共享
parameters:
- description: string valid
in: body
name: string
schema:
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- BearerAuth: []
summary: 共享地址簿
tags:
- 地址[Personal]
/ab/tags/{id}:
post:
consumes:
- application/json
description: 标签
parameters:
- description: id
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.TagList'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.ErrorResponse'
security:
- BearerAuth: []
summary: 标签
tags:
- 地址[Personal]
/api:
get:
consumes:
@@ -366,25 +514,6 @@ paths:
summary: OauthCallback
tags:
- Oauth
/oauth/login:
get:
consumes:
- application/json
description: WebOauthLogin
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
type: string
summary: WebOauthLogin
tags:
- Oauth
/oidc/auth:
post:
consumes: