core icon indicating copy to clipboard operation
core copied to clipboard

Schema.org type causes issues in the admin

Open soyuka opened this issue 10 months ago • 2 comments

#[ApiResource(
    types: [
        'https://schema.org/Store',
    ],
    operations: [
        new GetCollection(),
        new Get(),
        new Post(),
    ]
)]
#[ORM\Entity]
final class Store
{
    public function __construct(
        #[ORM\Id, ORM\Column]
        public string $id,
        #[ORM\Column, ApiProperty(types: ['https://schema.org/name'])]
        public string $title,
        #[ORM\Column, ApiProperty(types: ['https://schema.org/address'])]
        public ?string $address = null,
        #[ORM\Column, ApiProperty(types: ['https://schema.org/openingHours'])]
        public ?string $openingHours = null,
    ) {
    }
}

soyuka avatar Mar 26 '25 10:03 soyuka

First hypothesis: make the Store class non-final

kira0269 avatar Mar 26 '25 11:03 kira0269

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 25 '25 11:05 stale[bot]