API Platform custom operation with custom parameter
<p>I just started using the dunglas api platform. Im using v2.0.0-rc1 and i added an custom operation to enabled/disable an user.</p>

<p>This is my custom action for the user</p>

<pre><code>&lt;?php

namespace Zoef\UserBundle\Action;

use Zoef\UserBundle\Entity\User;
use Doctrine\Common\Persistence\ManagerRegistry;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\Routing\Annotation\Route;

class UserAction
{
    /**
     * @Route(
     *     name="enabled_user",
     *     path="/users/{id}/enabled",
     *     defaults={"_api_resource_class"=User::class, "_api_item_operation_name"="enabled"}
     * )
     * @Method("PUT")
     */
    public function __invoke(User $user)
    {
        if($user-&gt;isEnabled()) {
            $user-&gt;setEnabled(false);
        } else {
            $user-&gt;setEnabled(true);
        }

        return $user;
    }
}
</code></pre>

<p>When i go to my docs the custom operation is added and functional but to use this action i need to send 4 parameters: email, fullname, username, enabled. but i only want to send the enabled parameter and the id of the user is given in the route but i cant find in the doc how to change the parameters.</p>

<p>Can someone help me with this?</p>