Skip to content

Commit f9dfd31

Browse files
authored
Merge pull request #26 from ppolariss/main
chore: update question docs
2 parents ff95466 + ae1a278 commit f9dfd31

3 files changed

Lines changed: 57 additions & 9 deletions

File tree

docs/docs.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,13 +1597,21 @@ const docTemplate = `{
15971597
"type": "string",
15981598
"enum": [
15991599
"optional",
1600-
"required"
1600+
"required",
1601+
"campus"
16011602
]
16021603
},
16031604
"id": {
16041605
"description": "题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含",
16051606
"type": "integer"
16061607
},
1608+
"option": {
1609+
"description": "椰树 swift",
1610+
"type": "array",
1611+
"items": {
1612+
"type": "string"
1613+
}
1614+
},
16071615
"options": {
16081616
"description": "选项描述,单选、判断、多选\n有一个或多个选项,如果是判断题,则选项只能是 true 或者 false\n如果 Answer 中的答案不在 Options 中,则会在解析时加到 Options 中",
16091617
"type": "array",
@@ -1665,8 +1673,16 @@ const docTemplate = `{
16651673
"description": "表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题",
16661674
"type": "boolean"
16671675
},
1676+
"number_of_campus_questions": {
1677+
"description": "校园题的数量\n其余规则同可选题",
1678+
"type": "integer"
1679+
},
1680+
"number_of_optional_questions": {
1681+
"description": "可选题的题目数量\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送\n如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误\n如果设置为 0 或者不设置,可选题不会发送\n如果设置为 -1,则题库中的可选题都会发送",
1682+
"type": "integer"
1683+
},
16681684
"number_of_questions": {
1669-
"description": "表示总的题目数量。\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。\n如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。\n如果设置为 0 或者不设置,则题库中的所有题目都会发送\n如果设置为 -1,则题库中的必做题都会发送,可选题不会发送",
1685+
"description": "总题目数量\nDeprecated",
16701686
"type": "integer"
16711687
}
16721688
}

docs/swagger.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,13 +1591,21 @@
15911591
"type": "string",
15921592
"enum": [
15931593
"optional",
1594-
"required"
1594+
"required",
1595+
"campus"
15951596
]
15961597
},
15971598
"id": {
15981599
"description": "题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含",
15991600
"type": "integer"
16001601
},
1602+
"option": {
1603+
"description": "椰树 swift",
1604+
"type": "array",
1605+
"items": {
1606+
"type": "string"
1607+
}
1608+
},
16011609
"options": {
16021610
"description": "选项描述,单选、判断、多选\n有一个或多个选项,如果是判断题,则选项只能是 true 或者 false\n如果 Answer 中的答案不在 Options 中,则会在解析时加到 Options 中",
16031611
"type": "array",
@@ -1659,8 +1667,16 @@
16591667
"description": "表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题",
16601668
"type": "boolean"
16611669
},
1670+
"number_of_campus_questions": {
1671+
"description": "校园题的数量\n其余规则同可选题",
1672+
"type": "integer"
1673+
},
1674+
"number_of_optional_questions": {
1675+
"description": "可选题的题目数量\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送\n如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误\n如果设置为 0 或者不设置,可选题不会发送\n如果设置为 -1,则题库中的可选题都会发送",
1676+
"type": "integer"
1677+
},
16621678
"number_of_questions": {
1663-
"description": "表示总的题目数量。\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。\n如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。\n如果设置为 0 或者不设置,则题库中的所有题目都会发送\n如果设置为 -1,则题库中的必做题都会发送,可选题不会发送",
1679+
"description": "总题目数量\nDeprecated",
16641680
"type": "integer"
16651681
}
16661682
}

docs/swagger.yaml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,16 @@ definitions:
9999
enum:
100100
- optional
101101
- required
102+
- campus
102103
type: string
103104
id:
104105
description: 题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含
105106
type: integer
107+
option:
108+
description: 椰树 swift
109+
items:
110+
type: string
111+
type: array
106112
options:
107113
description: |-
108114
选项描述,单选、判断、多选
@@ -148,13 +154,23 @@ definitions:
148154
in_order:
149155
description: 表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题
150156
type: boolean
157+
number_of_campus_questions:
158+
description: |-
159+
校园题的数量
160+
其余规则同可选题
161+
type: integer
162+
number_of_optional_questions:
163+
description: |-
164+
可选题的题目数量
165+
发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送
166+
如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误
167+
如果设置为 0 或者不设置,可选题不会发送
168+
如果设置为 -1,则题库中的可选题都会发送
169+
type: integer
151170
number_of_questions:
152171
description: |-
153-
表示总的题目数量。
154-
发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。
155-
如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。
156-
如果设置为 0 或者不设置,则题库中的所有题目都会发送
157-
如果设置为 -1,则题库中的必做题都会发送,可选题不会发送
172+
总题目数量
173+
Deprecated
158174
type: integer
159175
type: object
160176
apis.QuestionType:

0 commit comments

Comments
 (0)