refactor: 请求头加描述
This commit is contained in:
parent
07797ec3b5
commit
2bc85f3e86
|
@ -16,7 +16,6 @@ import io.metersphere.api.service.ApiModuleService;
|
|||
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
|
||||
import io.metersphere.base.domain.ApiModule;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.json.JSONSchemaGenerator;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.commons.utils.XMLUtils;
|
||||
|
|
|
@ -537,6 +537,7 @@ public class ApiDefinitionService {
|
|||
apiDefinition.setModuleId(sameRequest.get(0).getModuleId());
|
||||
apiDefinition.setModulePath(sameRequest.get(0).getModulePath());
|
||||
apiDefinition.setNum(sameRequest.get(0).getNum()); //id 不变
|
||||
apiDefinition.setOrder(sameRequest.get(0).getOrder());
|
||||
apiDefinitionMapper.updateByPrimaryKeyWithBLOBs(apiDefinition);
|
||||
apiDefinition.setRequest(request);
|
||||
importApiCase(apiDefinition, apiTestCaseMapper, apiTestImportRequest, false);
|
||||
|
@ -553,6 +554,7 @@ public class ApiDefinitionService {
|
|||
if (StringUtils.equalsAnyIgnoreCase(apiDefinition.getProtocol(), RequestType.TCP)) {
|
||||
String request = setImportTCPHashTree(apiDefinition);
|
||||
}
|
||||
apiDefinition.setOrder(sameRequest.get(0).getOrder());
|
||||
apiDefinitionMapper.updateByPrimaryKeyWithBLOBs(apiDefinition);
|
||||
}
|
||||
|
||||
|
@ -640,6 +642,7 @@ public class ApiDefinitionService {
|
|||
apiTestCase.setPriority(sameCase.getPriority());
|
||||
apiTestCase.setCreateUserId(sameCase.getCreateUserId());
|
||||
apiTestCase.setNum(sameCase.getNum());
|
||||
apiTestCase.setOrder(sameCase.getOrder());
|
||||
apiTestCase.setProjectId(sameCase.getProjectId());
|
||||
apiTestCase.setVersion((sameCase.getVersion() == null ? 0 : sameCase.getVersion()) + 1);
|
||||
apiTestCaseMapper.updateByPrimaryKeySelective(apiTestCase);
|
||||
|
|
|
@ -47,6 +47,13 @@
|
|||
</el-autocomplete>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col class="item" v-if="showDesc">
|
||||
<el-input v-model="item.description" size="small" maxlength="200"
|
||||
:placeholder="$t('commons.description')" show-word-limit>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col class="item kv-delete">
|
||||
<el-button size="mini" class="el-icon-delete-solid" circle @click="remove(index)"
|
||||
:disabled="isDisable(index) || isReadOnly"/>
|
||||
|
@ -84,7 +91,8 @@
|
|||
needMock: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
showDesc: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<el-row>
|
||||
<el-link class="ms-el-link" @click="batchAdd" style="color: #783887"> {{ $t("commons.batch_add") }}</el-link>
|
||||
</el-row>
|
||||
<ms-api-key-value :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :suggestions="headerSuggestions" :items="headers" :need-mock="true"/>
|
||||
<ms-api-key-value :show-desc="true" :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :suggestions="headerSuggestions" :items="headers" :need-mock="true"/>
|
||||
</el-tab-pane>
|
||||
|
||||
<!--query 参数-->
|
||||
|
|
Loading…
Reference in New Issue