-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathswagger.yaml
More file actions
8566 lines (8565 loc) · 197 KB
/
swagger.yaml
File metadata and controls
8566 lines (8565 loc) · 197 KB
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
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
basePath: /
definitions:
constant.NotificationChannelKey:
enum:
- email
type: string
x-enum-varnames:
- EmailChannel
constant.Privilege:
properties:
key:
type: string
label:
type: string
value:
minimum: 1
type: integer
type: object
entity.BadgeLevel:
enum:
- 1
- 2
- 3
type: integer
x-enum-varnames:
- BadgeLevelBronze
- BadgeLevelSilver
- BadgeLevelGold
handler.RespBody:
properties:
code:
description: http code
type: integer
data:
description: response data
msg:
description: response message
type: string
reason:
description: reason key
type: string
type: object
install.CheckConfigFileResp:
properties:
config_file_exist:
type: boolean
db_connection_success:
type: boolean
db_table_exist:
type: boolean
type: object
install.CheckDatabaseReq:
properties:
db_file:
type: string
db_host:
type: string
db_name:
type: string
db_password:
type: string
db_type:
enum:
- postgres
- sqlite3
- mysql
type: string
db_username:
type: string
ssl_cert:
type: string
ssl_enabled:
type: boolean
ssl_key:
type: string
ssl_mode:
type: string
ssl_root_cert:
type: string
required:
- db_type
type: object
install.InitBaseInfoReq:
properties:
contact_email:
maxLength: 500
type: string
email:
maxLength: 500
type: string
external_content_display:
enum:
- always_display
- ask_before_display
type: string
lang:
maxLength: 30
type: string
login_required:
type: boolean
name:
maxLength: 30
minLength: 2
type: string
password:
maxLength: 32
minLength: 8
type: string
site_name:
maxLength: 30
type: string
site_url:
maxLength: 512
type: string
required:
- contact_email
- email
- external_content_display
- lang
- name
- password
- site_name
- site_url
type: object
pager.PageModel:
properties:
count:
type: integer
list: {}
type: object
plugin.EmbedConfig:
properties:
enable:
type: boolean
platform:
type: string
type: object
plugin.RenderConfig:
properties:
select_theme:
type: string
type: object
schema.AIConversationAdminDeleteReq:
properties:
conversation_id:
type: string
required:
- conversation_id
type: object
schema.AIConversationAdminDetailResp:
properties:
conversation_id:
type: string
created_at:
type: integer
records:
items:
$ref: '#/definitions/schema.AIConversationRecord'
type: array
topic:
type: string
user_info:
$ref: '#/definitions/schema.AIConversationUserInfo'
type: object
schema.AIConversationAdminListItem:
properties:
created_at:
type: integer
helpful_count:
type: integer
id:
type: string
topic:
type: string
unhelpful_count:
type: integer
user_info:
$ref: '#/definitions/schema.AIConversationUserInfo'
type: object
schema.AIConversationDetailResp:
properties:
conversation_id:
type: string
created_at:
type: integer
records:
items:
$ref: '#/definitions/schema.AIConversationRecord'
type: array
topic:
type: string
updated_at:
type: integer
type: object
schema.AIConversationListItem:
properties:
conversation_id:
type: string
created_at:
type: integer
topic:
type: string
type: object
schema.AIConversationRecord:
properties:
chat_completion_id:
type: string
content:
type: string
created_at:
type: integer
helpful:
type: integer
role:
type: string
unhelpful:
type: integer
type: object
schema.AIConversationUserInfo:
properties:
avatar:
type: string
display_name:
type: string
id:
type: string
rank:
type: integer
username:
type: string
type: object
schema.AIConversationVoteReq:
properties:
cancel:
type: boolean
chat_completion_id:
type: string
vote_type:
enum:
- helpful
- unhelpful
type: string
required:
- chat_completion_id
- vote_type
type: object
schema.AIPromptConfig:
properties:
en_us:
type: string
zh_cn:
type: string
type: object
schema.AcceptAnswerReq:
properties:
answer_id:
type: string
question_id:
maxLength: 30
type: string
required:
- question_id
type: object
schema.ActObjectInfo:
properties:
answer_id:
type: string
display_name:
type: string
main_tag_slug_name:
type: string
object_type:
type: string
question_id:
type: string
title:
type: string
username:
type: string
type: object
schema.ActObjectTimeline:
properties:
activity_id:
type: string
activity_type:
type: string
cancelled:
type: boolean
cancelled_at:
type: integer
comment:
type: string
created_at:
type: integer
object_id:
type: string
object_type:
type: string
revision_id:
type: string
user_info:
$ref: '#/definitions/schema.UserBasicInfo'
type: object
schema.ActionRecordResp:
properties:
captcha_id:
type: string
captcha_img:
type: string
verify:
type: boolean
type: object
schema.AddAPIKeyReq:
properties:
description:
maxLength: 150
type: string
scope:
enum:
- read-only
- global
type: string
required:
- description
- scope
type: object
schema.AddAPIKeyResp:
properties:
access_key:
type: string
type: object
schema.AddCommentReq:
properties:
captcha_code:
type: string
captcha_id:
type: string
mention_username_list:
description: '@ user id list'
items:
type: string
type: array
object_id:
description: object id
type: string
original_text:
description: original comment content
maxLength: 600
minLength: 2
type: string
reply_comment_id:
description: reply comment id
type: string
required:
- object_id
- original_text
type: object
schema.AddReportReq:
properties:
captcha_code:
type: string
captcha_id:
description: captcha_id
type: string
content:
description: report content
maxLength: 500
type: string
object_id:
description: object id
maxLength: 20
type: string
report_type:
description: report type
type: integer
required:
- object_id
- report_type
type: object
schema.AddTagReq:
properties:
display_name:
description: display_name
maxLength: 35
type: string
original_text:
description: original text
maxLength: 65536
type: string
slug_name:
description: slug_name
maxLength: 35
type: string
required:
- display_name
- original_text
- slug_name
type: object
schema.AddUserReq:
properties:
display_name:
maxLength: 30
minLength: 2
type: string
email:
maxLength: 500
type: string
password:
maxLength: 32
minLength: 8
type: string
required:
- display_name
- email
- password
type: object
schema.AddUsersReq:
properties:
users:
description: users info line by line
type: string
type: object
schema.AdminUpdateAnswerStatusReq:
properties:
answer_id:
type: string
status:
enum:
- available
- deleted
type: string
required:
- answer_id
- status
type: object
schema.AdminUpdateQuestionStatusReq:
properties:
question_id:
type: string
status:
enum:
- available
- closed
- deleted
type: string
required:
- question_id
- status
type: object
schema.AnswerAddReq:
properties:
captcha_code:
type: string
captcha_id:
type: string
content:
maxLength: 65535
minLength: 6
type: string
question_id:
type: string
required:
- content
type: object
schema.AnswerInfo:
properties:
accepted:
type: integer
collected:
type: boolean
content:
type: string
create_time:
type: integer
html:
type: string
id:
type: string
member_actions:
description: MemberActions
items:
$ref: '#/definitions/schema.PermissionMemberAction'
type: array
question_id:
type: string
question_info:
$ref: '#/definitions/schema.QuestionInfoResp'
status:
type: integer
update_time:
type: integer
update_user_info:
$ref: '#/definitions/schema.UserBasicInfo'
user_info:
$ref: '#/definitions/schema.UserBasicInfo'
vote_count:
type: integer
vote_status:
type: string
type: object
schema.AnswerUpdateReq:
properties:
captcha_code:
type: string
captcha_id:
type: string
content:
maxLength: 65535
minLength: 6
type: string
edit_summary:
type: string
id:
type: string
title:
type: string
required:
- content
type: object
schema.AvatarInfo:
properties:
custom:
maxLength: 200
type: string
gravatar:
maxLength: 200
type: string
type:
maxLength: 100
type: string
type: object
schema.BadgeListInfo:
properties:
award_count:
description: badge award count
type: integer
earned_count:
description: badge earned count
type: integer
icon:
description: badge icon
type: string
id:
description: badge id
type: string
level:
allOf:
- $ref: '#/definitions/entity.BadgeLevel'
description: badge level
name:
description: badge name
type: string
type: object
schema.BadgeStatus:
enum:
- active
- inactive
type: string
x-enum-varnames:
- BadgeStatusActive
- BadgeStatusInactive
schema.CloseQuestionReq:
properties:
close_msg:
description: close_type
type: string
close_type:
description: close_type
type: integer
id:
type: string
required:
- id
type: object
schema.CollectionSwitchReq:
properties:
bookmark:
type: boolean
group_id:
type: string
object_id:
type: string
required:
- group_id
- object_id
type: object
schema.CollectionSwitchResp:
properties:
object_collection_count:
type: integer
type: object
schema.ConfigField:
properties:
description:
type: string
name:
type: string
options:
items:
$ref: '#/definitions/schema.ConfigFieldOption'
type: array
required:
type: boolean
title:
type: string
type:
type: string
ui_options:
$ref: '#/definitions/schema.ConfigFieldUIOptions'
value: {}
type: object
schema.ConfigFieldOption:
properties:
label:
type: string
value:
type: string
type: object
schema.ConfigFieldUIOptions:
properties:
action:
$ref: '#/definitions/schema.UIOptionAction'
class_name:
type: string
field_class_name:
type: string
input_type:
type: string
label:
type: string
placeholder:
type: string
rows:
type: string
text:
type: string
variant:
type: string
type: object
schema.ConnectorInfoResp:
properties:
icon:
type: string
link:
type: string
name:
type: string
type: object
schema.ConnectorUserInfoResp:
properties:
binding:
type: boolean
external_id:
type: string
icon:
type: string
link:
type: string
name:
type: string
type: object
schema.DeleteAPIKeyReq:
properties:
id:
type: integer
type: object
schema.DeletePermanentlyReq:
properties:
type:
enum:
- users
- questions
- answers
type: string
required:
- type
type: object
schema.EditUserProfileReq:
properties:
display_name:
maxLength: 30
minLength: 2
type: string
email:
maxLength: 500
type: string
user_id:
type: string
username:
maxLength: 30
minLength: 2
type: string
required:
- display_name
- email
- user_id
type: object
schema.ExternalLoginBindingUserSendEmailReq:
properties:
binding_key:
maxLength: 100
type: string
email:
maxLength: 512
type: string
must:
description: |-
If must is true, whatever email if exists, try to bind user.
If must is false, when email exist, will only be prompted with a warning.
type: boolean
required:
- binding_key
- email
type: object
schema.ExternalLoginBindingUserSendEmailResp:
properties:
access_token:
type: string
email_exist_and_must_be_confirmed:
type: boolean
type: object
schema.ExternalLoginUnbindingReq:
properties:
external_id:
maxLength: 128
type: string
required:
- external_id
type: object
schema.FollowReq:
properties:
is_cancel:
description: is cancel
type: boolean
object_id:
description: object id
type: string
required:
- object_id
type: object
schema.FollowResp:
properties:
follows:
description: the followers of object
type: integer
is_followed:
description: if user is followed object will be true,otherwise false
type: boolean
type: object
schema.GetAIModelResp:
properties:
created:
type: integer
id:
type: string
object:
type: string
owned_by:
type: string
type: object
schema.GetAIProviderResp:
properties:
default_api_host:
type: string
display_name:
type: string
name:
type: string
type: object
schema.GetAPIKeyResp:
properties:
access_key:
type: string
created_at:
type: integer
description:
type: string
id:
type: integer
last_used_at:
type: integer
scope:
type: string
type: object
schema.GetAnswerInfoResp:
properties:
info:
$ref: '#/definitions/schema.AnswerInfo'
question:
$ref: '#/definitions/schema.QuestionInfoResp'
type: object
schema.GetBadgeInfoResp:
properties:
award_count:
description: badge award count
type: integer
description:
description: badge description
type: string
earned_count:
description: badge earned count
type: integer
icon:
description: badge icon
type: string
id:
description: badge id
type: string
is_single:
description: badge is single or multiple
type: boolean
level:
allOf:
- $ref: '#/definitions/entity.BadgeLevel'
description: badge level
name:
description: badge name
type: string
type: object
schema.GetBadgeListPagedResp:
properties:
award_count:
description: badge award count
type: integer
description:
description: badge description
type: string
earned:
description: badge earned count
type: boolean
group_name:
description: badge group name
type: string
icon:
description: badge icon
type: string
id:
description: badge id
type: string
level:
allOf:
- $ref: '#/definitions/entity.BadgeLevel'
description: badge level
name:
description: badge name
type: string
status:
allOf:
- $ref: '#/definitions/schema.BadgeStatus'
description: badge status
type: object
schema.GetBadgeListResp:
properties:
badges:
description: badge list info
items:
$ref: '#/definitions/schema.BadgeListInfo'
type: array
group_name:
description: badge group name
type: string
type: object
schema.GetCommentPersonalWithPageResp:
properties:
answer_id:
description: answer id
type: string
comment_id:
description: comment id
type: string
content:
description: content
type: string
created_at:
description: create time
type: integer
object_id:
description: object id
type: string
object_type:
description: object type
enum:
- question
- answer
- tag
- comment
type: string
question_id:
description: question id
type: string
title:
description: title
type: string
url_title:
description: url title
type: string
type: object
schema.GetCommentResp:
properties:
comment_id:
description: comment id
type: string
created_at:
description: create time
type: integer
is_vote:
description: current user if already vote this comment
type: boolean
member_actions:
description: MemberActions
items:
$ref: '#/definitions/schema.PermissionMemberAction'
type: array
object_id:
description: object id
type: string
original_text:
description: original comment content
type: string
parsed_text:
description: parsed comment content
type: string
reply_comment_id:
description: reply comment id
type: string
reply_user_display_name:
description: reply user display name
type: string
reply_user_id:
description: reply user id
type: string
reply_user_status:
description: reply user status
type: string
reply_username:
description: reply user username
type: string
user_avatar:
description: user avatar
type: string
user_display_name:
description: user display name
type: string
user_id:
description: user id
type: string
user_status:
description: user status
type: string
username:
description: username
type: string
vote_count:
description: user vote amount
type: integer
type: object
schema.GetCurrentLoginUserInfoResp:
properties:
access_token:
description: access token
type: string
answer_count:
description: answer count
type: integer
authority_group:
description: authority group
type: integer
avatar:
$ref: '#/definitions/schema.AvatarInfo'
bio:
description: bio markdown
type: string
bio_html:
description: bio html
type: string
color_scheme:
description: Color scheme
type: string
created_at:
description: create time
type: integer
display_name:
description: display name