Skip to content

Instantly share code, notes, and snippets.

@fehguy
Created December 8, 2011 21:52
Show Gist options
  • Save fehguy/1448791 to your computer and use it in GitHub Desktop.
Save fehguy/1448791 to your computer and use it in GitHub Desktop.
@GET
@Path("/findByStatus")
@ApiOperation(value = "Finds Pets by status",
notes = "Multiple status values can be provided with comma seperated strings",
responseClass = "com.wordnik.swagger.sample.model.Pet", multiValueResponse = true)
@ApiErrors(Array(
new ApiError(code = 400, reason = "Invalid status value")))
def findPetsByStatus(
@ApiParam(value = "Status values that need to be considered for filter", required = true, defaultValue = "available",
allowableValues = "available,pending,sold", allowMultiple = true)@QueryParam("status") status: String) = {
var results = petData.findPetByStatus(status)
JResponse.ok(results).build
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment