Skip to content

Instantly share code, notes, and snippets.

@pboethig
Last active October 16, 2016 09:28
Show Gist options
  • Save pboethig/0c7c8d030171e3458d3c2f221807d961 to your computer and use it in GitHub Desktop.
Save pboethig/0c7c8d030171e3458d3c2f221807d961 to your computer and use it in GitHub Desktop.
class ApiController extends Controller {
/**
* @SWG\Get(
* path="/list",
* summary="List all users",
* tags={"User/list"},
* description="return a list of users",
* operationId="userslist",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Response(
* response=200,
* description="successful operation",
* @SWG\Schema(
* type="array",
* @SWG\Items(ref="#/definitions/Users")
* ),
* ),
* @SWG\Response(
* response="404",
* description="Invalid tag value",
* ),
* security={
* {
* "usersstore_auth": {"write:users", "read:users"}
* }
* }
* )
*/
public function list()
{
$content = $this->getFakeData();
return response()->json($content, 200)->header('Content-Type', 'application/json');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment