Skip to content

Commit

Permalink
Add correct OpenApi 3.1 types for exclusiveMinimum/Maximum
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Nov 23, 2023
1 parent a122489 commit 419682b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions docs/reference/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -977,13 +977,13 @@ Default value is csv.</p></dd>
<dd><p>Sets a default value to the parameter. The type of the value depends on the defined type.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor101">JSON schema validation</a></p></dd>
<dt><strong>maximum</strong> : <span style="font-family: monospace;">int|float</span></dt>
<dd><p>The maximum value allowed for a numeric property. This value must be a number.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor17">JSON schema validation</a></p></dd>
<dt><strong>exclusiveMaximum</strong> : <span style="font-family: monospace;">bool</span></dt>
<dt><strong>exclusiveMaximum</strong> : <span style="font-family: monospace;">bool|int|float</span></dt>
<dd><p>A boolean indicating whether the maximum value is excluded from the set of valid values.<br />
<br />
When set to true, the maximum value is excluded, and when false or not specified, it is included.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor17">JSON schema validation</a></p></dd>
<dt><strong>minimum</strong> : <span style="font-family: monospace;">int|float</span></dt>
<dd><p>The minimum value allowed for a numeric property. This value must be a number.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor21">JSON schema validation</a></p></dd>
<dt><strong>exclusiveMinimum</strong> : <span style="font-family: monospace;">bool</span></dt>
<dt><strong>exclusiveMinimum</strong> : <span style="font-family: monospace;">bool|int|float</span></dt>
<dd><p>A boolean indicating whether the minimum value is excluded from the set of valid values.<br />
<br />
When set to true, the minimum value is excluded, and when false or not specified, it is included.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor21">JSON schema validation</a></p></dd>
Expand All @@ -1009,7 +1009,7 @@ An array instance is valid against this property if its number of items is great
<dd><p>A boolean value indicating whether all items in an array property must be unique.<br />
<br />
If this attribute is set to true, then all items in the array must be unique.</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[]|int[]|float[]|\UnitEnum[]|class-string</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string</span></dt>
<dd><p>A collection of allowable values for a property.<br />
<br />
A property instance is valid against this attribute if its value is one of the values specified in this collection.</p><p><i>See</i>: <a href="http://json-schema.org/latest/json-schema-validation.html#anchor76">JSON schema validation</a></p></dd>
Expand Down Expand Up @@ -1163,7 +1163,7 @@ An object representing a server variable for server URL template substitution.
<dl>
<dt><strong>serverVariable</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The key into Server->variables array.</p></dd>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|\UnitEnum[]|class-string</span></dt>
<dt><strong>enum</strong> : <span style="font-family: monospace;">string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string</span></dt>
<dd><p>An enumeration of values to be used if the substitution options are from a limited set.</p></dd>
<dt><strong>default</strong> : <span style="font-family: monospace;">string</span></dt>
<dd><p>The default value to use for substitution, and to send, if an alternate value is not supplied.<br />
Expand Down
38 changes: 19 additions & 19 deletions docs/reference/attributes.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Annotations/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Schema extends AbstractAnnotation
*
* @see [JSON schema validation](http://json-schema.org/latest/json-schema-validation.html#anchor17)
*
* @var bool
* @var bool|int|float
*/
public $exclusiveMaximum = Generator::UNDEFINED;

Expand All @@ -172,7 +172,7 @@ class Schema extends AbstractAnnotation
*
* @see [JSON schema validation](http://json-schema.org/latest/json-schema-validation.html#anchor21)
*
* @var bool
* @var bool|int|float
*/
public $exclusiveMinimum = Generator::UNDEFINED;

Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/AdditionalProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/JsonContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down
4 changes: 2 additions & 2 deletions src/Attributes/XmlContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function __construct(
?string $collectionFormat = null,
mixed $default = Generator::UNDEFINED,
$maximum = null,
?bool $exclusiveMaximum = null,
bool|int|float|null $exclusiveMaximum = null,
$minimum = null,
?bool $exclusiveMinimum = null,
bool|int|float|null $exclusiveMinimum = null,
?int $maxLength = null,
?int $minLength = null,
?int $maxItems = null,
Expand Down

0 comments on commit 419682b

Please sign in to comment.