mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-17 02:50:43 +08:00
Added json content-type header to doc request body if needed
This commit is contained in:
@@ -83,6 +83,9 @@ class GenerateDocumentation extends Command
|
||||
|
||||
$parsedRouteOutput = $parsedRoutes->map(function ($routeGroup) {
|
||||
return $routeGroup->map(function ($route) {
|
||||
if (count($route['cleanBodyParameters'])) {
|
||||
$route['headers']['Content-Type'] = 'application/json';
|
||||
}
|
||||
$route['output'] = (string) view('apidoc::partials.route')->with('route', $route)->render();
|
||||
|
||||
return $route;
|
||||
|
||||
Reference in New Issue
Block a user