Skip to content

Commit

Permalink
Add MediaType as possible type to RequestBody (#1426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malezha authored Mar 19, 2023
1 parent 1661f99 commit 4a1d127
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Annotations/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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 array<MediaType>|JsonContent|XmlContent|Attachable
* @var array<MediaType>|MediaType|JsonContent|XmlContent|Attachable
*/
public $content = Generator::UNDEFINED;

Expand Down
10 changes: 5 additions & 5 deletions src/Attributes/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
class RequestBody extends OA\RequestBody
{
/**
* @param string|class-string|object|null $ref
* @param array<MediaType>|JsonContent|XmlContent|Attachable|null $content
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param array<MediaType>|MediaType|JsonContent|XmlContent|Attachable|null $content
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
string|object|null $ref = null,
?string $request = null,
?string $description = null,
?bool $required = null,
array|JsonContent|XmlContent|Attachable|null $content = null,
array|MediaType|JsonContent|XmlContent|Attachable|null $content = null,
// annotation
?array $x = null,
?array $attachables = null
Expand Down

0 comments on commit 4a1d127

Please sign in to comment.