108 lines
2.3 KiB
PHP
Raw Normal View History

2016-07-12 00:33:55 +02:00
<?php
/*
2016-12-29 12:09:26 +01:00
* This file is part of the NelmioApiDocBundle package.
2016-07-12 00:33:55 +02:00
*
2016-12-29 12:09:26 +01:00
* (c) Nelmio
2016-07-12 00:33:55 +02:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2016-12-29 12:09:26 +01:00
namespace Nelmio\ApiDocBundle\Tests\Functional\Controller;
2016-07-12 00:33:55 +02:00
2016-11-30 16:21:03 +01:00
use FOS\RestBundle\Controller\Annotations\QueryParam;
use FOS\RestBundle\Controller\Annotations\RequestParam;
2017-01-14 17:36:56 +01:00
use Nelmio\ApiDocBundle\Annotation\Model;
2017-03-16 19:35:04 +01:00
use Nelmio\ApiDocBundle\Annotation\Operation;
2017-01-14 17:36:56 +01:00
use Nelmio\ApiDocBundle\Tests\Functional\Entity\User;
2016-07-12 00:33:55 +02:00
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Swagger\Annotations as SWG;
2016-07-12 00:33:55 +02:00
/**
* @Route("/api")
*/
2016-07-12 00:33:55 +02:00
class ApiController
{
/**
* @Route("/swagger", methods={"GET"})
* @Route("/swagger2", methods={"GET"})
2017-03-16 19:35:04 +01:00
* @Operation(
* @SWG\Response(response="201", description="An example resource")
* )
*/
public function swaggerAction()
{
}
/**
* @Route("/swagger/implicit", methods={"GET", "POST"})
2017-01-14 17:36:56 +01:00
* @SWG\Response(
* response="201",
* description="Operation automatically detected",
2017-01-23 19:46:38 +01:00
* @Model(type=User::class)
2017-01-14 17:36:56 +01:00
* )
* @SWG\Parameter(
* name="foo",
2017-01-14 17:36:56 +01:00
* in="body",
* description="This is a parameter",
* @SWG\Schema(
* type="array",
2017-01-23 19:46:38 +01:00
* @Model(type=User::class)
2017-01-14 17:36:56 +01:00
* )
* )
2017-03-17 19:45:46 +01:00
* @SWG\Tag(name="implicit")
*/
public function implicitSwaggerAction()
{
}
2016-07-12 00:33:55 +02:00
/**
* @Route("/test/{user}", methods={"GET"}, schemes={"https"}, requirements={"user"="/foo/"})
*/
public function userAction()
{
}
2016-07-13 23:05:14 +02:00
2016-11-30 16:21:03 +01:00
/**
2016-11-30 16:52:13 +01:00
* @Route("/fosrest.{_format}", methods={"POST"})
2016-11-30 16:21:03 +01:00
* @QueryParam(name="foo")
* @RequestParam(name="bar")
*/
public function fosrestAction()
{
}
2016-07-13 23:05:14 +02:00
/**
* This action is deprecated.
*
* Please do not use this action.
*
* @Route("/deprecated", methods={"GET"})
2016-07-14 23:52:01 +02:00
*
2016-07-13 23:05:14 +02:00
* @deprecated
*/
public function deprecatedAction()
{
}
/**
* This action is not documented. It is excluded by the config.
*
* @Route("/admin", methods={"GET"})
*/
public function adminAction()
{
}
2017-03-16 19:35:04 +01:00
/**
* @SWG\Get(
* path="/filtered",
* @SWG\Response(response="201", description="")
* )
*/
public function filteredAction()
{
}
2016-07-12 00:33:55 +02:00
}