Enunciate docs モジュールのサンプル JSON は、マップをオブジェクトの配列として示しています。
たとえば、次のようなオブジェクトがあります。
@JsonRootType
@JsonName("MyObj")
@XmlRootElement
public class MyObject {
@DocumentationExample("John Doe")
private String name;
private Map<String, String> attributes;
public MyObject() {}
public String getName() { return name; }
public Map<String, String> getAttributes() { return attributes; }
}
enunciate のサンプル JSON は次のようになります。
{
"name" : "John Doe",
"attributes" : [{
"..." : ...
},{
}]
}
JSON の例は次のようになると思います。
{
"name" : "John Doe",
"attributes" : {
"..." : ...,
}
}
GenerateExampleJsonMethod は、Map を見ると常に ArrayNode を作成しているようです。期待される JSON を取得する方法はありますか?
enunciate バージョン 1.26.2 を使用しています