尝试将swagger.json文件发布到atlassian wiki页面

时间:2017-04-13 05:29:48

标签: json swagger confluence

我正在尝试使用swagger-confluence-cli-all-2.2-RELEASE.jar将swagger.json文件发布到atlassian wiki页面

使用的命令

java -jar swagger-confluence-cli-all-2.2-RELEASE.jar -u "<atlassian wiki url>" -b "<base64 encode username:password>" -a "35273" -k "TestPage" -g "true" -i "true" -s "swagger.json file" -t "Test1" -m "single"

但是我得到的是异常

2017-04-13 10:52:47.215  INFO - [main] n.s.s.c.s.i.SwaggerToAsciiDocServiceImpl : Converting Swagger Schema to Ascii Doc...
Exception in thread "main" java.lang.IllegalArgumentException: text must not be blank
at org.apache.commons.lang3.Validate.notBlank(Validate.java:451)
at io.github.swagger2markup.markup.builder.internal.asciidoc.AsciiDocBuilder.paragraph(AsciiDocBuilder.java:91)
at io.github.swagger2markup.internal.document.builder.OverviewDocumentBuilder.buildContactInfoSection(OverviewDocumentBuilder.java:127)
at io.github.swagger2markup.internal.document.builder.OverviewDocumentBuilder.build(OverviewDocumentBuilder.java:88)
at io.github.swagger2markup.Swagger2MarkupConverter.toString(Swagger2MarkupConverter.java:233)
at net.slkdev.swagger.confluence.service.impl.SwaggerToAsciiDocServiceImpl.convertSwaggerToAsciiDoc(SwaggerToAsciiDocServiceImpl.java:67)
at net.slkdev.swagger.confluence.service.impl.SwaggerToConfluenceServiceImpl.convertSwaggerToConfluence(SwaggerToConfluenceServiceImpl.java:73)
at net.slkdev.swagger.confluence.cli.SwaggerConfluence.runCLI(SwaggerConfluence.java:63)

1 个答案:

答案 0 :(得分:0)

如果您尝试调试模式,您将看到您的swagger.json文件有一个空对象,名为contact。因此,您应该填写一些属性,例如姓名,url和/或email