Skip to content

Commit

Permalink
Fix: Merge Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Sep 26, 2024
1 parent 43047d7 commit d12fca0
Showing 1 changed file with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import graphql.schema.validation.SchemaValidationError;
import graphql.schema.validation.SchemaValidator;
import io.swagger.v3.parser.ObjectMapperFactory;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -101,9 +102,11 @@
import org.wso2.carbon.core.util.CryptoUtil;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -204,7 +207,6 @@ public static API updateApi(API originalAPI, APIDTO apiDtoToUpdate, APIProvider
}
}
return apiUpdated;
// TODO use returend api
}

/**
Expand Down Expand Up @@ -1144,23 +1146,6 @@ public static API addAPIWithGeneratedSwaggerDefinition(APIDTO apiDto, String oas

encryptEndpointSecurityApiKeyCredentials(endpointConfig, cryptoUtil, StringUtils.EMPTY, StringUtils.EMPTY,
apiDto);
// update endpointConfig with the provided custom sequence
if (endpointConfig != null) {
endpointConfig.get(APIConstants.API_ENDPOINT_CONFIG_PROTOCOL_TYPE))) {
try {
if (endpointConfig.get("sequence_path") != null) {
String pathToSequence = endpointConfig.get("sequence_path").toString();
String sequence = FileUtils.readFileToString(new File(pathToSequence),
Charset.defaultCharset());
endpointConfig.put("sequence", sequence);
apiDto.setEndpointConfig(endpointConfig);
}
} catch (IOException ex) {
throw new APIManagementException("Error while reading Custom Sequence of API: " + apiDto.getId(),
ex, ExceptionCodes.ERROR_READING_CUSTOM_SEQUENCE);
}
}
}

// AWS Lambda: secret key encryption while creating the API
if (endpointConfig.containsKey(APIConstants.AMZN_SECRET_KEY)) {
Expand All @@ -1171,7 +1156,6 @@ public static API addAPIWithGeneratedSwaggerDefinition(APIDTO apiDto, String oas
apiDto.setEndpointConfig(endpointConfig);
}
}
}

/* if (isWSAPI) {
ArrayList<String> websocketTransports = new ArrayList<>();
Expand Down

0 comments on commit d12fca0

Please sign in to comment.