Skip to content

Commit

Permalink
Merge pull request #26 from ppolariss/main
Browse files Browse the repository at this point in the history
chore: update question docs
  • Loading branch information
JingYiJun authored Jul 29, 2024
2 parents ff95466 + ae1a278 commit f9dfd31
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 9 deletions.
20 changes: 18 additions & 2 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1597,13 +1597,21 @@ const docTemplate = `{
"type": "string",
"enum": [
"optional",
"required"
"required",
"campus"
]
},
"id": {
"description": "题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含",
"type": "integer"
},
"option": {
"description": "椰树 swift",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"description": "选项描述,单选、判断、多选\n有一个或多个选项,如果是判断题,则选项只能是 true 或者 false\n如果 Answer 中的答案不在 Options 中,则会在解析时加到 Options 中",
"type": "array",
Expand Down Expand Up @@ -1665,8 +1673,16 @@ const docTemplate = `{
"description": "表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题",
"type": "boolean"
},
"number_of_campus_questions": {
"description": "校园题的数量\n其余规则同可选题",
"type": "integer"
},
"number_of_optional_questions": {
"description": "可选题的题目数量\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送\n如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误\n如果设置为 0 或者不设置,可选题不会发送\n如果设置为 -1,则题库中的可选题都会发送",
"type": "integer"
},
"number_of_questions": {
"description": "表示总的题目数量。\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。\n如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。\n如果设置为 0 或者不设置,则题库中的所有题目都会发送\n如果设置为 -1,则题库中的必做题都会发送,可选题不会发送",
"description": "总题目数量\nDeprecated",
"type": "integer"
}
}
Expand Down
20 changes: 18 additions & 2 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,13 +1591,21 @@
"type": "string",
"enum": [
"optional",
"required"
"required",
"campus"
]
},
"id": {
"description": "题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含",
"type": "integer"
},
"option": {
"description": "椰树 swift",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"description": "选项描述,单选、判断、多选\n有一个或多个选项,如果是判断题,则选项只能是 true 或者 false\n如果 Answer 中的答案不在 Options 中,则会在解析时加到 Options 中",
"type": "array",
Expand Down Expand Up @@ -1659,8 +1667,16 @@
"description": "表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题",
"type": "boolean"
},
"number_of_campus_questions": {
"description": "校园题的数量\n其余规则同可选题",
"type": "integer"
},
"number_of_optional_questions": {
"description": "可选题的题目数量\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送\n如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误\n如果设置为 0 或者不设置,可选题不会发送\n如果设置为 -1,则题库中的可选题都会发送",
"type": "integer"
},
"number_of_questions": {
"description": "表示总的题目数量。\n发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。\n如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。\n如果设置为 0 或者不设置,则题库中的所有题目都会发送\n如果设置为 -1,则题库中的必做题都会发送,可选题不会发送",
"description": "总题目数量\nDeprecated",
"type": "integer"
}
}
Expand Down
26 changes: 21 additions & 5 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,16 @@ definitions:
enum:
- optional
- required
- campus
type: string
id:
description: 题目 ID,题库解析时自动生成,题库中不必填写,发送给客户端时必须包含
type: integer
option:
description: 椰树 swift
items:
type: string
type: array
options:
description: |-
选项描述,单选、判断、多选
Expand Down Expand Up @@ -148,13 +154,23 @@ definitions:
in_order:
description: 表示是否由题目声明顺序由上到下顺序出题,默认为 false,即乱序出题
type: boolean
number_of_campus_questions:
description: |-
校园题的数量
其余规则同可选题
type: integer
number_of_optional_questions:
description: |-
可选题的题目数量
发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送
如果可选题的题目数量大于题库中的可选题数量,将会在解析时返回错误
如果设置为 0 或者不设置,可选题不会发送
如果设置为 -1,则题库中的可选题都会发送
type: integer
number_of_questions:
description: |-
表示总的题目数量。
发送题目时,题库中的必做题都会发送,可选题会根据题目数量随机发送。
如果总的题目数量小于题库中的必做题数量,将会在解析时返回错误。
如果设置为 0 或者不设置,则题库中的所有题目都会发送
如果设置为 -1,则题库中的必做题都会发送,可选题不会发送
总题目数量
Deprecated
type: integer
type: object
apis.QuestionType:
Expand Down

0 comments on commit f9dfd31

Please sign in to comment.