[Php-Symfony] showcase recent features in petstore.yaml (#21286)

PR #21261 added support for endpoint with response of type text/plain
or even image/png.

This commit adds such endpoint so that:
- the way those are supported is clearer (as it is now directly visible
  in the generated sample files)
- if a future commit impacts this part of the generation it will be easier
  to assess that impact
This commit is contained in:
Guillaume Turri
2025-05-16 04:32:52 +02:00
committed by GitHub
parent 5b885cd3db
commit 6c0e7274ea
6 changed files with 530 additions and 0 deletions

View File

@@ -98,6 +98,23 @@ interface PetApiInterface
array &$responseHeaders
): void;
/**
* Operation downloadFile
*
* downloads an image
*
* @param int $petId ID of pet to download an image from (required)
* @param int &$responseCode The HTTP Response Code
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return mixed
*/
public function downloadFile(
int $petId,
int &$responseCode,
array &$responseHeaders
): mixed;
/**
* Operation findPetsByStatus
*
@@ -150,6 +167,40 @@ interface PetApiInterface
array &$responseHeaders
): array|object|null;
/**
* Operation petAge
*
* Get the age of the pet
*
* @param int $petId ID of pet (required)
* @param int &$responseCode The HTTP Response Code
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return int
*/
public function petAge(
int $petId,
int &$responseCode,
array &$responseHeaders
): int;
/**
* Operation petAvailableForSale
*
* Whether the pet can currently be bought
*
* @param int $petId ID of pet (required)
* @param int &$responseCode The HTTP Response Code
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return bool
*/
public function petAvailableForSale(
int $petId,
int &$responseCode,
array &$responseHeaders
): bool;
/**
* Operation updatePet
*