diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java index f828e8db2ab0..4ce783bb67f5 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java @@ -730,7 +730,9 @@ private static void extractReferenceFromSchema(Schema schema, SwaggerUpdateConte addToReferenceObjectMap(ref, context); } else if (!references.isEmpty() && references.size() != 0) { for (String reference : references) { - addToReferenceObjectMap(reference, context); + if (reference != null) { + addToReferenceObjectMap(reference, context); + } } }