NelmioApiDocBundle/Controller/ApiDocController.php
William DURAND c4c7d14354 [ApiBundle] Added a controller to get a complete documentation
* Added an Extractor to get the documentation from all annotated
controllers
* Refactored some parts (command, event listener, ...)
2012-04-12 12:50:20 +02:00

18 lines
472 B
PHP

<?php
namespace Nelmio\ApiBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
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);
return new Response($htmlContent);
}
}