如下代码,但是在swagger的页面中显示No parameters 只有在方法上加@ApiImplicitParams才显示,但是属性太多了,不可能是这种方式加吧
@Api(value="/api/comment", tags = "评论模块")
@IocBean
@At("/api/comment")
public class CommentModule{
@ApiOperation(value = "添加", httpMethod="POST")
@At(value = "/add")
public Res add(Comment comment) {
return Res.OK("添加成功").data(comment);
}
}
Comment部分
@ApiModel("评论")
@Table("t_comment")
public class Comment {
@Column
@ColDefine(width = 32)
@ApiModelProperty("id")
private String id;
@Column
@ApiModelProperty("name")
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}