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 77f2ba94ad23..f828e8db2ab0 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 @@ -563,6 +563,10 @@ private static void readPathsAndScopes(PathItem srcPathItem, URITemplate uriTemp PathItem pathItem = paths.get(uriTemplate.getUriTemplate()); pathItem.operation(httpMethod, srcOperation); + if (pathItem.getParameters() == null && srcPathItem.getParameters() != null) { + pathItem.setParameters(srcPathItem.getParameters()); + setRefOfParameters(srcPathItem.getParameters(), context); + } readReferenceObjects(srcOperation, context); @@ -632,8 +636,11 @@ private static void setRefOfApiResponseHeaders(ApiResponses responses, SwaggerUp if (headers != null) { for (Header header : headers.values()) { Content content = header.getContent(); - extractReferenceFromContent(content, context); + String ref = header.get$ref(); + if (ref != null) { + addToReferenceObjectMap(ref, context); + } } } }