Операции / Operations

<?php // api/src/Entity/Book.php namespace App\Entity; use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\Post; use App\Controller\CreateBookPublication; #[ApiResource(types: ['https://schema.org/Book'], operations: [ new Get(), new Post(name: 'publication', uriTemplate: '/books/{id}/publication') ])] class Book { // ... }
#[ApiResource(operations: [ new Get(), new Put(), new Patch(), new Delete(), new GetCollection(), new Post(), ])]