mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
c4c7d14354
* Added an Extractor to get the documentation from all annotated controllers * Refactored some parts (command, event listener, ...)
18 lines
472 B
PHP
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);
|
|
}
|
|
}
|