Skip to content

Commit

Permalink
fix(clients): remove all client side validation expect null check (ge…
Browse files Browse the repository at this point in the history
…nerated)

algolia/api-clients-automation#3936

Co-authored-by: algolia-bot <[email protected]>
  • Loading branch information
algolia-bot committed Oct 9, 2024
1 parent 4bf434d commit 85023c6
Show file tree
Hide file tree
Showing 110 changed files with 0 additions and 7,047 deletions.
7 changes: 0 additions & 7 deletions lib/algolia/api/abtesting_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,6 @@ def list_ab_tests_with_http_info(
index_suffix = nil,
request_options = {}
)
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AbtestingClient.list_ab_tests, must be greater than or equal to 0."
)
end

path = "/2/abtests"
query_params = {}
query_params[:offset] = offset unless offset.nil?
Expand Down
168 changes: 0 additions & 168 deletions lib/algolia/api/analytics_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -819,27 +819,6 @@ def get_searches_no_clicks_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be greater than or equal to 0."
)
end

path = "/2/searches/noClicks"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -927,27 +906,6 @@ def get_searches_no_results_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be greater than or equal to 0."
)
end

path = "/2/searches/noResults"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1080,27 +1038,6 @@ def get_top_countries_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be greater than or equal to 0."
)
end

path = "/2/countries"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1182,27 +1119,6 @@ def get_top_filter_attributes_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be greater than or equal to 0."
)
end

path = "/2/filters"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1302,27 +1218,6 @@ def get_top_filter_for_attribute_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be greater than or equal to 0."
)
end

path = "/2/filters/{attribute}".sub("{" + "attribute" + "}", Transport.encode_uri(attribute.to_s))
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1419,27 +1314,6 @@ def get_top_filters_no_results_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be greater than or equal to 0."
)
end

path = "/2/filters/noResults"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1537,27 +1411,6 @@ def get_top_hits_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be greater than or equal to 0."
)
end

path = "/2/hits"
query_params = {}
query_params[:index] = index
Expand Down Expand Up @@ -1662,27 +1515,6 @@ def get_top_searches_with_http_info(
raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
end

if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
raise(
ArgumentError,
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
)
end

if @api_client.config.client_side_validation && !offset.nil? && offset < 0
raise(
ArgumentError,
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be greater than or equal to 0."
)
end

path = "/2/searches"
query_params = {}
query_params[:index] = index
Expand Down
Loading

0 comments on commit 85023c6

Please sign in to comment.