-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathswagger.yaml
318 lines (318 loc) · 7.38 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
definitions:
album.CreateAlbumRequest:
properties:
description:
description: 描述
type: string
summary:
description: 概况
type: string
title:
description: 相册标题
type: string
required:
- title
type: object
album.CreateAlbumResponse:
properties:
description:
description: 描述
type: string
id:
type: string
summary:
description: 概况
type: string
title:
description: 相册标题
type: string
required:
- title
type: object
album.ListRequest:
properties:
content:
type: string
page:
default: 1
description: 第几页
type: integer
size:
default: 10
description: 每页多少条
type: integer
type: object
album.ListResponse:
properties:
records:
items:
$ref: '#/definitions/entity.Album'
type: array
total:
type: integer
type: object
authorize.LoginRequest:
properties:
login_name:
description: 用户名
type: string
scrip:
description: 编码
type: string
required:
- login_name
- scrip
type: object
authorize.LoginResponse:
properties:
access_token:
type: string
refresh_token:
type: string
session_id:
type: string
user:
type: string
type: object
authorize.RegisterRequest:
properties:
password:
description: 密码
type: string
username:
description: 用户名
type: string
required:
- password
- username
type: object
entity.Album:
properties:
_id:
type: string
artist:
description: 创建人名字
type: string
created_at:
description: 创建时间
type: string
created_by:
description: 创建人
type: string
deleted:
description: 是否逻辑删除
type: boolean
description:
description: 描述
type: string
first_pic:
allOf:
- $ref: '#/definitions/entity.Picture'
description: 第一张照片
id:
type: string
last_view_at:
description: 上次查看日期
type: string
modified_at:
description: 修改时间
type: string
modified_by:
description: 修改人
type: string
order_index:
description: 排序,升序
type: integer
price:
description: 照片数量
type: integer
summary:
description: 概况
type: string
title:
description: 相册标题
type: string
type: object
entity.Picture:
properties:
_id:
type: string
abs_path:
description: 相对路径
type: string
created_at:
description: 创建时间
type: string
created_by:
description: 创建人
type: string
deleted:
description: 是否逻辑删除
type: boolean
file_name:
description: 文件名
type: string
hidden:
description: 是否隐藏
type: boolean
id:
type: string
location:
description: 拍摄位置
type: string
modified_at:
description: 修改时间
type: string
modified_by:
description: 修改人
type: string
real_path:
description: 真实路径
type: string
size:
description: 照片大小,字节
type: integer
suffix:
description: 后缀名
type: string
tags:
description: 标签
items:
type: string
type: array
type: object
internal.CommonResponse-album_CreateAlbumResponse:
properties:
biz_code:
description: 业务编码,0 - 正常
type: integer
error:
description: 异常信息,正确请求时为空白
type: string
result:
allOf:
- $ref: '#/definitions/album.CreateAlbumResponse'
description: 返回的数据
type: object
internal.CommonResponse-album_ListResponse:
properties:
biz_code:
description: 业务编码,0 - 正常
type: integer
error:
description: 异常信息,正确请求时为空白
type: string
result:
allOf:
- $ref: '#/definitions/album.ListResponse'
description: 返回的数据
type: object
internal.CommonResponse-authorize_LoginResponse:
properties:
biz_code:
description: 业务编码,0 - 正常
type: integer
error:
description: 异常信息,正确请求时为空白
type: string
result:
allOf:
- $ref: '#/definitions/authorize.LoginResponse'
description: 返回的数据
type: object
internal.CommonResponse-string:
properties:
biz_code:
description: 业务编码,0 - 正常
type: integer
error:
description: 异常信息,正确请求时为空白
type: string
result:
description: 返回的数据
type: string
type: object
info:
contact: {}
paths:
/album/create_one:
post:
consumes:
- application/json
description: 创建相册
parameters:
- description: 创建相册所需要的参数
in: body
name: json
required: true
schema:
$ref: '#/definitions/album.CreateAlbumRequest'
produces:
- application/json
responses:
"200":
description: 请求成功
schema:
$ref: '#/definitions/internal.CommonResponse-album_CreateAlbumResponse'
summary: 创建相册
/album/list:
post:
consumes:
- application/json
description: 列表查询所有相册
parameters:
- description: 分页参数
in: body
name: json
required: true
schema:
$ref: '#/definitions/album.ListRequest'
produces:
- application/json
responses:
"200":
description: 请求成功
schema:
$ref: '#/definitions/internal.CommonResponse-album_ListResponse'
summary: 列表查询所有相册
/authorize/login:
post:
consumes:
- application/json
description: 登陆
parameters:
- description: 登陆时所需要的信息
in: body
name: json
required: true
schema:
$ref: '#/definitions/authorize.LoginRequest'
produces:
- application/json
responses:
"200":
description: token信息
schema:
$ref: '#/definitions/internal.CommonResponse-authorize_LoginResponse'
summary: 登陆
/authorize/register:
post:
consumes:
- application/json
description: 注册用户
parameters:
- description: 注册用户所需的信息
in: body
name: json
required: true
schema:
$ref: '#/definitions/authorize.RegisterRequest'
produces:
- application/json
responses:
"200":
description: 请求成功
schema:
$ref: '#/definitions/internal.CommonResponse-string'
summary: 注册用户
swagger: "2.0"