diff --git a/Command/DumpCommand.php b/Command/DumpCommand.php index e49925d..07d2322 100644 --- a/Command/DumpCommand.php +++ b/Command/DumpCommand.php @@ -33,16 +33,16 @@ class DumpCommand extends ContainerAwareCommand $routeCollection = $this->getContainer()->get('router')->getRouteCollection(); if (!$input->hasOption('format') || in_array($format, array('json'))) { - $formatter = $this->getContainer()->get('nelmio.api.formatter.simple_formatter'); + $formatter = $this->getContainer()->get('nelmio_api_doc.formatter.simple_formatter'); } else { if (!in_array($format, $this->availableFormats)) { throw new \RuntimeException(sprintf('Format "%s" not supported.', $format)); } - $formatter = $this->getContainer()->get(sprintf('nelmio.api.formatter.%s_formatter', $format)); + $formatter = $this->getContainer()->get(sprintf('nelmio_api_doc.formatter.%s_formatter', $format)); } - $extractedDoc = $this->getContainer()->get('nelmio.api.extractor.api_doc_extractor')->all(); + $extractedDoc = $this->getContainer()->get('nelmio_api_doc.extractor.api_doc_extractor')->all(); $formattedDoc = $formatter->format($extractedDoc); if ('json' === $format) { diff --git a/Controller/ApiDocController.php b/Controller/ApiDocController.php index ac0e43e..b17b26a 100644 --- a/Controller/ApiDocController.php +++ b/Controller/ApiDocController.php @@ -9,8 +9,8 @@ class ApiDocController extends Controller { public function indexAction() { - $extractedDoc = $this->get('nelmio.api.extractor.api_doc_extractor')->all(); - $htmlContent = $this->get('nelmio.api.formatter.html_formatter')->format($extractedDoc); + $extractedDoc = $this->get('nelmio_api_doc.extractor.api_doc_extractor')->all(); + $htmlContent = $this->get('nelmio_api_doc.formatter.html_formatter')->format($extractedDoc); return new Response($htmlContent); } diff --git a/Resources/config/formatters.xml b/Resources/config/formatters.xml index 8774a28..d4f7ce4 100644 --- a/Resources/config/formatters.xml +++ b/Resources/config/formatters.xml @@ -4,26 +4,26 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - Nelmio\ApiDocBundle\Parser\FormTypeParser - Nelmio\ApiDocBundle\Formatter\AbstractFormatter - Nelmio\ApiDocBundle\Formatter\MarkdownFormatter - Nelmio\ApiDocBundle\Formatter\SimpleFormatter - Nelmio\ApiDocBundle\Formatter\HtmlFormatter + Nelmio\ApiDocBundle\Parser\FormTypeParser + Nelmio\ApiDocBundle\Formatter\AbstractFormatter + Nelmio\ApiDocBundle\Formatter\MarkdownFormatter + Nelmio\ApiDocBundle\Formatter\SimpleFormatter + Nelmio\ApiDocBundle\Formatter\HtmlFormatter - + - - + + - - - + + + diff --git a/Resources/config/request_listener.xml b/Resources/config/request_listener.xml index 08d6ac5..eef6b8c 100644 --- a/Resources/config/request_listener.xml +++ b/Resources/config/request_listener.xml @@ -4,13 +4,13 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - Nelmio\ApiDocBundle\EventListener\RequestListener + Nelmio\ApiDocBundle\EventListener\RequestListener - - - + + + diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 349be50..9197883 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -1,4 +1,4 @@ -nelmio_api_api_doc_index: +nelmio_api_doc_index: pattern: /api/doc defaults: { _controller: NelmioApiDocBundle:ApiDoc:index } requirements: diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 728eac5..01a4790 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - Nelmio\ApiDocBundle\Extractor\ApiDocExtractor + Nelmio\ApiDocBundle\Extractor\ApiDocExtractor - +