Skip to content

Commit

Permalink
Merge pull request #12159 from SavinduDimal/api-product-swagger
Browse files Browse the repository at this point in the history
Add missing references to api product swagger definition
  • Loading branch information
tharikaGitHub authored Nov 2, 2023
2 parents dc4d5da + 6d91787 commit 73c11f9
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 73c11f9

Please sign in to comment.