Skip to content

Commit 6a5f338

Browse files
authored
fix(spec): name conflict between method and params (#121)
1 parent b2225e5 commit 6a5f338

24 files changed

+167
-168
lines changed

.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ module.exports = {
6464
'no-continue': 0,
6565
'@typescript-eslint/prefer-enum-initializers': 0,
6666

67-
// in the meantime of finding an alternative, we warn
68-
'no-shadow': 'off',
69-
'@typescript-eslint/no-shadow': ['warn'],
70-
7167
'@typescript-eslint/no-unused-vars': 2,
7268
'unused-imports/no-unused-imports-ts': 2,
7369
'@typescript-eslint/member-ordering': [

clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntries.java renamed to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchDictionaryEntriesParams.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
import java.util.List;
66
import java.util.Objects;
77

8-
/** The `batchDictionaryEntries` requests. */
9-
public class BatchDictionaryEntries {
8+
/** The `batchDictionaryEntries` parameters. */
9+
public class BatchDictionaryEntriesParams {
1010

1111
@SerializedName("clearExistingDictionaryEntries")
1212
private Boolean clearExistingDictionaryEntries = false;
1313

1414
@SerializedName("requests")
1515
private List<BatchDictionaryEntriesRequest> requests = new ArrayList<>();
1616

17-
public BatchDictionaryEntries clearExistingDictionaryEntries(
17+
public BatchDictionaryEntriesParams clearExistingDictionaryEntries(
1818
Boolean clearExistingDictionaryEntries
1919
) {
2020
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
@@ -37,14 +37,14 @@ public void setClearExistingDictionaryEntries(
3737
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
3838
}
3939

40-
public BatchDictionaryEntries requests(
40+
public BatchDictionaryEntriesParams requests(
4141
List<BatchDictionaryEntriesRequest> requests
4242
) {
4343
this.requests = requests;
4444
return this;
4545
}
4646

47-
public BatchDictionaryEntries addRequestsItem(
47+
public BatchDictionaryEntriesParams addRequestsItem(
4848
BatchDictionaryEntriesRequest requestsItem
4949
) {
5050
this.requests.add(requestsItem);
@@ -73,13 +73,13 @@ public boolean equals(Object o) {
7373
if (o == null || getClass() != o.getClass()) {
7474
return false;
7575
}
76-
BatchDictionaryEntries batchDictionaryEntries = (BatchDictionaryEntries) o;
76+
BatchDictionaryEntriesParams batchDictionaryEntriesParams = (BatchDictionaryEntriesParams) o;
7777
return (
7878
Objects.equals(
7979
this.clearExistingDictionaryEntries,
80-
batchDictionaryEntries.clearExistingDictionaryEntries
80+
batchDictionaryEntriesParams.clearExistingDictionaryEntries
8181
) &&
82-
Objects.equals(this.requests, batchDictionaryEntries.requests)
82+
Objects.equals(this.requests, batchDictionaryEntriesParams.requests)
8383
);
8484
}
8585

@@ -91,7 +91,7 @@ public int hashCode() {
9191
@Override
9292
public String toString() {
9393
StringBuilder sb = new StringBuilder();
94-
sb.append("class BatchDictionaryEntries {\n");
94+
sb.append("class BatchDictionaryEntriesParams {\n");
9595
sb
9696
.append(" clearExistingDictionaryEntries: ")
9797
.append(toIndentedString(clearExistingDictionaryEntries))
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import java.util.Objects;
55

66
/** Disable the builtin Algolia entries for a type of dictionary per language. */
7-
public class DictionarySettingsRequest {
7+
public class DictionarySettingsParams {
88

99
@SerializedName("disableStandardEntries")
1010
private StandardEntries disableStandardEntries;
1111

12-
public DictionarySettingsRequest disableStandardEntries(
12+
public DictionarySettingsParams disableStandardEntries(
1313
StandardEntries disableStandardEntries
1414
) {
1515
this.disableStandardEntries = disableStandardEntries;
@@ -40,10 +40,10 @@ public boolean equals(Object o) {
4040
if (o == null || getClass() != o.getClass()) {
4141
return false;
4242
}
43-
DictionarySettingsRequest dictionarySettingsRequest = (DictionarySettingsRequest) o;
43+
DictionarySettingsParams dictionarySettingsParams = (DictionarySettingsParams) o;
4444
return Objects.equals(
4545
this.disableStandardEntries,
46-
dictionarySettingsRequest.disableStandardEntries
46+
dictionarySettingsParams.disableStandardEntries
4747
);
4848
}
4949

@@ -55,7 +55,7 @@ public int hashCode() {
5555
@Override
5656
public String toString() {
5757
StringBuilder sb = new StringBuilder();
58-
sb.append("class DictionarySettingsRequest {\n");
58+
sb.append("class DictionarySettingsParams {\n");
5959
sb
6060
.append(" disableStandardEntries: ")
6161
.append(toIndentedString(disableStandardEntries))

clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntries.java renamed to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchDictionaryEntriesParams.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import com.google.gson.annotations.SerializedName;
44
import java.util.Objects;
55

6-
/** The `searchDictionaryEntries` request. */
7-
public class SearchDictionaryEntries {
6+
/** The `searchDictionaryEntries` parameters. */
7+
public class SearchDictionaryEntriesParams {
88

99
@SerializedName("query")
1010
private String query = "";
@@ -18,7 +18,7 @@ public class SearchDictionaryEntries {
1818
@SerializedName("language")
1919
private String language;
2020

21-
public SearchDictionaryEntries query(String query) {
21+
public SearchDictionaryEntriesParams query(String query) {
2222
this.query = query;
2323
return this;
2424
}
@@ -37,7 +37,7 @@ public void setQuery(String query) {
3737
this.query = query;
3838
}
3939

40-
public SearchDictionaryEntries page(Integer page) {
40+
public SearchDictionaryEntriesParams page(Integer page) {
4141
this.page = page;
4242
return this;
4343
}
@@ -56,7 +56,7 @@ public void setPage(Integer page) {
5656
this.page = page;
5757
}
5858

59-
public SearchDictionaryEntries hitsPerPage(Integer hitsPerPage) {
59+
public SearchDictionaryEntriesParams hitsPerPage(Integer hitsPerPage) {
6060
this.hitsPerPage = hitsPerPage;
6161
return this;
6262
}
@@ -75,7 +75,7 @@ public void setHitsPerPage(Integer hitsPerPage) {
7575
this.hitsPerPage = hitsPerPage;
7676
}
7777

78-
public SearchDictionaryEntries language(String language) {
78+
public SearchDictionaryEntriesParams language(String language) {
7979
this.language = language;
8080
return this;
8181
}
@@ -102,12 +102,15 @@ public boolean equals(Object o) {
102102
if (o == null || getClass() != o.getClass()) {
103103
return false;
104104
}
105-
SearchDictionaryEntries searchDictionaryEntries = (SearchDictionaryEntries) o;
105+
SearchDictionaryEntriesParams searchDictionaryEntriesParams = (SearchDictionaryEntriesParams) o;
106106
return (
107-
Objects.equals(this.query, searchDictionaryEntries.query) &&
108-
Objects.equals(this.page, searchDictionaryEntries.page) &&
109-
Objects.equals(this.hitsPerPage, searchDictionaryEntries.hitsPerPage) &&
110-
Objects.equals(this.language, searchDictionaryEntries.language)
107+
Objects.equals(this.query, searchDictionaryEntriesParams.query) &&
108+
Objects.equals(this.page, searchDictionaryEntriesParams.page) &&
109+
Objects.equals(
110+
this.hitsPerPage,
111+
searchDictionaryEntriesParams.hitsPerPage
112+
) &&
113+
Objects.equals(this.language, searchDictionaryEntriesParams.language)
111114
);
112115
}
113116

@@ -119,7 +122,7 @@ public int hashCode() {
119122
@Override
120123
public String toString() {
121124
StringBuilder sb = new StringBuilder();
122-
sb.append("class SearchDictionaryEntries {\n");
125+
sb.append("class SearchDictionaryEntriesParams {\n");
123126
sb.append(" query: ").append(toIndentedString(query)).append("\n");
124127
sb.append(" page: ").append(toIndentedString(page)).append("\n");
125128
sb

0 commit comments

Comments
 (0)