Skip to content

Commit 85023c6

Browse files
committed
fix(clients): remove all client side validation expect null check (generated)
algolia/api-clients-automation#3936 Co-authored-by: algolia-bot <[email protected]>
1 parent 4bf434d commit 85023c6

File tree

110 files changed

+0
-7047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+0
-7047
lines changed

lib/algolia/api/abtesting_client.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,6 @@ def list_ab_tests_with_http_info(
372372
index_suffix = nil,
373373
request_options = {}
374374
)
375-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
376-
raise(
377-
ArgumentError,
378-
"invalid value for \"\"offset\"\" when calling AbtestingClient.list_ab_tests, must be greater than or equal to 0."
379-
)
380-
end
381-
382375
path = "/2/abtests"
383376
query_params = {}
384377
query_params[:offset] = offset unless offset.nil?

lib/algolia/api/analytics_client.rb

Lines changed: 0 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -819,27 +819,6 @@ def get_searches_no_clicks_with_http_info(
819819
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`."
820820
end
821821

822-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
823-
raise(
824-
ArgumentError,
825-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
826-
)
827-
end
828-
829-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
830-
raise(
831-
ArgumentError,
832-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be smaller than or equal to 1000."
833-
)
834-
end
835-
836-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
837-
raise(
838-
ArgumentError,
839-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_clicks, must be greater than or equal to 0."
840-
)
841-
end
842-
843822
path = "/2/searches/noClicks"
844823
query_params = {}
845824
query_params[:index] = index
@@ -927,27 +906,6 @@ def get_searches_no_results_with_http_info(
927906
raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`."
928907
end
929908

930-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
931-
raise(
932-
ArgumentError,
933-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
934-
)
935-
end
936-
937-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
938-
raise(
939-
ArgumentError,
940-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be smaller than or equal to 1000."
941-
)
942-
end
943-
944-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
945-
raise(
946-
ArgumentError,
947-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_searches_no_results, must be greater than or equal to 0."
948-
)
949-
end
950-
951909
path = "/2/searches/noResults"
952910
query_params = {}
953911
query_params[:index] = index
@@ -1080,27 +1038,6 @@ def get_top_countries_with_http_info(
10801038
raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`."
10811039
end
10821040

1083-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1084-
raise(
1085-
ArgumentError,
1086-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
1087-
)
1088-
end
1089-
1090-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1091-
raise(
1092-
ArgumentError,
1093-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be smaller than or equal to 1000."
1094-
)
1095-
end
1096-
1097-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1098-
raise(
1099-
ArgumentError,
1100-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_countries, must be greater than or equal to 0."
1101-
)
1102-
end
1103-
11041041
path = "/2/countries"
11051042
query_params = {}
11061043
query_params[:index] = index
@@ -1182,27 +1119,6 @@ def get_top_filter_attributes_with_http_info(
11821119
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`."
11831120
end
11841121

1185-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1186-
raise(
1187-
ArgumentError,
1188-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
1189-
)
1190-
end
1191-
1192-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1193-
raise(
1194-
ArgumentError,
1195-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be smaller than or equal to 1000."
1196-
)
1197-
end
1198-
1199-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1200-
raise(
1201-
ArgumentError,
1202-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_attributes, must be greater than or equal to 0."
1203-
)
1204-
end
1205-
12061122
path = "/2/filters"
12071123
query_params = {}
12081124
query_params[:index] = index
@@ -1302,27 +1218,6 @@ def get_top_filter_for_attribute_with_http_info(
13021218
raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`."
13031219
end
13041220

1305-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1306-
raise(
1307-
ArgumentError,
1308-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
1309-
)
1310-
end
1311-
1312-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1313-
raise(
1314-
ArgumentError,
1315-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be smaller than or equal to 1000."
1316-
)
1317-
end
1318-
1319-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1320-
raise(
1321-
ArgumentError,
1322-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filter_for_attribute, must be greater than or equal to 0."
1323-
)
1324-
end
1325-
13261221
path = "/2/filters/{attribute}".sub("{" + "attribute" + "}", Transport.encode_uri(attribute.to_s))
13271222
query_params = {}
13281223
query_params[:index] = index
@@ -1419,27 +1314,6 @@ def get_top_filters_no_results_with_http_info(
14191314
raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`."
14201315
end
14211316

1422-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1423-
raise(
1424-
ArgumentError,
1425-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
1426-
)
1427-
end
1428-
1429-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1430-
raise(
1431-
ArgumentError,
1432-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be smaller than or equal to 1000."
1433-
)
1434-
end
1435-
1436-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1437-
raise(
1438-
ArgumentError,
1439-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_filters_no_results, must be greater than or equal to 0."
1440-
)
1441-
end
1442-
14431317
path = "/2/filters/noResults"
14441318
query_params = {}
14451319
query_params[:index] = index
@@ -1537,27 +1411,6 @@ def get_top_hits_with_http_info(
15371411
raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
15381412
end
15391413

1540-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1541-
raise(
1542-
ArgumentError,
1543-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
1544-
)
1545-
end
1546-
1547-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1548-
raise(
1549-
ArgumentError,
1550-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be smaller than or equal to 1000."
1551-
)
1552-
end
1553-
1554-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1555-
raise(
1556-
ArgumentError,
1557-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_hits, must be greater than or equal to 0."
1558-
)
1559-
end
1560-
15611414
path = "/2/hits"
15621415
query_params = {}
15631416
query_params[:index] = index
@@ -1662,27 +1515,6 @@ def get_top_searches_with_http_info(
16621515
raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
16631516
end
16641517

1665-
if @api_client.config.client_side_validation && !limit.nil? && limit > 1000
1666-
raise(
1667-
ArgumentError,
1668-
"invalid value for \"\"limit\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
1669-
)
1670-
end
1671-
1672-
if @api_client.config.client_side_validation && !offset.nil? && offset > 1000
1673-
raise(
1674-
ArgumentError,
1675-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be smaller than or equal to 1000."
1676-
)
1677-
end
1678-
1679-
if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1680-
raise(
1681-
ArgumentError,
1682-
"invalid value for \"\"offset\"\" when calling AnalyticsClient.get_top_searches, must be greater than or equal to 0."
1683-
)
1684-
end
1685-
16861518
path = "/2/searches"
16871519
query_params = {}
16881520
query_params[:index] = index

0 commit comments

Comments
 (0)