mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-11-13 17:56:09 +08:00
bugfix-NPE异常
例如:当 ref = ApiResult«Void» 时, definitions的结构如下
"definitions": {
"ApiResult«Void»": {
"type": "object",
"title": "ApiResult«Void»"
}
}
This commit is contained in:
@@ -208,8 +208,11 @@ public class SwaggerDocParser implements DocParser {
|
||||
protected List<DocParameter> buildDocParameters(String ref, JSONObject docRoot, boolean doSubRef) {
|
||||
JSONObject responseObject = docRoot.getJSONObject("definitions").getJSONObject(ref);
|
||||
JSONObject properties = responseObject.getJSONObject("properties");
|
||||
Set<String> fieldNames = properties.keySet();
|
||||
List<DocParameter> docParameterList = new ArrayList<>();
|
||||
if (properties == null) {
|
||||
return docParameterList;
|
||||
}
|
||||
Set<String> fieldNames = properties.keySet();
|
||||
for (String fieldName : fieldNames) {
|
||||
/*
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user