Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): group parameters #46

Merged
merged 12 commits into from
Jan 4, 2022
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ module.exports = {
// there's a conflict when declaring `type` and `namespaces`, even with `ignoreDeclarationMerge`
'no-redeclare': 0,
'@typescript-eslint/no-redeclare': 0,
// Some endpoints have A LOT of parameters
'max-params': 0,

'@typescript-eslint/no-unused-vars': 2,
'unused-imports/no-unused-imports-ts': 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
/** SearchParams */
public class SearchParams {

public static final String SERIALIZED_NAME_PARAMS = "params";

@SerializedName(SERIALIZED_NAME_PARAMS)
private String params = "";

public static final String SERIALIZED_NAME_QUERY = "query";

@SerializedName(SERIALIZED_NAME_QUERY)
Expand Down Expand Up @@ -764,6 +769,26 @@ public AdvancedSyntaxFeaturesEnum read(final JsonReader jsonReader)
@SerializedName(SERIALIZED_NAME_RENDERING_CONTENT)
private Object renderingContent = new Object();

public SearchParams params(String params) {
this.params = params;
return this;
}

/**
* Search parameters as URL-encoded query string.
*
* @return params
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Search parameters as URL-encoded query string.")
public String getParams() {
return params;
}

public void setParams(String params) {
this.params = params;
}

public SearchParams query(String query) {
this.query = query;
return this;
Expand Down Expand Up @@ -2746,6 +2771,7 @@ public boolean equals(Object o) {
}
SearchParams searchParams = (SearchParams) o;
return (
Objects.equals(this.params, searchParams.params) &&
Objects.equals(this.query, searchParams.query) &&
Objects.equals(this.similarQuery, searchParams.similarQuery) &&
Objects.equals(this.filters, searchParams.filters) &&
Expand Down Expand Up @@ -2929,6 +2955,7 @@ private static <T> boolean equalsNullable(
@Override
public int hashCode() {
return Objects.hash(
params,
query,
similarQuery,
filters,
Expand Down Expand Up @@ -3020,6 +3047,7 @@ private static <T> int hashCodeNullable(JsonNullable<T> a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SearchParams {\n");
sb.append(" params: ").append(toIndentedString(params)).append("\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
sb
.append(" similarQuery: ")
Expand Down
Loading