Fixed rendering issue when used with FOSRestBundle and configured to not

accept html (e.g. only accept json & xml)
This commit is contained in:
Toni Van de Voorde 2012-08-23 15:09:56 +02:00
parent ed39180c6b
commit 2d0fc7fc61

View File

@ -21,6 +21,6 @@ class ApiDocController extends Controller
$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);
return new Response($htmlContent, 200, array('Content-Type' => 'text/html'));
}
}