Skip to content

Commit 1025ec0

Browse files
committed
Rename ModsSearchSortField back to ModSearchSortField
1 parent 4df5dd8 commit 1025ec0

File tree

7 files changed

+43
-43
lines changed

7 files changed

+43
-43
lines changed

docs/Api/ModsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ $class_id = 56; // int | Filter by section id (discoverable via Categories)
301301
$category_id = 56; // int | Filter by category id
302302
$game_version = 'game_version_example'; // string | Filter by game version string
303303
$search_filter = 'search_filter_example'; // string | Filter by free text search in the mod name and author
304-
$sort_field = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\ModsSearchSortField(); // \Aternos\CurseForgeApi\Model\ModsSearchSortField | Filter by ModsSearchSortField enumeration
304+
$sort_field = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\ModSearchSortField(); // \Aternos\CurseForgeApi\Model\ModSearchSortField | Filter by ModsSearchSortField enumeration
305305
$sort_order = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\SortOrder(); // \Aternos\CurseForgeApi\Model\SortOrder | 'asc' if sort is in ascending order, 'desc' if sort is in descending order
306306
$mod_loader_type = new \Aternos\CurseForgeApi\Model\\Aternos\CurseForgeApi\Model\ModLoaderType(); // \Aternos\CurseForgeApi\Model\ModLoaderType | Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion.
307307
$game_version_type_id = 56; // int | Filter only mods that contain files tagged with versions of the given gameVersionTypeId
@@ -332,7 +332,7 @@ try {
332332
| **category_id** | **int**| Filter by category id | [optional] |
333333
| **game_version** | **string**| Filter by game version string | [optional] |
334334
| **search_filter** | **string**| Filter by free text search in the mod name and author | [optional] |
335-
| **sort_field** | [**\Aternos\CurseForgeApi\Model\ModsSearchSortField**](../Model/.md)| Filter by ModsSearchSortField enumeration | [optional] |
335+
| **sort_field** | [**\Aternos\CurseForgeApi\Model\ModSearchSortField**](../Model/.md)| Filter by ModsSearchSortField enumeration | [optional] |
336336
| **sort_order** | [**\Aternos\CurseForgeApi\Model\SortOrder**](../Model/.md)| 'asc' if sort is in ascending order, 'desc' if sort is in descending order | [optional] |
337337
| **mod_loader_type** | [**\Aternos\CurseForgeApi\Model\ModLoaderType**](../Model/.md)| Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. | [optional] |
338338
| **game_version_type_id** | **int**| Filter only mods that contain files tagged with versions of the given gameVersionTypeId | [optional] |

docs/Model/ModsSearchSortField.md renamed to docs/Model/ModSearchSortField.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# # ModsSearchSortField
1+
# # ModSearchSortField
22

33
## Properties
44

openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ paths:
285285
description: Filter by ModsSearchSortField enumeration
286286
required: false
287287
schema:
288-
$ref: '#/components/schemas/ModsSearchSortField'
288+
$ref: '#/components/schemas/ModSearchSortField'
289289
- name: sortOrder
290290
in: query
291291
description: >
@@ -2043,7 +2043,7 @@ components:
20432043
- Fabric
20442044
- Quilt
20452045
- NeoForge
2046-
ModsSearchSortField:
2046+
ModSearchSortField:
20472047
description: |
20482048
Possible enum values:
20492049
* 1 = Featured

src/Api/ModsApi.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ public function getModsRequest(
15161516
* @param int|null $category_id Filter by category id (optional)
15171517
* @param string|null $game_version Filter by game version string (optional)
15181518
* @param string|null $search_filter Filter by free text search in the mod name and author (optional)
1519-
* @param \Aternos\CurseForgeApi\Model\ModsSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
1519+
* @param \Aternos\CurseForgeApi\Model\ModSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
15201520
* @param \Aternos\CurseForgeApi\Model\SortOrder|null $sort_order 'asc' if sort is in ascending order, 'desc' if sort is in descending order (optional)
15211521
* @param \Aternos\CurseForgeApi\Model\ModLoaderType|null $mod_loader_type Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. (optional)
15221522
* @param int|null $game_version_type_id Filter only mods that contain files tagged with versions of the given gameVersionTypeId (optional)
@@ -1541,7 +1541,7 @@ public function searchMods(
15411541
?int $category_id = null,
15421542
?string $game_version = null,
15431543
?string $search_filter = null,
1544-
?\Aternos\CurseForgeApi\Model\ModsSearchSortField $sort_field = null,
1544+
?\Aternos\CurseForgeApi\Model\ModSearchSortField $sort_field = null,
15451545
?\Aternos\CurseForgeApi\Model\SortOrder $sort_order = null,
15461546
?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_loader_type = null,
15471547
?int $game_version_type_id = null,
@@ -1571,7 +1571,7 @@ public function searchMods(
15711571
* @param int|null $category_id Filter by category id (optional)
15721572
* @param string|null $game_version Filter by game version string (optional)
15731573
* @param string|null $search_filter Filter by free text search in the mod name and author (optional)
1574-
* @param \Aternos\CurseForgeApi\Model\ModsSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
1574+
* @param \Aternos\CurseForgeApi\Model\ModSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
15751575
* @param \Aternos\CurseForgeApi\Model\SortOrder|null $sort_order 'asc' if sort is in ascending order, 'desc' if sort is in descending order (optional)
15761576
* @param \Aternos\CurseForgeApi\Model\ModLoaderType|null $mod_loader_type Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. (optional)
15771577
* @param int|null $game_version_type_id Filter only mods that contain files tagged with versions of the given gameVersionTypeId (optional)
@@ -1596,7 +1596,7 @@ public function searchModsWithHttpInfo(
15961596
?int $category_id = null,
15971597
?string $game_version = null,
15981598
?string $search_filter = null,
1599-
?\Aternos\CurseForgeApi\Model\ModsSearchSortField $sort_field = null,
1599+
?\Aternos\CurseForgeApi\Model\ModSearchSortField $sort_field = null,
16001600
?\Aternos\CurseForgeApi\Model\SortOrder $sort_order = null,
16011601
?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_loader_type = null,
16021602
?int $game_version_type_id = null,
@@ -1733,7 +1733,7 @@ public function searchModsWithHttpInfo(
17331733
* @param int|null $category_id Filter by category id (optional)
17341734
* @param string|null $game_version Filter by game version string (optional)
17351735
* @param string|null $search_filter Filter by free text search in the mod name and author (optional)
1736-
* @param \Aternos\CurseForgeApi\Model\ModsSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
1736+
* @param \Aternos\CurseForgeApi\Model\ModSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
17371737
* @param \Aternos\CurseForgeApi\Model\SortOrder|null $sort_order 'asc' if sort is in ascending order, 'desc' if sort is in descending order (optional)
17381738
* @param \Aternos\CurseForgeApi\Model\ModLoaderType|null $mod_loader_type Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. (optional)
17391739
* @param int|null $game_version_type_id Filter only mods that contain files tagged with versions of the given gameVersionTypeId (optional)
@@ -1757,7 +1757,7 @@ public function searchModsAsync(
17571757
?int $category_id = null,
17581758
?string $game_version = null,
17591759
?string $search_filter = null,
1760-
?\Aternos\CurseForgeApi\Model\ModsSearchSortField $sort_field = null,
1760+
?\Aternos\CurseForgeApi\Model\ModSearchSortField $sort_field = null,
17611761
?\Aternos\CurseForgeApi\Model\SortOrder $sort_order = null,
17621762
?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_loader_type = null,
17631763
?int $game_version_type_id = null,
@@ -1791,7 +1791,7 @@ function ($response) {
17911791
* @param int|null $category_id Filter by category id (optional)
17921792
* @param string|null $game_version Filter by game version string (optional)
17931793
* @param string|null $search_filter Filter by free text search in the mod name and author (optional)
1794-
* @param \Aternos\CurseForgeApi\Model\ModsSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
1794+
* @param \Aternos\CurseForgeApi\Model\ModSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
17951795
* @param \Aternos\CurseForgeApi\Model\SortOrder|null $sort_order 'asc' if sort is in ascending order, 'desc' if sort is in descending order (optional)
17961796
* @param \Aternos\CurseForgeApi\Model\ModLoaderType|null $mod_loader_type Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. (optional)
17971797
* @param int|null $game_version_type_id Filter only mods that contain files tagged with versions of the given gameVersionTypeId (optional)
@@ -1815,7 +1815,7 @@ public function searchModsAsyncWithHttpInfo(
18151815
?int $category_id = null,
18161816
?string $game_version = null,
18171817
?string $search_filter = null,
1818-
?\Aternos\CurseForgeApi\Model\ModsSearchSortField $sort_field = null,
1818+
?\Aternos\CurseForgeApi\Model\ModSearchSortField $sort_field = null,
18191819
?\Aternos\CurseForgeApi\Model\SortOrder $sort_order = null,
18201820
?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_loader_type = null,
18211821
?int $game_version_type_id = null,
@@ -1878,7 +1878,7 @@ function ($exception) {
18781878
* @param int|null $category_id Filter by category id (optional)
18791879
* @param string|null $game_version Filter by game version string (optional)
18801880
* @param string|null $search_filter Filter by free text search in the mod name and author (optional)
1881-
* @param \Aternos\CurseForgeApi\Model\ModsSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
1881+
* @param \Aternos\CurseForgeApi\Model\ModSearchSortField|null $sort_field Filter by ModsSearchSortField enumeration (optional)
18821882
* @param \Aternos\CurseForgeApi\Model\SortOrder|null $sort_order 'asc' if sort is in ascending order, 'desc' if sort is in descending order (optional)
18831883
* @param \Aternos\CurseForgeApi\Model\ModLoaderType|null $mod_loader_type Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion. (optional)
18841884
* @param int|null $game_version_type_id Filter only mods that contain files tagged with versions of the given gameVersionTypeId (optional)
@@ -1902,7 +1902,7 @@ public function searchModsRequest(
19021902
?int $category_id = null,
19031903
?string $game_version = null,
19041904
?string $search_filter = null,
1905-
?\Aternos\CurseForgeApi\Model\ModsSearchSortField $sort_field = null,
1905+
?\Aternos\CurseForgeApi\Model\ModSearchSortField $sort_field = null,
19061906
?\Aternos\CurseForgeApi\Model\SortOrder $sort_order = null,
19071907
?\Aternos\CurseForgeApi\Model\ModLoaderType $mod_loader_type = null,
19081908
?int $game_version_type_id = null,
@@ -2016,7 +2016,7 @@ public function searchModsRequest(
20162016
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
20172017
$sort_field?->value,
20182018
'sortField', // param base name
2019-
'ModsSearchSortField', // openApiType
2019+
'ModSearchSortField', // openApiType
20202020
'form', // style
20212021
true, // explode
20222022
false // required

src/Client/Options/ModSearchOptions.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Aternos\CurseForgeApi\Client\List\PaginatedModList;
66
use Aternos\CurseForgeApi\Model\ModLoaderType;
7-
use Aternos\CurseForgeApi\Model\ModsSearchSortField;
7+
use Aternos\CurseForgeApi\Model\ModSearchSortField;
88
use Aternos\CurseForgeApi\Model\PremiumType;
99
use Aternos\CurseForgeApi\Model\SortOrder;
1010

@@ -16,7 +16,7 @@ class ModSearchOptions
1616
* @param int[]|null $categoryIds
1717
* @param string[]|null $gameVersions
1818
* @param string|null $searchFilter Filter by free text search in the mod name and author
19-
* @param ModsSearchSortField|null $sortField
19+
* @param ModSearchSortField|null $sortField
2020
* @param SortOrder|null $sortOrder
2121
* @param ModLoaderType[]|null $modLoaderTypes Filter only mods associated to a given mod loader (Forge, Fabric ...). Must be coupled with gameVersion.
2222
* @param int|null $gameVersionTypeId Filter only mods that contain files tagged with versions of the given gameVersionTypeId
@@ -28,21 +28,21 @@ class ModSearchOptions
2828
* @param int $pageSize
2929
*/
3030
public function __construct(
31-
protected int $gameId,
32-
protected int $offset = 0,
33-
protected int $pageSize = PaginatedModList::MAX_PAGE_SIZE,
34-
protected ?int $classId = null,
35-
protected ?array $categoryIds = null,
36-
protected ?array $gameVersions = null,
37-
protected ?string $searchFilter = null,
38-
protected ?ModsSearchSortField $sortField = null,
39-
protected ?SortOrder $sortOrder = null,
40-
protected ?array $modLoaderTypes = null,
41-
protected ?int $gameVersionTypeId = null,
42-
protected ?int $authorId = null,
43-
protected ?int $primaryAuthorId = null,
44-
protected ?PremiumType $premiumType = null,
45-
protected ?string $slug = null,
31+
protected int $gameId,
32+
protected int $offset = 0,
33+
protected int $pageSize = PaginatedModList::MAX_PAGE_SIZE,
34+
protected ?int $classId = null,
35+
protected ?array $categoryIds = null,
36+
protected ?array $gameVersions = null,
37+
protected ?string $searchFilter = null,
38+
protected ?ModSearchSortField $sortField = null,
39+
protected ?SortOrder $sortOrder = null,
40+
protected ?array $modLoaderTypes = null,
41+
protected ?int $gameVersionTypeId = null,
42+
protected ?int $authorId = null,
43+
protected ?int $primaryAuthorId = null,
44+
protected ?PremiumType $premiumType = null,
45+
protected ?string $slug = null,
4646
)
4747
{
4848
}
@@ -247,18 +247,18 @@ public function setSearchFilter(?string $searchFilter): static
247247
}
248248

249249
/**
250-
* @return ModsSearchSortField|null
250+
* @return ModSearchSortField|null
251251
*/
252-
public function getSortField(): ?ModsSearchSortField
252+
public function getSortField(): ?ModSearchSortField
253253
{
254254
return $this->sortField;
255255
}
256256

257257
/**
258-
* @param ModsSearchSortField|null $sortField
258+
* @param ModSearchSortField|null $sortField
259259
* @return $this
260260
*/
261-
public function setSortField(?ModsSearchSortField $sortField): static
261+
public function setSortField(?ModSearchSortField $sortField): static
262262
{
263263
$this->sortField = $sortField;
264264
return $this;

src/Model/ModsSearchSortField.php renamed to src/Model/ModSearchSortField.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* ModsSearchSortField
3+
* ModSearchSortField
44
*
55
* PHP version 8.1
66
*
@@ -28,14 +28,14 @@
2828
namespace Aternos\CurseForgeApi\Model;
2929

3030
/**
31-
* ModsSearchSortField Class Doc Comment
31+
* ModSearchSortField Class Doc Comment
3232
*
3333
* @description Possible enum values: * 1 &#x3D; Featured * 2 &#x3D; Popularity * 3 &#x3D; LastUpdated * 4 &#x3D; Name * 5 &#x3D; Author * 6 &#x3D; TotalDownloads * 7 &#x3D; Category * 8 &#x3D; GameVersion * 9 &#x3D; Early Access * 10 &#x3D; Featured Release * 11 &#x3D; Release Date * 12 &#x3D; Rating
3434
* @package Aternos\CurseForgeApi
3535
* @author OpenAPI Generator team
3636
* @link https://openapi-generator.tech
3737
*/
38-
enum ModsSearchSortField: int
38+
enum ModSearchSortField: int
3939
{
4040
case FEATURED = 1;
4141

tests/Unit/Client/Options/ModSearchOptionsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Aternos\CurseForgeApi\Client\Options\ModSearchOptions;
66
use Aternos\CurseForgeApi\Model\ModLoaderType;
7-
use Aternos\CurseForgeApi\Model\ModsSearchSortField;
7+
use Aternos\CurseForgeApi\Model\ModSearchSortField;
88
use Aternos\CurseForgeApi\Model\PremiumType;
99
use Aternos\CurseForgeApi\Model\SortOrder;
1010
use PHPUnit\Framework\TestCase;
@@ -155,8 +155,8 @@ public function testSetSortField(): void
155155
{
156156
$modSearchOptions = new ModSearchOptions(1);
157157
$this->assertNull($modSearchOptions->getSortField());
158-
$modSearchOptions->setSortField(ModsSearchSortField::NAME);
159-
$this->assertSame(ModsSearchSortField::NAME, $modSearchOptions->getSortField());
158+
$modSearchOptions->setSortField(ModSearchSortField::NAME);
159+
$this->assertSame(ModSearchSortField::NAME, $modSearchOptions->getSortField());
160160
$modSearchOptions->setSortField(null);
161161
$this->assertNull($modSearchOptions->getSortField());
162162
}

0 commit comments

Comments
 (0)