Skip to content

Commit c759443

Browse files
authored
Merge branch 'Axway-API-Management-Plus:develop' into openapi31-merged
2 parents 7d19abe + a3d51cf commit c759443

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
blank_issues_enabled: false
2-
contact_links:
3-
- name: Axway Support
4-
url: https://support.axway.com
5-
about: If you are using an Axway officially supported version you may also create an Axway support case.

modules/apis/src/main/java/com/axway/apim/api/export/impl/CSVAPIExporter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ private enum HeaderFields {
7676
"Tags",
7777
"Granted Organization",
7878
"Application Name",
79+
"Application ID",
7980
"Application Organization",
8081
CREATED_ON
8182
});
@@ -232,6 +233,7 @@ private void writeAPIUltraToCSV(CSVPrinter csvPrinter, API api, ClientApplicatio
232233
getTags(api),
233234
org.getName(),
234235
app.getName(),
236+
app.getId(),
235237
app.getOrganization().getName(),
236238
getFormattedDate(api)
237239
);

modules/apis/src/main/java/com/axway/apim/api/export/impl/ExportHelper.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ public ExportHelper(APIExportParams params) {
4646
this.params = params;
4747
}
4848

49-
public void saveAPILocally(ObjectMapper mapper, ExportAPI exportAPI, String configFile) throws AppException {
49+
public void saveAPILocally(ObjectMapper mapper, ExportAPI exportAPI, String configFile, int size) throws AppException {
5050

5151
String apiPath = getAPIExportFolder(exportAPI.getPath());
5252
File localFolder = new File(params.getTarget() + File.separator + getVHost(exportAPI) + apiPath);
53+
if (size > 1 && localFolder.exists()) {
54+
localFolder = new File(params.getTarget() + File.separator + getVHost(exportAPI) + apiPath + "-" + System.currentTimeMillis());
55+
}
5356
if (!EnvironmentProperties.PRINT_CONFIG_CONSOLE) {
5457
LOG.debug("Going to export API: {} into folder: {} ", exportAPI.getName(), localFolder);
5558
validateFolder(localFolder);

modules/apis/src/main/java/com/axway/apim/api/export/impl/JsonAPIExporter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ public JsonAPIExporter(APIExportParams params) {
2828
@Override
2929
public void execute(List<API> apis) throws AppException {
3030
LOG.info("Exporting API and configuration as JSON format");
31+
int size = apis.size();
3132
for (API api : apis) {
3233
ExportAPI exportAPI = new ExportAPI(api);
33-
exportHelper.saveAPILocally(new ObjectMapper(), exportAPI, "/api-config.json");
34+
exportHelper.saveAPILocally(new ObjectMapper(), exportAPI, "/api-config.json", size);
3435
}
3536
}
3637

modules/apis/src/main/java/com/axway/apim/api/export/impl/YamlAPIExporter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ public YamlAPIExporter(APIExportParams params) {
2222
@Override
2323
public void execute(List<API> apis) throws AppException {
2424
LOG.info("Export API and configuration as Yaml format");
25+
int size = apis.size();
2526
for (API api : apis) {
2627
ExportAPI exportAPI = new ExportAPI(api);
27-
exportHelper.saveAPILocally(new ObjectMapper(CustomYamlFactory.createYamlFactory()), exportAPI, "/api-config.yaml");
28+
exportHelper.saveAPILocally(new ObjectMapper(CustomYamlFactory.createYamlFactory()), exportAPI, "/api-config.yaml", size);
2829
}
2930
}
3031
}

0 commit comments

Comments
 (0)