forked from loafle/openapi-generator-original
[php] Implement JsonSerializable in php Model class (#7768)
* Update model_generic.mustache Implemented the JsonSerializable interface which allows to use json_encode() on the model object.
This commit is contained in:
parent
7e7bfc74de
commit
8c084e2dc0
@ -1,4 +1,4 @@
|
||||
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}}
|
||||
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess, \JsonSerializable{{/parentSchema}}
|
||||
{
|
||||
public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
|
||||
|
||||
@ -400,6 +400,18 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Animal implements ModelInterface, ArrayAccess
|
||||
class Animal implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = 'class_name';
|
||||
|
||||
@ -321,6 +321,18 @@ class Animal implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ApiResponse implements ModelInterface, ArrayAccess
|
||||
class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -345,6 +345,18 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
class ArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayTest implements ModelInterface, ArrayAccess
|
||||
class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -345,6 +345,18 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Capitalization implements ModelInterface, ArrayAccess
|
||||
class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -435,6 +435,18 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -279,6 +279,18 @@ class Cat extends Animal
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class CatAllOf implements ModelInterface, ArrayAccess
|
||||
class CatAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class CatAllOf implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Category implements ModelInterface, ArrayAccess
|
||||
class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -318,6 +318,18 @@ class Category implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ClassModel implements ModelInterface, ArrayAccess
|
||||
class ClassModel implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -286,6 +286,18 @@ class ClassModel implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Client implements ModelInterface, ArrayAccess
|
||||
class Client implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class Client implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -279,6 +279,18 @@ class Dog extends Animal
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class DogAllOf implements ModelInterface, ArrayAccess
|
||||
class DogAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class DogAllOf implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class EnumArrays implements ModelInterface, ArrayAccess
|
||||
class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -371,6 +371,18 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class EnumTest implements ModelInterface, ArrayAccess
|
||||
class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -630,6 +630,18 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class File implements ModelInterface, ArrayAccess
|
||||
class File implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -286,6 +286,18 @@ class File implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class FileSchemaTestClass implements ModelInterface, ArrayAccess
|
||||
class FileSchemaTestClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Foo implements ModelInterface, ArrayAccess
|
||||
class Foo implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class Foo implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class FormatTest implements ModelInterface, ArrayAccess
|
||||
class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -839,6 +839,18 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
class HasOnlyReadOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class HealthCheckResult implements ModelInterface, ArrayAccess
|
||||
class HealthCheckResult implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -286,6 +286,18 @@ class HealthCheckResult implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject implements ModelInterface, ArrayAccess
|
||||
class InlineObject implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class InlineObject implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject1 implements ModelInterface, ArrayAccess
|
||||
class InlineObject1 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class InlineObject1 implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject2 implements ModelInterface, ArrayAccess
|
||||
class InlineObject2 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -373,6 +373,18 @@ class InlineObject2 implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject3 implements ModelInterface, ArrayAccess
|
||||
class InlineObject3 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -793,6 +793,18 @@ class InlineObject3 implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject4 implements ModelInterface, ArrayAccess
|
||||
class InlineObject4 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -321,6 +321,18 @@ class InlineObject4 implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject5 implements ModelInterface, ArrayAccess
|
||||
class InlineObject5 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -318,6 +318,18 @@ class InlineObject5 implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineResponseDefault implements ModelInterface, ArrayAccess
|
||||
class InlineResponseDefault implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class MapTest implements ModelInterface, ArrayAccess
|
||||
class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -399,6 +399,18 @@ class MapTest implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -345,6 +345,18 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Model200Response implements ModelInterface, ArrayAccess
|
||||
class Model200Response implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -316,6 +316,18 @@ class Model200Response implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ModelList implements ModelInterface, ArrayAccess
|
||||
class ModelList implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class ModelList implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ModelReturn implements ModelInterface, ArrayAccess
|
||||
class ModelReturn implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -286,6 +286,18 @@ class ModelReturn implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -44,7 +44,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Name implements ModelInterface, ArrayAccess
|
||||
class Name implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -379,6 +379,18 @@ class Name implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class NullableClass implements ModelInterface, ArrayAccess
|
||||
class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -615,6 +615,18 @@ class NullableClass implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class NumberOnly implements ModelInterface, ArrayAccess
|
||||
class NumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class NumberOnly implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Order implements ModelInterface, ArrayAccess
|
||||
class Order implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -469,6 +469,18 @@ class Order implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class OuterComposite implements ModelInterface, ArrayAccess
|
||||
class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -345,6 +345,18 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Pet implements ModelInterface, ArrayAccess
|
||||
class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -475,6 +475,18 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
class ReadOnlyFirst implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class SpecialModelName implements ModelInterface, ArrayAccess
|
||||
class SpecialModelName implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -285,6 +285,18 @@ class SpecialModelName implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Tag implements ModelInterface, ArrayAccess
|
||||
class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -315,6 +315,18 @@ class Tag implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class User implements ModelInterface, ArrayAccess
|
||||
class User implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@ -495,6 +495,18 @@ class User implements ModelInterface, ArrayAccess
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user