forked from loafle/openapi-generator-original
Update samples under openapi3 folder
Apply changes that comes with master bin/openapi3/php-petstore.sh
This commit is contained in:
parent
b287520e8a
commit
bd19c6bdea
@ -249,7 +249,7 @@ class Body2 implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties = [];
|
$invalidProperties = [];
|
||||||
|
|
||||||
$allowedValues = $this->getEnumFormStringAllowableValues();
|
$allowedValues = $this->getEnumFormStringAllowableValues();
|
||||||
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues)) {
|
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_form_string', must be one of '%s'",
|
"invalid value for 'enum_form_string', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -257,7 +257,7 @@ class Body2 implements ModelInterface, ArrayAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
||||||
if (!is_null($this->container['enum_query_double']) && !in_array($this->container['enum_query_double'], $allowedValues)) {
|
if (!is_null($this->container['enum_query_double']) && !in_array($this->container['enum_query_double'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_query_double', must be one of '%s'",
|
"invalid value for 'enum_query_double', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -277,11 +277,11 @@ class Body2 implements ModelInterface, ArrayAccess
|
|||||||
{
|
{
|
||||||
|
|
||||||
$allowedValues = $this->getEnumFormStringAllowableValues();
|
$allowedValues = $this->getEnumFormStringAllowableValues();
|
||||||
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues)) {
|
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
||||||
if (!is_null($this->container['enum_query_double']) && !in_array($this->container['enum_query_double'], $allowedValues)) {
|
if (!is_null($this->container['enum_query_double']) && !in_array($this->container['enum_query_double'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -341,7 +341,7 @@ class Body2 implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumFormString($enum_form_string)
|
public function setEnumFormString($enum_form_string)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumFormStringAllowableValues();
|
$allowedValues = $this->getEnumFormStringAllowableValues();
|
||||||
if (!is_null($enum_form_string) && !in_array($enum_form_string, $allowedValues)) {
|
if (!is_null($enum_form_string) && !in_array($enum_form_string, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_form_string', must be one of '%s'",
|
"Invalid value for 'enum_form_string', must be one of '%s'",
|
||||||
@ -374,7 +374,7 @@ class Body2 implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumQueryDouble($enum_query_double)
|
public function setEnumQueryDouble($enum_query_double)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
$allowedValues = $this->getEnumQueryDoubleAllowableValues();
|
||||||
if (!is_null($enum_query_double) && !in_array($enum_query_double, $allowedValues)) {
|
if (!is_null($enum_query_double) && !in_array($enum_query_double, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_query_double', must be one of '%s'",
|
"Invalid value for 'enum_query_double', must be one of '%s'",
|
||||||
|
@ -226,7 +226,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties = [];
|
$invalidProperties = [];
|
||||||
|
|
||||||
$allowedValues = $this->getJustSymbolAllowableValues();
|
$allowedValues = $this->getJustSymbolAllowableValues();
|
||||||
if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues)) {
|
if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'just_symbol', must be one of '%s'",
|
"invalid value for 'just_symbol', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -246,7 +246,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
|||||||
{
|
{
|
||||||
|
|
||||||
$allowedValues = $this->getJustSymbolAllowableValues();
|
$allowedValues = $this->getJustSymbolAllowableValues();
|
||||||
if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues)) {
|
if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -273,7 +273,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
|||||||
public function setJustSymbol($just_symbol)
|
public function setJustSymbol($just_symbol)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getJustSymbolAllowableValues();
|
$allowedValues = $this->getJustSymbolAllowableValues();
|
||||||
if (!is_null($just_symbol) && !in_array($just_symbol, $allowedValues)) {
|
if (!is_null($just_symbol) && !in_array($just_symbol, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'just_symbol', must be one of '%s'",
|
"Invalid value for 'just_symbol', must be one of '%s'",
|
||||||
|
@ -278,7 +278,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties = [];
|
$invalidProperties = [];
|
||||||
|
|
||||||
$allowedValues = $this->getEnumStringAllowableValues();
|
$allowedValues = $this->getEnumStringAllowableValues();
|
||||||
if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues)) {
|
if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_string', must be one of '%s'",
|
"invalid value for 'enum_string', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -289,7 +289,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties[] = "'enum_string_required' can't be null";
|
$invalidProperties[] = "'enum_string_required' can't be null";
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
||||||
if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues)) {
|
if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_string_required', must be one of '%s'",
|
"invalid value for 'enum_string_required', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -297,7 +297,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
$allowedValues = $this->getEnumIntegerAllowableValues();
|
$allowedValues = $this->getEnumIntegerAllowableValues();
|
||||||
if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues)) {
|
if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_integer', must be one of '%s'",
|
"invalid value for 'enum_integer', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -305,7 +305,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
$allowedValues = $this->getEnumNumberAllowableValues();
|
$allowedValues = $this->getEnumNumberAllowableValues();
|
||||||
if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues)) {
|
if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'enum_number', must be one of '%s'",
|
"invalid value for 'enum_number', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -325,22 +325,22 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
{
|
{
|
||||||
|
|
||||||
$allowedValues = $this->getEnumStringAllowableValues();
|
$allowedValues = $this->getEnumStringAllowableValues();
|
||||||
if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues)) {
|
if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($this->container['enum_string_required'] === null) {
|
if ($this->container['enum_string_required'] === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
||||||
if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues)) {
|
if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getEnumIntegerAllowableValues();
|
$allowedValues = $this->getEnumIntegerAllowableValues();
|
||||||
if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues)) {
|
if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getEnumNumberAllowableValues();
|
$allowedValues = $this->getEnumNumberAllowableValues();
|
||||||
if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues)) {
|
if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -367,7 +367,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumString($enum_string)
|
public function setEnumString($enum_string)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumStringAllowableValues();
|
$allowedValues = $this->getEnumStringAllowableValues();
|
||||||
if (!is_null($enum_string) && !in_array($enum_string, $allowedValues)) {
|
if (!is_null($enum_string) && !in_array($enum_string, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_string', must be one of '%s'",
|
"Invalid value for 'enum_string', must be one of '%s'",
|
||||||
@ -400,7 +400,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumStringRequired($enum_string_required)
|
public function setEnumStringRequired($enum_string_required)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
$allowedValues = $this->getEnumStringRequiredAllowableValues();
|
||||||
if (!in_array($enum_string_required, $allowedValues)) {
|
if (!in_array($enum_string_required, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_string_required', must be one of '%s'",
|
"Invalid value for 'enum_string_required', must be one of '%s'",
|
||||||
@ -433,7 +433,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumInteger($enum_integer)
|
public function setEnumInteger($enum_integer)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumIntegerAllowableValues();
|
$allowedValues = $this->getEnumIntegerAllowableValues();
|
||||||
if (!is_null($enum_integer) && !in_array($enum_integer, $allowedValues)) {
|
if (!is_null($enum_integer) && !in_array($enum_integer, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_integer', must be one of '%s'",
|
"Invalid value for 'enum_integer', must be one of '%s'",
|
||||||
@ -466,7 +466,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
|||||||
public function setEnumNumber($enum_number)
|
public function setEnumNumber($enum_number)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getEnumNumberAllowableValues();
|
$allowedValues = $this->getEnumNumberAllowableValues();
|
||||||
if (!is_null($enum_number) && !in_array($enum_number, $allowedValues)) {
|
if (!is_null($enum_number) && !in_array($enum_number, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'enum_number', must be one of '%s'",
|
"Invalid value for 'enum_number', must be one of '%s'",
|
||||||
|
@ -237,7 +237,7 @@ class Order implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties = [];
|
$invalidProperties = [];
|
||||||
|
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues)) {
|
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'status', must be one of '%s'",
|
"invalid value for 'status', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -257,7 +257,7 @@ class Order implements ModelInterface, ArrayAccess
|
|||||||
{
|
{
|
||||||
|
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues)) {
|
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -380,7 +380,7 @@ class Order implements ModelInterface, ArrayAccess
|
|||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($status) && !in_array($status, $allowedValues)) {
|
if (!is_null($status) && !in_array($status, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'status', must be one of '%s'",
|
"Invalid value for 'status', must be one of '%s'",
|
||||||
|
@ -243,7 +243,7 @@ class Pet implements ModelInterface, ArrayAccess
|
|||||||
$invalidProperties[] = "'photo_urls' can't be null";
|
$invalidProperties[] = "'photo_urls' can't be null";
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues)) {
|
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||||
$invalidProperties[] = sprintf(
|
$invalidProperties[] = sprintf(
|
||||||
"invalid value for 'status', must be one of '%s'",
|
"invalid value for 'status', must be one of '%s'",
|
||||||
implode("', '", $allowedValues)
|
implode("', '", $allowedValues)
|
||||||
@ -269,7 +269,7 @@ class Pet implements ModelInterface, ArrayAccess
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues)) {
|
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -416,7 +416,7 @@ class Pet implements ModelInterface, ArrayAccess
|
|||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
{
|
{
|
||||||
$allowedValues = $this->getStatusAllowableValues();
|
$allowedValues = $this->getStatusAllowableValues();
|
||||||
if (!is_null($status) && !in_array($status, $allowedValues)) {
|
if (!is_null($status) && !in_array($status, $allowedValues, true)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
sprintf(
|
sprintf(
|
||||||
"Invalid value for 'status', must be one of '%s'",
|
"Invalid value for 'status', must be one of '%s'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user