diff --git a/src/Builders/Paths/Operation/ParametersBuilder.php b/src/Builders/Paths/Operation/ParametersBuilder.php index 2333690b..cfe99f5f 100644 --- a/src/Builders/Paths/Operation/ParametersBuilder.php +++ b/src/Builders/Paths/Operation/ParametersBuilder.php @@ -41,10 +41,12 @@ protected function buildPath(RouteInformation $route): Collection $schema = SchemaHelpers::guessFromReflectionType($reflectionParameter->getType()); } - + /** @var Param $description */ - $description = collect($route->actionDocBlock->getTagsByName('param')) - ->first(static fn (Param $param) => Str::snake($param->getVariableName()) === Str::snake($parameter['name'])); + $description = $route->actionDocBlock + ? collect($route->actionDocBlock->getTagsByName('param')) + ->first(static fn(Param $param) => Str::snake($param->getVariableName()) === Str::snake($parameter['name'])) + : null; return Parameter::path()->name($parameter['name']) ->required()