Skip to content

Commit

Permalink
fixing cli usage
Browse files Browse the repository at this point in the history
  • Loading branch information
astroDEX2020 committed Dec 20, 2017
1 parent 2294cb0 commit 1adfbd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
public class Swagger2Confluence {
private static final Logger LOGGER = Logger.getLogger(Swagger2Confluence.class.getName());
private static final String USAGE = new StringBuilder()
.append(" Usage: com.kicksolutions.swagger.confluence.Swagger2Confluence <options> \n")
.append(" Usage: ")
.append(Swagger2Confluence.class.getName()).append(" <options> \n")
.append(" -i <Spec File> ").append(" -a <Parent Page Id> ").append(" -u <User Name> ")
.append(" -p <Password> ").append(" -l <Conflunce URL> ").append(" -s <Confluenec Space key>")
.append(" -r <alternate URL>").append("-c <Clinet Kit URL>").append("-d <HTML Documentation URL>").toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ public String processSwagger2Confluence(String specFile, String parentPageID, St
String version = swaggerObject.getInfo().getVersion();
String title = swaggerObject.getInfo().getTitle();

String parentTitle = new StringBuilder().append(title).toString();
String versionTitle = new StringBuilder().append("V").append(version).append("-").append(title).toString();
String swaggerPageContent = StringUtils.isNotEmpty(alternateURL) ? swaggerMacroContent(alternateURL,clientkitURL,htmlDocumentationURL) : swaggerMacroContent(specFile,clientkitURL,htmlDocumentationURL);

if (StringUtils.isNotEmpty(version) && StringUtils.isNotEmpty(title)) {
String parentTitle = new StringBuilder().append(title).toString();
String versionTitle = new StringBuilder().append("V").append(version).append(" - ").append(parentTitle).toString();
String swaggerPageContent = StringUtils.isNotEmpty(alternateURL) ? swaggerMacroContent(alternateURL,clientkitURL,htmlDocumentationURL) : swaggerMacroContent(specFile,clientkitURL,htmlDocumentationURL);

// Create a Page whose name is same as Swagger Title Ex: Pet Store
LOGGER.log(Level.INFO, "About to generate Page -->" + title);
LOGGER.log(Level.INFO, "About to generate Page -->" + parentTitle);

ConfluenceVo parentPageVo = createSwaggerPage(new ConfluenceVo(userName, password, confluenceURL, "",
parentPageID, "", parentTitle, "0", parentPageContent(versionTitle), spaceKey, false));
Expand Down

0 comments on commit 1adfbd4

Please sign in to comment.