mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 11:18:51 +02:00
Fixed API Platform deprecations
This commit is contained in:
parent
d0a5b4dcd7
commit
717a9fb0a3
18 changed files with 72 additions and 29 deletions
|
@ -32,6 +32,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\Validator\UniqueValidatableInterface;
|
||||
|
@ -69,8 +70,10 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||
#[ApiResource(
|
||||
uriTemplate: '/projects/{id}/bom.{_format}',
|
||||
operations: [
|
||||
new GetCollection(openapiContext: ['summary' => 'Retrieves the BOM entries of the given project.'],
|
||||
security: 'is_granted("@projects.read")')
|
||||
new GetCollection(
|
||||
openapi: new Operation(summary: 'Retrieves the BOM entries of the given project.'),
|
||||
security: 'is_granted("@projects.read")'
|
||||
)
|
||||
],
|
||||
uriVariables: [
|
||||
'id' => new Link(fromProperty: 'bom_entries', fromClass: Project::class)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue