title: Replace "id" parameter with custom parameter in openapi_context (Swagger) - api-platform
body: <p>I have my custom operation for an entity, it uses <code>PUT</code> method, i ould like to document the parameter in my swagger (OpenApi) documentation.</p>
  <p>This is the definition</p>
  <pre class="lang-php prettyprint-override"><code>/*
   * itemOperations={
   *                  &quot;get&quot;,
   *                  &quot;patch&quot;,
   *                  &quot;put&quot;,
   *                  &quot;delete&quot;,
   *                  &quot;activate&quot;={
   *                      &quot;method&quot;=&quot;PUT&quot;,
   *                      &quot;path&quot;=&quot;/user/{token}/activate&quot;,
   *                      &quot;requirements&quot;={&quot;token&quot;=&quot;^\w{32}$&quot;},
   *                      &quot;controller&quot;=ActivateUser::class,
   *                      &quot;normalization_context&quot;={&quot;groups&quot;={&quot;user:read&quot;}},
   *                      &quot;denormalization_context&quot;={&quot;groups&quot;={&quot;user:activation&quot;}},
   *                      &quot;read&quot;=false,
   *                      &quot;validation_groups&quot;={&quot;Activate&quot;},
   *                      &quot;openapi_context&quot;={
   *                          &quot;summary&quot;=&quot;Attiva un utente tramite token dopo la registrazione.&quot;,
   *                          &quot;description&quot;=&quot;Cambia lo stato dell'utente in 'attivo' permettendo così il login.&quot;,
   *                          &quot;parameters&quot;={
   *                              {
   *                                &quot;in&quot;=&quot;path&quot;,
   *                                &quot;name&quot;=&quot;token&quot;,
   *                                &quot;required&quot;=true,
   *                                &quot;type&quot;=&quot;string&quot;,
   *                                &quot;description&quot;=&quot;Il token generato al momento della registrazione.&quot;
   *                              }
   *                          }
   *                      }
   *                  },
   *              },
  */
  </code></pre>
  <p>The part interested is the <code>&quot;openapi_context&quot;</code> key then <code>&quot;parameters&quot;</code>.
  This description doesn't change anything about parameters definitions, the ID requirement still remains and there's no token description (i read the documentation <a href="https://swagger.io/docs/specification/describing-parameters/#path-parameters" rel="nofollow noreferrer">here for path parameters in open api context</a></p>
  <p><a href="https://i.stack.imgur.com/HymvC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HymvC.png" alt="my actual result" /></a></p>
  <p>Where am i wrong? Is there a way to do it?</p>