#Support for javax.validation annotations
param.required=@javax.validation.constraints.NotBlank
param.required=@"javax.validation.constraints.NotNull
param.required=@javax.validation.constraints.NotEmpty
param.required=@io.swagger.annotations.ApiParam#required
MockCtrl.java
@RestController
@RequestMapping(value = "mock")
public class MockCtrl {
/**
* Mock String
*/
@GetMapping("/string")
public String mockString(
@ApiParam(value = "seed for mock", required = true, defaultValue = "666666") long seed) {
return Result.success("mock string");
}
}
Request Parameters:
Parameter name | required | Demo | desc |
---|---|---|---|
seed | Yes | 666666 | seed for mock |