Last active
October 16, 2016 09:29
-
-
Save pboethig/52c770a6d09e0522b51d01064bc5e865 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Modules\Api\Controllers; | |
use App\Http\Requests; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
/** | |
* @SWG\Swagger( | |
* schemes={"http"}, | |
* host="swagger.local", | |
* basePath="/lektionen/swagger/Api/public/Api", | |
* @SWG\Info( | |
* version="1.0.0", | |
* title="Main user api", | |
* description="This is our main user api. It contains all method to handle users...", | |
* termsOfService="", | |
* @SWG\Contact( | |
* email="[email protected]" | |
* ), | |
* @SWG\License( | |
* name="Private License", | |
* url="URL to the license" | |
* ) | |
* ), | |
* @SWG\ExternalDocumentation( | |
* description="Find out more about this in our FAQ", | |
* url="http://www.google.de" | |
* ) | |
* ) | |
*/ | |
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