阐明报告 - 如何排除少数 API 并包含来自同一 class 的少数 API
Enunciate reporting - How to Exclude few APIs and include few APIs from a same class
我想从 Enunciate 文档中排除 API 中的几个 API 方法。
有没有办法使用 enunciate 实现它?
提前致谢
Enunciate 1.27 has a feature "Facet"(http://docs.codehaus.org/display/ENUNCIATE/Enunciate+API+Facets) which helps in achieving the above.
Requires following changes
1.) pom.xml
Added the plugin
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.27</version>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
2.) In the API Method you want to exclude, add Facet annotation like below
@GET
@Path("/{memberId}")
@Produces(APPLICATION_JSON)
@Facet(name = "external")
3.) Change enunciate xml to refer to 1.27 enunciate xsd
4.) Add Facets tag in your enunciate xml
<facets>
<exclude name ="external"/>
</facets>
Result - Enunciate report excludes selected APIs methods in class "A" and includes the rest.
我想从 Enunciate 文档中排除 API 中的几个 API 方法。
有没有办法使用 enunciate 实现它?
提前致谢
Enunciate 1.27 has a feature "Facet"(http://docs.codehaus.org/display/ENUNCIATE/Enunciate+API+Facets) which helps in achieving the above.
Requires following changes
1.) pom.xml
Added the plugin
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.27</version>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
2.) In the API Method you want to exclude, add Facet annotation like below
@GET
@Path("/{memberId}")
@Produces(APPLICATION_JSON)
@Facet(name = "external")
3.) Change enunciate xml to refer to 1.27 enunciate xsd
4.) Add Facets tag in your enunciate xml
<facets>
<exclude name ="external"/>
</facets>
Result - Enunciate report excludes selected APIs methods in class "A" and includes the rest.