Fixed API Platform deprecations

This commit is contained in:
Jan Böhmer 2023-10-25 20:40:41 +02:00
parent d0a5b4dcd7
commit 717a9fb0a3
18 changed files with 72 additions and 29 deletions

View file

@ -33,6 +33,7 @@ use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Link;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post;
use ApiPlatform\OpenApi\Model\Operation;
use ApiPlatform\Serializer\Filter\PropertyFilter;
use App\ApiPlatform\Filter\LikeFilter;
use App\Entity\Parts\Footprint;
@ -70,7 +71,7 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ApiResource(
uriTemplate: '/attachment_types/{id}/children.{_format}',
operations: [
new GetCollection(openapiContext: ['summary' => 'Retrieves the children elements of an attachment type.'],
new GetCollection(openapi: new Operation(summary: 'Retrieves the children elements of an attachment type.'),
security: 'is_granted("@attachment_types.read")')
],
uriVariables: [