From ef7ac9107fb2998440948b46610182f398487b6d Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 10 Feb 2022 20:48:55 +0100 Subject: [PATCH] fix(Attributes): type RequestBody content (#1098) --- src/Annotations/RequestBody.php | 2 +- src/Attributes/RequestBody.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Annotations/RequestBody.php b/src/Annotations/RequestBody.php index 29813c105..24fd1540f 100644 --- a/src/Annotations/RequestBody.php +++ b/src/Annotations/RequestBody.php @@ -49,7 +49,7 @@ class RequestBody extends AbstractAnnotation * The key is a media type or media type range and the value describes it. For requests that match multiple keys, * only the most specific key is applicable. e.g. text/plain overrides text/*. * - * @var MediaType[] + * @var array|JsonContent|XmlContent */ public $content = Generator::UNDEFINED; diff --git a/src/Attributes/RequestBody.php b/src/Attributes/RequestBody.php index a2438d146..0b713d825 100644 --- a/src/Attributes/RequestBody.php +++ b/src/Attributes/RequestBody.php @@ -12,13 +12,14 @@ class RequestBody extends \OpenApi\Annotations\RequestBody { /** - * @param array|null $x - * @param Attachable[]|null $attachables + * @param array|JsonContent|XmlContent|null $content + * @param array|null $x + * @param Attachable[]|null $attachables */ public function __construct( ?string $description = null, ?bool $required = null, - $content = null, + array|JsonContent|XmlContent|null $content = null, // annotation ?array $x = null, ?array $attachables = null