Skip to content

Commit c766a3d

Browse files
author
Chris Wiechmann
committed
#113 When Backend-API is created, transfer the API-Name with the correct
content type. Made the same fix for the filename as well, just in case.
1 parent 6275b50 commit c766a3d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
## [Unreleased]
88
### Fixed
99
- Created BE-API response was parsing the response wrong. This could lead to an issue, if the API contains a createdOn field. (See issue [#112](https://github.com/Axway-API-Management-Plus/apim-cli/issues/112))
10+
- Unicode API-Name was not shown correctly in the Backend-API overview (See issue [#113](https://github.com/Axway-API-Management-Plus/apim-cli/issues/113))
1011

1112
## [1.3.0] 2020-11-10
1213
### Added

modules/apim-adapter/src/main/java/com/axway/apim/adapter/apis/APIManagerAPIAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,10 @@ private JsonNode importFromSwagger(API api) throws URISyntaxException, AppExcept
788788
}
789789
try {
790790
entity = MultipartEntityBuilder.create()
791-
.addTextBody("name", api.getName())
791+
.addTextBody("name", api.getName(), ContentType.create("text/plain", StandardCharsets.UTF_8))
792792
.addTextBody("type", "swagger")
793793
.addBinaryBody("file", api.getApiDefinition().getApiSpecificationContent(), ContentType.create("application/json"), "filename")
794-
.addTextBody("fileName", "XYZ").addTextBody("organizationId", api.getOrganization().getId())
794+
.addTextBody("fileName", "XYZ").addTextBody("organizationId", api.getOrganization().getId(), ContentType.create("text/plain", StandardCharsets.UTF_8))
795795
.addTextBody("integral", "false").addTextBody("uploadType", "html5").build();
796796
RestAPICall importSwagger = new POSTRequest(entity, uri);
797797
importSwagger.setContentType(null);

0 commit comments

Comments
 (0)