Skip to content

Commit

Permalink
- Formatting issue #516
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Nov 4, 2024
1 parent 83a078e commit 52517ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public byte[] getApiSpecificationContent() {
// Return the original given API-Spec if no filters are applied
if (this.filterConfig == null) return this.apiSpecificationContent;
try {
return mapper.writerWithDefaultPrettyPrinter().writeValueAsBytes(openApiNode);
return mapper.writeValueAsBytes(openApiNode);
} catch (JsonProcessingException e) {
throw new InternalException("Error parsing API-Specification", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public byte[] getApiSpecificationContent() {
// Return the original given API-Spec if no filters are applied
if (this.filterConfig == null) return this.apiSpecificationContent;
try {
return mapper.writerWithDefaultPrettyPrinter().writeValueAsBytes(swagger);
return mapper.writeValueAsBytes(swagger);
} catch (JsonProcessingException e) {
throw new InternalException("Error parsing API-Specification", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void saveAPILocally(ObjectMapper mapper, ExportAPI exportAPI, String conf
String fileName = Utils.replaceSpecialChars(exportAPI.getName()) + apiDef.getAPIDefinitionType().getFileExtension();
targetFile = localFolder.getCanonicalPath() + "/" + fileName;
if (!(apiDef instanceof WSDLSpecification && EnvironmentProperties.RETAIN_BACKEND_URL) && (!EnvironmentProperties.PRINT_CONFIG_CONSOLE)) {
writeBytesToFile(apiDef.getApiSpecificationContent(), targetFile);
Object spec = mapper.readValue(apiDef.getApiSpecificationContent(), Object.class);
mapper.writerWithDefaultPrettyPrinter().writeValue(new File(targetFile), spec);
exportAPI.getAPIDefinition().setApiSpecificationFile(fileName);
}
} catch (IOException e) {
Expand Down

0 comments on commit 52517ef

Please sign in to comment.