dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link

api:doc command not working #1678

Open zorn-v opened 5 years ago

zorn-v commented 5 years ago
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.8.35
Package version 2.3.0
PHP version 7.3.8

Actual Behaviour

With followed docblock

    /**
     * Login user
     *
     * Login user with a `username` and `password`
     *
     * @Post("/auth/login")
     */
    public function login(Request $request)

there is exception in api:doc command


   InvalidArgumentException  : Expected a string. Got: boolean

  at vendor/webmozart/assert/src/Assert.php:1696
    1692|      * @param string $message
    1693|      */
    1694|     protected static function reportInvalidArgument($message)
    1695|     {
  > 1696|         throw new InvalidArgumentException($message);
    1697|     }
    1698|
    1699|     private function __construct()
    1700|     {

  Exception trace:

  1   Webmozart\Assert\Assert::reportInvalidArgument("Expected a string. Got: boolean")
      vendor/webmozart/assert/src/Assert.php:206

  2   Webmozart\Assert\Assert::string("")
      vendor/webmozart/assert/src/Assert.php:219

  3   Webmozart\Assert\Assert::stringNotEmpty()
      vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php:84

  4   phpDocumentor\Reflection\DocBlockFactory::create()
      vendor/dingo/blueprint/src/RestResource.php:144

  5   Dingo\Blueprint\RestResource::getDescription()
      vendor/dingo/blueprint/src/Blueprint.php:148
...