注釈(フィールドレベル)を使用してフィールドの説明を付けることはできますか?注釈からのSpring-restdocsフィールドの説明
私はその
.andDo(document("index", responseFields(
fieldWithPath("contact").description("The user's contact details"),
ためdescription
方法を使用することができます知っているが、私は私のレスポンスオブジェクトに、フィールド定義と一緒にその説明を置くことを好むだろう。
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のようなものをお探しします。