diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3f69eaac2..000000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -dist: trusty - -language: php - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -matrix: - include: - - php: 5.4 - env: SYMFONY_VERSION=2.3.* - - php: 5.5 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 5.6 - env: SYMFONY_VERSION=2.7.* COVERAGE=true - - php: 5.6 - env: SYMFONY_VERSION=2.8.* - - php: 5.6 - env: SYMFONY_VERSION=3.0.* - - php: 7.0 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: hhvm - env: SYMFONY_DEPRECATIONS_HELPER=weak - fast_finish: true - -before_install: - - if [ "$COVERAGE" != "true" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi - - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; - -before_script: - - composer self-update - - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [ "$SYMFONY_VERSION" != "3.0.*" ] && [ "$SYMFONY_VERSION" != "2.8.*" ] && [ "$SYMFONY_VERSION" != "2.7.*" ]; then sed -i "/dunglas\/api-bundle/d;/symfony\/serializer/d" composer.json; fi; - - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; - - composer update $COMPOSER_FLAGS - -script: - - if [ "$COVERAGE" == "true" ]; then phpunit --coverage-text; else phpunit; fi diff --git a/DependencyInjection/LoadExtractorParsersPass.php b/DependencyInjection/LoadExtractorParsersPass.php index f514c92cf..249fb97f0 100644 --- a/DependencyInjection/LoadExtractorParsersPass.php +++ b/DependencyInjection/LoadExtractorParsersPass.php @@ -32,10 +32,5 @@ public function process(ContainerBuilder $container): void if ($container->hasDefinition('jms_serializer.serializer')) { $loader->load('services.jms.xml'); } - - // DunglasJsonLdApiBundle may or may not be installed, if it is, load that config as well - if ($container->hasDefinition('api.resource_collection')) { - $loader->load('services.dunglas_api.xml'); - } } } diff --git a/Extractor/Handler/FosRestHandler.php b/Extractor/Handler/FosRestHandler.php deleted file mode 100644 index b7b36a2f2..000000000 --- a/Extractor/Handler/FosRestHandler.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Nelmio\ApiDocBundle\Extractor\Handler; - -use FOS\RestBundle\Controller\Annotations\QueryParam; -use FOS\RestBundle\Controller\Annotations\RequestParam; -use Nelmio\ApiDocBundle\Annotation\ApiDoc; -use Nelmio\ApiDocBundle\DataTypes; -use Nelmio\ApiDocBundle\Extractor\HandlerInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Regex; - -class FosRestHandler implements HandlerInterface -{ - public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method): void - { - foreach ($annotations as $annot) { - if ($annot instanceof RequestParam) { - $requirements = $this->handleRequirements($annot->requirements); - $data = [ - 'required' => $annot->strict && false === $annot->nullable && null === $annot->default, - 'dataType' => $requirements . ((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''), - 'actualType' => $this->inferType($requirements), - 'subType' => null, - 'description' => $annot->description, - 'readonly' => false, - ]; - if (false === $annot->strict) { - $data['default'] = $annot->default; - } - $annotation->addParameter($annot->name, $data); - } elseif ($annot instanceof QueryParam) { - if ($annot->strict && false === $annot->nullable && null === $annot->default) { - $annotation->addRequirement($annot->name, [ - 'requirement' => $this->handleRequirements($annot->requirements) . ((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''), - 'dataType' => '', - 'description' => $annot->description, - ]); - } elseif (null !== $annot->default) { - $annotation->addFilter($annot->name, [ - 'requirement' => $this->handleRequirements($annot->requirements) . ((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''), - 'description' => $annot->description, - 'default' => $annot->default, - ]); - } elseif (null !== $annot->requirements) { - $annotation->addFilter($annot->name, [ - 'requirement' => $this->handleRequirements($annot->requirements) . ((property_exists($annot, 'map') ? $annot->map : $annot->array) ? '[]' : ''), - 'description' => $annot->description, - ]); - } else { - $annotation->addFilter($annot->name, [ - 'description' => $annot->description, - ]); - } - } - } - } - - /** - * Handle FOSRestBundle requirements in order to return a string. - * - * @return string - */ - private function handleRequirements($requirements) - { - if (is_object($requirements) && $requirements instanceof Constraint) { - if ($requirements instanceof Regex) { - return $requirements->getHtmlPattern(); - } - $class = $requirements::class; - - return substr($class, strrpos($class, '\\') + 1); - } - - if (is_array($requirements) && isset($requirements['rule'])) { - return (string) $requirements['rule']; - } - - if (is_array($requirements) && array_key_exists(0, $requirements)) { - $output = []; - - foreach ($requirements as $req) { - if (is_object($req) && $req instanceof Constraint) { - if ($req instanceof Regex) { - $output[] = $req->getHtmlPattern(); - } else { - $class = $req::class; - $output[] = substr($class, strrpos($class, '\\') + 1); - } - } - - if (is_array($req)) { - if (array_key_exists('_format', $req)) { - $output[] = 'Format: ' . $req['_format']; - } elseif (isset($req['rule'])) { - $output[] = $req['rule']; - } - } - } - - return implode(', ', $output); - } - - return (string) $requirements; - } - - public function inferType($requirement) - { - if (DataTypes::isPrimitive($requirement)) { - return $requirement; - } - - return DataTypes::STRING; - } -} diff --git a/Extractor/Handler/JmsSecurityExtraHandler.php b/Extractor/Handler/JmsSecurityExtraHandler.php deleted file mode 100644 index 1905fdc32..000000000 --- a/Extractor/Handler/JmsSecurityExtraHandler.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Nelmio\ApiDocBundle\Extractor\Handler; - -use JMS\SecurityExtraBundle\Annotation\PreAuthorize; -use JMS\SecurityExtraBundle\Annotation\Secure; -use Nelmio\ApiDocBundle\Annotation\ApiDoc; -use Nelmio\ApiDocBundle\Extractor\HandlerInterface; -use Symfony\Component\Routing\Route; - -class JmsSecurityExtraHandler implements HandlerInterface -{ - public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method): void - { - foreach ($annotations as $annot) { - if ($annot instanceof PreAuthorize) { - $annotation->setAuthentication(true); - } elseif ($annot instanceof Secure) { - $annotation->setAuthentication(true); - $annotation->setAuthenticationRoles(is_array($annot->roles) ? $annot->roles : explode(',', $annot->roles)); - } - } - } -} diff --git a/README.md b/README.md index a9da1b193..404ea576c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ NelmioApiDocBundle ================== -[![Build -Status](https://secure.travis-ci.org/nelmio/NelmioApiDocBundle.png?branch=master)](http://travis-ci.org/nelmio/NelmioApiDocBundle) -[![Total Downloads](https://poser.pugx.org/nelmio/api-doc-bundle/downloads)](https://packagist.org/packages/nelmio/api-doc-bundle) -[![Latest Stable -Version](https://poser.pugx.org/nelmio/api-doc-bundle/v/stable)](https://packagist.org/packages/nelmio/api-doc-bundle) - The **NelmioApiDocBundle** bundle allows you to generate a decent documentation for your APIs. diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 87ec9259b..e79d223c6 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -9,8 +9,6 @@ Nelmio\ApiDocBundle\Twig\Extension\MarkdownExtension Nelmio\ApiDocBundle\Util\DocCommentExtractor - Nelmio\ApiDocBundle\Extractor\Handler\FosRestHandler - Nelmio\ApiDocBundle\Extractor\Handler\JmsSecurityExtraHandler Nelmio\ApiDocBundle\Extractor\Handler\PhpDocHandler Nelmio\ApiDocBundle\Parser\CollectionParser @@ -43,14 +41,6 @@ - - - - - - - - diff --git a/Resources/doc/dunglasapibundle.rst b/Resources/doc/dunglasapibundle.rst deleted file mode 100644 index b2531b2fb..000000000 --- a/Resources/doc/dunglasapibundle.rst +++ /dev/null @@ -1,23 +0,0 @@ -DunglasApiBundle Support -======================== - -This bundle recognizes and documents resources exposed with -`DunglasApiBundle`_. - -Install NelmioApiDocBundle and the documentation will be automatically -available. To enable the sandbox, use the following configuration: - -.. code-block:: yaml - - # app/config/config.yml - nelmio_api_doc: - sandbox: - accept_type: "application/json" - body_format: - formats: [ "json" ] - default_format: "json" - request_format: - formats: - json: "application/json" - -.. _`DunglasApiBundle`: https://github.com/dunglas/DunglasApiBundle diff --git a/Resources/doc/index.rst b/Resources/doc/index.rst index ac4c79393..e53fc2805 100644 --- a/Resources/doc/index.rst +++ b/Resources/doc/index.rst @@ -94,7 +94,6 @@ setup your API documentation: multiple-api-doc other-bundle-annotations swagger-support - dunglasapibundle sandbox commands configuration-in-depth diff --git a/Resources/doc/other-bundle-annotations.rst b/Resources/doc/other-bundle-annotations.rst index dd1fbfc62..61cd33883 100644 --- a/Resources/doc/other-bundle-annotations.rst +++ b/Resources/doc/other-bundle-annotations.rst @@ -1,14 +1,6 @@ Other Bundle Annotations ======================== -This bundle will get information from the following other annotations: - -* ``@FOS\RestBundle\Controller\Annotations\RequestParam`` - use as ``parameters`` -* ``@FOS\RestBundle\Controller\Annotations\QueryParam`` - use as ``requirements`` - (when strict parameter is true), ``filters`` (when strict is false) -* ``@JMS\SecurityExtraBundle\Annotation\Secure`` - set ``authentication`` to true, - ``authenticationRoles`` to the given roles - PHPDoc ------ diff --git a/Tests/Extractor/AnnotationsProvider/DunglasApiProviderTest.php b/Tests/Extractor/AnnotationsProvider/DunglasApiProviderTest.php deleted file mode 100644 index aef902782..000000000 --- a/Tests/Extractor/AnnotationsProvider/DunglasApiProviderTest.php +++ /dev/null @@ -1,44 +0,0 @@ - -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ - -namespace Nelmio\ApiDocBundle\Tests\Extractor\AnnotationsProvider; - -use Nelmio\ApiDocBundle\Tests\WebTestCase; - -/** - * @author Kévin Dunglas - */ -class DunglasApiProviderTest extends WebTestCase -{ - protected function setUp(): void - { - if (!class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $this->markTestSkipped( - 'DunglasApiBundle is not available.' - ); - } - } - - public function testGetAnnotations(): void - { - $container = $this->getContainer(); - $provider = $container->get('nelmio_api_doc.annotations_provider.dunglas_api_annotation_provider'); - - $annotations = $provider->getAnnotations(); - $this->assertCount(5, $annotations); - - foreach ($annotations as $annotation) { - $this->assertInstanceOf('Nelmio\ApiDocBundle\Annotation\ApiDoc', $annotation); - $this->assertInstanceOf('Symfony\Component\Routing\Route', $annotation->getRoute()); - $this->assertTrue('' != $annotation->getDescription()); - } - } -} diff --git a/Tests/Extractor/ApiDocExtractorTest.php b/Tests/Extractor/ApiDocExtractorTest.php index 25bbe1dda..a8de15b3f 100644 --- a/Tests/Extractor/ApiDocExtractorTest.php +++ b/Tests/Extractor/ApiDocExtractorTest.php @@ -17,21 +17,10 @@ class ApiDocExtractorTest extends WebTestCase { - public const NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE = 5; - - private static $ROUTES_QUANTITY_DEFAULT = 36; // Routes in the default view + private static $ROUTES_QUANTITY_DEFAULT = 28; // Routes in the default view private static $ROUTES_QUANTITY_PREMIUM = 5; // Routes in the premium view private static $ROUTES_QUANTITY_TEST = 2; // Routes in the test view - public static function setUpBeforeClass(): void - { - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - self::$ROUTES_QUANTITY_DEFAULT += self::NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE; - self::$ROUTES_QUANTITY_PREMIUM += self::NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE; - self::$ROUTES_QUANTITY_TEST += self::NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE; - } - } - public function testAll(): void { $container = $this->getContainer(); @@ -40,11 +29,6 @@ public function testAll(): void $data = $extractor->all(); restore_error_handler(); - $httpsKey = 21; - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $httpsKey += self::NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE; - } - $this->assertTrue(is_array($data)); $this->assertCount(self::$ROUTES_QUANTITY_DEFAULT, $data); @@ -61,39 +45,6 @@ public function testAll(): void $this->assertInstanceOf('Symfony\Component\Routing\Route', $d['annotation']->getRoute()); $this->assertNotNull($d['resource']); } - - // $a1 = $data[7]['annotation']; - // $array1 = $a1->toArray(); - // $this->assertTrue($a1->isResource()); - // $this->assertEquals('index action', $a1->getDescription()); - // $this->assertTrue(is_array($array1['filters'])); - // $this->assertNull($a1->getInput()); - // - // $a2 = $data[8]['annotation']; - // $array2 = $a2->toArray(); - // $this->assertFalse($a2->isResource()); - // $this->assertEquals('create test', $a2->getDescription()); - // $this->assertFalse(isset($array2['filters'])); - // $this->assertEquals('Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType', $a2->getInput()); - // - // $a2 = $data[9]['annotation']; - // $array2 = $a2->toArray(); - // $this->assertFalse($a2->isResource()); - // $this->assertEquals('create test', $a2->getDescription()); - // $this->assertFalse(isset($array2['filters'])); - // $this->assertEquals('Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType', $a2->getInput()); - // - // $a3 = $data[$httpsKey]['annotation']; - // $this->assertTrue($a3->getHttps()); - // - // $a4 = $data[11]['annotation']; - // $this->assertTrue($a4->isResource()); - // $this->assertEquals('TestResource', $a4->getResource()); - // - // $a5 = $data[$httpsKey - 1]['annotation']; - // $a5requirements = $a5->getRequirements(); - // $this->assertEquals('api.test.dev', $a5->getHost()); - // $this->assertEquals('test.dev|test.com', $a5requirements['domain']['requirement']); } public function testRouteVersionChecking(): void @@ -298,12 +249,9 @@ public function testPatchRequestDoesNeverRequireParameters(): void $this->assertFalse($parameters['required_field']['required']); } - public static function dataProviderForViews() + public static function dataProviderForViews(): array { $offset = 0; - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $offset = self::NB_ROUTES_ADDED_BY_DUNGLAS_API_BUNDLE; - } return [ ['default', self::$ROUTES_QUANTITY_DEFAULT + $offset], diff --git a/Tests/Extractor/Handler/FosRestHandlerTest.php b/Tests/Extractor/Handler/FosRestHandlerTest.php deleted file mode 100644 index 8f534460e..000000000 --- a/Tests/Extractor/Handler/FosRestHandlerTest.php +++ /dev/null @@ -1,205 +0,0 @@ - -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ - -namespace Nelmio\ApiDocBundle\Tests\Extractor; - -use Nelmio\ApiDocBundle\Tests\WebTestCase; - -class FosRestHandlerTest extends WebTestCase -{ - public function testGetWithQueryParamStrict(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamStrictAction', 'test_route_15'); - - $this->assertNotNull($annotation); - - $requirements = $annotation->getRequirements(); - $this->assertCount(1, $requirements); - $this->assertArrayHasKey('page', $requirements); - - $requirement = $requirements['page']; - - $this->assertArrayHasKey('requirement', $requirement); - $this->assertEquals($requirement['requirement'], '\d+'); - - $this->assertArrayHasKey('description', $requirement); - $this->assertEquals($requirement['description'], 'Page of the overview.'); - - $this->assertArrayHasKey('dataType', $requirement); - - $this->assertArrayNotHasKey('default', $requirement); - } - - public function testGetWithQueryParam(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamAction', 'test_route_8'); - - $this->assertNotNull($annotation); - - $filters = $annotation->getFilters(); - $this->assertCount(1, $filters); - $this->assertArrayHasKey('page', $filters); - - $filter = $filters['page']; - - $this->assertArrayHasKey('requirement', $filter); - $this->assertEquals($filter['requirement'], '\d+'); - - $this->assertArrayHasKey('description', $filter); - $this->assertEquals($filter['description'], 'Page of the overview.'); - - $this->assertArrayHasKey('default', $filter); - $this->assertEquals($filter['default'], '1'); - } - - public function testGetWithQueryParamNoDefault(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamNoDefaultAction', 'test_route_16'); - - $this->assertNotNull($annotation); - - $filters = $annotation->getFilters(); - $this->assertCount(1, $filters); - $this->assertArrayHasKey('page', $filters); - - $filter = $filters['page']; - - $this->assertArrayHasKey('requirement', $filter); - $this->assertEquals($filter['requirement'], '\d+'); - - $this->assertArrayHasKey('description', $filter); - $this->assertEquals($filter['description'], 'Page of the overview.'); - - $this->assertArrayNotHasKey('default', $filter); - } - - public function testGetWithConstraintAsRequirements(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithConstraintAsRequirements', 'test_route_21'); - - $this->assertNotNull($annotation); - - $filters = $annotation->getFilters(); - $this->assertCount(1, $filters); - $this->assertArrayHasKey('mail', $filters); - - $filter = $filters['mail']; - - $this->assertArrayHasKey('requirement', $filter); - $this->assertEquals($filter['requirement'], 'Email'); - } - - public function testGetWithRequestParam(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithRequestParamAction', 'test_route_11'); - - $this->assertNotNull($annotation); - - $parameters = $annotation->getParameters(); - $this->assertCount(1, $parameters); - $this->assertArrayHasKey('param1', $parameters); - - $parameter = $parameters['param1']; - - $this->assertArrayHasKey('dataType', $parameter); - $this->assertEquals($parameter['dataType'], 'string'); - - $this->assertArrayHasKey('description', $parameter); - $this->assertEquals($parameter['description'], 'Param1 description.'); - - $this->assertArrayHasKey('required', $parameter); - $this->assertEquals($parameter['required'], true); - - $this->assertArrayNotHasKey('default', $parameter); - } - - public function testGetWithRequestParamNullable(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithNullableRequestParamAction', 'test_route_22'); - - $this->assertNotNull($annotation); - - $parameters = $annotation->getParameters(); - $this->assertCount(1, $parameters); - $this->assertArrayHasKey('param1', $parameters); - - $parameter = $parameters['param1']; - - $this->assertArrayHasKey('dataType', $parameter); - $this->assertEquals($parameter['dataType'], 'string'); - - $this->assertArrayHasKey('description', $parameter); - $this->assertEquals($parameter['description'], 'Param1 description.'); - - $this->assertArrayHasKey('required', $parameter); - $this->assertEquals($parameter['required'], false); - - $this->assertArrayNotHasKey('default', $parameter); - } - - public function testWithRequestParamArrayRequirements(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::routeWithQueryParamArrayRequirementsAction', 'test_route_29'); - - $this->assertNotNull($annotation); - $filters = $annotation->getFilters(); - - $this->assertArrayHasKey('param1', $filters); - $this->assertArrayHasKey('requirement', $filters['param1']); - $this->assertEquals('regexp', $filters['param1']['requirement']); - } - - public function testWithRequestParamPlainArrayRequirements(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::routeWithQueryParamPlainArrayRequirementsAction', 'test_route_30'); - - $this->assertNotNull($annotation); - $filters = $annotation->getFilters(); - - $this->assertArrayHasKey('param1', $filters); - $this->assertArrayHasKey('requirement', $filters['param1']); - $this->assertEquals('NotNull, NotBlank', $filters['param1']['requirement']); - } - - public function testWithRequirementParamNotSet(): void - { - $container = $this->getContainer(); - $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor'); - $annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithRequirementParamNotSet', 'test_route_31'); - - $this->assertNotNull($annotation); - - $filters = $annotation->getFilters(); - $this->assertCount(1, $filters); - $this->assertArrayHasKey('param1', $filters); - $filter = $filters['param1']; - - $this->assertArrayNotHasKey('requirement', $filter); - $this->assertArrayHasKey('description', $filter); - $this->assertEquals($filter['description'], 'Param1 description.'); - } -} diff --git a/Tests/Fixtures/Controller/TestController.php b/Tests/Fixtures/Controller/TestController.php index e757648a0..ab94a74f7 100644 --- a/Tests/Fixtures/Controller/TestController.php +++ b/Tests/Fixtures/Controller/TestController.php @@ -11,12 +11,9 @@ namespace Nelmio\ApiDocBundle\Tests\Fixtures\Controller; -use FOS\RestBundle\Controller\Annotations\QueryParam; -use FOS\RestBundle\Controller\Annotations\RequestParam; use Nelmio\ApiDocBundle\Annotation\ApiDoc; use Nelmio\ApiDocBundle\Tests\Fixtures\DependencyTypePath; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Validator\Constraints as Assert; class TestController { @@ -128,42 +125,6 @@ public function anotherPostAction(): void { } - /** - * @ApiDoc() - * - * @QueryParam(strict=true, name="page", requirements="\d+", description="Page of the overview.") - */ - public function zActionWithQueryParamStrictAction(): void - { - } - - /** - * @ApiDoc() - * - * @QueryParam(name="page", requirements="\d+", default="1", description="Page of the overview.") - */ - public function zActionWithQueryParamAction(): void - { - } - - /** - * @ApiDoc() - * - * @QueryParam(name="page", requirements="\d+", description="Page of the overview.") - */ - public function zActionWithQueryParamNoDefaultAction(): void - { - } - - /** - * @ApiDoc() - * - * @QueryParam(name="mail", requirements=@Assert\Email, description="Email of someone.") - */ - public function zActionWithConstraintAsRequirements(): void - { - } - /** * @ApiDoc( * description="Testing JMS", @@ -184,24 +145,6 @@ public function jmsReturnTestAction(): void { } - /** - * @ApiDoc() - * - * @RequestParam(name="param1", requirements="string", description="Param1 description.") - */ - public function zActionWithRequestParamAction(): void - { - } - - /** - * @ApiDoc() - * - * @RequestParam(name="param1", requirements="string", description="Param1 description.", nullable=true) - */ - public function zActionWithNullableRequestParamAction(): void - { - } - /** * @ApiDoc() */ @@ -400,31 +343,4 @@ public function defaultJmsAnnotations(): void public function routeWithHostAction(): void { } - - /** - * @ApiDoc() - * - * @QueryParam(name="param1", requirements={"rule": "regexp", "error_message": "warning"}, description="Param1 description.") - */ - public function routeWithQueryParamArrayRequirementsAction(): void - { - } - - /** - * @ApiDoc() - * - * @QueryParam(name="param1", requirements={@Assert\NotNull(), @Assert\NotBlank()}, description="Param1 description.") - */ - public function routeWithQueryParamPlainArrayRequirementsAction(): void - { - } - - /** - * @ApiDoc() - * - * @QueryParam(name="param1", description="Param1 description.") - */ - public function zActionWithRequirementParamNotSet(): void - { - } } diff --git a/Tests/Fixtures/Model/Popo.php b/Tests/Fixtures/Model/Popo.php index 28830ca38..a47590e67 100644 --- a/Tests/Fixtures/Model/Popo.php +++ b/Tests/Fixtures/Model/Popo.php @@ -11,9 +11,6 @@ namespace Nelmio\ApiDocBundle\Tests\Fixtures\Model; -/** - * @author Kévin Dunglas - */ class Popo { /** diff --git a/Tests/Fixtures/app/AppKernel.php b/Tests/Fixtures/app/AppKernel.php index a763dff02..ddcfa45c6 100644 --- a/Tests/Fixtures/app/AppKernel.php +++ b/Tests/Fixtures/app/AppKernel.php @@ -29,11 +29,6 @@ public function registerBundles(): iterable new \Nelmio\ApiDocBundle\Tests\Fixtures\NelmioApiDocTestBundle(), ]; - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $bundles[] = new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(); - $bundles[] = new \Dunglas\ApiBundle\DunglasApiBundle(); - } - return $bundles; } @@ -56,10 +51,6 @@ public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(__DIR__ . '/config/' . $this->environment . '.yml'); - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $loader->load(__DIR__ . '/config/dunglas_api.yml'); - } - // If symfony/framework-bundle > 3.0 if (!class_exists('Symfony\Bundle\FrameworkBundle\Command\RouterApacheDumperCommand')) { $loader->load(__DIR__ . '/config/twig_assets.yml'); diff --git a/Tests/Fixtures/app/config/dunglas_api.yml b/Tests/Fixtures/app/config/dunglas_api.yml deleted file mode 100644 index d89a92753..000000000 --- a/Tests/Fixtures/app/config/dunglas_api.yml +++ /dev/null @@ -1,22 +0,0 @@ -doctrine: - dbal: - driver: "pdo_sqlite" - path: "%kernel.cache_dir%/db.sqlite" - charset: "UTF8" - - orm: - auto_generate_proxy_classes: "%kernel.debug%" - auto_mapping: true - -framework: - router: { resource: "%kernel.project_dir%/config/dunglas_api_routing.yml" } - -dunglas_api: - title: API - description: Test API - -services: - dunglas_api.popo: - parent: api.resource - arguments: [ Nelmio\ApiDocBundle\Tests\Fixtures\Model\Popo ] - tags: [ { name: api.resource } ] diff --git a/Tests/Fixtures/app/config/dunglas_api_routing.yml b/Tests/Fixtures/app/config/dunglas_api_routing.yml deleted file mode 100644 index d46992603..000000000 --- a/Tests/Fixtures/app/config/dunglas_api_routing.yml +++ /dev/null @@ -1,6 +0,0 @@ -main: - resource: "routing.yml" - -dunglas_api: - resource: "." - type: "api" diff --git a/Tests/Fixtures/app/config/routing.yml b/Tests/Fixtures/app/config/routing.yml index 4ad676600..3387f7bbe 100644 --- a/Tests/Fixtures/app/config/routing.yml +++ b/Tests/Fixtures/app/config/routing.yml @@ -32,11 +32,6 @@ test_route_7: methods: [POST] defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::anotherPostAction, _format: json } -test_route_8: - path: /z-action-with-query-param - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamAction } - test_route_9: path: /jms-input-test methods: [POST] @@ -47,11 +42,6 @@ test_route_10: methods: [GET] defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::jmsReturnTestAction } -test_route_11: - path: /z-action-with-request-param - methods: [POST] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithRequestParamAction } - test_route_12: path: /secure-route schemes: [https] @@ -89,16 +79,6 @@ test_route_14: methods: [POST] defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::postTest2Action, _format: json } -test_route_15: - path: /z-action-with-query-param-strict - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamStrictAction } - -test_route_16: - path: /z-action-with-query-param-no-default - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithQueryParamNoDefaultAction } - test_route_17: path: /z-action-with-deprecated-indicator methods: [GET] @@ -136,16 +116,6 @@ test_route_exclusive: path: /exclusive defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::exclusiveAction } -test_route_21: - path: /z-action-with-constraint-requirements - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithConstraintAsRequirementsAction } - -test_route_22: - path: /z-action-with-nullable-request-param - methods: [POST] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithNullableRequestParamAction } - test_route_list_resource: path: /api/resources.{_format} methods: [GET] @@ -239,21 +209,6 @@ test_route_28: domain: "%domain_dev%|%domain_prod%" defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::routeWithHostAction, domain: "%domain_dev%", _format: json } -test_route_29: - path: /z-query-param-array-requirements - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::routeWithQueryParamArrayRequirementsAction } - -test_route_30: - path: /z-query-param-plain-array-requirements - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::routeWithQueryParamPlainArrayRequirementsAction } - -test_route_31: - path: /z-query-requirement-param-not-set - methods: [GET] - defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zActionWithRequirementParamNotSet } - test_route_version_checking: path: /zz-tests-route-version.{_format} methods: [GET] diff --git a/Tests/Formatter/MarkdownFormatterTest.php b/Tests/Formatter/MarkdownFormatterTest.php index 65294f6f0..29825f57c 100644 --- a/Tests/Formatter/MarkdownFormatterTest.php +++ b/Tests/Formatter/MarkdownFormatterTest.php @@ -26,13 +26,13 @@ public function testFormat(): void restore_error_handler(); $result = $container->get('nelmio_api_doc.formatter.markdown_formatter')->format($data); - $suffix = class_exists('Dunglas\ApiBundle\DunglasApiBundle') ? '' : '_1'; + $suffix = '_1'; $expected = file_get_contents(__DIR__ . '/testFormat-result' . $suffix . '.markdown'); if (LegacyFormHelper::isLegacy()) { $expected = str_replace('DependencyType', 'dependency_type', $expected); } - $this->assertEquals($expected, $result . "\n"); + $this->assertEquals($expected, $result . "\n", 'file ' . __DIR__ . '/testFormat-result' . $suffix . '.markdown'); } public function testFormatOne(): void diff --git a/Tests/Formatter/SimpleFormatterTest.php b/Tests/Formatter/SimpleFormatterTest.php index ce2da43c3..3a7d7845d 100644 --- a/Tests/Formatter/SimpleFormatterTest.php +++ b/Tests/Formatter/SimpleFormatterTest.php @@ -25,10 +25,10 @@ public function testFormat(): void restore_error_handler(); $result = $container->get('nelmio_api_doc.formatter.simple_formatter')->format($data); - $suffix = class_exists('Dunglas\ApiBundle\DunglasApiBundle') ? '' : '_1'; + $suffix = '_1'; $expected = require __DIR__ . '/testFormat-result' . $suffix . '.php'; - $this->assertEquals($expected, $result); + $this->assertEquals($expected, $result, 'file ' . __DIR__ . '/testFormat-result' . $suffix . '.php'); } public function testFormatOne(): void diff --git a/Tests/Formatter/SwaggerFormatterTest.php b/Tests/Formatter/SwaggerFormatterTest.php index d481adc11..564b81938 100644 --- a/Tests/Formatter/SwaggerFormatterTest.php +++ b/Tests/Formatter/SwaggerFormatterTest.php @@ -41,119 +41,51 @@ public function testResourceListing(): void /** @var $formatter SwaggerFormatter */ $actual = $this->formatter->format($data, null); - if (class_exists('Dunglas\ApiBundle\DunglasApiBundle')) { - $expected = [ - 'swaggerVersion' => '1.2', - 'apis' => [ - 0 => [ - 'path' => '/other-resources', - 'description' => 'Operations on another resource.', - ], - 1 => [ - 'path' => '/resources', - 'description' => 'Operations on resource.', - ], - 2 => [ - 'path' => '/tests', - 'description' => null, - ], - 3 => [ - 'path' => '/tests', - 'description' => null, - ], - 4 => [ - 'path' => '/tests2', - 'description' => null, - ], - 5 => [ - 'path' => '/TestResource', - 'description' => null, - ], - 6 => [ - 'path' => '/others', - 'description' => 'Popo', - ], - 7 => [ - 'path' => '/others', - 'description' => 'Popo', - ], - 8 => [ - 'path' => '/others', - 'description' => 'Popo', - ], - 9 => [ - 'path' => '/others', - 'description' => 'Popo', - ], - 10 => [ - 'path' => '/others', - 'description' => 'Popo', - ], + $expected = [ + 'swaggerVersion' => '1.2', + 'apiVersion' => '3.14', + 'info' => [ + 'title' => 'Nelmio Swagger', + 'description' => 'Testing Swagger integration.', + 'TermsOfServiceUrl' => 'https://github.com', + 'contact' => 'user@domain.tld', + 'license' => 'MIT', + 'licenseUrl' => 'http://opensource.org/licenses/MIT', + ], + 'authorizations' => [ + 'apiKey' => [ + 'type' => 'apiKey', + 'passAs' => 'header', + 'keyname' => 'access_token', ], - 'apiVersion' => '3.14', - 'info' => [ - 'title' => 'Nelmio Swagger', - 'description' => 'Testing Swagger integration.', - 'TermsOfServiceUrl' => 'https://github.com', - 'contact' => 'user@domain.tld', - 'license' => 'MIT', - 'licenseUrl' => 'http://opensource.org/licenses/MIT', + ], + 'apis' => [ + [ + 'path' => '/other-resources', + 'description' => 'Operations on another resource.', ], - 'authorizations' => [ - 'apiKey' => [ - 'type' => 'apiKey', - 'passAs' => 'header', - 'keyname' => 'access_token', - ], + [ + 'path' => '/resources', + 'description' => 'Operations on resource.', ], - ]; - } else { - $expected = [ - 'swaggerVersion' => '1.2', - 'apiVersion' => '3.14', - 'info' => [ - 'title' => 'Nelmio Swagger', - 'description' => 'Testing Swagger integration.', - 'TermsOfServiceUrl' => 'https://github.com', - 'contact' => 'user@domain.tld', - 'license' => 'MIT', - 'licenseUrl' => 'http://opensource.org/licenses/MIT', + [ + 'path' => '/tests', + 'description' => null, ], - 'authorizations' => [ - 'apiKey' => [ - 'type' => 'apiKey', - 'passAs' => 'header', - 'keyname' => 'access_token', - ], + [ + 'path' => '/tests', + 'description' => null, ], - 'apis' => [ - [ - 'path' => '/other-resources', - 'description' => 'Operations on another resource.', - ], - [ - 'path' => '/resources', - 'description' => 'Operations on resource.', - ], - [ - 'path' => '/tests', - 'description' => null, - ], - [ - 'path' => '/tests', - 'description' => null, - ], - [ - 'path' => '/tests2', - 'description' => null, - ], - [ - 'path' => '/TestResource', - 'description' => null, - ], + [ + 'path' => '/tests2', + 'description' => null, ], - ]; - } + [ + 'path' => '/TestResource', + 'description' => null, + ], + ], + ]; $this->assertEquals($expected, $actual); } diff --git a/Tests/Formatter/testFormat-result-no-dunglas.php b/Tests/Formatter/testFormat-result-no-dunglas.php index a29df9a6f..a06f9f029 100644 --- a/Tests/Formatter/testFormat-result-no-dunglas.php +++ b/Tests/Formatter/testFormat-result-no-dunglas.php @@ -1816,91 +1816,6 @@ ], 'deprecated' => true, ], - 12 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-nullable-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => false, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 13 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - 'default' => '1', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 14 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-no-default', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 15 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-strict', - 'requirements' => [ - 'page' => [ - 'requirement' => '\\d+', - 'dataType' => '', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 16 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => true, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], 17 => [ 'method' => 'ANY', 'uri' => '/z-return-jms-and-validator-output', diff --git a/Tests/Formatter/testFormat-result.markdown b/Tests/Formatter/testFormat-result.markdown deleted file mode 100644 index 2c16f077b..000000000 --- a/Tests/Formatter/testFormat-result.markdown +++ /dev/null @@ -1,1031 +0,0 @@ -# Popo # - -### `GET` /popos ### - -_Retrieves the collection of Popo resources._ - -#### Response #### - -foo: - - * type: string - - -### `POST` /popos ### - -_Creates a Popo resource._ - -#### Parameters #### - -foo: - - * type: string - * required: false - -#### Response #### - -foo: - - * type: string - - -### `DELETE` /popos/{id} ### - -_Deletes the Popo resource._ - -#### Requirements #### - -**id** - - - Type: string - - -### `GET` /popos/{id} ### - -_Retrieves Popo resource._ - -#### Requirements #### - -**id** - - - Type: int - -#### Response #### - -foo: - - * type: string - - -### `PUT` /popos/{id} ### - -_Replaces the Popo resource._ - -#### Requirements #### - -**id** - - - Type: string - -#### Parameters #### - -foo: - - * type: string - * required: false - -#### Response #### - -foo: - - * type: string - - - -## /api/other-resources ## - -### `GET` /api/other-resources.{_format} ### - -_List another resource._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html - -#### Response #### - -[]: - - * type: array of objects (JmsTest) - -[][foo]: - - * type: string - -[][bar]: - - * type: DateTime - -[][number]: - - * type: double - -[][arr]: - - * type: array - -[][nested]: - - * type: object (JmsNested) - -[][nested][foo]: - - * type: DateTime - -[][nested][bar]: - - * type: string - -[][nested][baz][]: - - * type: array of integers - * description: Epic description. - -With multiple lines. - -[][nested][circular]: - - * type: object (JmsNested) - -[][nested][parent]: - - * type: object (JmsTest) - -[][nested][parent][foo]: - - * type: string - -[][nested][parent][bar]: - - * type: DateTime - -[][nested][parent][number]: - - * type: double - -[][nested][parent][arr]: - - * type: array - -[][nested][parent][nested]: - - * type: object (JmsNested) - -[][nested][parent][nested_array][]: - - * type: array of objects (JmsNested) - -[][nested][since]: - - * type: string - * versions: >=0.2 - -[][nested][until]: - - * type: string - * versions: <=0.3 - -[][nested][since_and_until]: - - * type: string - * versions: >=0.4,<=0.5 - -[][nested_array][]: - - * type: array of objects (JmsNested) - - -### `PUT|PATCH` /api/other-resources/{id}.{_format} ### - -_Update a resource bu ID._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html -**id** - - - -## /api/resources ## - -### `GET` /api/resources.{_format} ### - -_List resources._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html - -#### Response #### - -tests[]: - - * type: array of objects (Test) - -tests[][a]: - - * type: string - -tests[][b]: - - * type: DateTime - - -### `POST` /api/resources.{_format} ### - -_Create a new resource._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html - -#### Parameters #### - -a: - - * type: string - * required: true - * description: Something that describes A. - -b: - - * type: float - * required: true - -c: - - * type: choice - * required: true - -d: - - * type: datetime - * required: true - -e: - - * type: date - * required: true - -g: - - * type: string - * required: true - -#### Response #### - -foo: - - * type: DateTime - -bar: - - * type: string - -baz[]: - - * type: array of integers - * description: Epic description. - -With multiple lines. - -circular: - - * type: object (JmsNested) - -circular[foo]: - - * type: DateTime - -circular[bar]: - - * type: string - -circular[baz][]: - - * type: array of integers - * description: Epic description. - -With multiple lines. - -circular[circular]: - - * type: object (JmsNested) - -circular[parent]: - - * type: object (JmsTest) - -circular[parent][foo]: - - * type: string - -circular[parent][bar]: - - * type: DateTime - -circular[parent][number]: - - * type: double - -circular[parent][arr]: - - * type: array - -circular[parent][nested]: - - * type: object (JmsNested) - -circular[parent][nested_array][]: - - * type: array of objects (JmsNested) - -circular[since]: - - * type: string - * versions: >=0.2 - -circular[until]: - - * type: string - * versions: <=0.3 - -circular[since_and_until]: - - * type: string - * versions: >=0.4,<=0.5 - -parent: - - * type: object (JmsTest) - -parent[foo]: - - * type: string - -parent[bar]: - - * type: DateTime - -parent[number]: - - * type: double - -parent[arr]: - - * type: array - -parent[nested]: - - * type: object (JmsNested) - -parent[nested_array][]: - - * type: array of objects (JmsNested) - -since: - - * type: string - * versions: >=0.2 - -until: - - * type: string - * versions: <=0.3 - -since_and_until: - - * type: string - * versions: >=0.4,<=0.5 - - -### `DELETE` /api/resources/{id}.{_format} ### - -_Delete a resource by ID._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html -**id** - - - -### `GET` /api/resources/{id}.{_format} ### - -_Retrieve a resource by ID._ - -#### Requirements #### - -**_format** - - - Requirement: json|xml|html -**id** - - - -## /tests ## - -### `GET` /tests.{_format} ### - -_index action_ - -#### Requirements #### - -**_format** - - -#### Filters #### - -a: - - * DataType: integer - -b: - - * DataType: string - * Arbitrary: ["arg1","arg2"] - - -### `GET` /tests.{_format} ### - -_index action_ - -#### Requirements #### - -**_format** - - -#### Filters #### - -a: - - * DataType: integer - -b: - - * DataType: string - * Arbitrary: ["arg1","arg2"] - - -### `POST` /tests.{_format} ### - -_create test_ - -#### Requirements #### - -**_format** - - -#### Parameters #### - -a: - - * type: string - * required: true - * description: A nice description - -b: - - * type: string - * required: false - -c: - - * type: boolean - * required: true - -d: - - * type: string - * required: true - * default value: DefaultTest - - -### `POST` /tests.{_format} ### - -_create test_ - -#### Requirements #### - -**_format** - - -#### Parameters #### - -a: - - * type: string - * required: true - * description: A nice description - -b: - - * type: string - * required: false - -c: - - * type: boolean - * required: true - -d: - - * type: string - * required: true - * default value: DefaultTest - - -## /tests2 ## - -### `POST` /tests2.{_format} ### - -_post test 2_ - -#### Requirements #### - -**_format** - - - -## TestResource ## - -### `ANY` /named-resource ### - - - -### `POST` /another-post ### - -_create another test_ - -#### Parameters #### - -dependency_type: - - * type: object (DependencyType) - * required: true - -dependency_type[a]: - - * type: string - * required: true - * description: A nice description - - -### `ANY` /any ### - -_Action without HTTP verb_ - - -### `ANY` /any/{foo} ### - -_Action without HTTP verb_ - -#### Requirements #### - -**foo** - - - -### `ANY` /authenticated ### - - - -### `POST` /jms-input-test ### - -_Testing JMS_ - -#### Parameters #### - -foo: - - * type: string - * required: false - -number: - - * type: double - * required: false - -arr: - - * type: array - * required: false - -nested: - - * type: object (JmsNested) - * required: false - -nested[bar]: - - * type: string - * required: false - * default value: baz - -nested[baz][]: - - * type: array of integers - * required: false - * description: Epic description. - -With multiple lines. - -nested[circular]: - - * type: object (JmsNested) - * required: false - -nested[parent]: - - * type: object (JmsTest) - * required: false - -nested[parent][foo]: - - * type: string - * required: false - -nested[parent][number]: - - * type: double - * required: false - -nested[parent][arr]: - - * type: array - * required: false - -nested[parent][nested]: - - * type: object (JmsNested) - * required: false - -nested[parent][nested_array][]: - - * type: array of objects (JmsNested) - * required: false - -nested[since]: - - * type: string - * required: false - -nested[until]: - - * type: string - * required: false - -nested[since_and_until]: - - * type: string - * required: false - -nested_array[]: - - * type: array of objects (JmsNested) - * required: false - - -### `GET` /jms-return-test ### - -_Testing return_ - -#### Response #### - -dependency_type: - - * type: object (DependencyType) - -dependency_type[a]: - - * type: string - * description: A nice description - - -### `ANY` /my-commented/{id}/{page}/{paramType}/{param} ### - -_This method is useful to test if the getDocComment works._ - -This method is useful to test if the getDocComment works. -And, it supports multilines until the first '@' char. - -#### Requirements #### - -**id** - - - Type: int - - Description: A nice comment -**page** - - - Type: int -**paramType** - - - Type: int - - Description: The param type -**param** - - - Type: int - - Description: The param id - - -### `ANY` /return-nested-output ### - - -#### Response #### - -foo: - - * type: string - -bar: - - * type: DateTime - -number: - - * type: double - -arr: - - * type: array - -nested: - - * type: object (JmsNested) - -nested[foo]: - - * type: DateTime - -nested[bar]: - - * type: string - -nested[baz][]: - - * type: array of integers - * description: Epic description. - -With multiple lines. - -nested[circular]: - - * type: object (JmsNested) - -nested[parent]: - - * type: object (JmsTest) - -nested[parent][foo]: - - * type: string - -nested[parent][bar]: - - * type: DateTime - -nested[parent][number]: - - * type: double - -nested[parent][arr]: - - * type: array - -nested[parent][nested]: - - * type: object (JmsNested) - -nested[parent][nested_array][]: - - * type: array of objects (JmsNested) - -nested[since]: - - * type: string - * versions: >=0.2 - -nested[until]: - - * type: string - * versions: <=0.3 - -nested[since_and_until]: - - * type: string - * versions: >=0.4,<=0.5 - -nested_array[]: - - * type: array of objects (JmsNested) - - -### `GET` /route_with_host.{_format} ### - -_Route with host placeholder_ - -#### Requirements #### - -**domain** - - - Requirement: test.dev|test.com -**_format** - - - -### `ANY` /secure-route ### - - - -### `ANY` /yet-another/{id} ### - - -#### Requirements #### - -**id** - - - Requirement: \d+ - - -### `GET` /z-action-with-deprecated-indicator ### -### This method is deprecated ### - - - - -### `POST` /z-action-with-nullable-request-param ### - - -#### Parameters #### - -param1: - - * type: string - * required: false - * description: Param1 description. - - -### `GET` /z-action-with-query-param ### - - -#### Filters #### - -page: - - * Requirement: \d+ - * Description: Page of the overview. - * Default: 1 - - -### `GET` /z-action-with-query-param-no-default ### - - -#### Filters #### - -page: - - * Requirement: \d+ - * Description: Page of the overview. - - -### `GET` /z-action-with-query-param-strict ### - - -#### Requirements #### - -**page** - - - Requirement: \d+ - - Description: Page of the overview. - - -### `POST` /z-action-with-request-param ### - - -#### Parameters #### - -param1: - - * type: string - * required: true - * description: Param1 description. - - -### `ANY` /z-return-jms-and-validator-output ### - - -#### Response #### - -bar: - - * type: DateTime - -objects[]: - - * type: array of objects (Test) - -objects[][a]: - - * type: string - -objects[][b]: - - * type: DateTime - -number: - - * type: DateTime - -related: - - * type: object (Test) - -related[a]: - - * type: string - -related[b]: - - * type: DateTime - - -### `ANY` /z-return-selected-parsers-input ### - - -#### Parameters #### - -a: - - * type: string - * required: true - * description: A nice description - -b: - - * type: string - * required: false - -c: - - * type: boolean - * required: true - -d: - - * type: string - * required: true - * default value: DefaultTest - - -### `ANY` /z-return-selected-parsers-output ### - - -#### Response #### - -bar: - - * type: DateTime - -objects[]: - - * type: array of objects (Test) - -objects[][a]: - - * type: string - -objects[][b]: - - * type: DateTime - -number: - - * type: DateTime - -related: - - * type: object (Test) - -related[a]: - - * type: string - -related[b]: - - * type: DateTime - - -### `POST` /zcached ### - - - -### `POST` /zsecured ### - - - -### `GET` /zz-tests-route-version.{_format} ### - - -#### Requirements #### - -**_format** diff --git a/Tests/Formatter/testFormat-result.php b/Tests/Formatter/testFormat-result.php deleted file mode 100644 index de5b26ba7..000000000 --- a/Tests/Formatter/testFormat-result.php +++ /dev/null @@ -1,2348 +0,0 @@ - [ - 0 => [ - 'method' => 'GET', - 'uri' => '/api/other-resources.{_format}', - 'description' => 'List another resource.', - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - ], - 'response' => [ - '' => [ - 'dataType' => 'array of objects (JmsTest)', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'actualType' => 'collection', - 'readonly' => true, - 'required' => true, - 'default' => true, - 'description' => '', - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'foo' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => 'baz', - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'bar', - ], - 'baz' => [ - 'dataType' => 'array of integers', - 'actualType' => 'collection', - 'subType' => 'integer', - 'required' => false, - 'default' => null, - 'description' => 'Epic description. - -With multiple lines.', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'baz', - ], - 'circular' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'circular', - ], - 'parent' => [ - 'dataType' => 'object (JmsTest)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'parent', - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'bar', - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'number', - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'arr', - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested', - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested_array', - ], - ], - ], - 'since' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.2', - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since', - ], - 'until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => '0.3', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'until', - ], - 'since_and_until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.4', - 'untilVersion' => '0.5', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since_and_until', - ], - ], - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - ], - ], - ], - 'resourceDescription' => 'Operations on another resource.', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - 'premium', - ], - ], - 1 => [ - 'method' => 'PUT|PATCH', - 'uri' => '/api/other-resources/{id}.{_format}', - 'description' => 'Update a resource bu ID.', - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - 'id' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - ], - '/api/resources' => [ - 0 => [ - 'method' => 'GET', - 'uri' => '/api/resources.{_format}', - 'description' => 'List resources.', - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - ], - 'response' => [ - 'tests' => [ - 'dataType' => 'array of objects (Test)', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', - 'actualType' => 'collection', - 'readonly' => true, - 'required' => true, - 'default' => true, - 'description' => '', - 'children' => [ - 'a' => [ - 'default' => 'nelmio', - 'actualType' => 'string', - 'subType' => null, - 'format' => '{length: {min: foo}}, {not blank}', - 'required' => true, - 'dataType' => 'string', - 'readonly' => null, - 'groups' => ['Default', 'Test'], - ], - 'b' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'groups' => ['Default', 'Test'], - ], - ], - ], - ], - 'statusCodes' => [ - 200 => [ - 0 => 'Returned on success.', - ], - 404 => [ - 0 => 'Returned if resource cannot be found.', - ], - ], - 'resourceDescription' => 'Operations on resource.', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'test', - 'premium', - 'default', - ], - ], - 1 => [ - 'method' => 'POST', - 'uri' => '/api/resources.{_format}', - 'description' => 'Create a new resource.', - 'parameters' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'Something that describes A.', - 'readonly' => false, - ], - 'b' => [ - 'dataType' => 'float', - 'actualType' => 'float', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'c' => [ - 'dataType' => 'choice', - 'actualType' => 'choice', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => null, - 'readonly' => false, - 'format' => '[X|Y|Z]', - ], - 'd' => [ - 'dataType' => 'datetime', - 'actualType' => 'datetime', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'e' => [ - 'dataType' => 'date', - 'actualType' => 'date', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'g' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - ], - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - ], - 'response' => [ - 'foo' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'bar' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => 'baz', - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'baz' => [ - 'dataType' => 'array of integers', - 'actualType' => 'collection', - 'subType' => 'integer', - 'required' => false, - 'default' => null, - 'description' => 'Epic description. - -With multiple lines.', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'circular' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'foo' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => 'baz', - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'bar', - ], - 'baz' => [ - 'dataType' => 'array of integers', - 'actualType' => 'collection', - 'subType' => 'integer', - 'required' => false, - 'default' => null, - 'description' => 'Epic description. - -With multiple lines.', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'baz', - ], - 'circular' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'circular', - ], - 'parent' => [ - 'dataType' => 'object (JmsTest)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'parent', - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'bar', - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'number', - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'arr', - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested', - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested_array', - ], - ], - ], - 'since' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.2', - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since', - ], - 'until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => '0.3', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'until', - ], - 'since_and_until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.4', - 'untilVersion' => '0.5', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since_and_until', - ], - ], - ], - 'parent' => [ - 'dataType' => 'object (JmsTest)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'bar', - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'number', - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'arr', - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested', - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested_array', - ], - ], - ], - 'since' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.2', - 'untilVersion' => null, - ], - 'until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => '0.3', - ], - 'since_and_until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.4', - 'untilVersion' => '0.5', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - 'premium', - ], - ], - 2 => [ - 'method' => 'DELETE', - 'uri' => '/api/resources/{id}.{_format}', - 'description' => 'Delete a resource by ID.', - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - 'id' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 3 => [ - 'method' => 'GET', - 'uri' => '/api/resources/{id}.{_format}', - 'description' => 'Retrieve a resource by ID.', - 'requirements' => [ - '_format' => [ - 'requirement' => 'json|xml|html', - 'dataType' => '', - 'description' => '', - ], - 'id' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - ], - '/tests' => [ - 0 => [ - 'method' => 'GET', - 'uri' => '/tests.{_format}', - 'description' => 'index action', - 'filters' => [ - 'a' => [ - 'dataType' => 'integer', - ], - 'b' => [ - 'dataType' => 'string', - 'arbitrary' => [ - 0 => 'arg1', - 1 => 'arg2', - ], - ], - ], - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 1 => [ - 'method' => 'GET', - 'uri' => '/tests.{_format}', - 'description' => 'index action', - 'filters' => [ - 'a' => [ - 'dataType' => 'integer', - ], - 'b' => [ - 'dataType' => 'string', - 'arbitrary' => [ - 0 => 'arg1', - 1 => 'arg2', - ], - ], - ], - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 2 => [ - 'method' => 'POST', - 'uri' => '/tests.{_format}', - 'host' => 'api.test.dev', - 'description' => 'create test', - 'parameters' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false, - ], - 'b' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => false, - 'description' => null, - 'readonly' => false, - ], - 'c' => [ - 'dataType' => 'boolean', - 'actualType' => 'boolean', - 'subType' => null, - 'default' => false, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'd' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => 'DefaultTest', - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - ], - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - 'premium', - ], - ], - 3 => [ - 'method' => 'POST', - 'uri' => '/tests.{_format}', - 'host' => 'api.test.dev', - 'description' => 'create test', - 'parameters' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false, - ], - 'b' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => false, - 'description' => null, - 'readonly' => false, - ], - 'c' => [ - 'dataType' => 'boolean', - 'actualType' => 'boolean', - 'subType' => null, - 'default' => false, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'd' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => 'DefaultTest', - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - ], - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - 'premium', - ], - ], - ], - '/tests2' => [ - 0 => [ - 'method' => 'POST', - 'uri' => '/tests2.{_format}', - 'description' => 'post test 2', - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - 'premium', - ], - ], - ], - 'TestResource' => [ - 0 => [ - 'method' => 'ANY', - 'uri' => '/named-resource', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'views' => [ - 'default', - ], - ], - ], - 'others' => [ - 0 => [ - 'method' => 'POST', - 'uri' => '/another-post', - 'description' => 'create another test', - 'parameters' => [ - 'dependency_type' => [ - 'required' => true, - 'readonly' => false, - 'description' => '', - 'default' => null, - 'dataType' => 'object (' . - (LegacyFormHelper::isLegacy() ? 'dependency_type' : 'DependencyType') - . ')', - 'actualType' => 'model', - 'subType' => LegacyFormHelper::isLegacy() ? 'dependency_type' : 'Nelmio\ApiDocBundle\Tests\Fixtures\Form\DependencyType', - 'children' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false, - ], - ], - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'views' => [ - 'default', - 'test', - ], - ], - 1 => [ - 'method' => 'ANY', - 'uri' => '/any', - 'description' => 'Action without HTTP verb', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 2 => [ - 'method' => 'ANY', - 'uri' => '/any/{foo}', - 'description' => 'Action without HTTP verb', - 'requirements' => [ - 'foo' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 3 => [ - 'method' => 'ANY', - 'uri' => '/authenticated', - 'https' => false, - 'authentication' => true, - 'authenticationRoles' => [ - 0 => 'ROLE_USER', - 1 => 'ROLE_FOOBAR', - ], - 'deprecated' => false, - 'scope' => null, - ], - 4 => [ - 'method' => 'POST', - 'uri' => '/jms-input-test', - 'description' => 'Testing JMS', - 'parameters' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'foo' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => 'baz', - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'bar', - ], - 'baz' => [ - 'dataType' => 'array of integers', - 'actualType' => 'collection', - 'subType' => 'integer', - 'required' => false, - 'default' => null, - 'description' => 'Epic description. - -With multiple lines.', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'baz', - ], - 'circular' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'circular', - ], - 'parent' => [ - 'dataType' => 'object (JmsTest)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'parent', - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'bar', - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'number', - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'arr', - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested', - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested_array', - ], - ], - ], - 'since' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.2', - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since', - ], - 'until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => '0.3', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'until', - ], - 'since_and_until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.4', - 'untilVersion' => '0.5', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since_and_until', - ], - ], - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 5 => [ - 'method' => 'GET', - 'uri' => '/jms-return-test', - 'description' => 'Testing return', - 'response' => [ - 'dependency_type' => [ - 'required' => true, - 'readonly' => false, - 'description' => '', - 'default' => null, - 'dataType' => 'object (' . - (LegacyFormHelper::isLegacy() ? 'dependency_type' : 'DependencyType') - . ')', - 'actualType' => 'model', - 'subType' => LegacyFormHelper::isLegacy() ? 'dependency_type' : 'Nelmio\ApiDocBundle\Tests\Fixtures\Form\DependencyType', - 'children' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false, - ], - ], - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 6 => [ - 'method' => 'ANY', - 'uri' => '/my-commented/{id}/{page}/{paramType}/{param}', - 'description' => 'This method is useful to test if the getDocComment works.', - 'documentation' => 'This method is useful to test if the getDocComment works. -And, it supports multilines until the first \'@\' char.', - 'requirements' => [ - 'id' => [ - 'dataType' => 'int', - 'description' => 'A nice comment', - 'requirement' => '', - ], - 'page' => [ - 'dataType' => 'int', - 'description' => '', - 'requirement' => '', - ], - 'paramType' => [ - 'dataType' => 'int', - 'description' => 'The param type', - 'requirement' => '', - ], - 'param' => [ - 'dataType' => 'int', - 'description' => 'The param id', - 'requirement' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 7 => [ - 'method' => 'GET', - 'uri' => '/popos', - 'description' => 'Retrieves the collection of Popo resources.', - 'documentation' => 'Gets the collection.', - 'response' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'resourceDescription' => 'Popo', - 'section' => 'Popo', - ], - 8 => [ - 'method' => 'POST', - 'uri' => '/popos', - 'description' => 'Creates a Popo resource.', - 'documentation' => 'Adds an element to the collection.', - 'parameters' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'response' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'resourceDescription' => 'Popo', - 'section' => 'Popo', - ], - 9 => [ - 'method' => 'DELETE', - 'uri' => '/popos/{id}', - 'description' => 'Deletes the Popo resource.', - 'documentation' => 'Deletes an element of the collection.', - 'requirements' => [ - 'id' => [ - 'dataType' => 'string', - 'description' => '', - 'requirement' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'resourceDescription' => 'Popo', - 'section' => 'Popo', - ], - 10 => [ - 'method' => 'GET', - 'uri' => '/popos/{id}', - 'description' => 'Retrieves Popo resource.', - 'documentation' => 'Gets an element of the collection.', - 'requirements' => [ - 'id' => [ - 'dataType' => 'int', - 'description' => '', - 'requirement' => '', - ], - ], - 'response' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'resourceDescription' => 'Popo', - 'section' => 'Popo', - ], - 11 => [ - 'method' => 'PUT', - 'uri' => '/popos/{id}', - 'description' => 'Replaces the Popo resource.', - 'documentation' => 'Replaces an element of the collection.', - 'parameters' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'requirements' => [ - 'id' => [ - 'dataType' => 'string', - 'description' => '', - 'requirement' => '', - ], - ], - 'response' => [ - 'foo' => [ - 'required' => false, - 'description' => '', - 'readonly' => false, - 'dataType' => 'string', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - 'resourceDescription' => 'Popo', - 'section' => 'Popo', - ], - 12 => [ - 'method' => 'ANY', - 'uri' => '/return-nested-output', - 'response' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'foo' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => 'baz', - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'bar', - ], - 'baz' => [ - 'dataType' => 'array of integers', - 'actualType' => 'collection', - 'subType' => 'integer', - 'required' => false, - 'default' => null, - 'description' => 'Epic description. - -With multiple lines.', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'baz', - ], - 'circular' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'circular', - ], - 'parent' => [ - 'dataType' => 'object (JmsTest)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'parent', - 'children' => [ - 'foo' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'foo', - ], - 'bar' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => true, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'bar', - ], - 'number' => [ - 'dataType' => 'double', - 'actualType' => 'float', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'number', - ], - 'arr' => [ - 'dataType' => 'array', - 'actualType' => 'collection', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'arr', - ], - 'nested' => [ - 'dataType' => 'object (JmsNested)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested', - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsTest', - 'field' => 'nested_array', - ], - ], - ], - 'since' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.2', - 'untilVersion' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since', - ], - 'until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => '0.3', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'until', - ], - 'since_and_until' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => '0.4', - 'untilVersion' => '0.5', - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\JmsNested', - 'field' => 'since_and_until', - ], - ], - ], - 'nested_array' => [ - 'dataType' => 'array of objects (JmsNested)', - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 13 => [ - 'method' => 'GET', - 'uri' => '/route_with_host.{_format}', - 'host' => 'api.test.dev', - 'description' => 'Route with host placeholder', - 'requirements' => [ - 'domain' => [ - 'requirement' => 'test.dev|test.com', - 'dataType' => '', - 'description' => '', - ], - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - 'views' => [ - 0 => 'default', - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 14 => [ - 'method' => 'ANY', - 'uri' => '/secure-route', - 'https' => true, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 15 => [ - 'method' => 'ANY', - 'uri' => '/yet-another/{id}', - 'requirements' => [ - 'id' => [ - 'requirement' => '\\d+', - 'dataType' => '', - 'description' => '', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 16 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-deprecated-indicator', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => true, - 'scope' => null, - ], - 17 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-nullable-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => false, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 18 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - 'default' => '1', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 19 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-no-default', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 20 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-strict', - 'requirements' => [ - 'page' => [ - 'requirement' => '\\d+', - 'dataType' => '', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - ], - 21 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => true, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 22 => [ - 'method' => 'ANY', - 'uri' => '/z-return-jms-and-validator-output', - 'response' => [ - 'bar' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'groups' => ['Default', 'MultipleTest'], - ], - 'objects' => [ - 'default' => null, - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', - 'dataType' => 'array of objects (Test)', - 'children' => [ - 'a' => [ - 'default' => 'nelmio', - 'actualType' => 'string', - 'subType' => null, - 'format' => '{length: {min: foo}}, {not blank}', - 'required' => true, - 'dataType' => 'string', - 'readonly' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'a', - 'groups' => ['Default', 'Test'], - ], - 'b' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'b', - 'groups' => ['Default', 'Test'], - ], - ], - 'readonly' => null, - 'required' => null, - 'groups' => ['Default', 'MultipleTest'], - ], - 'number' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'related' => [ - 'dataType' => 'object (Test)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'a' => [ - 'default' => 'nelmio', - 'actualType' => 'string', - 'subType' => null, - 'format' => '{length: {min: foo}}, {not blank}', - 'required' => true, - 'dataType' => 'string', - 'readonly' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'a', - 'groups' => ['Default', 'Test'], - ], - 'b' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'b', - 'groups' => ['Default', 'Test'], - ], - ], - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 23 => [ - 'method' => 'ANY', - 'uri' => '/z-return-selected-parsers-input', - 'parameters' => [ - 'a' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false, - ], - 'b' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => null, - 'required' => false, - 'description' => null, - 'readonly' => false, - ], - 'c' => [ - 'dataType' => 'boolean', - 'actualType' => 'boolean', - 'subType' => null, - 'default' => false, - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - 'd' => [ - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'default' => 'DefaultTest', - 'required' => true, - 'description' => null, - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 24 => [ - 'method' => 'ANY', - 'uri' => '/z-return-selected-parsers-output', - 'response' => [ - 'bar' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'groups' => ['Default', 'MultipleTest'], - ], - 'objects' => [ - 'default' => null, - 'actualType' => 'collection', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', - 'dataType' => 'array of objects (Test)', - 'children' => [ - 'a' => [ - 'default' => 'nelmio', - 'actualType' => 'string', - 'subType' => null, - 'format' => '{length: {min: foo}}, {not blank}', - 'required' => true, - 'dataType' => 'string', - 'readonly' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'a', - 'groups' => ['Default', 'Test'], - ], - 'b' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'b', - 'groups' => ['Default', 'Test'], - ], - ], - 'readonly' => null, - 'required' => null, - 'groups' => ['Default', 'MultipleTest'], - ], - 'number' => [ - 'dataType' => 'DateTime', - 'actualType' => 'datetime', - 'subType' => null, - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - ], - 'related' => [ - 'dataType' => 'object (Test)', - 'actualType' => 'model', - 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', - 'required' => false, - 'default' => null, - 'description' => '', - 'readonly' => false, - 'sinceVersion' => null, - 'untilVersion' => null, - 'children' => [ - 'a' => [ - 'default' => 'nelmio', - 'actualType' => 'string', - 'subType' => null, - 'format' => '{length: {min: foo}}, {not blank}', - 'required' => true, - 'dataType' => 'string', - 'readonly' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'a', - 'groups' => ['Default', 'Test'], - ], - 'b' => [ - 'default' => null, - 'actualType' => 'datetime', - 'subType' => null, - 'dataType' => 'DateTime', - 'readonly' => null, - 'required' => null, - 'parentClass' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Model\Test', - 'field' => 'b', - 'groups' => ['Default', 'Test'], - ], - ], - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 25 => [ - 'method' => 'POST', - 'uri' => '/zcached', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 26 => [ - 'method' => 'POST', - 'uri' => '/zsecured', - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 27 => [ - 'authentication' => false, - 'method' => 'GET', - 'uri' => '/zz-tests-route-version.{_format}', - 'https' => false, - 'authenticationRoles' => [], - 'deprecated' => false, - 'scope' => null, - 'requirements' => [ - '_format' => [ - 'requirement' => '', - 'dataType' => '', - 'description' => '', - ], - ], - ], - ], -]; diff --git a/Tests/Formatter/testFormat-result_1.markdown b/Tests/Formatter/testFormat-result_1.markdown index f02386031..bbb1ad658 100644 --- a/Tests/Formatter/testFormat-result_1.markdown +++ b/Tests/Formatter/testFormat-result_1.markdown @@ -710,96 +710,6 @@ _Route with host placeholder_ -### `POST` /z-action-with-nullable-request-param ### - - -#### Parameters #### - -param1: - - * type: string - * required: false - * description: Param1 description. - - -### `GET` /z-action-with-query-param ### - - -#### Filters #### - -page: - - * Requirement: \d+ - * Description: Page of the overview. - * Default: 1 - - -### `GET` /z-action-with-query-param-no-default ### - - -#### Filters #### - -page: - - * Requirement: \d+ - * Description: Page of the overview. - - -### `GET` /z-action-with-query-param-strict ### - - -#### Requirements #### - -**page** - - - Requirement: \d+ - - Description: Page of the overview. - - -### `POST` /z-action-with-request-param ### - - -#### Parameters #### - -param1: - - * type: string - * required: true - * description: Param1 description. - - -### `GET` /z-query-param-array-requirements ### - - -#### Filters #### - -param1: - - * Requirement: regexp - * Description: Param1 description. - - -### `GET` /z-query-param-plain-array-requirements ### - - -#### Filters #### - -param1: - - * Requirement: NotNull, NotBlank - * Description: Param1 description. - - -### `GET` /z-query-requirement-param-not-set ### - - -#### Filters #### - -param1: - - * Description: Param1 description. - - ### `ANY` /z-return-jms-and-validator-output ### diff --git a/Tests/Formatter/testFormat-result_1.php b/Tests/Formatter/testFormat-result_1.php index a92292e10..a8163f4f5 100644 --- a/Tests/Formatter/testFormat-result_1.php +++ b/Tests/Formatter/testFormat-result_1.php @@ -1750,143 +1750,6 @@ 'scope' => null, ], 12 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-nullable-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => false, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 13 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - 'default' => '1', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 14 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-no-default', - 'filters' => [ - 'page' => [ - 'requirement' => '\\d+', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 15 => [ - 'method' => 'GET', - 'uri' => '/z-action-with-query-param-strict', - 'requirements' => [ - 'page' => [ - 'requirement' => '\\d+', - 'dataType' => '', - 'description' => 'Page of the overview.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 16 => [ - 'method' => 'POST', - 'uri' => '/z-action-with-request-param', - 'parameters' => [ - 'param1' => [ - 'required' => true, - 'dataType' => 'string', - 'actualType' => 'string', - 'subType' => null, - 'description' => 'Param1 description.', - 'readonly' => false, - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 17 => [ - 'method' => 'GET', - 'uri' => '/z-query-param-array-requirements', - 'filters' => [ - 'param1' => [ - 'requirement' => 'regexp', - 'description' => 'Param1 description.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 18 => [ - 'method' => 'GET', - 'uri' => '/z-query-param-plain-array-requirements', - 'filters' => [ - 'param1' => [ - 'requirement' => 'NotNull, NotBlank', - 'description' => 'Param1 description.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 19 => [ - 'method' => 'GET', - 'uri' => '/z-query-requirement-param-not-set', - 'filters' => [ - 'param1' => [ - 'description' => 'Param1 description.', - ], - ], - 'https' => false, - 'authentication' => false, - 'authenticationRoles' => [ - ], - 'deprecated' => false, - 'scope' => null, - ], - 20 => [ 'method' => 'ANY', 'uri' => '/z-return-jms-and-validator-output', 'response' => [ @@ -2006,7 +1869,7 @@ 'deprecated' => false, 'scope' => null, ], - 21 => [ + 13 => [ 'method' => 'ANY', 'uri' => '/z-return-selected-parsers-input', 'parameters' => [ @@ -2054,7 +1917,7 @@ 'deprecated' => false, 'scope' => null, ], - 22 => [ + 14 => [ 'method' => 'ANY', 'uri' => '/z-return-selected-parsers-output', 'response' => [ @@ -2174,7 +2037,7 @@ 'deprecated' => false, 'scope' => null, ], - 23 => [ + 15 => [ 'method' => 'POST', 'uri' => '/zcached', 'https' => false, @@ -2184,7 +2047,7 @@ 'deprecated' => false, 'scope' => null, ], - 24 => [ + 16 => [ 'method' => 'POST', 'uri' => '/zsecured', 'https' => false, @@ -2194,7 +2057,7 @@ 'deprecated' => false, 'scope' => null, ], - 25 => [ + 17 => [ 'method' => 'GET', 'uri' => '/zz-tests-route-version.{_format}', 'requirements' => [ diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index eb79afa3e..68b11dca7 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -13,9 +13,5 @@ function includeIfExists($file) 'php composer.phar install' . PHP_EOL); } -if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { - Doctrine\Common\Annotations\AnnotationRegistry::registerLoader([$loader, 'loadClass']); -} - // force loading the ApiDoc annotation since the composer target-dir autoloader does not run through $loader::loadClass class_exists('Nelmio\ApiDocBundle\Annotation\ApiDoc'); diff --git a/composer.json b/composer.json index 6de6f23aa..5a465c329 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,6 @@ "require-dev": { "doctrine/annotations": "^1.0", "friendsofphp/php-cs-fixer": "^3", - "friendsofsymfony/rest-bundle": "^3.7", "jms/serializer": "^3.15", "jms/serializer-bundle": "^4.1|^5.4", "phpunit/phpunit": "~9.5", @@ -45,7 +44,6 @@ "suggest": { "symfony/form": "For using form definitions as input.", "symfony/validator": "For making use of validator information in the doc.", - "friendsofsymfony/rest-bundle": "For making use of REST information in the doc.", "jms/serializer": "For making use of serializer information in the doc." }, "autoload": {