Enunciate Spring Request param

318 Views Asked by At

I would like to document my Spring api with enunciate. Works fine, but some endpoints have request parameters included. These wont get documented by enunciate.

/**
 * Does some magic.
 *
 * @HTTP 201 Successful Request.
 */
@PostMapping(value = "/{id}", params = "action=doMagic")
@RolesAllowed("ADMIN")
public User restoreUser(@PathVariable Long id) {
    User user = userService.restore(id);
    return ResponseEntity.ok(project);
}

The enunciate docu documents the id as parameter but not the requestParameter "action". How can this be solved?

1

There are 1 best solutions below

0
On

Add @param to javadoc

/**
 * Does some magic.
 * 
 * @param action description of this parameter
 * @param id and you can describe id here too
 * 
 * @HTTP 201 Successful Request.
 */