From 94f2c4bb3c3fb67c982172cd18482facae6a77bc Mon Sep 17 00:00:00 2001 From: CapooL <2053217188@qq.com> Date: Thu, 19 Oct 2023 17:25:38 +0800 Subject: [PATCH] test(quiz): add test files --- tests/quiz_paper_200.json | 2843 +++++++++++++++++++++++++++++++++++++ tests/quiz_paper_400.json | 1247 ++++++++++++++++ tests/quiz_paper_404.json | 1684 ++++++++++++++++++++++ 3 files changed, 5774 insertions(+) create mode 100644 tests/quiz_paper_200.json create mode 100644 tests/quiz_paper_400.json create mode 100644 tests/quiz_paper_404.json diff --git a/tests/quiz_paper_200.json b/tests/quiz_paper_200.json new file mode 100644 index 00000000..89bf0152 --- /dev/null +++ b/tests/quiz_paper_200.json @@ -0,0 +1,2843 @@ +{ + "apifoxCli": "1.1.0", + "item": [ + { + "item": [ + { + "id": "f66c9bca-46ce-43b5-9863-491411ef54ab", + "name": "LG0101 账号密码登录(登录用户admin)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "login" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"username\": \"admin\",\r\n \"password\": \"testtest123\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "postProcessors.0.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.token`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.environment.set(`token`, value);console.log('已设置环境变量【token】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【token】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + }, + { + "listen": "test", + "script": { + "id": "postProcessors.1.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.id`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.variables.set(`user_id`, value);console.log('已设置临时变量【user_id】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【user_id】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + } + ], + "responseDefinition": { + "id": 4183271, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "mock": { + "mock": "@string" + }, + "title": "权" + }, + "id": { + "type": "integer", + "title": "用户id" + } + }, + "required": [ + "token", + "id" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2021-07-29T14:43:37.000Z", + "updatedAt": "2021-08-12T16:27:18.000Z", + "deletedAt": null, + "apiDetailId": 5318056, + "schemaDefinitions": {} + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "mock": { + "mock": "@cname" + }, + "title": "用户名" + }, + "password": { + "type": "string", + "mock": { + "mock": "@string('lower', 1, 3)" + }, + "title": "密码" + } + }, + "required": [ + "username", + "password" + ] + } + }, + "metaInfo": { + "httpApiId": 5318056, + "httpApiCaseId": 115882615, + "httpApiName": "LG0101 账号密码登录", + "httpApiPath": "/login", + "httpApiMethod": "post", + "httpApiCaseName": "登录用户admin", + "id": "7088df62-216f-47b9-8842-d976a73f4aee", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "f6be3a55-519c-4f58-8adc-ed7eeb4954eb", + "name": "QZ0102 增加单个测试(QZ0102 增加单个测试)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"question\": \"记红国率由所历\",\r\n \"answer\": 88,\r\n \"options\": [\r\n \"容白界生存图六制则书验进米切写十流。\",\r\n \"务料后江命正见回建起很一选快子里。\",\r\n \"使管数是明观目土内回求清书。\",\r\n \"平非除听战革命为十传高团消花有数气光。\",\r\n \"压题光适五相思除极先术选复下。\"\r\n ],\r\n \"explanation\": \"国被提教干她话因平通才越但管于。器没身展政非更需而将人地生多经。商也处四建九往务集况素院学二队集。积那连局立状调和号认听化率。\",\r\n \"type\": \"1\",\r\n \"voice_source\": \"http://xpseiecged.gov/thinrxe\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 70048663, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "x-apifox-overrides": {}, + "type": "object", + "x-apifox-refs": {}, + "properties": { + "quiz": { + "$ref": "#/definitions/13080595", + "x-apifox-overrides": {} + } + }, + "required": [ + "quiz" + ], + "x-apifox-orders": [ + "quiz" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2022-07-15T11:22:03.000Z", + "updatedAt": "2022-07-23T08:30:31.000Z", + "deletedAt": null, + "apiDetailId": 29662986, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "$ref": "#/definitions/13080737", + "x-apifox-overrides": {} + } + }, + "metaInfo": { + "httpApiId": 29662986, + "httpApiCaseId": 115888524, + "httpApiName": "QZ0102 增加单个测试", + "httpApiPath": "/quizzes", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0102 增加单个测试", + "id": "dab9216d-5d38-4e54-9f3b-d4e2537b4bd0", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "ff0cae62-5258-44c9-ae2e-ad371c206052", + "name": "QZ0102 增加单个测试(QZ0102 增加单个测试)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"question\": \"记红国率由所历\",\r\n \"answer\": 88,\r\n \"options\": [\r\n \"容白界生存图六制则书验进米切写十流。\",\r\n \"务料后江命正见回建起很一选快子里。\",\r\n \"使管数是明观目土内回求清书。\",\r\n \"平非除听战革命为十传高团消花有数气光。\",\r\n \"压题光适五相思除极先术选复下。\"\r\n ],\r\n \"explanation\": \"国被提教干她话因平通才越但管于。器没身展政非更需而将人地生多经。商也处四建九往务集况素院学二队集。积那连局立状调和号认听化率。\",\r\n \"type\": \"2\",\r\n \"voice_source\": \"http://xpseiecged.gov/thinrxe\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 70048663, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "x-apifox-overrides": {}, + "type": "object", + "x-apifox-refs": {}, + "properties": { + "quiz": { + "$ref": "#/definitions/13080595", + "x-apifox-overrides": {} + } + }, + "required": [ + "quiz" + ], + "x-apifox-orders": [ + "quiz" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2022-07-15T11:22:03.000Z", + "updatedAt": "2022-07-23T08:30:31.000Z", + "deletedAt": null, + "apiDetailId": 29662986, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "$ref": "#/definitions/13080737", + "x-apifox-overrides": {} + } + }, + "metaInfo": { + "httpApiId": 29662986, + "httpApiCaseId": 115889184, + "httpApiName": "QZ0102 增加单个测试", + "httpApiPath": "/quizzes", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0102 增加单个测试", + "id": "5dcf2eaf-cdb3-447f-9c5b-1a9a7b39bf20", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "60ed16b1-8615-4c0b-92b6-a39363ea9599", + "name": "QZ0203 测试题组卷(QZ0203 测试题组卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [ + { + "disabled": false, + "key": "number", + "value": "2" + }, + { + "disabled": false, + "key": "type", + "value": "1,2" + } + ], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"王时流安\"\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "postProcessors.0.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.id`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.environment.set(`paper_id`, value);console.log('已设置环境变量【paper_id】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【paper_id】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + } + ], + "responseDefinition": { + "id": 147260241, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "$ref": "#/definitions/65181535" + }, + "defaultEnable": true, + "projectId": 404238, + "ordering": 1, + "createdAt": "2023-01-10T15:21:40.000Z", + "updatedAt": "2023-10-19T06:23:50.000Z", + "deletedAt": null, + "apiDetailId": 58017398, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + }, + "description": "试卷标题" + } + }, + "x-apifox-orders": [ + "title" + ], + "required": [ + "title" + ] + } + }, + "metaInfo": { + "httpApiId": 58017398, + "httpApiCaseId": 115887054, + "httpApiName": "QZ0203 测试题组卷", + "httpApiPath": "/quizzes/paper", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0203 测试题组卷", + "id": "9636b1f8-a15f-4efd-8ec1-de098b03c606", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "5f076b4e-8f1d-442c-baf1-dd77c5fc27a4", + "name": "QZ0204 查询所有试卷(QZ0204 查询所有试卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + } + ], + "method": "GET", + "baseUrl": "http://127.0.0.1:8000", + "body": {}, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 337002971, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "paper": { + "type": "array", + "items": { + "$ref": "#/definitions/65181535" + } + } + }, + "x-apifox-orders": [ + "total", + "paper" + ], + "x-apifox-refs": {}, + "required": [ + "total", + "paper" + ] + }, + "defaultEnable": true, + "projectId": 404238, + "ordering": 1, + "createdAt": "2023-10-19T03:41:47.000Z", + "updatedAt": "2023-10-19T06:02:17.000Z", + "deletedAt": null, + "apiDetailId": 118004287, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + } + }, + "requestDefinition": { + "jsonSchema": {} + }, + "metaInfo": { + "httpApiId": 118004287, + "httpApiCaseId": 115887053, + "httpApiName": "QZ0204 查询所有试卷", + "httpApiPath": "/quizzes/paper", + "httpApiMethod": "get", + "httpApiCaseName": "QZ0204 查询所有试卷", + "id": "75b04c41-14a3-428d-99d2-4fa38036120f", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "70e0b41a-7075-49b5-a153-bc747953466b", + "name": "QZ0205 查询特定试卷(QZ0205 查询特定试卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper", + "{{paper_id}}" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + } + ], + "method": "GET", + "baseUrl": "http://127.0.0.1:8000", + "body": {}, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 337143360, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "$ref": "#/definitions/65181535" + }, + "defaultEnable": true, + "projectId": 404238, + "ordering": 1, + "createdAt": "2023-10-19T06:27:14.000Z", + "updatedAt": "2023-10-19T06:27:31.000Z", + "deletedAt": null, + "apiDetailId": 118058158, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + } + }, + "requestDefinition": { + "jsonSchema": {} + }, + "metaInfo": { + "httpApiId": 118058158, + "httpApiCaseId": 115887052, + "httpApiName": "QZ0205 查询特定试卷", + "httpApiPath": "/quizzes/paper/{paper_id}", + "httpApiMethod": "get", + "httpApiCaseName": "QZ0205 查询特定试卷", + "id": "29f07f58-7aeb-41e5-9d0d-fdaad52ecae9", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + } + ], + "name": "QZ模块组卷200" + } + ], + "info": { + "name": "QZ模块组卷200" + }, + "dataSchemas": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "13080737": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号" + }, + "voice_source": { + "type": "string", + "mock": { + "mock": "@url(\"http\")" + }, + "title": "播报语音链接" + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "type" + ], + "title": "[入] quiz_update", + "name": "[入] quiz_update" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + }, + "mockRules": { + "rules": [], + "enableSystemRule": true + }, + "environment": { + "id": 510825, + "name": "测试环境", + "baseUrl": "http://127.0.0.1:8000", + "baseUrls": { + "default": "http://127.0.0.1:8000" + }, + "variable": { + "id": "c89cc34e-c250-4490-bad9-d36a011fc082", + "name": "测试环境", + "values": [ + { + "type": "any", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOjEsImV4cCI6MTY5ODMwMzU3NC42MDQ1NDZ9.GPLw8A6TTlu8XAQbOaJPZrhsUYgH6PlGq3sCDVhX_KI", + "key": "token", + "initialValue": "" + }, + { + "type": "any", + "value": "87", + "key": "quiz_id", + "initialValue": "" + }, + { + "type": "any", + "value": "16", + "key": "word_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "15", + "key": "word_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "token_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "word_id_3", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "user_id", + "initialValue": "" + }, + { + "type": "any", + "value": "1", + "key": "article_id", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "like_num_2", + "initialValue": "" + }, + { + "type": "any", + "value": 6, + "key": "num_pre", + "initialValue": "" + }, + { + "type": "any", + "value": "7", + "key": "num_later", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "id", + "initialValue": "2" + }, + { + "type": "any", + "value": "13", + "key": "music_id", + "initialValue": "13" + }, + { + "type": "any", + "value": "undefined", + "key": "rewards_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "undefined", + "key": "title_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "SP000011", + "key": "products_id", + "initialValue": "SP000011" + }, + { + "type": "any", + "value": "DD000004", + "key": "order_id", + "initialValue": "DD000004" + }, + { + "type": "any", + "value": "JL000039", + "key": "transaction_id", + "initialValue": "JL000039" + }, + { + "type": "any", + "value": "CD000015", + "key": "list_id", + "initialValue": "CD000015" + }, + { + "type": "any", + "value": "SJ000008", + "key": "paper_id", + "isBindInitial": false, + "initialValue": "" + } + ] + }, + "type": "normal", + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "globals": { + "baseUrl": "", + "baseUrls": {}, + "variable": { + "id": "b57b3f73-4fd0-4475-bd81-ee1dc1b6a8fb", + "values": [] + }, + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "isServerBuild": false, + "isTestFlowControl": false +} diff --git a/tests/quiz_paper_400.json b/tests/quiz_paper_400.json new file mode 100644 index 00000000..aeb1a7cd --- /dev/null +++ b/tests/quiz_paper_400.json @@ -0,0 +1,1247 @@ +{ + "apifoxCli": "1.1.0", + "item": [ + { + "item": [ + { + "id": "19ec7433-3ac7-4324-bff8-5104161bcffa", + "name": "LG0101 账号密码登录(登录用户admin)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "login" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"username\": \"admin\",\r\n \"password\": \"testtest123\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "postProcessors.0.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.token`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.environment.set(`token`, value);console.log('已设置环境变量【token】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【token】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + }, + { + "listen": "test", + "script": { + "id": "postProcessors.1.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.id`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.variables.set(`user_id`, value);console.log('已设置临时变量【user_id】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【user_id】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + } + ], + "responseDefinition": { + "id": 4183271, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "mock": { + "mock": "@string" + }, + "title": "权" + }, + "id": { + "type": "integer", + "title": "用户id" + } + }, + "required": [ + "token", + "id" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2021-07-29T14:43:37.000Z", + "updatedAt": "2021-08-12T16:27:18.000Z", + "deletedAt": null, + "apiDetailId": 5318056, + "schemaDefinitions": {} + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "mock": { + "mock": "@cname" + }, + "title": "用户名" + }, + "password": { + "type": "string", + "mock": { + "mock": "@string('lower', 1, 3)" + }, + "title": "密码" + } + }, + "required": [ + "username", + "password" + ] + } + }, + "metaInfo": { + "httpApiId": 5318056, + "httpApiCaseId": 115892877, + "httpApiName": "LG0101 账号密码登录", + "httpApiPath": "/login", + "httpApiMethod": "post", + "httpApiCaseName": "登录用户admin", + "id": "693ce0af-a3fc-4209-bbec-2afe0662a24e", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "dca8323a-bdc9-4b55-8eb9-2032b8c5535c", + "name": "QZ0102 增加单个测试(QZ0102 增加单个测试)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"question\": \"名律能\",\r\n \"answer\": 29,\r\n \"options\": [\r\n \"毛低便例质天来整干周然率局列层离标。\",\r\n \"非直定存公期号主林装斗也每给千果用。\",\r\n \"技门确气我称公学第着维复美段约反部。\",\r\n \"引里华达些程以本次上之意总。\"\r\n ],\r\n \"explanation\": \"四华率代美等就因究造很化音。走别带极圆验火展在前起化权派将候。写非温然江然容青和证济众织装图律。种学队变知象计两张白律近只参比物些各。\",\r\n \"type\": \"1\",\r\n \"voice_source\": \"http://mjfufjiuxv.nr/avfsync\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 70048663, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "x-apifox-overrides": {}, + "type": "object", + "x-apifox-refs": {}, + "properties": { + "quiz": { + "$ref": "#/definitions/13080595", + "x-apifox-overrides": {} + } + }, + "required": [ + "quiz" + ], + "x-apifox-orders": [ + "quiz" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2022-07-15T11:22:03.000Z", + "updatedAt": "2022-07-23T08:30:31.000Z", + "deletedAt": null, + "apiDetailId": 29662986, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "$ref": "#/definitions/13080737", + "x-apifox-overrides": {} + } + }, + "metaInfo": { + "httpApiId": 29662986, + "httpApiCaseId": 115892928, + "httpApiName": "QZ0102 增加单个测试", + "httpApiPath": "/quizzes", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0102 增加单个测试", + "id": "c2b8048e-8b9e-40d5-9696-9a1620dd91b7", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "d234ab7c-cad7-4598-bf99-b4d512d9cdea", + "name": "QZ0203 测试题组卷(QZ0203 测试题组卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [ + { + "disabled": false, + "key": "number", + "value": "999" + }, + { + "disabled": false, + "key": "type", + "value": "1" + } + ], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"道是合加\"\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 73275463, + "createdAt": "2022-07-24T10:43:07.000Z", + "updatedAt": "2022-07-24T10:43:07.000Z", + "deletedAt": null, + "name": "请求有误", + "apiDetailId": 0, + "projectId": 404238, + "code": 400, + "contentType": "json", + "ordering": 50, + "jsonSchema": { + "title": "", + "type": "object", + "properties": { + "msg": { + "type": "string" + } + }, + "x-apifox-orders": [ + "msg" + ], + "required": [ + "msg" + ] + }, + "defaultEnable": false, + "folderId": 0, + "responseExamples": [], + "schemaDefinitions": {} + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + }, + "description": "试卷标题" + } + }, + "x-apifox-orders": [ + "title" + ], + "required": [ + "title" + ] + } + }, + "metaInfo": { + "httpApiId": 58017398, + "httpApiCaseId": 115892927, + "httpApiName": "QZ0203 测试题组卷", + "httpApiPath": "/quizzes/paper", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0203 测试题组卷", + "id": "d443acee-9f00-433d-9575-64942512eaf5", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + } + ], + "name": "QZ模块组卷题目不足" + } + ], + "info": { + "name": "QZ模块组卷题目不足" + }, + "dataSchemas": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "13080737": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号" + }, + "voice_source": { + "type": "string", + "mock": { + "mock": "@url(\"http\")" + }, + "title": "播报语音链接" + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "type" + ], + "title": "[入] quiz_update", + "name": "[入] quiz_update" + } + }, + "mockRules": { + "rules": [], + "enableSystemRule": true + }, + "environment": { + "id": 510825, + "name": "测试环境", + "baseUrl": "http://127.0.0.1:8000", + "baseUrls": { + "default": "http://127.0.0.1:8000" + }, + "variable": { + "id": "8591d99e-8049-4fac-ba9a-3f3c4c86a836", + "name": "测试环境", + "values": [ + { + "type": "any", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOjEsImV4cCI6MTY5ODMwMzU3NC42MDQ1NDZ9.GPLw8A6TTlu8XAQbOaJPZrhsUYgH6PlGq3sCDVhX_KI", + "key": "token", + "initialValue": "" + }, + { + "type": "any", + "value": "87", + "key": "quiz_id", + "initialValue": "" + }, + { + "type": "any", + "value": "16", + "key": "word_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "15", + "key": "word_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "token_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "word_id_3", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "user_id", + "initialValue": "" + }, + { + "type": "any", + "value": "1", + "key": "article_id", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "like_num_2", + "initialValue": "" + }, + { + "type": "any", + "value": 6, + "key": "num_pre", + "initialValue": "" + }, + { + "type": "any", + "value": "7", + "key": "num_later", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "id", + "initialValue": "2" + }, + { + "type": "any", + "value": "13", + "key": "music_id", + "initialValue": "13" + }, + { + "type": "any", + "value": "undefined", + "key": "rewards_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "undefined", + "key": "title_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "SP000011", + "key": "products_id", + "initialValue": "SP000011" + }, + { + "type": "any", + "value": "DD000004", + "key": "order_id", + "initialValue": "DD000004" + }, + { + "type": "any", + "value": "JL000039", + "key": "transaction_id", + "initialValue": "JL000039" + }, + { + "type": "any", + "value": "CD000015", + "key": "list_id", + "initialValue": "CD000015" + }, + { + "type": "any", + "value": "SJ000008", + "key": "paper_id", + "initialValue": "SJ000008" + }, + { + "type": "any", + "value": "undefined", + "key": "paper_count", + "isBindInitial": false, + "initialValue": "" + } + ] + }, + "type": "normal", + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "globals": { + "baseUrl": "", + "baseUrls": {}, + "variable": { + "id": "e0de281e-1703-4d0c-bc7b-e6f3b73514a8", + "values": [] + }, + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "isServerBuild": false, + "isTestFlowControl": false +} diff --git a/tests/quiz_paper_404.json b/tests/quiz_paper_404.json new file mode 100644 index 00000000..bdb6da38 --- /dev/null +++ b/tests/quiz_paper_404.json @@ -0,0 +1,1684 @@ +{ + "apifoxCli": "1.1.0", + "item": [ + { + "item": [ + { + "id": "fcb595d7-b867-4c00-8c8d-c4590e6e0e96", + "name": "LG0101 账号密码登录(登录用户admin)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "login" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"username\": \"admin\",\r\n \"password\": \"testtest123\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "postProcessors.0.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.token`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.environment.set(`token`, value);console.log('已设置环境变量【token】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【token】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + }, + { + "listen": "test", + "script": { + "id": "postProcessors.1.extractor", + "type": "text/javascript", + "exec": [ + "", + " if (JSON.setEnableBigInt) {", + " JSON.setEnableBigInt(undefined);", + " }", + " ", + " try{", + " ", + " const expression = pm.variables.replaceIn(`$.id`);", + " const JSONPath = require('jsonpath-plus').JSONPath;", + " const jsonData = pm.response.json();", + " let value = JSONPath({", + " json: jsonData,", + " path: expression,", + " wrap: false", + " });", + "", + " ", + " if (false && undefined !== undefined) {", + " if (Array.isArray(value)) {", + " value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];", + " } else {", + " value = undefined;", + " }", + " }", + " ", + " ", + " switch (typeof value) {", + " case 'object':", + " value = JSON.stringify(value);", + " break;", + " default:", + " value = String(value);", + " break;", + " }", + " ", + " pm.variables.set(`user_id`, value);console.log('已设置临时变量【user_id】,值为 【' + value + '】')", + " } catch(e) {", + " e.message = '提取变量【user_id】出错: ' + e.message;", + " throw e;", + " }", + " ", + " " + ] + } + } + ], + "responseDefinition": { + "id": 4183271, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "mock": { + "mock": "@string" + }, + "title": "权" + }, + "id": { + "type": "integer", + "title": "用户id" + } + }, + "required": [ + "token", + "id" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2021-07-29T14:43:37.000Z", + "updatedAt": "2021-08-12T16:27:18.000Z", + "deletedAt": null, + "apiDetailId": 5318056, + "schemaDefinitions": {} + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "mock": { + "mock": "@cname" + }, + "title": "用户名" + }, + "password": { + "type": "string", + "mock": { + "mock": "@string('lower', 1, 3)" + }, + "title": "密码" + } + }, + "required": [ + "username", + "password" + ] + } + }, + "metaInfo": { + "httpApiId": 5318056, + "httpApiCaseId": 115894635, + "httpApiName": "LG0101 账号密码登录", + "httpApiPath": "/login", + "httpApiMethod": "post", + "httpApiCaseName": "登录用户admin", + "id": "7fb6c043-11a1-447e-8b7c-ea99424d5772", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "2958fcc7-6ba7-4f5f-8c87-5583b04da068", + "name": "QZ0102 增加单个测试(QZ0102 增加单个测试)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\r\n \"question\": \"表国社到低\",\r\n \"answer\": 31,\r\n \"options\": [\r\n \"革观许下术门群形成什就记。\",\r\n \"走难海备公此才划保他织儿需。\",\r\n \"阶步市达容要分适马组细整年史他。\",\r\n \"际造务要克特强知林老交形条成采为。\",\r\n \"物县会报边表想群林济圆少石十决。\"\r\n ],\r\n \"explanation\": \"工周高按边话快法革年能民表并。议走完团住组商四长照放龙例相派调圆铁。族学干军种求历感克军住反器一但育市对。记求空亲离合力给反据与都交。\",\r\n \"type\": \"1\",\r\n \"voice_source\": \"http://iihcb.dm/eydffkixx\"\r\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 70048663, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "x-apifox-overrides": {}, + "type": "object", + "x-apifox-refs": {}, + "properties": { + "quiz": { + "$ref": "#/definitions/13080595", + "x-apifox-overrides": {} + } + }, + "required": [ + "quiz" + ], + "x-apifox-orders": [ + "quiz" + ] + }, + "defaultEnable": true, + "projectId": 0, + "ordering": 1, + "unpackerId": "", + "unpackerSetting": "", + "folderId": 0, + "createdAt": "2022-07-15T11:22:03.000Z", + "updatedAt": "2022-07-23T08:30:31.000Z", + "deletedAt": null, + "apiDetailId": 29662986, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "$ref": "#/definitions/13080737", + "x-apifox-overrides": {} + } + }, + "metaInfo": { + "httpApiId": 29662986, + "httpApiCaseId": 115895469, + "httpApiName": "QZ0102 增加单个测试", + "httpApiPath": "/quizzes", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0102 增加单个测试", + "id": "df598e05-d4bf-43d2-8716-c3f82fe1d5f4", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "8fd4f34d-3f88-4b29-a30b-4ed266180a90", + "name": "QZ0203 测试题组卷(QZ0203 测试题组卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [ + { + "disabled": false, + "key": "number", + "value": "1" + }, + { + "disabled": false, + "key": "type", + "value": "1" + } + ], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "baseUrl": "http://127.0.0.1:8000", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"特族志记看\"\n}", + "generateMode": "normal", + "type": "application/json" + }, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 147260241, + "name": "成功", + "code": 200, + "contentType": "json", + "jsonSchema": { + "$ref": "#/definitions/65181535" + }, + "defaultEnable": true, + "projectId": 404238, + "ordering": 1, + "createdAt": "2023-01-10T15:21:40.000Z", + "updatedAt": "2023-10-19T06:23:50.000Z", + "deletedAt": null, + "apiDetailId": 58017398, + "responseExamples": [], + "schemaDefinitions": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + } + }, + "requestDefinition": { + "jsonSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + }, + "description": "试卷标题" + } + }, + "x-apifox-orders": [ + "title" + ], + "required": [ + "title" + ] + } + }, + "metaInfo": { + "httpApiId": 58017398, + "httpApiCaseId": 115895585, + "httpApiName": "QZ0203 测试题组卷", + "httpApiPath": "/quizzes/paper", + "httpApiMethod": "post", + "httpApiCaseName": "QZ0203 测试题组卷", + "id": "8a7c0ce2-ce97-445e-b556-ea8840d8c554", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + }, + { + "id": "13bb46a7-515f-4a9c-940f-8c7ec0c7b8ed", + "name": "QZ0205 查询特定试卷(QZ0205 查询特定试卷)", + "request": { + "url": { + "protocol": "http", + "port": "8000", + "path": [ + "quizzes", + "paper", + "~{{paper_id}}" + ], + "host": [ + "127", + "0", + "0", + "1" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "User-Agent", + "value": "Apifox/1.0.0 (https://apifox.com)" + } + ], + "method": "GET", + "baseUrl": "http://127.0.0.1:8000", + "body": {}, + "type": "http" + }, + "response": [], + "event": [], + "responseDefinition": { + "id": 69812670, + "createdAt": "2022-07-15T06:52:36.000Z", + "updatedAt": "2022-07-15T06:52:36.000Z", + "deletedAt": null, + "name": "不存在", + "apiDetailId": 0, + "projectId": 404238, + "code": 404, + "contentType": "json", + "ordering": 30, + "jsonSchema": {}, + "defaultEnable": false, + "folderId": 0, + "responseExamples": [], + "schemaDefinitions": {} + }, + "requestDefinition": { + "jsonSchema": {} + }, + "metaInfo": { + "httpApiId": 118058158, + "httpApiCaseId": 115895584, + "httpApiName": "QZ0205 查询特定试卷", + "httpApiPath": "/quizzes/paper/{paper_id}", + "httpApiMethod": "get", + "httpApiCaseName": "QZ0205 查询特定试卷", + "id": "8f365ee2-f6c2-4730-88ed-ce5eb5e4b765", + "type": "http" + }, + "type": "http", + "protocolProfileBehavior": { + "useWhatWGUrlParser": false, + "disableUrlEncoding": false + } + } + ], + "name": "QZ模块试卷查询404" + } + ], + "info": { + "name": "QZ模块试卷查询404" + }, + "dataSchemas": { + "1097305": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "title": "user的id", + "mock": { + "mock": "@integer(10000)" + } + }, + "username": { + "type": "string", + "title": "用户名", + "mock": { + "mock": "@cname" + } + }, + "nickname": { + "type": "string", + "title": "昵称", + "mock": { + "mock": "@cname" + } + }, + "email": { + "type": "string", + "title": "邮箱", + "mock": { + "mock": "@email" + } + }, + "telephone": { + "type": "string", + "title": "电话" + }, + "birthday": { + "type": "string", + "title": "生日", + "mock": { + "mock": "@date('yyyy-MM-dd')" + } + }, + "avatar": { + "type": "string", + "title": "头像", + "description": "头像的url地址", + "mock": { + "mock": "@image" + } + }, + "is_admin": { + "type": "boolean", + "title": "是否管理员", + "mock": { + "mock": "@boolean" + } + }, + "county": { + "type": "string", + "title": "县区", + "description": "用户所在县区", + "mock": { + "mock": "@county" + } + }, + "town": { + "type": "string", + "title": "乡镇", + "description": "用户所在乡镇", + "mock": { + "mock": "@county" + } + }, + "registration_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "注册时间" + }, + "login_time": { + "type": "string", + "mock": { + "mock": "@datetime('yyyy-MM-dd HH:mm:ss')" + }, + "title": "登录时间" + }, + "wechat": { + "type": "boolean", + "title": "绑定微信" + }, + "points_sum": { + "type": "integer", + "title": "总分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "points_now": { + "type": "integer", + "title": "现有分数", + "mock": { + "mock": "@integer(0)" + }, + "minimum": 0 + }, + "title": { + "type": "object", + "properties": { + "color": { + "type": "string", + "mock": { + "mock": "@color" + }, + "title": "颜色" + }, + "title": { + "type": "string", + "mock": { + "mock": "@cword" + }, + "title": "称号" + } + }, + "title": "标题", + "mock": { + "mock": "@cname" + }, + "x-apifox-orders": [ + "title", + "color" + ], + "required": [ + "title", + "color" + ] + }, + "level": { + "type": "integer", + "title": "等级", + "mock": { + "mock": "@integer(1,6)" + } + } + }, + "required": [ + "id", + "email", + "username", + "is_admin", + "avatar", + "registration_time", + "login_time", + "nickname", + "telephone", + "birthday", + "county", + "town", + "wechat", + "points_sum", + "points_now", + "title", + "level" + ], + "x-apifox-orders": [ + "id", + "username", + "nickname", + "email", + "telephone", + "birthday", + "avatar", + "is_admin", + "county", + "town", + "points_sum", + "points_now", + "title", + "registration_time", + "login_time", + "wechat", + "level" + ], + "title": "user_all", + "name": "user_all" + }, + "13080595": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号", + "description": "options数组下标" + }, + "id": { + "type": "integer" + }, + "visibility": { + "type": "boolean", + "title": "" + }, + "author": { + "$ref": "#/definitions/1097305" + }, + "voice_source": { + "title": "播报语音链接", + "mock": { + "mock": "@url(\"http\")" + }, + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "id", + "author", + "visibility", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "id", + "visibility", + "author", + "voice_source", + "type" + ], + "title": "quiz_all", + "name": "quiz_all" + }, + "13080737": { + "type": "object", + "properties": { + "question": { + "type": "string", + "title": "问题", + "mock": { + "mock": "@ctitle" + } + }, + "options": { + "type": "array", + "items": { + "type": "string", + "mock": { + "mock": "@csentence" + } + }, + "title": "选项" + }, + "explanation": { + "type": "string", + "title": "答案解析", + "mock": { + "mock": "@cparagraph" + } + }, + "answer": { + "type": "integer", + "title": "答案序号" + }, + "voice_source": { + "type": "string", + "mock": { + "mock": "@url(\"http\")" + }, + "title": "播报语音链接" + }, + "type": { + "type": "string", + "title": "类型" + } + }, + "x-apifox-orders": [ + "question", + "options", + "answer", + "explanation", + "voice_source", + "type" + ], + "required": [ + "question", + "answer", + "options", + "explanation", + "type" + ], + "title": "[入] quiz_update", + "name": "[入] quiz_update" + }, + "65181535": { + "type": "object", + "properties": { + "id": { + "type": "string", + "mock": { + "mock": "@string" + } + }, + "title": { + "type": "string", + "mock": { + "mock": "@ctitle" + } + }, + "quizzes": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "x-apifox-orders": [ + "01HD3987MFMNXZBC3WYH3E2Z14" + ], + "required": [], + "x-apifox-refs": { + "01HD3987MFMNXZBC3WYH3E2Z14": { + "$ref": "#/definitions/13080595" + } + } + } + }, + "quantity": { + "type": "integer", + "mock": { + "mock": "@integer" + } + } + }, + "x-apifox-orders": [ + "id", + "title", + "quantity", + "quizzes" + ], + "required": [ + "id", + "title", + "quizzes", + "quantity" + ], + "title": "paper_all", + "name": "paper_all" + } + }, + "mockRules": { + "rules": [], + "enableSystemRule": true + }, + "environment": { + "id": 510825, + "name": "测试环境", + "baseUrl": "http://127.0.0.1:8000", + "baseUrls": { + "default": "http://127.0.0.1:8000" + }, + "variable": { + "id": "87342855-c0fa-467e-88b3-14eb766f85ae", + "name": "测试环境", + "values": [ + { + "type": "any", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOjEsImV4cCI6MTY5ODMwMzU3NC42MDQ1NDZ9.GPLw8A6TTlu8XAQbOaJPZrhsUYgH6PlGq3sCDVhX_KI", + "key": "token", + "initialValue": "" + }, + { + "type": "any", + "value": "87", + "key": "quiz_id", + "initialValue": "" + }, + { + "type": "any", + "value": "16", + "key": "word_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "15", + "key": "word_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "token_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "word_id_3", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "user_id", + "initialValue": "" + }, + { + "type": "any", + "value": "1", + "key": "article_id", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_1", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "comment_id_2", + "initialValue": "" + }, + { + "type": "any", + "value": "", + "key": "like_num_2", + "initialValue": "" + }, + { + "type": "any", + "value": 6, + "key": "num_pre", + "initialValue": "" + }, + { + "type": "any", + "value": "7", + "key": "num_later", + "initialValue": "" + }, + { + "type": "any", + "value": "2", + "key": "id", + "initialValue": "2" + }, + { + "type": "any", + "value": "13", + "key": "music_id", + "initialValue": "13" + }, + { + "type": "any", + "value": "undefined", + "key": "rewards_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "undefined", + "key": "title_id", + "initialValue": "undefined" + }, + { + "type": "any", + "value": "SP000011", + "key": "products_id", + "initialValue": "SP000011" + }, + { + "type": "any", + "value": "DD000004", + "key": "order_id", + "initialValue": "DD000004" + }, + { + "type": "any", + "value": "JL000039", + "key": "transaction_id", + "initialValue": "JL000039" + }, + { + "type": "any", + "value": "CD000015", + "key": "list_id", + "initialValue": "CD000015" + }, + { + "type": "any", + "value": "SJ000008", + "key": "paper_id", + "initialValue": "SJ000008" + }, + { + "type": "any", + "value": "undefined", + "key": "paper_count", + "isBindInitial": false, + "initialValue": "" + } + ] + }, + "type": "normal", + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "globals": { + "baseUrl": "", + "baseUrls": {}, + "variable": { + "id": "e0de281e-1703-4d0c-bc7b-e6f3b73514a8", + "values": [] + }, + "parameter": { + "header": [], + "query": [], + "body": [], + "cookie": [] + } + }, + "isServerBuild": false, + "isTestFlowControl": false +}