title: How to show input and output exemple with nelmio-api-bundle and php8.1
body: <p>I'm currently trying to make an API doc page thanks to nelmio-api-bundle. I only have one route which is a POST route. I'm receiving a JSON in the body of the request and I'm using the Serializer from symfony to deserialize it in a DTO. I'm also using a DTO for the response (which contains the status code, a bool set to true or false, and a message). Now I'm trying to use these DTO (for input and output) to build the API documentation with nelmio-api-bundle but how to make it ? I'm using PHP8.1 attributes to make it, for response it almost works (except that the response is shows as an array) but I don't know how to make it for the inputs.</p>
  <p>Here is my current code:</p>
  <pre><code>#[Route('/user', methods: ['POST'])]
  #[OA\Parameter(
      name: 'user',
      description: 'The user information in JSON',
      in: 'query',
      required: true
  )]
  #[OA\Response(
      response: 200,
      description: 'Returns the success response',
      content: new OA\JsonContent(
          type: 'array',
          items: new OA\Items(ref: new Model(type: SuccessResponseDTO::class))
      )
  )]
  public function registerUser(Request $request, LoggerInterface $logger): JsonResponse
  {
      //the code to register the user
  }
  </code></pre>
  <p>And here is the result:
  <a href="https://i.stack.imgur.com/LNInm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LNInm.jpg" alt="Result of the current code" /></a></p>
  <p>Do someone know how to make it ?</p>