Skip to content

"shortName" setting is expected to be null or an array, string given in  #5117

Description

@herman-aka-wouter

API Platform version(s) affected: 3.0.0

Description
Error when setting the shortName on a ApiResource using yaml
"shortName" setting is expected to be null or an array, string given

How to reproduce

Have a resource with the shortName (or description) manually set.

Resource:

Toppy\Bundle\PurchaseBundle\Entity\PurchaseOrder\Item:
    shortName: 'PurchaseOrderItem'
    operations:
        ApiPlatform\Metadata\Get: ~

Possible Solution

The YamlPropertyExtractor.php:66 expects everything to be an array, thats not true as far as I can see.

Additional Context

Symfony 6.2
PHP 8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions