【发布时间】:2016-07-18 04:40:44
【问题描述】:
我已经像那样配置了 swagger-codegen-plugin
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.1.5</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/model.json</inputSpec>
<language>java</language>
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
</configOptions>
<modelPackage>com.mypackage</modelPackage>
<environmentVariables>
<models></models>
<supportingFiles>false</supportingFiles>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
一切正常,但是当我将语言更改为 <language>html</language> 时,没有生成任何内容。
那么如何生成 staitc html 文档呢?
【问题讨论】:
-
您能检查
target/generated-sources/swagger/文件夹吗?应该有一个index.html文件。我不确定它是否需要sourceFolder -
有一些文件,但根本没有html文件!!!
-
也许 maven 日志会有所帮助。真的很难弄清楚。你的配置看起来不错
标签: java maven swagger-2.0 swagger-codegen