-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
688 lines (688 loc) · 17 KB
/
openapi.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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
openapi: 3.0.1
info:
contact: {}
description: gin-http服务文档
title: gin-http API
version: "1.0"
servers:
- url: http://127.0.0.1:3013/goodsCenterLogic
paths:
/asynq/v1/addAggTask:
get:
description: asynq-添加聚合任务
parameters:
- description: "环境变量,默认线上; sandbox 沙箱环境, production 生产环境"
in: query
name: env
schema:
type: string
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.GroupDeliveryTaskAddResponse'
description: 请求成功
summary: asynq-添加聚合任务
tags:
- asynq
/asynq/v1/addTask:
get:
description: "asynq-异步任务,可通过: http://localhost:7013/monitoring/ 查看dashbord报表"
parameters:
- description: "环境变量,默认线上; sandbox 沙箱环境, production 生产环境"
in: query
name: env
schema:
type: string
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.AsynqEmailDeliveryTaskAddResponse'
description: 请求成功
summary: asynq-add异步任务
tags:
- asynq
/auth/v1/token/generate:
get:
description: jwt-token生成及校验
parameters:
- description: "环境变量,默认线上; sandbox 沙箱环境, production 生产环境"
in: query
name: env
schema:
type: string
- description: UserID 用户id
in: query
name: userId
required: true
schema:
type: string
- description: UserName 用户名 example:张三
in: query
name: userName
required: true
schema:
type: string
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.AppJwtTokenSwgResponse'
description: 请求成功
summary: jwt-token生成及校验
tags:
- auth
/v1/common/generateId:
get:
description: 生成id-描述
parameters:
- description: 认证信息 eg:xxxx-xxxx-xxxx-xxx
in: header
name: Authorization
schema:
type: string
- description: 生成id数量 1-1000
in: query
name: num
required: true
schema:
type: integer
- description: ID
in: path
name: id
required: true
schema:
type: integer
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_handler_servicev1.HttpGenerateIDResponse'
description: 请求成功
summary: 雪花ID生成
tags:
- 公共接口
/v1/exampleGet:
get:
description: get接口示例
parameters:
- description: create_time
in: query
name: create_time
required: true
schema:
type: integer
- description: query_id
in: query
name: query_id
required: true
schema:
type: string
- description: user_id 用户id
in: query
name: user_id
required: true
schema:
type: string
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.ExampleGetResponse'
description: 请求成功
summary: get接口示例
tags:
- Example
/v1/exampleGetOne:
get:
description: getOne接口示例
parameters:
- description: create_time
in: query
name: create_time
required: true
schema:
type: integer
- description: query_id
in: query
name: query_id
required: true
schema:
type: string
- description: user_id 用户id
in: query
name: user_id
required: true
schema:
type: string
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.ExampleGetOneResponse'
description: 请求成功
summary: getOne接口示例
tags:
- Example
/v1/examplePost:
post:
description: "\nios购买项类型 <a href=\"https://developer.apple.com/documentation/appstoreconnectapi/list_all_in-app_purchases_for_an_app\"\
> 详情</a> </br> \n\n\nandroid订阅 <a href=\"https://developers.google.com/android-publisher/api-ref/rest/v3/monetization.subscriptions/list?hl=zh-cn\"\
> 详情</a> </br> \n\nandroid非订阅<a href=\"https://developers.google.com/android-publisher/api-ref/rest/v3/inappproducts/list?hl=zh-cn\"\
> 详情</a> </br> \n\nandroid订阅产品的类型<a href=\"https://developers.google.com/android-publisher/api-ref/rest/v3/inappproducts?hl=zh-cn#PurchaseType\"\
> 详情</a> </br>"
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/internal_api_dto.ExamplePostRequest'
description: 请求参数
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/internal_api_dto.ExamplePostResponse'
description: 请求成功
headers:
Token:
description: token
schema:
type: string
Token2:
description: token2
schema:
type: string
Location:
description: /entity/1
schema:
type: string
summary: post 接口 示例
tags:
- Example
x-codegen-request-body-name: body
/v1/userScore/add:
post:
description: gorm 添加数据
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_handler.ResponseData'
description: 请求成功
summary: 添加数据
tags:
- user_score
/v1/userScore/del:
post:
description: gorm 删除数据
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_handler.ResponseData'
description: 请求成功
summary: 删除数据
tags:
- user_score
/v1/userScore/find:
get:
description: gorm 查询一条数据
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.UserScoreFindResponse'
description: 请求成功
summary: 查询一条数据
tags:
- user_score
/v1/userScore/list:
get:
description: gorm 查询列表
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_api_dto.UserScoreListResponse'
description: 请求成功
summary: 查询列表
tags:
- user_score
/v1/userScore/update:
post:
description: gorm 更新数据
responses:
"200":
content:
'*/*':
schema:
$ref: '#/components/schemas/internal_handler.ResponseData'
description: 请求成功
summary: 更新数据
tags:
- user_score
components:
schemas:
internal_api_dto.AppJwtTokenResponse:
example:
jwtPayload: "{}"
token: token
properties:
jwtPayload:
allOf:
- $ref: '#/components/schemas/internal_module_auth_application_service.AuthPayload'
description: token payload 信息
type: object
token:
description: Token jwt token
type: string
type: object
internal_api_dto.AppJwtTokenSwgResponse:
example:
msg: success
traceId: traceId
code: 1
data:
jwtPayload: "{}"
token: token
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
$ref: '#/components/schemas/internal_api_dto.AppJwtTokenResponse'
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.AsynqEmailDeliveryTaskAddResponse:
example:
msg: success
traceId: traceId
code: 1
data: "{}"
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
description: 数据data
type: object
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.ExampleGetOneResponse:
example:
msg: success
traceId: traceId
code: 1
data:
country: country
vip_info: 0
user_id: user_id
last_login: last_login
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
$ref: '#/components/schemas/internal_api_dto.UserPortraitData'
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.ExampleGetResponse:
example:
msg: success
traceId: traceId
code: 1
data:
country: country
vip_info: 0
user_id: user_id
last_login: last_login
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
$ref: '#/components/schemas/internal_api_dto.UserPortraitData'
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.ExamplePostRequest:
properties:
Title:
description: 标题
type: string
app_id:
description: 应用id
type: string
question:
description: 问题
type: string
required:
- Title
- app_id
- question
type: object
internal_api_dto.ExamplePostResponse:
example:
msg: success
traceId: traceId
code: 1
data:
country: country
vip_info: 0
user_id: user_id
last_login: last_login
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
$ref: '#/components/schemas/internal_api_dto.UserPortraitData'
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.GroupDeliveryTaskAddResponse:
example:
msg: success
traceId: traceId
code: 1
data: "{}"
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
description: 数据data
type: object
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.UserPortraitData:
example:
country: country
vip_info: 0
user_id: user_id
last_login: last_login
properties:
country:
description: 国家
type: string
last_login:
description: 上次登陆时间
type: string
user_id:
description: 用户id
type: string
vip_info:
description: 是否为VIP,0/1
type: integer
type: object
internal_api_dto.UserScoreFindResponse:
example:
msg: success
traceId: traceId
code: 1
data:
score: 1
update_time: 5
create_time: 0
user_id: user_id
id: 6
zero_timestamp: 2
score_result: 5
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
$ref: '#/components/schemas/internal_module_mockv2_application_entity.UserScore'
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_api_dto.UserScoreListResponse:
example:
msg: success
traceId: traceId
code: 1
data:
- score: 1
update_time: 5
create_time: 0
user_id: user_id
id: 6
zero_timestamp: 2
score_result: 5
- score: 1
update_time: 5
create_time: 0
user_id: user_id
id: 6
zero_timestamp: 2
score_result: 5
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
items:
$ref: '#/components/schemas/internal_module_mockv2_application_entity.UserScore'
type: array
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_handler.ResponseData:
example:
msg: success
traceId: traceId
code: 1
data: "{}"
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
description: 数据data
type: object
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
internal_module_auth_application_service.AuthPayload:
properties:
aud:
type: string
audience:
description: Audience 当前时间
type: integer
exp:
type: integer
expiresAt:
description: ExpiresAt token 过期时间
type: integer
iat:
type: integer
iss:
type: string
jti:
type: string
nbf:
type: integer
sub:
type: string
uid:
description: UID 用户id
type: string
username:
description: Username 用户名
type: string
type: object
internal_module_mockv2_application_entity.UserScore:
example:
score: 1
update_time: 5
create_time: 0
user_id: user_id
id: 6
zero_timestamp: 2
score_result: 5
properties:
create_time:
type: integer
id:
type: integer
score:
type: integer
score_result:
type: integer
update_time:
type: integer
user_id:
type: string
zero_timestamp:
type: integer
type: object
internal_handler_servicev1.HttpGenerateIDResponse:
example:
msg: success
traceId: traceId
code: 1
data:
- data
- data
properties:
code:
description: "code: 0 成功; 非0失败;"
example: 1
type: integer
data:
description: 生成id数组
items:
type: string
type: array
msg:
description: 错误消息
example: success
type: string
traceId:
description: traceId
type: string
required:
- code
- data
- msg
- traceId
type: object
x-original-swagger-version: "2.0"