Skip to content

Commit

Permalink
[PHP] BUGFIX: model_generic: fix missing setOpenAPInullablesSetToNull…
Browse files Browse the repository at this point in the history
… method (#13499)

* [PHP] Bugfix - model_generic.mustache: missing setter for openAPINullabelsSetToNull (which is invoked in the property setters)

* [AUTOGENERATED] update samples

* [PHP] Added test for nullable fields
  • Loading branch information
thomasphansen authored Sep 26, 2022
1 parent d46189b commit efccc01
Show file tree
Hide file tree
Showing 44 changed files with 469 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
10 changes: 10 additions & 0 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ private function getOpenAPINullablesSetToNull(): array
return $this->openAPINullablesSetToNull;
}

/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}

/**
* Checks if a property is nullable
*
Expand Down
Loading

0 comments on commit efccc01

Please sign in to comment.