Skip to content

Commit

Permalink
Enhance template creation to include api methods and inbound per meth…
Browse files Browse the repository at this point in the history
…od override
  • Loading branch information
rathnapandi committed Nov 22, 2024
1 parent 05c9e73 commit 53f6737
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public Map<String, OutboundProfile> getOutboundProfiles() {


public List<SecurityProfile> getSecurityProfiles() {
if (api.getSecurityProfiles().size() == 1) {
return Collections.emptyList();
}
return api.getSecurityProfiles();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public APIConfig generateTemplate(GenerateTemplateParameters parameters) throws
String frontendAuthType = parameters.getFrontendAuthType();
// If frontendAuthType is null, use authentication from openapi spec. If none found, set it as pass through
List<SecurityProfile> securityProfiles = addInboundSecurityToAPI(frontendAuthType);
api.setSecurityProfiles(securityProfiles);
String backendAuthType = parameters.getBackendAuthType();
addOutboundSecurityToAPI(api, backendAuthType);
String apiSpecLocation;
Expand All @@ -228,7 +229,6 @@ public APIConfig generateTemplate(GenerateTemplateParameters parameters) throws
List<APIMethod> methods = addMethods(openAPI);
api.setApiMethods(methods);
}

if (parameters.isInboundPerMethodOverride()) {
Map<String, InboundProfile> inboundProfileMap = addInboundPerMethodOverride(openAPI, api, securityProfiles);
api.setInboundProfiles(inboundProfileMap);
Expand Down

0 comments on commit 53f6737

Please sign in to comment.