Skip to content

'Type mismatch' error after update to 4.1.* #7163

Closed
@AlinaSob

Description

@AlinaSob

API Platform version(s) affected: 4.1.* (although I do not know why it hadn't appeared earlier)

Description
After upgrading my in-developent app from api-platform 3.4 to 4.1 I've got plenty of similar errors:

TypeError: ApiPlatform\OpenApi\Model\Tag::getExternalDocs(): Return value must be of type string, null returned in /path_to_app/vendor/api-platform/openapi/Model/Tag.php on line 52

How to reproduce
In my case - just upgrade and open your_domain/api

Possible Solution
The return type should clearly be ?string in api-platform/openapi/Model/Tag.php on line 52 as the property is null by default

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