8000 Response Model with Map can not be showed the details in response · Issue #3297 · springfox/springfox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Response Model with Map can not be showed the details in response #3297
Closed
@dianfenzhan

Description

@dianfenzhan

Hi my response model is generic and has a column 'errorInfo' which type is Map,then swagger can not show the response details,If i change the type from Map to other type (String or other Class),then it works.(swagger.version=2.9.2,springboot.version=2.2.4.RELEASE)

@Data
@NoArgsConstructor
@ApiModel("Standard response model")
public class ApiResult<T> implements Serializable {

    @ApiModelProperty(value = "success or fail")
    private Boolean success;

    @ApiModelProperty(value = "result status", reference = "IResultMsg", required = true)
    private Integer status;

    @ApiModelProperty(value = "result message", required = true)
    private String message;

    @ApiModelProperty(value = "response data")
    private T data;

    @ApiModelProperty(value = "error info")
    private Map errorInfo;

    @ApiModelProperty(value = "error message")
    private String errorMessage;

21588064974_ pic
31588065022_ pic

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0