Skip to content

Commit

Permalink
Merge pull request #486 from SBShane/custom-content-type-header
Browse files Browse the repository at this point in the history
Custom Content-Type Header
  • Loading branch information
shalvah authored Mar 30, 2019
2 parents 8d0bf3a + 8762610 commit e8bd27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private function writeMarkdown($parsedRoutes)

$parsedRouteOutput = $parsedRoutes->map(function ($routeGroup) {
return $routeGroup->map(function ($route) {
if (count($route['cleanBodyParameters'])) {
if (count($route['cleanBodyParameters']) && ! isset($route['headers']['Content-Type'])) {
$route['headers']['Content-Type'] = 'application/json';
}
$route['output'] = (string) view('apidoc::partials.route')->with('route', $route)->render();
Expand Down

0 comments on commit e8bd27c

Please sign in to comment.