forked from loafle/openapi-generator-original
[PHP-SYMFONY] Debug Symfony version 7, enums ref, array of enums $ref and date assert (#19008)
* [PHP-SYMFONY] Debug for Symfony 7 support & debug enum ref & debug array enum ref & debug date assert * [PHP-SYMFONY] Debug for Symfony 7 support & debug enum ref & debug array enum ref & debug date assert * [PHP-SYMFONY] Debug for Symfony 7 support & debug enum ref & debug array enum ref & debug date assert
This commit is contained in:
@@ -48,47 +48,47 @@ class Pet
|
||||
/**
|
||||
* @var int|null
|
||||
* @SerializedName("id")
|
||||
* @Assert\Type("int")
|
||||
* @Type("int")
|
||||
*/
|
||||
*/
|
||||
#[Assert\Type("int")]
|
||||
protected ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Category|null
|
||||
* @SerializedName("category")
|
||||
* @Assert\Type("OpenAPI\Server\Model\Category")
|
||||
* @Type("OpenAPI\Server\Model\Category")
|
||||
*/
|
||||
*/
|
||||
#[Assert\Type("OpenAPI\Server\Model\Category")]
|
||||
protected ?Category $category = null;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
* @SerializedName("name")
|
||||
* @Assert\NotNull()
|
||||
* @Assert\Type("string")
|
||||
* @Type("string")
|
||||
*/
|
||||
*/
|
||||
#[Assert\NotNull]
|
||||
#[Assert\Type("string")]
|
||||
protected ?string $name = null;
|
||||
|
||||
/**
|
||||
* @var string[]|null
|
||||
* @SerializedName("photoUrls")
|
||||
* @Assert\NotNull()
|
||||
* @Assert\All({
|
||||
* @Assert\Type("string")
|
||||
* })
|
||||
* @Type("array<string>")
|
||||
*/
|
||||
*/
|
||||
#[Assert\NotNull]
|
||||
#[Assert\All([
|
||||
new Assert\Type("string"),
|
||||
])]
|
||||
protected ?array $photoUrls = null;
|
||||
|
||||
/**
|
||||
* @var Tag[]|null
|
||||
* @SerializedName("tags")
|
||||
* @Assert\All({
|
||||
* @Assert\Type("OpenAPI\Server\Model\Tag")
|
||||
* })
|
||||
* @Type("array<OpenAPI\Server\Model\Tag>")
|
||||
*/
|
||||
*/
|
||||
#[Assert\All([
|
||||
new Assert\Type("OpenAPI\Server\Model\Tag"),
|
||||
])]
|
||||
protected ?array $tags = null;
|
||||
|
||||
/**
|
||||
@@ -96,10 +96,10 @@ class Pet
|
||||
*
|
||||
* @var string|null
|
||||
* @SerializedName("status")
|
||||
* @Assert\Choice({ "available", "pending", "sold" })
|
||||
* @Assert\Type("string")
|
||||
* @Type("string")
|
||||
*/
|
||||
*/
|
||||
#[Assert\Choice(["available", "pending", "sold"])]
|
||||
#[Assert\Type("string")]
|
||||
protected ?string $status = null;
|
||||
|
||||
/**
|
||||
@@ -128,15 +128,13 @@ class Pet
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets id.
|
||||
*
|
||||
* @param int|null $id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets id.
|
||||
*
|
||||
* @param int|null $id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId(?int $id = null): self
|
||||
{
|
||||
$this->id = $id;
|
||||
@@ -144,6 +142,9 @@ class Pet
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets category.
|
||||
*
|
||||
@@ -154,15 +155,13 @@ class Pet
|
||||
return $this->category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets category.
|
||||
*
|
||||
* @param Category|null $category
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets category.
|
||||
*
|
||||
* @param Category|null $category
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCategory(?Category $category = null): self
|
||||
{
|
||||
$this->category = $category;
|
||||
@@ -170,6 +169,9 @@ class Pet
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets name.
|
||||
*
|
||||
@@ -180,15 +182,13 @@ class Pet
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets name.
|
||||
*
|
||||
* @param string|null $name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets name.
|
||||
*
|
||||
* @param string|null $name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName(?string $name): self
|
||||
{
|
||||
$this->name = $name;
|
||||
@@ -196,6 +196,9 @@ class Pet
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets photoUrls.
|
||||
*
|
||||
@@ -206,15 +209,13 @@ class Pet
|
||||
return $this->photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets photoUrls.
|
||||
*
|
||||
* @param string[]|null $photoUrls
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets photoUrls.
|
||||
*
|
||||
* @param string[]|null $photoUrls
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhotoUrls(?array $photoUrls): self
|
||||
{
|
||||
$this->photoUrls = $photoUrls;
|
||||
@@ -222,6 +223,9 @@ class Pet
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets tags.
|
||||
*
|
||||
@@ -232,15 +236,13 @@ class Pet
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets tags.
|
||||
*
|
||||
* @param Tag[]|null $tags
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets tags.
|
||||
*
|
||||
* @param Tag[]|null $tags
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags(?array $tags = null): self
|
||||
{
|
||||
$this->tags = $tags;
|
||||
@@ -248,6 +250,9 @@ class Pet
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets status.
|
||||
*
|
||||
@@ -258,21 +263,22 @@ class Pet
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets status.
|
||||
*
|
||||
* @param string|null $status pet status in the store
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
* Sets status.
|
||||
*
|
||||
* @param string|null $status pet status in the store
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus(?string $status = null): self
|
||||
{
|
||||
$this->status = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user