(Quick Reference)

SwaggySave

Purpose

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

Examples

This is the shortcode:

@SwaggySave
def save() {
  // …
}

Detailed version

This is the effect of SwaggySave

@ApiOperation(value = "Save #Domain", response = #Domain)
@ApiResponses([
    @ApiResponse(code = 422, message = 'Bad Entity Received'),
])
@ApiImplicitParams([
    @ApiImplicitParam(name = 'body', paramType = 'body', required = true,
        dataType = '#Domain'),
])