Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Model/Mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 8 additions & 15 deletions src/Model/Mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -706,31 +706,24 @@ 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'];
}

/**
* 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;

Expand Down
Loading