Skip to content

Commit

Permalink
Fix spot bug issue
Browse files Browse the repository at this point in the history
  • Loading branch information
TharmiganK committed May 2, 2024
1 parent a3d10ff commit 7a62f4e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.DELETE;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.ENCODING;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.EXECUTE;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.HEAD;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.HEADERS;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.HEADER_VALUES;
import static io.ballerina.openapi.core.generators.common.GeneratorConstants.HTTP_HEADERS;
Expand Down Expand Up @@ -327,8 +326,7 @@ private void addUpdatedPathAndHeaders(List<StatementNode> statementsList, List<S
}
}

if (hasQueries || !queryApiKeyNameList.isEmpty()) {
if (!queryApiKeyNameList.isEmpty()) {
if (!queryApiKeyNameList.isEmpty()) {
String defaultValue = "{}";
if (hasQueries) {
defaultValue = "{..." + QUERIES + "}";
Expand All @@ -343,7 +341,7 @@ private void addUpdatedPathAndHeaders(List<StatementNode> statementsList, List<S
// `queryParam["api-key"] = self.apiKeyConfig?.apiKey;`
addApiKeysToMap(QUERY_PARAM, queryApiKeyNameList, ifBodyStatementsList);
}
}

}

generateIfBlockToAddApiKeysToMaps(statementsList, ifBodyStatementsList);
Expand Down Expand Up @@ -560,8 +558,6 @@ private void createCommonFunctionBodyStatements(List<StatementNode> statementsLi

} else if (method.equals(DELETE)) {
clientCallStatement = getClientCallWithHeadersParam().formatted(method, RESOURCE_PATH, paramName);
} else if (method.equals(HEAD)) {
clientCallStatement = getClientCallWithHeaders().formatted(method, RESOURCE_PATH, paramName);
} else {
clientCallStatement = getClientCallWithHeaders().formatted(method, RESOURCE_PATH, paramName);
}
Expand Down

0 comments on commit 7a62f4e

Please sign in to comment.