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

Change enum type from string[] to string[]|int[]|float[] #1233

Merged
merged 1 commit into from
May 12, 2022
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
22 changes: 11 additions & 11 deletions docs/reference/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ On top of this subset, there are extensions provided by this specification to al
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>example</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into `#/components/examples`.</p></dd>
Expand Down Expand Up @@ -294,7 +294,7 @@ A map between the scope name and a short description for it.</p></dd>
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>header</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -431,7 +431,7 @@ accessing values in an operation and using them as parameters while invoking the
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>link</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into MediaType->links array.</p></dd>
Expand Down Expand Up @@ -576,7 +576,7 @@ A unique parameter is defined by a combination of a name and location.
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>parameter</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into <code>Components::parameters</code> or <code>PathItem::parameters</code> array.</p></dd>
Expand Down Expand Up @@ -706,7 +706,7 @@ The path itself is still exposed to the documentation viewer but they will not k
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>path</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>Key for the Path Object (OpenApi->paths array).</p></dd>
Expand Down Expand Up @@ -811,7 +811,7 @@ Describes a single request body.
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>request</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>Request body model name.</p></dd>
Expand Down Expand Up @@ -848,7 +848,7 @@ static links to operations based on the response.
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>response</strong> : <span style="font-family: monospace;">string|int</span></dt>
<dd><p>The key into Operations->responses array.<br />
Expand Down Expand Up @@ -884,7 +884,7 @@ On top of this subset, there are extensions provided by this specification to al
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into Components->schemas array.</p></dd>
Expand Down Expand Up @@ -940,9 +940,9 @@ Default value is csv.</p></dd>
<dd><p>No details available.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor45">JSON schema validation</a></p></dd>
<dt><strong>uniqueItems</strong> : <span style="font-family: monospace;">bool</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor49">JSON schema validation</a></p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor76">JSON schema validation</a></p></dd>
<dt><strong>multipleOf</strong> : <span style="font-family: monospace;">number</span></dt>
<dt><strong>multipleOf</strong> : <span style="font-family: monospace;">int|float</span></dt>
<dd><p>A numeric instance is valid against "multipleOf" if the result of the division of the instance by this<br />
property's value is an integer.</p></dd>
<dt><strong>readOnly</strong> : <span style="font-family: monospace;">bool</span></dt>
Expand Down Expand Up @@ -1018,7 +1018,7 @@ defined by this property's value.</p></dd>
#### Properties
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|object</span></dt>
<dd><p>No details available.</p><p><i>See</i>: <a href="https://swagger.io/docs/specification/using-ref/">Using refs</a></p></dd>
<dt><strong>securityScheme</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into OpenApi->security array.</p></dd>
Expand Down
44 changes: 22 additions & 22 deletions docs/reference/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -64,7 +64,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -272,7 +272,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>externalValue</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|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 @@ -445,7 +445,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>header</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -513,7 +513,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -555,7 +555,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -598,9 +598,9 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>examples</strong> : <span style="font-family: monospace;">array|null</span></dt>
<dt><strong>examples</strong> : <span style="font-family: monospace;">array&lt;string,Examples&gt;</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -642,7 +642,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -720,7 +720,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>operationRef</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>operationId</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -878,7 +878,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>allowEmptyValue</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Schema|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1007,7 +1007,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>allowEmptyValue</strong> : <span style="font-family: monospace;">bool|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Schema|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1095,7 +1095,7 @@ In addition to this page, there are also a number of [examples](https://github.c
<dl>
<dt><strong>property</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1137,7 +1137,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1231,7 +1231,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>request</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1262,7 +1262,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>response</strong> : <span style="font-family: monospace;">string|int|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1295,7 +1295,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1337,7 +1337,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1386,7 +1386,7 @@ In addition to this page, there are also a number of [examples](https://github.c
#### Parameters
---
<dl>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>securityScheme</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1460,7 +1460,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>default</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|null</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>variables</strong> : <span style="font-family: monospace;">array|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1588,7 +1588,7 @@ In addition to this page, there are also a number of [examples](https://github.c
<dl>
<dt><strong>examples</strong> : <span style="font-family: monospace;">array&lt;string,Examples&gt;</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>ref</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dt><strong>ref</strong> : <span style="font-family: monospace;">object|string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>schema</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down Expand Up @@ -1630,7 +1630,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>pattern</strong> : <span style="font-family: monospace;">string|null</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]</span></dt>
<dd><p>No details available.</p></dd>
<dt><strong>discriminator</strong> : <span style="font-family: monospace;">OpenApi\Attributes\Discriminator|null</span></dt>
<dd><p>No details available.</p></dd>
Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class Schema extends AbstractAnnotation
/**
* @see [JSON schema validation](http://json-schema.org/latest/json-schema-validation.html#anchor76)
*
* @var string[]
* @var string[]|int[]|float[]
*/
public $enum = Generator::UNDEFINED;

Expand Down
4 changes: 2 additions & 2 deletions src/Annotations/ServerVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class ServerVariable extends AbstractAnnotation
public $serverVariable = Generator::UNDEFINED;

/**
* An enumeration of string values to be used if the substitution options are from a limited set.
* An enumeration of values to be used if the substitution options are from a limited set.
*
* @var string[]
* @var string[]|int[]|float[]
*/
public $enum = Generator::UNDEFINED;

Expand Down
Loading