From f01f45cb66097fa94f7f366ee8d6178294595e62 Mon Sep 17 00:00:00 2001 From: Christophe Gosiau Date: Thu, 5 Sep 2024 22:10:39 +0200 Subject: [PATCH] bugfix: media_type 'default' property was not initiated --- lib/Skeleton/Application/Api/Media/Type.php | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/Skeleton/Application/Api/Media/Type.php b/lib/Skeleton/Application/Api/Media/Type.php index 41cd597..af96861 100644 --- a/lib/Skeleton/Application/Api/Media/Type.php +++ b/lib/Skeleton/Application/Api/Media/Type.php @@ -68,6 +68,14 @@ class Type { */ public $readonly = null; + /** + * Default + * + * @access public + * @var bool $default + */ + public $default = null; + /** * Writeonly * @@ -283,6 +291,9 @@ private function get_schema_array($object_reference = true) { if (isset($this->readonly) and $this->readonly !== false) { $schema['readOnly'] = $this->readonly; } + if (isset($this->default)) { + $schema['default'] = $this->default; + } if (isset($this->writeonly) and $this->writeonly !== false) { $schema['writeOnly'] = $this->writeonly; } @@ -308,6 +319,9 @@ private function get_schema_boolean($object_reference = true) { if (isset($this->readonly) and $this->readonly !== false) { $schema['readOnly'] = $this->readonly; } + if (isset($this->default)) { + $schema['default'] = $this->default; + } if (isset($this->writeonly) and $this->writeonly !== false) { $schema['writeOnly'] = $this->writeonly; } @@ -338,6 +352,9 @@ private function get_schema_number($object_reference = true) { if (isset($this->readonly) and $this->readonly !== false) { $schema['readOnly'] = $this->readonly; } + if (isset($this->default)) { + $schema['default'] = $this->default; + } if (isset($this->writeonly) and $this->writeonly !== false) { $schema['writeOnly'] = $this->writeonly; } @@ -368,6 +385,9 @@ private function get_schema_integer($object_reference = true) { if (isset($this->readonly) and $this->readonly !== false) { $schema['readOnly'] = $this->readonly; } + if (isset($this->default)) { + $schema['default'] = $this->default; + } if (isset($this->writeonly) and $this->writeonly !== false) { $schema['writeOnly'] = $this->writeonly; } @@ -398,6 +418,9 @@ private function get_schema_string($object_reference = true) { if (isset($this->readonly) and $this->readonly !== false) { $schema['readOnly'] = $this->readonly; } + if (isset($this->default)) { + $schema['default'] = $this->default; + } if (isset($this->writeonly) and $this->writeonly !== false) { $schema['writeOnly'] = $this->writeonly; }