From 2d0fc7fc6155c1bf22cfc8193ef522498a2fb3b5 Mon Sep 17 00:00:00 2001 From: Toni Van de Voorde Date: Thu, 23 Aug 2012 15:09:56 +0200 Subject: [PATCH] Fixed rendering issue when used with FOSRestBundle and configured to not accept html (e.g. only accept json & xml) --- Controller/ApiDocController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/ApiDocController.php b/Controller/ApiDocController.php index 1ac882f..8ea71aa 100644 --- a/Controller/ApiDocController.php +++ b/Controller/ApiDocController.php @@ -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')); } }