Closed poppycoding closed 3 years ago
public class ApiResponse (T) { private Integer code; private String message; private T data; } public class SelectVO { @ApiModelProperty(value = "label", required = true) Object label; @ApiModelProperty(value = "value", required = true) Object value; }
ApiResponse T , Map(String, List (SelectVO)) 我定义这种返回类型的时候ApiResponse(Map(String, List (SelectVO))),.swagger解析不出来
这是example value: { "code": 0, "data": {}, "message": "string" }
这是Model: ApiResponseOfMapOfstringAndListOfSelectVO { code (integer): data (inline_model): message (string): } inline_model {}
请问是我注解没有写清楚还是???嵌套层次的问题??有人知道解决方案的话告知一下哈!谢谢! ps: 泛型markdown好像有问题,暂时用括号代替泛型
支持无限多层嵌套的。演示demo里面就有:http://suldemo.tianox.com/docs.html “查询用户基本信息”这个接口就是返回的多层嵌套。
public class ApiResponse (T) { private Integer code; private String message; private T data; } public class SelectVO { @ApiModelProperty(value = "label", required = true) Object label; @ApiModelProperty(value = "value", required = true) Object value; }
ApiResponse T , Map(String, List (SelectVO)) 我定义这种返回类型的时候ApiResponse(Map(String, List (SelectVO))),.swagger解析不出来
这是example value: { "code": 0, "data": {}, "message": "string" }
这是Model: ApiResponseOfMapOfstringAndListOfSelectVO { code (integer): data (inline_model): message (string): } inline_model {}
请问是我注解没有写清楚还是???嵌套层次的问题??有人知道解决方案的话告知一下哈!谢谢! ps: 泛型markdown好像有问题,暂时用括号代替泛型