laravel-openapi icon indicating copy to clipboard operation
laravel-openapi copied to clipboard

Added nullsafe operator to actionDocBlock in OperationsBuilder

Open ricklambrechts opened this issue 2 years ago • 0 comments

When there is no docblock for a controller function like:

#[OpenApi\Operation]
public function __invoke(): Response

You will get the following exception:

Call to a member function getSummary() on null {"exception":"[object] (Error(code: 0): Call to a member function getSummary() on null at /var/www/html/vendor/vyuldashev/laravel-openapi/src/Builders/Paths/OperationsBuilder.php:82)

This PR fixes that you don't need to have a docblock for your function.

ricklambrechts avatar Feb 23 '23 23:02 ricklambrechts