(Quick Reference)

SwaggyShow

Purpose

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

Examples

This is the shortcode:

@SwaggyShow
def show() {
  // …
}

Detailed version

This is the effect of SwaggyShow

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