Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix processor option default #1653

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions docs/reference/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down Expand Up @@ -207,7 +207,7 @@ These will be ignored but can be used for custom processing.</p><table class="ta
#### Parameters
---
<dl>
<dt><strong>schemas</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;|null</span></dt>
<dt><strong>schemas</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;|null</span></dt>
<dd><p>Reusable Schemas.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>responses</strong> : <span style="font-family: monospace;">Response[]|null</span></dt>
<dd><p>Reusable Responses.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
Expand Down Expand Up @@ -1127,13 +1127,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down Expand Up @@ -1298,13 +1298,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down Expand Up @@ -2192,13 +2192,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down Expand Up @@ -2656,13 +2656,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down Expand Up @@ -3179,13 +3179,13 @@ instead make the "type" property an array and add "null" as a possible type.</p>
<dt><strong>deprecated</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>Specifies that a schema is deprecated and should be transitioned out of usage.<br />
Default value is false.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>allOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against all schemas<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>anyOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against at least one<br />
schema defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|\OpenApi\Annotations\Schema&gt;</span></dt>
<dt><strong>oneOf</strong> : <span style="font-family: monospace;">array&lt;Schema|OA\Schema&gt;</span></dt>
<dd><p>An instance validates successfully against this property if it validates successfully against exactly one schema<br />
defined by this property's value.</p><table class="table-plain"><tr><td><i>Required</i>:</td><td style="padding-left: 0;"><b>no</b></td></tr></table></dd>
<dt><strong>additionalProperties</strong> : <span style="font-family: monospace;">OpenApi\Attributes\AdditionalProperties|bool|null</span></dt>
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,11 @@ Tracks the use of all <code>Components</code> and removed unused schemas.
### [AugmentTags](https://github.com/zircote/swagger-php/tree/master/src/Processors/AugmentTags.php)

Ensures that all tags used on operations also exist in the global <code>tags</code> list.
#### Config settings
<dl>
<dt><strong>augmentTags.whitelist</strong> : <span style="font-family: monospace;">array</span></dt>
<dt><strong>default</strong> : <span style="font-family: monospace;">[]</span></dt>
<dd><p>Whitelist tags to keep even if not used. <code>*</code> may be used to keep all unused.</p> </dd>
</dl>


2 changes: 1 addition & 1 deletion src/Processors/AugmentTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AugmentTags implements ProcessorInterface
{

/** @var array<string> */
protected $whitelist;
protected $whitelist = [];

public function __construct(array $whitelist = [])
{
Expand Down