swaggerParser RefProperty bug fix (#994)
Co-authored-by: luoyoujun <luoyoujun3712@dingtalk.com>
This commit is contained in:
parent
79d34a1825
commit
24e89c2c57
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue