2

フィールドの説明を提供するために (フィールドレベルで) 注釈を使用することは可能ですか?

私は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のようなものを探しています。

4

2 に答える 2