@@ -608,8 +608,27 @@ public API updateAPIProxy(API api) throws AppException {
608608 }
609609 }
610610
611- public String [] getSerializeAllExcept () {
612- return new String []{"apiDefinition" , "certFile" , "useForInbound" , "useForOutbound" , "organization" , "applications" , "image" , "clientOrganizations" , "applicationQuota" , "systemQuota" , "backendBasepath" , "remoteHost" };
611+ public String [] getSerializeAllExcept () throws AppException {
612+ String [] serializeAllExcept ;
613+ // queryStringPassThrough added in inboundProfiles on API manager version 7.7.20220530
614+ if (isAPIManagerVersionGreaterThan7720220530 (APIManagerAdapter .getInstance ().getApiManagerVersion ())) {
615+ serializeAllExcept = new String []{"apiDefinition" , "certFile" , "useForInbound" , "useForOutbound" , "organization" , "applications" , "image" , "clientOrganizations" , "applicationQuota" , "systemQuota" , "backendBasepath" , "remoteHost" };
616+ } else {
617+ serializeAllExcept = new String []{"queryStringPassThrough" , "apiDefinition" , "certFile" , "useForInbound" , "useForOutbound" , "organization" , "applications" , "image" , "clientOrganizations" , "applicationQuota" , "systemQuota" , "backendBasepath" , "remoteHost" };
618+ }
619+ LOG .debug ("serializeAllExcept={}" , serializeAllExcept );
620+ return serializeAllExcept ;
621+ }
622+
623+ private boolean isAPIManagerVersionGreaterThan7720220530 (String apiManagerVersion ) {
624+ try {
625+ apiManagerVersion = apiManagerVersion .replace ("7.7." , "" );
626+ LOG .debug ("apiManagerVersion for conversion: {}" ,apiManagerVersion );
627+ return (Integer .parseInt (apiManagerVersion ) >= 20220530 );
628+ } catch (NumberFormatException nfe ){
629+ LOG .warn ("Failed to convert API Manager version to integer: {}, returning false" , apiManagerVersion );
630+ return false ;
631+ }
613632 }
614633
615634 public void deleteAPIProxy (API api ) throws AppException {
0 commit comments