| 1 | <?php |
||
| 15 | class UserController extends Controller |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @Rest\Get("/api/users", methods={"GET"}) |
||
| 19 | * @Rest\View |
||
| 20 | * @SWG\Response( |
||
| 21 | * response=200, |
||
| 22 | * description="Returns a list of users", |
||
| 23 | * @SWG\Schema( |
||
| 24 | * type="array", |
||
| 25 | * @Model(type=App\Entity\User::class) |
||
| 26 | * ) |
||
| 27 | * ) |
||
| 28 | * @SWG\Tag(name="User Service") |
||
| 29 | */ |
||
| 30 | 2 | public function index() |
|
| 31 | { |
||
| 32 | 2 | return $this->getDoctrine()->getRepository(User::class)->findAll(); |
|
| 33 | } |
||
| 34 | |||
| 35 | } |
||
| 36 |