diff --git a/docs/Model/Mod.md b/docs/Model/Mod.md index 728b66e..febae63 100644 --- a/docs/Model/Mod.md +++ b/docs/Model/Mod.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **summary** | **string** | Mod summary | [optional] **status** | [**\Aternos\CurseForgeApi\Model\ModStatus**](ModStatus.md) | | [optional] **download_count** | **int** | Number of downloads for the mod | [optional] -**is_featured** | **mixed** | Whether the mod is included in the featured mods list | [optional] +**is_featured** | **bool** | Whether the mod is included in the featured mods list | [optional] **primary_category_id** | **int** | The main category of the mod as it was chosen by the mod author | [optional] **categories** | [**\Aternos\CurseForgeApi\Model\Category[]**](Category.md) | List of categories that this mod is related to | [optional] **class_id** | **int** | The class id this mod belongs to | [optional] diff --git a/openapi.yaml b/openapi.yaml index 076d92a..750cf42 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1941,7 +1941,7 @@ components: format: int64 description: Number of downloads for the mod isFeatured: - format: boolean + type: boolean description: Whether the mod is included in the featured mods list primaryCategoryId: type: integer diff --git a/src/Model/Mod.php b/src/Model/Mod.php index 8aa2a91..b9c860a 100644 --- a/src/Model/Mod.php +++ b/src/Model/Mod.php @@ -66,7 +66,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'summary' => 'string', 'status' => '\Aternos\CurseForgeApi\Model\ModStatus', 'download_count' => 'int', - 'is_featured' => 'mixed', + 'is_featured' => 'bool', 'primary_category_id' => 'int', 'categories' => '\Aternos\CurseForgeApi\Model\Category[]', 'class_id' => 'int', @@ -107,7 +107,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'summary' => null, 'status' => null, 'download_count' => 'int64', - 'is_featured' => 'boolean', + 'is_featured' => null, 'primary_category_id' => 'int32', 'categories' => null, 'class_id' => 'int32', @@ -148,7 +148,7 @@ class Mod implements ModelInterface, ArrayAccess, JsonSerializable 'summary' => false, 'status' => false, 'download_count' => false, - 'is_featured' => true, + 'is_featured' => false, 'primary_category_id' => false, 'categories' => false, 'class_id' => true, @@ -706,9 +706,9 @@ public function setDownloadCount(?int $download_count): static /** * Gets is_featured * - * @return mixed|null + * @return bool|null */ - public function getIsFeatured(): mixed + public function getIsFeatured(): ?bool { return $this->container['is_featured']; } @@ -716,21 +716,14 @@ public function getIsFeatured(): mixed /** * Sets is_featured * - * @param mixed|null $is_featured Whether the mod is included in the featured mods list + * @param bool|null $is_featured Whether the mod is included in the featured mods list * * @return $this */ - public function setIsFeatured(mixed $is_featured): static + public function setIsFeatured(?bool $is_featured): static { if (is_null($is_featured)) { - array_push($this->openAPINullablesSetToNull, 'is_featured'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('is_featured', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable is_featured cannot be null'); } $this->container['is_featured'] = $is_featured;