Skip to content

Commit

Permalink
- update change log and add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Nov 6, 2024
1 parent b8136c5 commit c43dfe6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


# [1.14.8] In progress
# [1.14.8] 2024-11-05

### Fixed
- Removing existing GLOBAL quotas in Api Manager(See issue [#442](https://github.com/Axway-API-Management-Plus/apim-cli/issues/442))
Expand Down Expand Up @@ -76,7 +76,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- APIM CLI to check/skip already removed API (See issue [#417](https://github.com/Axway-API-Management-Plus/apim-cli/issues/417))
- Error mapping is not applied when importing "app" (See issue [#437](https://github.com/Axway-API-Management-Plus/apim-cli/issues/437))
- Handling backend changes and removal of organization from api-config json file in one command [#441](https://github.com/Axway-API-Management-Plus/apim-cli/issues/441))
- Handling backend changes and removal of organization from api-config json file in one command [#441](https://github.com/Axway-API-Management-Plus/apim-cli/issues/441)
- Handling removing of existing quota in API (See issue [#438](https://github.com/Axway-API-Management-Plus/apim-cli/issues/438))
- Regression in handling removing existing quota in API Manager (See issue [#434](https://github.com/Axway-API-Management-Plus/apim-cli/issues/434))
### Added
Expand Down Expand Up @@ -142,7 +142,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added
- Support of All / Global quotas for API and application. (See issue [#362](https://github.com/Axway-API-Management-Plus/apim-cli/issues/362))
- Host docker cli images on github docker registry [#373](https://github.com/Axway-API-Management-Plus/apim-cli/issues/373))
- Host docker cli images on github docker registry (See issue [#373](https://github.com/Axway-API-Management-Plus/apim-cli/issues/373)


## [1.13.5] 2023-03-15
Expand All @@ -166,7 +166,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added
- Support yaml configuration for apim cli (Beta)
- Support for APIM February 2023 release [#346](https://github.com/Axway-API-Management-Plus/apim-cli/issues/346))
- Support for APIM February 2023 release [#346](https://github.com/Axway-API-Management-Plus/apim-cli/issues/346)


## [1.13.3] 2023-02-08
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ public APIManagerAPIMethodAdapter() {
cmd = CoreParameters.getInstance();
}

Map<String, String> apiManagerResponse = new HashMap<>();
private final Map<String, String> apiManagerResponse = new HashMap<>();

private void readMethodsFromAPIManager(String apiId) throws AppException {
if (this.apiManagerResponse.get(apiId) != null) return;
if (apiManagerResponse.get(apiId) != null) return;
try {
URI uri = new URIBuilder(cmd.getAPIManagerURL()).setPath(cmd.getApiBasepath() + "/proxies/" + apiId + "/operations").build();
LOG.debug("Load API-Methods for API: {} from API-Manager", apiId);
RestAPICall getRequest = new GETRequest(uri);
try (CloseableHttpResponse httpResponse = (CloseableHttpResponse) getRequest.execute()) {
this.apiManagerResponse.put(apiId, EntityUtils.toString(httpResponse.getEntity()));
apiManagerResponse.put(apiId, EntityUtils.toString(httpResponse.getEntity()));
}
} catch (Exception e) {
throw new AppException(ERROR_CANT_LOAD_API_METHODS_FOR_API + apiId + "' from API-Manager", ErrorCode.API_MANAGER_COMMUNICATION, e);
Expand All @@ -58,7 +58,7 @@ public List<APIMethod> getAllMethodsForAPI(String apiId) throws AppException {
readMethodsFromAPIManager(apiId);
List<APIMethod> apiMethods;
try {
apiMethods = mapper.readValue(this.apiManagerResponse.get(apiId), new TypeReference<>() {
apiMethods = mapper.readValue(apiManagerResponse.get(apiId), new TypeReference<>() {
});
} catch (IOException e) {
throw new AppException(ERROR_CANT_LOAD_API_METHODS_FOR_API + apiId + "' from API-Manager.", ErrorCode.API_MANAGER_COMMUNICATION, e);
Expand Down Expand Up @@ -113,7 +113,8 @@ public void updateApiMethod(APIMethod apiMethod) throws AppException {
int statusCode = httpResponse.getStatusLine().getStatusCode();
String response = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
if (statusCode < 200 || statusCode > 299) {
throw new AppException("Can't update API-Manager Method. Response: '" + response + "'", ErrorCode.API_MANAGER_COMMUNICATION);
LOG.debug("Response from server: {}", response);
throw new AppException("Can't update API-Manager Method.", ErrorCode.API_MANAGER_COMMUNICATION);
} else {
LOG.info("Successfully updated API Method. Received Status-Code: {}", statusCode);
}
Expand Down

0 comments on commit c43dfe6

Please sign in to comment.