Merge remote-tracking branch 'origin/master'

This commit is contained in:
Captain.B 2020-12-28 13:50:48 +08:00
commit 2df5199e64
1 changed files with 6 additions and 0 deletions

View File

@ -283,6 +283,12 @@ public class Swagger2Parser extends ApiImportAbstractParser {
} else {
jsonObject.put(key, new ArrayList<>());
}
} else if (value instanceof RefProperty) {
RefProperty refProperty = (RefProperty) value;
String simpleRef = refProperty.getSimpleRef();
refSet.add(simpleRef);
Model model = definitions.get(simpleRef);
jsonObject.put(key, getBodyParameters(model.getProperties(), refSet));
} else {
jsonObject.put(key, getDefaultValueByPropertyType(value));
}