778 lines
17 KiB
JSON
778 lines
17 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "rs_common.proto",
|
|
"version": "version not set"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "Gateway"
|
|
},
|
|
{
|
|
"name": "Qgdzs"
|
|
},
|
|
{
|
|
"name": "Scene"
|
|
},
|
|
{
|
|
"name": "User"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/qgdzs/auth/generate_question": {
|
|
"post": {
|
|
"summary": "生成题目",
|
|
"operationId": "Qgdzs_GenerateQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/GenerateQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/GenerateQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/auth/get_record": {
|
|
"post": {
|
|
"summary": "---------- 答题记录 ----------\n获取答题记录",
|
|
"operationId": "Qgdzs_GetRecord",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/GetRecordResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/GetRecordReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/category/answer": {
|
|
"post": {
|
|
"summary": "回答题目",
|
|
"operationId": "Qgdzs_CategoryAnswerQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/CategoryAnswerQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/CategoryAnswerQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/category/get_category": {
|
|
"post": {
|
|
"summary": "---------- 类目答题 ----------\n获取所有类目",
|
|
"operationId": "Qgdzs_GetAllCategory",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/GetAllCategoryResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/GetAllCategoryReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/category/question": {
|
|
"post": {
|
|
"summary": "获取题目",
|
|
"operationId": "Qgdzs_CategoryGetQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/CategoryGetQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/CategoryGetQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/get_question_info": {
|
|
"post": {
|
|
"summary": "获取具体的题目",
|
|
"operationId": "Qgdzs_GetQuestionInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/GetQuestionInfoResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/GetQuestionInfoReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/quickly/answer": {
|
|
"post": {
|
|
"summary": "回答题目",
|
|
"operationId": "Qgdzs_QuicklyAnswerQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/QuicklyAnswerQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/QuicklyAnswerQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/quickly/question": {
|
|
"post": {
|
|
"summary": "---------- 快速答题 ----------\n获取题目",
|
|
"operationId": "Qgdzs_QuicklyGetQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/QuicklyGetQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/QuicklyGetQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/random/answer": {
|
|
"post": {
|
|
"summary": "回答题目",
|
|
"operationId": "Qgdzs_RandomAnswerQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/RandomAnswerQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/RandomAnswerQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/qgdzs/open/random/question": {
|
|
"post": {
|
|
"summary": "---------- 随机答题 ----------\n获取题目",
|
|
"operationId": "Qgdzs_RandomGetQuestion",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/RandomGetQuestionResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/RandomGetQuestionReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Qgdzs"
|
|
]
|
|
}
|
|
},
|
|
"/user/auth/info": {
|
|
"post": {
|
|
"summary": "获取用户信息",
|
|
"operationId": "User_GetUserInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/GetUserInfoResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/GetUserInfoReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"User"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"ActionResp": {
|
|
"type": "object"
|
|
},
|
|
"CategoryAnswerQuestionReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
}
|
|
},
|
|
"title": "---------- CategoryAnswerQuestion ----------"
|
|
},
|
|
"CategoryAnswerQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
},
|
|
"explanation": {
|
|
"type": "string",
|
|
"title": "解析"
|
|
}
|
|
}
|
|
},
|
|
"CategoryGetQuestionReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category_sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "类目唯一标识"
|
|
}
|
|
},
|
|
"title": "---------- CategoryGetQuestion ----------"
|
|
},
|
|
"CategoryGetQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"question": {
|
|
"type": "string",
|
|
"title": "题干"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "选项"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "题目类型"
|
|
},
|
|
"difficulty": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "难度"
|
|
}
|
|
}
|
|
},
|
|
"EnterResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"SceneSID": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "场景服务ID"
|
|
},
|
|
"UniqueNo": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "副本唯一编号"
|
|
},
|
|
"MessageID": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "发送给客户端的消息ID"
|
|
},
|
|
"Payload": {
|
|
"type": "string",
|
|
"format": "byte",
|
|
"title": "消息负载"
|
|
}
|
|
}
|
|
},
|
|
"GenerateQuestionReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"num": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "生成数量"
|
|
}
|
|
},
|
|
"title": "---------- GenerateQuestion ----------"
|
|
},
|
|
"GenerateQuestionResp": {
|
|
"type": "object"
|
|
},
|
|
"GetAllCategoryItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "唯一标识"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "类目"
|
|
}
|
|
}
|
|
},
|
|
"GetAllCategoryReq": {
|
|
"type": "object",
|
|
"title": "---------- GetAllCategory ----------"
|
|
},
|
|
"GetAllCategoryResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/GetAllCategoryItem"
|
|
},
|
|
"title": "类目"
|
|
}
|
|
}
|
|
},
|
|
"GetQuestionInfoReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question_sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
}
|
|
},
|
|
"title": "---------- GetQuestionInfo ----------"
|
|
},
|
|
"GetQuestionInfoResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question": {
|
|
"type": "string",
|
|
"title": "题干"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "选项"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "类目"
|
|
},
|
|
"difficulty": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "难度"
|
|
},
|
|
"explanation": {
|
|
"type": "string",
|
|
"title": "解析"
|
|
}
|
|
}
|
|
},
|
|
"GetRecordItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question_sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"question": {
|
|
"type": "string",
|
|
"title": "题干"
|
|
},
|
|
"difficulty": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "难度"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "题目类型"
|
|
},
|
|
"question_answer": {
|
|
"type": "string",
|
|
"title": "题目答案"
|
|
},
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "用户答案"
|
|
},
|
|
"create_time": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "创建时间"
|
|
}
|
|
}
|
|
},
|
|
"GetRecordReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"page": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"page_size": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
},
|
|
"title": "---------- GetRecord ----------"
|
|
},
|
|
"GetRecordResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "总数"
|
|
},
|
|
"records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/GetRecordItem"
|
|
},
|
|
"title": "记录"
|
|
}
|
|
}
|
|
},
|
|
"GetUserInfoReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
"title": "---------- GetUserInfo ----------"
|
|
},
|
|
"GetUserInfoResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"KickUserResp": {
|
|
"type": "object"
|
|
},
|
|
"LeaveResp": {
|
|
"type": "object"
|
|
},
|
|
"PhoneLoginResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "用户ID"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "用户名"
|
|
}
|
|
}
|
|
},
|
|
"QuicklyAnswerQuestionReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
}
|
|
},
|
|
"title": "---------- QuicklyAnswerQuestion ----------"
|
|
},
|
|
"QuicklyAnswerQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
},
|
|
"explanation": {
|
|
"type": "string",
|
|
"title": "解析"
|
|
}
|
|
}
|
|
},
|
|
"QuicklyGetQuestionReq": {
|
|
"type": "object",
|
|
"title": "---------- QuicklyGetQuestion ----------"
|
|
},
|
|
"QuicklyGetQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"question": {
|
|
"type": "string",
|
|
"title": "题干"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "选项"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "题目类型"
|
|
},
|
|
"difficulty": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "难度"
|
|
}
|
|
}
|
|
},
|
|
"RandomAnswerQuestionReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
}
|
|
},
|
|
"title": "---------- RandomAnswerQuestion ----------"
|
|
},
|
|
"RandomAnswerQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer": {
|
|
"type": "string",
|
|
"title": "答案"
|
|
},
|
|
"explanation": {
|
|
"type": "string",
|
|
"title": "解析"
|
|
}
|
|
}
|
|
},
|
|
"RandomGetQuestionReq": {
|
|
"type": "object",
|
|
"title": "---------- RandomGetQuestion ----------"
|
|
},
|
|
"RandomGetQuestionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "题目唯一标识"
|
|
},
|
|
"question": {
|
|
"type": "string",
|
|
"title": "题干"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "选项"
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"title": "题目类型"
|
|
},
|
|
"difficulty": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"title": "难度"
|
|
}
|
|
}
|
|
},
|
|
"ToClientResp": {
|
|
"type": "object"
|
|
},
|
|
"WxMiniLoginResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usn": {
|
|
"type": "string",
|
|
"format": "int64",
|
|
"title": "用户ID"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "用户名"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|