Skip to content

Could be supported not only request as a parameter in controller method #29

@talismandev

Description

@talismandev

Hello!

First of all: thanks for the awesome plugin. Generate docs from tests is amazingly good.

But, I have to share some restriction I saw, when testing my controllers:

The controller testing method should receive only FormRequest or Illuminate\Http\Request as a parameter;

For example: public function get_list(TestGetRequest $request)

If I want to test method like this: public function post_with_params(Request $request, int $user_id, int $comment_id),
with additional parameters, I receive an error:

 "message" => "Call to a member function uri() on null"
      "exception" => "Symfony\Component\Debug\Exception\FatalThrowableError"
      "file" => "\vendor\ronasit\laravel-swagger\src\Services\SwaggerService.php"
      "line" => 181

Could it be fixed ? Can you help me please?

Laravel version: 6.20.27
PHP Version: 7.2.10
Plugin version: 1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions