Skip to content

Commit

Permalink
fix(Attributes): type RequestBody content (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Feb 10, 2022
1 parent 223dfb3 commit ef7ac91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Annotations/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, MediaType>|JsonContent|XmlContent
*/
public $content = Generator::UNDEFINED;

Expand Down
7 changes: 4 additions & 3 deletions src/Attributes/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
class RequestBody extends \OpenApi\Annotations\RequestBody
{
/**
* @param array<string,string>|null $x
* @param Attachable[]|null $attachables
* @param array<string, MediaType>|JsonContent|XmlContent|null $content
* @param array<string,string>|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
Expand Down

0 comments on commit ef7ac91

Please sign in to comment.