Skip to content

Commit

Permalink
fix(spec): name conflict between method and params (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Feb 7, 2022
1 parent b2225e5 commit 6a5f338
Show file tree
Hide file tree
Showing 24 changed files with 167 additions and 168 deletions.
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ module.exports = {
'no-continue': 0,
'@typescript-eslint/prefer-enum-initializers': 0,

// in the meantime of finding an alternative, we warn
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['warn'],

'@typescript-eslint/no-unused-vars': 2,
'unused-imports/no-unused-imports-ts': 2,
'@typescript-eslint/member-ordering': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import java.util.List;
import java.util.Objects;

/** The `batchDictionaryEntries` requests. */
public class BatchDictionaryEntries {
/** The `batchDictionaryEntries` parameters. */
public class BatchDictionaryEntriesParams {

@SerializedName("clearExistingDictionaryEntries")
private Boolean clearExistingDictionaryEntries = false;

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

public BatchDictionaryEntries clearExistingDictionaryEntries(
public BatchDictionaryEntriesParams clearExistingDictionaryEntries(
Boolean clearExistingDictionaryEntries
) {
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
Expand All @@ -37,14 +37,14 @@ public void setClearExistingDictionaryEntries(
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
}

public BatchDictionaryEntries requests(
public BatchDictionaryEntriesParams requests(
List<BatchDictionaryEntriesRequest> requests
) {
this.requests = requests;
return this;
}

public BatchDictionaryEntries addRequestsItem(
public BatchDictionaryEntriesParams addRequestsItem(
BatchDictionaryEntriesRequest requestsItem
) {
this.requests.add(requestsItem);
Expand Down Expand Up @@ -73,13 +73,13 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
BatchDictionaryEntries batchDictionaryEntries = (BatchDictionaryEntries) o;
BatchDictionaryEntriesParams batchDictionaryEntriesParams = (BatchDictionaryEntriesParams) o;
return (
Objects.equals(
this.clearExistingDictionaryEntries,
batchDictionaryEntries.clearExistingDictionaryEntries
batchDictionaryEntriesParams.clearExistingDictionaryEntries
) &&
Objects.equals(this.requests, batchDictionaryEntries.requests)
Objects.equals(this.requests, batchDictionaryEntriesParams.requests)
);
}

Expand All @@ -91,7 +91,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BatchDictionaryEntries {\n");
sb.append("class BatchDictionaryEntriesParams {\n");
sb
.append(" clearExistingDictionaryEntries: ")
.append(toIndentedString(clearExistingDictionaryEntries))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import java.util.Objects;

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

@SerializedName("disableStandardEntries")
private StandardEntries disableStandardEntries;

public DictionarySettingsRequest disableStandardEntries(
public DictionarySettingsParams disableStandardEntries(
StandardEntries disableStandardEntries
) {
this.disableStandardEntries = disableStandardEntries;
Expand Down Expand Up @@ -40,10 +40,10 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
DictionarySettingsRequest dictionarySettingsRequest = (DictionarySettingsRequest) o;
DictionarySettingsParams dictionarySettingsParams = (DictionarySettingsParams) o;
return Objects.equals(
this.disableStandardEntries,
dictionarySettingsRequest.disableStandardEntries
dictionarySettingsParams.disableStandardEntries
);
}

Expand All @@ -55,7 +55,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DictionarySettingsRequest {\n");
sb.append("class DictionarySettingsParams {\n");
sb
.append(" disableStandardEntries: ")
.append(toIndentedString(disableStandardEntries))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.google.gson.annotations.SerializedName;
import java.util.Objects;

/** The `searchDictionaryEntries` request. */
public class SearchDictionaryEntries {
/** The `searchDictionaryEntries` parameters. */
public class SearchDictionaryEntriesParams {

@SerializedName("query")
private String query = "";
Expand All @@ -18,7 +18,7 @@ public class SearchDictionaryEntries {
@SerializedName("language")
private String language;

public SearchDictionaryEntries query(String query) {
public SearchDictionaryEntriesParams query(String query) {
this.query = query;
return this;
}
Expand All @@ -37,7 +37,7 @@ public void setQuery(String query) {
this.query = query;
}

public SearchDictionaryEntries page(Integer page) {
public SearchDictionaryEntriesParams page(Integer page) {
this.page = page;
return this;
}
Expand All @@ -56,7 +56,7 @@ public void setPage(Integer page) {
this.page = page;
}

public SearchDictionaryEntries hitsPerPage(Integer hitsPerPage) {
public SearchDictionaryEntriesParams hitsPerPage(Integer hitsPerPage) {
this.hitsPerPage = hitsPerPage;
return this;
}
Expand All @@ -75,7 +75,7 @@ public void setHitsPerPage(Integer hitsPerPage) {
this.hitsPerPage = hitsPerPage;
}

public SearchDictionaryEntries language(String language) {
public SearchDictionaryEntriesParams language(String language) {
this.language = language;
return this;
}
Expand All @@ -102,12 +102,15 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
SearchDictionaryEntries searchDictionaryEntries = (SearchDictionaryEntries) o;
SearchDictionaryEntriesParams searchDictionaryEntriesParams = (SearchDictionaryEntriesParams) o;
return (
Objects.equals(this.query, searchDictionaryEntries.query) &&
Objects.equals(this.page, searchDictionaryEntries.page) &&
Objects.equals(this.hitsPerPage, searchDictionaryEntries.hitsPerPage) &&
Objects.equals(this.language, searchDictionaryEntries.language)
Objects.equals(this.query, searchDictionaryEntriesParams.query) &&
Objects.equals(this.page, searchDictionaryEntriesParams.page) &&
Objects.equals(
this.hitsPerPage,
searchDictionaryEntriesParams.hitsPerPage
) &&
Objects.equals(this.language, searchDictionaryEntriesParams.language)
);
}

Expand All @@ -119,7 +122,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SearchDictionaryEntries {\n");
sb.append("class SearchDictionaryEntriesParams {\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
sb.append(" page: ").append(toIndentedString(page)).append("\n");
sb
Expand Down
Loading

0 comments on commit 6a5f338

Please sign in to comment.