Skip to content

Commit

Permalink
Add Attachable to Response::$content and RequestBody::$content (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuilhemN authored Sep 11, 2022
1 parent 5a32885 commit 0c1cdd3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/reference/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ In addition to this page, there are also a number of [examples](https://github.c
<dd><p>No details available.</p></dd>
<dt><strong>required</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>content</strong> : <span style="font-family: monospace;">array&lt;MediaType&gt;|JsonContent|XmlContent|null</span></dt>
<dt><strong>content</strong> : <span style="font-family: monospace;">array&lt;MediaType&gt;|JsonContent|XmlContent|Attachable|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>x</strong> : <span style="font-family: monospace;">array&lt;string,string&gt;|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1270,7 +1270,7 @@ In addition to this page, there are also a number of [examples](https://github.c
<dd><p>No details available.</p></dd>
<dt><strong>headers</strong> : <span style="font-family: monospace;">Header[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>content</strong> : <span style="font-family: monospace;">MediaType|JsonContent|XmlContent|array&lt;MediaType|XmlContent&gt;</span></dt>
<dt><strong>content</strong> : <span style="font-family: monospace;">MediaType|JsonContent|XmlContent|array&lt;MediaType|XmlContent|Attachable&gt;</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>links</strong> : <span style="font-family: monospace;">Link[]</span></dt>
<dd><p>No details available.</p></dd>
Expand Down
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
* @var array<MediaType>|JsonContent|XmlContent|Attachable
*/
public $content = Generator::UNDEFINED;

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Response extends AbstractAnnotation
* For responses that match multiple keys, only the most specific key is applicable;
* e.g. <code>text/plain</code> overrides <code>text/*</code>.
*
* @var MediaType|JsonContent|XmlContent|array<MediaType|JsonContent|XmlContent>
* @var MediaType|JsonContent|XmlContent|Attachable|array<MediaType|JsonContent|XmlContent|Attachable>
*/
public $content = Generator::UNDEFINED;

Expand Down
8 changes: 4 additions & 4 deletions src/Attributes/RequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
class RequestBody extends \OpenApi\Annotations\RequestBody
{
/**
* @param array<MediaType>|JsonContent|XmlContent|null $content
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param array<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|null $content = null,
array|JsonContent|XmlContent|Attachable|null $content = null,
// annotation
?array $x = null,
?array $attachables = null
Expand Down
12 changes: 6 additions & 6 deletions src/Attributes/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
class Response extends \OpenApi\Annotations\Response
{
/**
* @param Header[] $headers
* @param MediaType|JsonContent|XmlContent|array<MediaType|JsonContent|XmlContent> $content
* @param Link[] $links
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param Header[] $headers
* @param MediaType|JsonContent|XmlContent|Attachable|array<MediaType|JsonContent|XmlContent|Attachable> $content
* @param Link[] $links
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
string|object|null $ref = null,
int|string $response = null,
?string $description = null,
?array $headers = null,
MediaType|JsonContent|XmlContent|array|null $content = null,
MediaType|JsonContent|XmlContent|Attachable|array|null $content = null,
?array $links = null,
// annotation
?array $x = null,
Expand Down

0 comments on commit 0c1cdd3

Please sign in to comment.