"user":{ "birth":null, "nationality":null, "lastname":null, "firstname":null, "identity":null }
PS:我使用带注释的spring boot:@ApiOperation,。。。
然后,必须在bean中为所有属性插入@ApiModelProperty anotion。然后在其中放置一个示例属性。假设您的用户已映射到该用户。java类,因此您可以:
public class User { @ApiModelProperty(value = "The birthdate", example = "1985-12-07", format= "yyyy-MM-dd") private String birth;