Skip to content

Commit

Permalink
bugfix: media_type 'default' property was not initiated
Browse files Browse the repository at this point in the history
  • Loading branch information
christopheg committed Sep 5, 2024
1 parent 1e41ec7 commit 26186fd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/Skeleton/Application/Api/Media/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ class Type {
*/
public $readonly = null;

/**
* Default
*
* @access public
* @var bool $default
*/
public $default = null;

/**
* Writeonly
*
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 26186fd

Please sign in to comment.