Skip to content

Better error handling if no PHPDoc is present #38

@LordSimal

Description

@LordSimal

Sometimes I forget to add the PHPDoc for the "marked" controller action like so

    #[OpenApi\Operation]
    #[OpenApi\Parameters(UTPHeaderParameters::class)]
    #[OpenApi\Response(factory: CustomerResetPasswordValidResponse::class, statusCode: 200)]
    #[OpenApi\SecurityRequirement(ApiTokenSecurityScheme::class)]
    public function passwordReset(
        Request $request,
        PianoClient $pianoClient
    ): JsonResponse {
        // something
    }

Executing the command results in the error

In OperationsBuilder.php line 79:
                                                      
  Call to a member function getDescription() on null  

which doesn't make it blatantly obvious where the PHPDoc is missing.

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