39 lines
1.1 KiB
PHP
Raw Normal View History

<?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;
2021-03-16 10:40:12 +01:00
use Symfony\Component\Validator\Constraints\DateTime;
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+$/"))
2020-11-03 10:10:31 +01:00
* @QueryParam(name="mapped", map=true)
2020-02-21 10:42:13 +01:00
* @RequestParam(name="Barraa", key="bar", requirements="\d+")
* @RequestParam(name="baz", requirements=@IsTrue)
2021-03-16 10:40:12 +01:00
* @RequestParam(name="datetime", requirements=@DateTime("Y-m-d\TH:i:s"))
* @RequestParam(name="date", requirements=@DateTime("Y-m-d"))
*/
public function fosrestAction()
{
}
}