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

Enum can have boolean values #1467

Merged
merged 12 commits into from
Sep 12, 2023
2 changes: 1 addition & 1 deletion src/Annotations/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Schema extends AbstractAnnotation
*
* @see [JSON schema validation](http://json-schema.org/latest/json-schema-validation.html#anchor76)
*
* @var string[]|int[]|float[]|\UnitEnum[]|class-string
* @var string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string
*/
public $enum = Generator::UNDEFINED;

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/ServerVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ServerVariable extends AbstractAnnotation
/**
* An enumeration of values to be used if the substitution options are from a limited set.
*
* @var string[]|int[]|float[]|\UnitEnum[]|class-string
* @var string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string
*/
public $enum = Generator::UNDEFINED;

Expand Down
22 changes: 11 additions & 11 deletions src/Attributes/AdditionalProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
class AdditionalProperties extends \OpenApi\Annotations\AdditionalProperties
{
/**
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
// schema
Expand Down
22 changes: 11 additions & 11 deletions src/Attributes/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
class Items extends \OpenApi\Annotations\Items
{
/**
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
// schema
Expand Down
24 changes: 12 additions & 12 deletions src/Attributes/JsonContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
class JsonContent extends \OpenApi\Annotations\JsonContent
{
/**
* @param string|class-string|object|null $ref
* @param array<string,Examples> $examples
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param array<string,Examples> $examples
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
?array $examples = null,
Expand Down
22 changes: 11 additions & 11 deletions src/Attributes/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
class Property extends \OpenApi\Annotations\Property
{
/**
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
?string $property = null,
Expand Down
24 changes: 12 additions & 12 deletions src/Attributes/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
class Schema extends \OpenApi\Annotations\Schema
{
/**
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param mixed $const
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param string[] $required
* @param Property[] $properties
* @param int|float $maximum
* @param int|float $minimum
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param mixed $const
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
// schema
Expand Down
6 changes: 3 additions & 3 deletions src/Attributes/ServerVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
class ServerVariable extends \OpenApi\Annotations\ServerVariable
{
/**
* @param string[]|int[]|float[]|\UnitEnum[]|class-string|null $enum
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string|null $enum
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
?string $serverVariable = null,
Expand Down
24 changes: 12 additions & 12 deletions src/Attributes/XmlContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
class XmlContent extends \OpenApi\Annotations\XmlContent
{
/**
* @param string|class-string|object|null $ref
* @param array<string,Examples> $examples
* @param string[] $required
* @param int|float $maximum
* @param int|float $minimum
* @param Property[] $properties
* @param string[]|int[]|float[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
* @param string|class-string|object|null $ref
* @param array<string,Examples> $examples
* @param string[] $required
* @param int|float $maximum
* @param int|float $minimum
* @param Property[] $properties
* @param string[]|int[]|float[]|bool[]|\UnitEnum[]|class-string $enum
* @param array<Schema|\OpenApi\Annotations\Schema> $allOf
* @param array<Schema|\OpenApi\Annotations\Schema> $anyOf
* @param array<Schema|\OpenApi\Annotations\Schema> $oneOf
* @param array<string,mixed>|null $x
* @param Attachable[]|null $attachables
*/
public function __construct(
?array $examples = null,
Expand Down