Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
5ae9f4dcfe
|
@ -270,7 +270,12 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
refSet.add(simpleRef);
|
||||
Model model = this.definitions.get(simpleRef);
|
||||
JSONArray propertyList = new JSONArray();
|
||||
propertyList.add(getBodyParameters(model.getProperties(), refSet));
|
||||
if (model != null) {
|
||||
propertyList.add(getBodyParameters(model.getProperties(), refSet));
|
||||
} else {
|
||||
propertyList.add(new JSONObject());
|
||||
}
|
||||
|
||||
jsonObject.put(key, propertyList);
|
||||
} else {
|
||||
jsonObject.put(key, new ArrayList<>());
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
},
|
||||
methods: {
|
||||
validateSocket(socket) {
|
||||
if (!socket) return true;
|
||||
// if (!socket) return true;
|
||||
if (socket !== ''){
|
||||
let urlStr = this.httpConfig.protocol + '://' + socket;
|
||||
let url = {};
|
||||
try {
|
||||
|
@ -58,7 +59,6 @@
|
|||
return false;
|
||||
}
|
||||
this.httpConfig.domain = decodeURIComponent(url.hostname);
|
||||
|
||||
this.httpConfig.port = url.port;
|
||||
let path = url.pathname === '/' ? '' : url.pathname;
|
||||
if (url.port) {
|
||||
|
@ -67,6 +67,13 @@
|
|||
this.httpConfig.socket = this.httpConfig.domain + path;
|
||||
}
|
||||
return true;
|
||||
}else {
|
||||
this.httpConfig.domain = socket;
|
||||
this.httpConfig.port = '';
|
||||
this.httpConfig.socket = socket;
|
||||
return true;
|
||||
}
|
||||
|
||||
},
|
||||
validate() {
|
||||
let isValidate = false;
|
||||
|
|
Loading…
Reference in New Issue