Jersey 2.0 使用swagger从jersey生成JSON定义
我的目标是从我的资源中生成一个狂妄的定义 为此,我的pom.xml如下所示:Jersey 2.0 使用swagger从jersey生成JSON定义,jersey-2.0,swagger,swagger-ui,swagger-maven-plugin,Jersey 2.0,Swagger,Swagger Ui,Swagger Maven Plugin,我的目标是从我的资源中生成一个狂妄的定义 为此,我的pom.xml如下所示: <plugin> <groupId>com.github.kongchen</groupId> <artifactId>swagger-maven-plugin</artifactId> <version>2.3.1</version> &
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<apiSources>
<apiSource>
<locations>com.rest.resources</locations>
<apiVersion>1.0</apiVersion>
<swaggerDirectory>${basedir}/src/main/webapp/docs</swaggerDirectory>
</apiSource>
</apiSources>
</configuration>
</plugin>
com.github.kongchen
大摇大摆的maven插件
2.3.1
com.rest.resources
1
${basedir}/src/main/webapp/docs
我也有自大/球衣依赖性:
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-jaxrs_2.10</artifactId>
<version>1.3.10</version>
<scope>compile</scope>
</dependency>
com.wordnik
swagger-jaxrs_2.10
1.3.10
编译
json生成得很好,但我的每个资源都有一个json文件,而不是一个
我缺少的东西你什么都没有遗漏,它正在按预期工作 即使在您提供的链接中,每个资源也有一个文件。 查看以下链接: