mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 20:49:56 +08:00
fix(接口测试): 修复定时任务导入处理json失败问题
--user=郭雨琦
This commit is contained in:
parent
ee5442b44d
commit
078f24d86b
@ -43,7 +43,6 @@ public class SwaggerUrlImportJob extends MsScheduleJob {
|
||||
request.setPlatform("Swagger2");
|
||||
request.setUserId(jobDataMap.getString("userId"));
|
||||
request.setType("schedule");
|
||||
request.setUserId(jobDataMap.getString("userId"));
|
||||
request.setResourceId(resourceId);
|
||||
apiDefinitionService.apiTestImport(null, request);
|
||||
}
|
||||
@ -59,7 +58,7 @@ public class SwaggerUrlImportJob extends MsScheduleJob {
|
||||
public void setAuthInfo(String config, ApiTestImportRequest request) {
|
||||
// 获取鉴权设置
|
||||
if (StringUtils.isNotBlank(config)) {
|
||||
JSONObject configObj = JSON.parseObject(config, JSONObject.class);
|
||||
JSONObject configObj = JSONUtil.parseObject(config);
|
||||
List<KeyValue> headers = JSONUtil.parseArray(configObj.optString("headers"), KeyValue.class);
|
||||
if (CollectionUtils.isNotEmpty(headers)) {
|
||||
request.setHeaders(headers);
|
||||
|
Loading…
Reference in New Issue
Block a user