NelmioApiDocBundle/Controller/ApiDocController.php

18 lines
475 B
PHP
Raw Normal View History

<?php
2012-04-12 18:37:42 +02:00
namespace Nelmio\ApiDocBundle\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);
}
}