(Quick Reference)

SwaggyDelete

Purpose

Documents a method as a Delete action for an entity. This is shortcode for a couple of Swagger Annotations.

Examples

This is the shortcode:

@SwaggyDelete
def delete() {
  // …
}

Detailed version

This is the effect of SwaggyDelete

@ApiOperation(value = "Delete #Domain")
@ApiResponses([
    @ApiResponse(code = 400, message = 'Bad Id provided'),
    @ApiResponse(code = 404, message = 'Could not find #Domain with that Id'),
])
@ApiImplicitParams([
    @ApiImplicitParam(name = 'id', value = 'Id to delete', paramType = 'path',
        dataType = 'int', required = true),
])