diff --git a/api-test/frontend/src/business/commons/json-schema/JsonSchemaEditor.vue b/api-test/frontend/src/business/commons/json-schema/JsonSchemaEditor.vue index 04fa228e4b..22c2a73b75 100644 --- a/api-test/frontend/src/business/commons/json-schema/JsonSchemaEditor.vue +++ b/api-test/frontend/src/business/commons/json-schema/JsonSchemaEditor.vue @@ -13,6 +13,7 @@ :show-mock-vars="showMockVars" :scenario-definition="scenarioDefinition" @editScenarioAdvance="editScenarioAdvance" + :need-mock="needMock" lang="zh_CN" custom/> @@ -54,6 +55,12 @@ export default { } }, scenarioDefinition: Array, + needMock: { + type: Boolean, + default() { + return true; + } + } }, created() { if (!this.body.jsonSchema && this.body.raw && this.checkIsJson(this.body.raw)) { diff --git a/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue b/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue index 98ae6d825e..13ab80684d 100644 --- a/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue +++ b/api-test/frontend/src/business/commons/json-schema/schema/editor/main.vue @@ -30,6 +30,7 @@ :schema="pickValue" :scenario-definition="scenarioDefinition" :show-mock-vars="showMockVars" + :need-mock="needMock" @editScenarioAdvance="editScenarioAdvance"/> @@ -57,6 +58,7 @@ :disabled="disabled" @editScenarioAdvance="editScenarioAdvance" :lang="lang" :custom="custom" @changeAllItemsType="changeAllItemsType" + :need-mock="needMock" @reloadItems="reloadItems"/> @@ -165,6 +168,10 @@ export default { default: 'zh_CN' }, scenarioDefinition: Array, + needMock: { + type: Boolean, + default: true + }, }, computed: { pickValue() { diff --git a/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue b/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue index ed0c7c4470..52749053d5 100644 --- a/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue +++ b/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue @@ -10,7 +10,8 @@ value-key="name" highlight-first-item @select="change"> - + @@ -39,6 +40,12 @@ export default { return false; } }, + needMock: { + type: Boolean, + default() { + return true; + } + } }, data() { return { diff --git a/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue b/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue index 3c50c65711..d1a949e964 100644 --- a/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue +++ b/api-test/frontend/src/business/definition/components/mock/Components/MockApiBody.vue @@ -39,6 +39,7 @@ + :headers="response.headers" :use-post-script="response.usePostScript" + :need-mock="false"/>