是否可以使用注释(在字段级别)为字段提供说明?注释中的spring-restdocs字段说明
我知道我可以使用description
方法为
.andDo(document("index", responseFields(
fieldWithPath("contact").description("The user's contact details"),
,但我宁愿把那说明连同场的定义,在我的响应对象。
class IndexResponse {
//The user's contact details
String contract;
}
我知道,我可以产生约束描述(http://docs.spring.io/spring-restdocs/docs/current/reference/html5/#_using_constraint_descriptions_in_generated_snippets),但它仅用于验证注释生成的描述。
我正在找Swagger的https://github.com/swagger-api/swagger-core/wiki/Annotations#apimodelproperty这样的产品。