Skip to content

Commit e8bd27c

Browse files
authored
Merge pull request #486 from SBShane/custom-content-type-header
Custom Content-Type Header
2 parents 8d0bf3a + 8762610 commit e8bd27c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/GenerateDocumentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function writeMarkdown($parsedRoutes)
8585

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

0 commit comments

Comments
 (0)