Skip to content

Commit

Permalink
Merge pull request #43 from marcelstoer/master
Browse files Browse the repository at this point in the history
Remove *nix specific code to make it run on Windows as well
  • Loading branch information
RobWin authored Feb 20, 2018
2 parents aa589b0 + 2658713 commit 578cbbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private File getEffectiveOutputDirWhenInputIsAFolder(Swagger2MarkupConverter con
* If the folder the current Swagger file resides in contains at least one other Swagger file then the
* output dir must have an extra subdir per file to avoid markdown files getting overwritten.
*/
outputDirAddendum += "/" + extracSwaggerFileNameWithoutExtension(converter);
outputDirAddendum += File.separator + extracSwaggerFileNameWithoutExtension(converter);
}
return new File(outputDir, outputDirAddendum);
}
Expand All @@ -131,7 +131,7 @@ private String getInputDirStructurePath(Swagger2MarkupConverter converter) {
* - outputDir is set to /tmp/asciidoc
* -> markdown files from bar.yaml are generated to /tmp/asciidoc/bar-service/v1
*/
String swaggerFilePath = converter.getContext().getSwaggerLocation().getPath(); // /Users/foo/bar-service/v1/bar.yaml
String swaggerFilePath = new File(converter.getContext().getSwaggerLocation()).getAbsolutePath(); // /Users/foo/bar-service/v1/bar.yaml
String swaggerFileFolder = StringUtils.substringBeforeLast(swaggerFilePath, File.separator); // /Users/foo/bar-service/v1
return StringUtils.remove(swaggerFileFolder, swaggerInput); // /bar-service/v1
}
Expand Down

0 comments on commit 578cbbb

Please sign in to comment.