我正在尝试在我的项目中设置 spring-auto-restdocs,该项目使用 JDK 11、Gradle 5、JUnit5 和 Spring Webflux 以及 spring boot 2.1.1。
我在这里遵循了正常的 spring-restdocs 设置指南:https ://docs.spring.io/spring-restdocs/docs/current/reference/html5/
然后也做了这个入门指南:https : //scacap.github.io/spring-auto-restdocs/
我的问题是,当我尝试运行以下 gradle 命令时: gradlew asciidoctor --stacktrace
我收到以下错误:
javadoc: warning - The old Doclet and Taglet APIs in the packages
com.sun.javadoc, com.sun.tools.doclets and their implementations
are planned to be removed in a future JDK release. These
components have been superseded by the new APIs in jdk.javadoc.doclet.
Users are strongly recommended to migrate to the new APIs.
javadoc: error - invalid …Run Code Online (Sandbox Code Playgroud) 我是 Spring Boot 的新手。我想从 Spring MVC 控制器自动将 REST api 文档生成到 RAML 中。有什么可以做的吗?或者有什么指南可以让我用它来将我的 REST API 生成到 RAML 中?
spring raml raml-java-parser spring-restdocs spring-auto-restdocs
是否可以使用注释(在字段级别)为字段提供描述?
我知道我可以使用description方法
.andDo(document("index", responseFields(
fieldWithPath("contact").description("The user's contact details"),
Run Code Online (Sandbox Code Playgroud)
但是我更希望将该描述与字段定义一起放在我的响应对象中。
class IndexResponse {
//The user's contact details
String contract;
}
Run Code Online (Sandbox Code Playgroud)
我知道我可以生成约束描述(http://docs.spring.io/spring-restdocs/docs/current/reference/html5/#_using_constraint_descriptions_in_genic_snippets),但是它仅生成验证注释的描述。
我正在寻找来自Swagger的https://github.com/swagger-api/swagger-core/wiki/Annotations#apimodelproperty之类的东西。