fix: swagger3 空指针
This commit is contained in:
parent
a2faa2bc87
commit
44b0d7f6ad
|
@ -320,6 +320,9 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object parseSchema(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) {
|
private Object parseSchema(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) {
|
||||||
|
if (schema == null) {
|
||||||
|
return new JSONObject();
|
||||||
|
}
|
||||||
infoMap.put(schema.getName(), schema);
|
infoMap.put(schema.getName(), schema);
|
||||||
if (StringUtils.isNotBlank(schema.get$ref())) {
|
if (StringUtils.isNotBlank(schema.get$ref())) {
|
||||||
if (refSet.contains(schema.get$ref())) {
|
if (refSet.contains(schema.get$ref())) {
|
||||||
|
|
Loading…
Reference in New Issue