1
我的目標是從我的澤西島資源生成一個swagger定義like this。使用swagger從澤西島生成JSON定義
爲了得到這個,我的pom.xml的樣子:
<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>
我也有招搖/球衣依賴性:
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-jaxrs_2.10</artifactId>
<version>1.3.10</version>
<scope>compile</scope>
</dependency>
JSON的良好生成,但我發現了一個json文件爲我的每個資源,而不是隻有一個
我失蹤