-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
bugSomething isn't workingSomething isn't working
Description
- Laravel Swagger Version: v0.7.x-dev
- Laravel Version: 6.0.x
- PHP Version: 7.3
Description:
If there is a route with PATCH method an error will be thrown: Undefined index: patch
Fixed it in SuccessResponseGenerator.php:
$methodMappingHttpCode = [
'head' => 200,
'get' => 200,
'post' => 201,
'put' => 204,
'delete' => 204,
'patch' => 204,
];
Another issue when I'm using laravel-debugbar in src/DataObjects/Route.php
line #78 since middleware constructor only accept string, so I had to hack it like this
protected function formatMiddleware()
{
return array_map(function ($middleware) {
if (gettype($middleware) !== 'string') {
// dd($middleware);
return new Middleware('ignored');
}
return new Middleware((string)$middleware);
}, $this->route->gatherMiddleware());
}
Tried to dump the $middleware object then I got:
^ Closure($request, $next)^ {#1346
class: "Barryvdh\Debugbar\Controllers\BaseController"
this: Barryvdh\Debugbar\Controllers\OpenHandlerController {#1345 …}
}
Another issue again:
Is this package dependant to laravel-passport? Tried to disable parseSecurity
to false but it was still required. I had to install laravel-passport and configure it to make this package working
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working