是否有办法在vert中生成api文档?喜欢春季的狂妄文档吗?
我做了我的研究,但没有找到任何解决办法
你可以很容易地引入一个依赖,比如smallrys -open-api,为你的服务创建一个接口,放置注释,并在编译时生成它。我已经做了很多次了。我写的x分量
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-core</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-jaxrs</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<scope>compile</scope>
</dependency>
<build>
<plugins>
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate-schema</goal>
</goals>
</execution>
</executions>
<configuration>
<infoTitle>Notifier API</infoTitle>
<outputDirectory>../application/src/main/resources/</outputDirectory>
<includeDependenciesScopes>compile,provided,system,test,import</includeDependenciesScopes>
</configuration>
</plugin>
</plugins>
- 如果实现不在同一模块中,请记住添加mock impl,以便插件检测正在使用的接口。