Post and Swagger on Spring
Lalu bagaimana jika swagger dipasangkan ke parameter api. Jadi beginilah
@ApiOperation(value="Post method")
@PostMapping(path="/postcrot")
public User helloPost(
@ApiParam(value = "Employee object store in database table", required = true)
@Valid @RequestBody User user){
return userRepository.save(user);
}
jadi ini lanjutan dari pasang swagger di Spring.
Referensi :
@ApiOperation(value="Post method")
@PostMapping(path="/postcrot")
public User helloPost(
@ApiParam(value = "Employee object store in database table", required = true)
@Valid @RequestBody User user){
return userRepository.save(user);
}
jadi ini lanjutan dari pasang swagger di Spring.
Referensi :
Comments
Post a Comment