mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-03 16:19:26 +03:00
35 lines
921 B
PHP
35 lines
921 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the NelmioApiDocBundle package.
|
|
*
|
|
* (c) Nelmio
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Functional\Controller;
|
|
|
|
use FOS\RestBundle\Controller\Annotations\QueryParam;
|
|
use FOS\RestBundle\Controller\Annotations\RequestParam;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
use Symfony\Component\Validator\Constraints\IsTrue;
|
|
use Symfony\Component\Validator\Constraints\Regex;
|
|
|
|
/**
|
|
* @Route("/api", host="api.example.com")
|
|
*/
|
|
class FOSRestController
|
|
{
|
|
/**
|
|
* @Route("/fosrest.{_format}", methods={"POST"})
|
|
* @QueryParam(name="foo", requirements=@Regex("/^\d+$/"))
|
|
* @RequestParam(name="Barraa", key="bar", requirements="\d+")
|
|
* @RequestParam(name="baz", requirements=@IsTrue)
|
|
*/
|
|
public function fosrestAction()
|
|
{
|
|
}
|
|
}
|