elasticsearch-api 8.10.0 → 8.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (745) hide show
  1. checksums.yaml +4 -4
  2. data/api-spec-testing/rspec_matchers.rb +2 -0
  3. data/api-spec-testing/test_file/action.rb +76 -64
  4. data/api-spec-testing/test_file/task_group.rb +5 -2
  5. data/api-spec-testing/test_file.rb +8 -3
  6. data/api-spec-testing/wipe_cluster.rb +9 -4
  7. data/elasticsearch-api.gemspec +2 -2
  8. data/lib/elasticsearch/api/actions/async_search/delete.rb +10 -2
  9. data/lib/elasticsearch/api/actions/async_search/get.rb +10 -2
  10. data/lib/elasticsearch/api/actions/async_search/status.rb +10 -2
  11. data/lib/elasticsearch/api/actions/async_search/submit.rb +10 -2
  12. data/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +10 -2
  13. data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +4 -2
  14. data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +10 -2
  15. data/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +10 -2
  16. data/lib/elasticsearch/api/actions/bulk.rb +11 -2
  17. data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -2
  18. data/lib/elasticsearch/api/actions/cat/allocation.rb +10 -2
  19. data/lib/elasticsearch/api/actions/cat/component_templates.rb +10 -2
  20. data/lib/elasticsearch/api/actions/cat/count.rb +10 -2
  21. data/lib/elasticsearch/api/actions/cat/fielddata.rb +10 -2
  22. data/lib/elasticsearch/api/actions/cat/health.rb +4 -2
  23. data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
  24. data/lib/elasticsearch/api/actions/cat/indices.rb +10 -2
  25. data/lib/elasticsearch/api/actions/cat/master.rb +4 -2
  26. data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +10 -2
  27. data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +10 -2
  28. data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +10 -2
  29. data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +10 -2
  30. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +4 -2
  31. data/lib/elasticsearch/api/actions/cat/nodes.rb +4 -2
  32. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +4 -2
  33. data/lib/elasticsearch/api/actions/cat/plugins.rb +4 -2
  34. data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -2
  35. data/lib/elasticsearch/api/actions/cat/repositories.rb +4 -2
  36. data/lib/elasticsearch/api/actions/cat/segments.rb +10 -2
  37. data/lib/elasticsearch/api/actions/cat/shards.rb +10 -2
  38. data/lib/elasticsearch/api/actions/cat/snapshots.rb +10 -2
  39. data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -2
  40. data/lib/elasticsearch/api/actions/cat/templates.rb +10 -2
  41. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +10 -2
  42. data/lib/elasticsearch/api/actions/cat/transforms.rb +10 -2
  43. data/lib/elasticsearch/api/actions/clear_scroll.rb +11 -3
  44. data/lib/elasticsearch/api/actions/close_point_in_time.rb +4 -2
  45. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +4 -2
  46. data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +10 -2
  47. data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +4 -2
  48. data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +10 -2
  49. data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +10 -2
  50. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +4 -2
  51. data/lib/elasticsearch/api/actions/cluster/health.rb +10 -2
  52. data/lib/elasticsearch/api/actions/cluster/info.rb +10 -2
  53. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +4 -2
  54. data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +4 -2
  55. data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +10 -2
  56. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +4 -2
  57. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +4 -2
  58. data/lib/elasticsearch/api/actions/cluster/reroute.rb +4 -2
  59. data/lib/elasticsearch/api/actions/cluster/state.rb +10 -2
  60. data/lib/elasticsearch/api/actions/cluster/stats.rb +10 -2
  61. data/lib/elasticsearch/api/actions/connector/check_in.rb +65 -0
  62. data/lib/elasticsearch/api/actions/connector/delete.rb +65 -0
  63. data/lib/elasticsearch/api/actions/connector/get.rb +65 -0
  64. data/lib/elasticsearch/api/actions/connector/last_sync.rb +67 -0
  65. data/lib/elasticsearch/api/actions/connector/list.rb +56 -0
  66. data/lib/elasticsearch/api/actions/connector/post.rb +57 -0
  67. data/lib/elasticsearch/api/actions/connector/put.rb +67 -0
  68. data/lib/elasticsearch/api/actions/connector/update_configuration.rb +67 -0
  69. data/lib/elasticsearch/api/actions/connector/update_error.rb +67 -0
  70. data/lib/elasticsearch/api/actions/connector/update_filtering.rb +67 -0
  71. data/lib/elasticsearch/api/actions/connector/update_name.rb +67 -0
  72. data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +67 -0
  73. data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +67 -0
  74. data/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb +66 -0
  75. data/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb +66 -0
  76. data/lib/elasticsearch/api/actions/connector_sync_job/delete.rb +66 -0
  77. data/lib/elasticsearch/api/actions/connector_sync_job/error.rb +69 -0
  78. data/lib/elasticsearch/api/actions/connector_sync_job/get.rb +66 -0
  79. data/lib/elasticsearch/api/actions/connector_sync_job/list.rb +58 -0
  80. data/lib/elasticsearch/api/actions/connector_sync_job/post.rb +57 -0
  81. data/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb +69 -0
  82. data/lib/elasticsearch/api/actions/count.rb +10 -2
  83. data/lib/elasticsearch/api/actions/create.rb +9 -1
  84. data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +10 -2
  85. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +10 -2
  86. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +10 -2
  87. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +10 -2
  88. data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +10 -2
  89. data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +10 -2
  90. data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +10 -2
  91. data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +10 -2
  92. data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +10 -2
  93. data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +10 -2
  94. data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +10 -2
  95. data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +4 -2
  96. data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +10 -2
  97. data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +10 -2
  98. data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +10 -2
  99. data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +4 -2
  100. data/lib/elasticsearch/api/actions/delete.rb +11 -3
  101. data/lib/elasticsearch/api/actions/delete_by_query.rb +10 -2
  102. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +10 -2
  103. data/lib/elasticsearch/api/actions/delete_script.rb +10 -2
  104. data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +10 -2
  105. data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +10 -2
  106. data/lib/elasticsearch/api/actions/enrich/get_policy.rb +10 -2
  107. data/lib/elasticsearch/api/actions/enrich/put_policy.rb +10 -2
  108. data/lib/elasticsearch/api/actions/enrich/stats.rb +4 -2
  109. data/lib/elasticsearch/api/actions/eql/delete.rb +10 -2
  110. data/lib/elasticsearch/api/actions/eql/get.rb +10 -2
  111. data/lib/elasticsearch/api/actions/eql/get_status.rb +10 -2
  112. data/lib/elasticsearch/api/actions/eql/search.rb +10 -2
  113. data/lib/elasticsearch/api/actions/esql/query.rb +59 -0
  114. data/lib/elasticsearch/api/actions/exists.rb +10 -2
  115. data/lib/elasticsearch/api/actions/exists_source.rb +10 -2
  116. data/lib/elasticsearch/api/actions/explain.rb +10 -2
  117. data/lib/elasticsearch/api/actions/features/get_features.rb +4 -2
  118. data/lib/elasticsearch/api/actions/features/reset_features.rb +4 -2
  119. data/lib/elasticsearch/api/actions/field_caps.rb +10 -2
  120. data/lib/elasticsearch/api/actions/fleet/delete_secret.rb +9 -1
  121. data/lib/elasticsearch/api/actions/fleet/get_secret.rb +9 -1
  122. data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +10 -2
  123. data/lib/elasticsearch/api/actions/fleet/msearch.rb +9 -1
  124. data/lib/elasticsearch/api/actions/fleet/post_secret.rb +3 -1
  125. data/lib/elasticsearch/api/actions/fleet/search.rb +9 -1
  126. data/lib/elasticsearch/api/actions/get.rb +11 -3
  127. data/lib/elasticsearch/api/actions/get_script.rb +10 -2
  128. data/lib/elasticsearch/api/actions/get_script_context.rb +4 -2
  129. data/lib/elasticsearch/api/actions/get_script_languages.rb +4 -2
  130. data/lib/elasticsearch/api/actions/get_source.rb +10 -2
  131. data/lib/elasticsearch/api/actions/graph/explore.rb +10 -2
  132. data/lib/elasticsearch/api/actions/health_report.rb +10 -2
  133. data/lib/elasticsearch/api/actions/index.rb +10 -2
  134. data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +10 -2
  135. data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +10 -2
  136. data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +10 -2
  137. data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +4 -2
  138. data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +4 -2
  139. data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +10 -2
  140. data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +10 -2
  141. data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +10 -2
  142. data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +10 -2
  143. data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +4 -2
  144. data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +4 -2
  145. data/lib/elasticsearch/api/actions/indices/add_block.rb +10 -2
  146. data/lib/elasticsearch/api/actions/indices/analyze.rb +10 -2
  147. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +10 -2
  148. data/lib/elasticsearch/api/actions/indices/clone.rb +10 -2
  149. data/lib/elasticsearch/api/actions/indices/close.rb +10 -2
  150. data/lib/elasticsearch/api/actions/indices/create.rb +10 -2
  151. data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +10 -2
  152. data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +10 -2
  153. data/lib/elasticsearch/api/actions/indices/delete.rb +11 -3
  154. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +10 -2
  155. data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +10 -2
  156. data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +10 -2
  157. data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +10 -2
  158. data/lib/elasticsearch/api/actions/indices/delete_template.rb +11 -3
  159. data/lib/elasticsearch/api/actions/indices/disk_usage.rb +10 -2
  160. data/lib/elasticsearch/api/actions/indices/downsample.rb +10 -2
  161. data/lib/elasticsearch/api/actions/indices/exists.rb +10 -2
  162. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +10 -2
  163. data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +10 -2
  164. data/lib/elasticsearch/api/actions/indices/exists_template.rb +10 -2
  165. data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +10 -2
  166. data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +10 -2
  167. data/lib/elasticsearch/api/actions/indices/flush.rb +10 -2
  168. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +10 -2
  169. data/lib/elasticsearch/api/actions/indices/get.rb +10 -2
  170. data/lib/elasticsearch/api/actions/indices/get_alias.rb +10 -2
  171. data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +10 -2
  172. data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +10 -2
  173. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +10 -2
  174. data/lib/elasticsearch/api/actions/indices/get_index_template.rb +10 -2
  175. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +10 -2
  176. data/lib/elasticsearch/api/actions/indices/get_settings.rb +10 -2
  177. data/lib/elasticsearch/api/actions/indices/get_template.rb +10 -2
  178. data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +10 -2
  179. data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +4 -2
  180. data/lib/elasticsearch/api/actions/indices/open.rb +10 -2
  181. data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +10 -2
  182. data/lib/elasticsearch/api/actions/indices/put_alias.rb +10 -2
  183. data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +10 -2
  184. data/lib/elasticsearch/api/actions/indices/put_index_template.rb +10 -2
  185. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +10 -2
  186. data/lib/elasticsearch/api/actions/indices/put_settings.rb +11 -2
  187. data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -2
  188. data/lib/elasticsearch/api/actions/indices/recovery.rb +10 -2
  189. data/lib/elasticsearch/api/actions/indices/refresh.rb +10 -2
  190. data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +10 -2
  191. data/lib/elasticsearch/api/actions/indices/resolve_index.rb +10 -2
  192. data/lib/elasticsearch/api/actions/indices/rollover.rb +10 -2
  193. data/lib/elasticsearch/api/actions/indices/segments.rb +10 -2
  194. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +10 -2
  195. data/lib/elasticsearch/api/actions/indices/shrink.rb +10 -2
  196. data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +10 -2
  197. data/lib/elasticsearch/api/actions/indices/simulate_template.rb +10 -2
  198. data/lib/elasticsearch/api/actions/indices/split.rb +10 -2
  199. data/lib/elasticsearch/api/actions/indices/stats.rb +10 -2
  200. data/lib/elasticsearch/api/actions/indices/unfreeze.rb +10 -2
  201. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +4 -2
  202. data/lib/elasticsearch/api/actions/indices/validate_query.rb +10 -2
  203. data/lib/elasticsearch/api/actions/inference/delete_model.rb +69 -0
  204. data/lib/elasticsearch/api/actions/inference/get_model.rb +69 -0
  205. data/lib/elasticsearch/api/actions/inference/inference.rb +70 -0
  206. data/lib/elasticsearch/api/actions/inference/put_model.rb +70 -0
  207. data/lib/elasticsearch/api/actions/info.rb +4 -2
  208. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +10 -2
  209. data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +4 -2
  210. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +10 -2
  211. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +4 -2
  212. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +10 -2
  213. data/lib/elasticsearch/api/actions/ingest/simulate.rb +10 -2
  214. data/lib/elasticsearch/api/actions/knn_search.rb +10 -2
  215. data/lib/elasticsearch/api/actions/license/delete.rb +4 -2
  216. data/lib/elasticsearch/api/actions/license/get.rb +4 -2
  217. data/lib/elasticsearch/api/actions/license/get_basic_status.rb +4 -2
  218. data/lib/elasticsearch/api/actions/license/get_trial_status.rb +4 -2
  219. data/lib/elasticsearch/api/actions/license/post.rb +4 -2
  220. data/lib/elasticsearch/api/actions/license/post_start_basic.rb +4 -2
  221. data/lib/elasticsearch/api/actions/license/post_start_trial.rb +4 -2
  222. data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +10 -2
  223. data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +10 -2
  224. data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +10 -2
  225. data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +10 -2
  226. data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +10 -2
  227. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +10 -2
  228. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +10 -2
  229. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +10 -2
  230. data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +10 -2
  231. data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +10 -2
  232. data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +10 -2
  233. data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +10 -2
  234. data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +10 -2
  235. data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +10 -2
  236. data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +10 -2
  237. data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +10 -2
  238. data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +10 -2
  239. data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +4 -2
  240. data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +4 -2
  241. data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +10 -2
  242. data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +10 -2
  243. data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +10 -2
  244. data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +10 -2
  245. data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +10 -2
  246. data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +10 -2
  247. data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +10 -2
  248. data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +10 -2
  249. data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +10 -2
  250. data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +10 -2
  251. data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +10 -2
  252. data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +10 -2
  253. data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +10 -2
  254. data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +10 -2
  255. data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +10 -2
  256. data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +10 -2
  257. data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +10 -2
  258. data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +10 -2
  259. data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +10 -2
  260. data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +10 -2
  261. data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +10 -2
  262. data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +10 -2
  263. data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +10 -2
  264. data/lib/elasticsearch/api/actions/machine_learning/info.rb +4 -2
  265. data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +10 -2
  266. data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +10 -2
  267. data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +10 -2
  268. data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +10 -2
  269. data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +10 -2
  270. data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +10 -2
  271. data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +10 -2
  272. data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +10 -2
  273. data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +10 -2
  274. data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +10 -2
  275. data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +10 -2
  276. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +10 -2
  277. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +10 -2
  278. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +10 -2
  279. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +10 -2
  280. data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +10 -2
  281. data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +10 -2
  282. data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +4 -2
  283. data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +10 -2
  284. data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +10 -2
  285. data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +10 -2
  286. data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +10 -2
  287. data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +10 -2
  288. data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +10 -2
  289. data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +10 -2
  290. data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +10 -2
  291. data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +10 -2
  292. data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +10 -2
  293. data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +10 -2
  294. data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +10 -2
  295. data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +10 -2
  296. data/lib/elasticsearch/api/actions/machine_learning/validate.rb +4 -2
  297. data/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +4 -2
  298. data/lib/elasticsearch/api/actions/mget.rb +10 -2
  299. data/lib/elasticsearch/api/actions/migration/deprecations.rb +10 -2
  300. data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +4 -2
  301. data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +4 -2
  302. data/lib/elasticsearch/api/actions/monitoring/bulk.rb +10 -2
  303. data/lib/elasticsearch/api/actions/msearch.rb +10 -2
  304. data/lib/elasticsearch/api/actions/msearch_template.rb +10 -2
  305. data/lib/elasticsearch/api/actions/mtermvectors.rb +10 -2
  306. data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +10 -2
  307. data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +10 -2
  308. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +10 -2
  309. data/lib/elasticsearch/api/actions/nodes/info.rb +10 -2
  310. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -2
  311. data/lib/elasticsearch/api/actions/nodes/stats.rb +10 -2
  312. data/lib/elasticsearch/api/actions/nodes/usage.rb +10 -2
  313. data/lib/elasticsearch/api/actions/open_point_in_time.rb +12 -3
  314. data/lib/elasticsearch/api/actions/ping.rb +4 -2
  315. data/lib/elasticsearch/api/actions/profiling/status.rb +53 -0
  316. data/lib/elasticsearch/api/actions/put_script.rb +10 -2
  317. data/lib/elasticsearch/api/actions/query_ruleset/delete.rb +10 -2
  318. data/lib/elasticsearch/api/actions/query_ruleset/get.rb +10 -2
  319. data/lib/elasticsearch/api/actions/query_ruleset/list.rb +4 -2
  320. data/lib/elasticsearch/api/actions/query_ruleset/put.rb +10 -2
  321. data/lib/elasticsearch/api/actions/rank_eval.rb +10 -2
  322. data/lib/elasticsearch/api/actions/reindex.rb +4 -2
  323. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +10 -2
  324. data/lib/elasticsearch/api/actions/render_search_template.rb +10 -2
  325. data/lib/elasticsearch/api/actions/rollup/delete_job.rb +10 -2
  326. data/lib/elasticsearch/api/actions/rollup/get_jobs.rb +10 -2
  327. data/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +10 -2
  328. data/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +10 -2
  329. data/lib/elasticsearch/api/actions/rollup/put_job.rb +10 -2
  330. data/lib/elasticsearch/api/actions/rollup/rollup_search.rb +10 -2
  331. data/lib/elasticsearch/api/actions/rollup/start_job.rb +10 -2
  332. data/lib/elasticsearch/api/actions/rollup/stop_job.rb +10 -2
  333. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +4 -2
  334. data/lib/elasticsearch/api/actions/scroll.rb +10 -2
  335. data/lib/elasticsearch/api/actions/search.rb +10 -2
  336. data/lib/elasticsearch/api/actions/search_application/delete.rb +10 -2
  337. data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +10 -2
  338. data/lib/elasticsearch/api/actions/search_application/get.rb +10 -2
  339. data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +10 -2
  340. data/lib/elasticsearch/api/actions/search_application/list.rb +4 -2
  341. data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +9 -1
  342. data/lib/elasticsearch/api/actions/search_application/put.rb +10 -2
  343. data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +10 -2
  344. data/lib/elasticsearch/api/actions/search_application/render_query.rb +10 -2
  345. data/lib/elasticsearch/api/actions/search_application/search.rb +10 -2
  346. data/lib/elasticsearch/api/actions/search_mvt.rb +10 -2
  347. data/lib/elasticsearch/api/actions/search_shards.rb +10 -2
  348. data/lib/elasticsearch/api/actions/search_template.rb +10 -2
  349. data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +10 -2
  350. data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +10 -2
  351. data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +10 -2
  352. data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +10 -2
  353. data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +4 -2
  354. data/lib/elasticsearch/api/actions/security/authenticate.rb +4 -2
  355. data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +4 -2
  356. data/lib/elasticsearch/api/actions/security/change_password.rb +10 -2
  357. data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +10 -2
  358. data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +10 -2
  359. data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +10 -2
  360. data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +10 -2
  361. data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +10 -2
  362. data/lib/elasticsearch/api/actions/security/create_api_key.rb +4 -2
  363. data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +4 -2
  364. data/lib/elasticsearch/api/actions/security/create_service_token.rb +10 -2
  365. data/lib/elasticsearch/api/actions/security/delete_privileges.rb +10 -2
  366. data/lib/elasticsearch/api/actions/security/delete_role.rb +10 -2
  367. data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +10 -2
  368. data/lib/elasticsearch/api/actions/security/delete_service_token.rb +10 -2
  369. data/lib/elasticsearch/api/actions/security/delete_user.rb +10 -2
  370. data/lib/elasticsearch/api/actions/security/disable_user.rb +10 -2
  371. data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +10 -2
  372. data/lib/elasticsearch/api/actions/security/enable_user.rb +10 -2
  373. data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +10 -2
  374. data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +4 -2
  375. data/lib/elasticsearch/api/actions/security/enroll_node.rb +4 -2
  376. data/lib/elasticsearch/api/actions/security/get_api_key.rb +5 -2
  377. data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +4 -2
  378. data/lib/elasticsearch/api/actions/security/get_privileges.rb +10 -2
  379. data/lib/elasticsearch/api/actions/security/get_role.rb +11 -3
  380. data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +10 -2
  381. data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +10 -2
  382. data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +10 -2
  383. data/lib/elasticsearch/api/actions/security/get_settings.rb +4 -2
  384. data/lib/elasticsearch/api/actions/security/get_token.rb +4 -2
  385. data/lib/elasticsearch/api/actions/security/get_user.rb +11 -3
  386. data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +4 -2
  387. data/lib/elasticsearch/api/actions/security/get_user_profile.rb +10 -2
  388. data/lib/elasticsearch/api/actions/security/grant_api_key.rb +4 -2
  389. data/lib/elasticsearch/api/actions/security/has_privileges.rb +10 -2
  390. data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +4 -2
  391. data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +4 -2
  392. data/lib/elasticsearch/api/actions/security/invalidate_token.rb +4 -2
  393. data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +4 -2
  394. data/lib/elasticsearch/api/actions/security/oidc_logout.rb +4 -2
  395. data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +4 -2
  396. data/lib/elasticsearch/api/actions/security/put_privileges.rb +4 -2
  397. data/lib/elasticsearch/api/actions/security/put_role.rb +10 -2
  398. data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +10 -2
  399. data/lib/elasticsearch/api/actions/security/put_user.rb +10 -2
  400. data/lib/elasticsearch/api/actions/security/query_api_keys.rb +4 -2
  401. data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +4 -2
  402. data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +4 -2
  403. data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +4 -2
  404. data/lib/elasticsearch/api/actions/security/saml_logout.rb +4 -2
  405. data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +4 -2
  406. data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +10 -2
  407. data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +4 -2
  408. data/lib/elasticsearch/api/actions/security/update_api_key.rb +10 -2
  409. data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +10 -2
  410. data/lib/elasticsearch/api/actions/security/update_settings.rb +4 -2
  411. data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +10 -2
  412. data/lib/elasticsearch/api/actions/shutdown/delete_node.rb +9 -1
  413. data/lib/elasticsearch/api/actions/shutdown/get_node.rb +9 -1
  414. data/lib/elasticsearch/api/actions/shutdown/put_node.rb +9 -1
  415. data/lib/elasticsearch/api/actions/simulate/ingest.rb +71 -0
  416. data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +10 -2
  417. data/lib/elasticsearch/api/actions/snapshot/clone.rb +10 -2
  418. data/lib/elasticsearch/api/actions/snapshot/create.rb +10 -2
  419. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +10 -2
  420. data/lib/elasticsearch/api/actions/snapshot/delete.rb +11 -3
  421. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +11 -3
  422. data/lib/elasticsearch/api/actions/snapshot/get.rb +11 -3
  423. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +11 -3
  424. data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +10 -2
  425. data/lib/elasticsearch/api/actions/snapshot/restore.rb +10 -2
  426. data/lib/elasticsearch/api/actions/snapshot/status.rb +11 -3
  427. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +10 -2
  428. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +10 -2
  429. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +10 -2
  430. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +4 -2
  431. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +10 -2
  432. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +4 -2
  433. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +4 -2
  434. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +10 -2
  435. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +4 -2
  436. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +4 -2
  437. data/lib/elasticsearch/api/actions/sql/clear_cursor.rb +4 -2
  438. data/lib/elasticsearch/api/actions/sql/delete_async.rb +10 -2
  439. data/lib/elasticsearch/api/actions/sql/get_async.rb +10 -2
  440. data/lib/elasticsearch/api/actions/sql/get_async_status.rb +10 -2
  441. data/lib/elasticsearch/api/actions/sql/query.rb +4 -2
  442. data/lib/elasticsearch/api/actions/sql/translate.rb +4 -2
  443. data/lib/elasticsearch/api/actions/ssl/certificates.rb +4 -2
  444. data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +10 -2
  445. data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +10 -2
  446. data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +10 -2
  447. data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +10 -2
  448. data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +4 -2
  449. data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +10 -2
  450. data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +10 -2
  451. data/lib/elasticsearch/api/actions/tasks/cancel.rb +10 -2
  452. data/lib/elasticsearch/api/actions/tasks/get.rb +10 -2
  453. data/lib/elasticsearch/api/actions/tasks/list.rb +4 -2
  454. data/lib/elasticsearch/api/actions/terms_enum.rb +10 -2
  455. data/lib/elasticsearch/api/actions/termvectors.rb +10 -2
  456. data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +4 -2
  457. data/lib/elasticsearch/api/actions/transform/delete_transform.rb +10 -2
  458. data/lib/elasticsearch/api/actions/transform/get_transform.rb +10 -2
  459. data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +10 -2
  460. data/lib/elasticsearch/api/actions/transform/preview_transform.rb +10 -2
  461. data/lib/elasticsearch/api/actions/transform/put_transform.rb +10 -2
  462. data/lib/elasticsearch/api/actions/transform/reset_transform.rb +10 -2
  463. data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +10 -2
  464. data/lib/elasticsearch/api/actions/transform/start_transform.rb +10 -2
  465. data/lib/elasticsearch/api/actions/transform/stop_transform.rb +10 -2
  466. data/lib/elasticsearch/api/actions/transform/update_transform.rb +10 -2
  467. data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +4 -2
  468. data/lib/elasticsearch/api/actions/update.rb +11 -3
  469. data/lib/elasticsearch/api/actions/update_by_query.rb +10 -2
  470. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +10 -2
  471. data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +10 -2
  472. data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +10 -2
  473. data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +10 -2
  474. data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +11 -3
  475. data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +10 -2
  476. data/lib/elasticsearch/api/actions/watcher/get_settings.rb +4 -2
  477. data/lib/elasticsearch/api/actions/watcher/get_watch.rb +10 -2
  478. data/lib/elasticsearch/api/actions/watcher/put_watch.rb +10 -2
  479. data/lib/elasticsearch/api/actions/watcher/query_watches.rb +4 -2
  480. data/lib/elasticsearch/api/actions/watcher/start.rb +4 -2
  481. data/lib/elasticsearch/api/actions/watcher/stats.rb +10 -2
  482. data/lib/elasticsearch/api/actions/watcher/stop.rb +4 -2
  483. data/lib/elasticsearch/api/actions/watcher/update_settings.rb +4 -2
  484. data/lib/elasticsearch/api/actions/xpack/info.rb +4 -2
  485. data/lib/elasticsearch/api/actions/xpack/usage.rb +4 -2
  486. data/lib/elasticsearch/api/namespace/common.rb +2 -2
  487. data/lib/elasticsearch/api/namespace/{synonym_rule.rb → connector.rb} +7 -7
  488. data/{spec/rspec_formatter.rb → lib/elasticsearch/api/namespace/connector_sync_job.rb} +14 -9
  489. data/lib/elasticsearch/api/namespace/{synonyms_sets.rb → esql.rb} +7 -7
  490. data/lib/elasticsearch/api/namespace/inference.rb +36 -0
  491. data/lib/elasticsearch/api/namespace/profiling.rb +36 -0
  492. data/lib/elasticsearch/api/namespace/simulate.rb +36 -0
  493. data/lib/elasticsearch/api/version.rb +1 -1
  494. data/lib/elasticsearch/api.rb +6 -2
  495. data/spec/elasticsearch/api/actions/bulk_spec.rb +24 -1
  496. data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +2 -1
  497. data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +2 -1
  498. data/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +22 -10
  499. data/spec/elasticsearch/api/actions/cat/count_spec.rb +2 -1
  500. data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +4 -2
  501. data/spec/elasticsearch/api/actions/cat/health_spec.rb +2 -1
  502. data/spec/elasticsearch/api/actions/cat/help_spec.rb +2 -1
  503. data/spec/elasticsearch/api/actions/cat/indices_spec.rb +2 -1
  504. data/spec/elasticsearch/api/actions/cat/master_spec.rb +2 -1
  505. data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +2 -1
  506. data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +2 -1
  507. data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +2 -1
  508. data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +2 -1
  509. data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +2 -1
  510. data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +2 -1
  511. data/spec/elasticsearch/api/actions/cat/segments_spec.rb +13 -1
  512. data/spec/elasticsearch/api/actions/cat/shards_spec.rb +2 -1
  513. data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +2 -1
  514. data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +2 -1
  515. data/spec/elasticsearch/api/actions/cat/templates_spec.rb +2 -1
  516. data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +2 -1
  517. data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
  518. data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +2 -1
  519. data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +2 -1
  520. data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +2 -1
  521. data/spec/elasticsearch/api/actions/cluster/health_spec.rb +6 -3
  522. data/spec/elasticsearch/api/actions/cluster/info_spec.rb +2 -1
  523. data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +2 -1
  524. data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +2 -1
  525. data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +2 -1
  526. data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +4 -2
  527. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +4 -2
  528. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +2 -1
  529. data/spec/elasticsearch/api/actions/connector/check_in_spec.rb +38 -0
  530. data/spec/elasticsearch/api/actions/{synonyms/delete_synonym_rule_spec.rb → connector/delete_spec.rb} +8 -4
  531. data/spec/elasticsearch/api/actions/{synonyms/delete_synonym_spec.rb → connector/get_spec.rb} +9 -5
  532. data/spec/elasticsearch/api/actions/connector/last_sync_spec.rb +38 -0
  533. data/spec/elasticsearch/api/actions/{query_ruleset → connector}/list_spec.rb +5 -4
  534. data/spec/elasticsearch/api/actions/{security/update_settings_spec.rb → connector/post_spec.rb} +6 -5
  535. data/spec/elasticsearch/api/actions/connector/put_spec.rb +43 -0
  536. data/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb +38 -0
  537. data/spec/elasticsearch/api/actions/connector/update_error_spec.rb +38 -0
  538. data/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb +38 -0
  539. data/spec/elasticsearch/api/actions/connector/update_name_spec.rb +38 -0
  540. data/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb +38 -0
  541. data/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb +42 -0
  542. data/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb +38 -0
  543. data/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb +38 -0
  544. data/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb +38 -0
  545. data/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb +38 -0
  546. data/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb +38 -0
  547. data/spec/elasticsearch/api/actions/{synonyms/get_synonym_rule_spec.rb → connector_sync_job/list_spec.rb} +5 -4
  548. data/spec/elasticsearch/api/actions/{synonyms/put_synonym_rule_spec.rb → connector_sync_job/post_spec.rb} +6 -5
  549. data/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb +38 -0
  550. data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
  551. data/spec/elasticsearch/api/actions/create_document_spec.rb +35 -1
  552. data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +2 -1
  553. data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +2 -1
  554. data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +2 -1
  555. data/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb +2 -1
  556. data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +4 -2
  557. data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
  558. data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
  559. data/spec/elasticsearch/api/actions/{synonyms/update_spec.rb → esql/query_spec.rb} +6 -5
  560. data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
  561. data/spec/elasticsearch/api/actions/explain_document_spec.rb +35 -1
  562. data/spec/elasticsearch/api/actions/features/get_features_spec.rb +2 -1
  563. data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +2 -1
  564. data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
  565. data/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb +2 -1
  566. data/spec/elasticsearch/api/actions/fleet/msearch_spec.rb +2 -1
  567. data/spec/elasticsearch/api/actions/fleet/search_spec.rb +2 -1
  568. data/spec/elasticsearch/api/actions/get_document_source_spec.rb +13 -1
  569. data/spec/elasticsearch/api/actions/get_document_spec.rb +13 -1
  570. data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
  571. data/spec/elasticsearch/api/actions/health_report_spec.rb +4 -2
  572. data/spec/elasticsearch/api/actions/index_document_spec.rb +24 -1
  573. data/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb +2 -1
  574. data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +3 -1
  575. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +13 -1
  576. data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +24 -1
  577. data/spec/elasticsearch/api/actions/indices/clone_spec.rb +3 -1
  578. data/spec/elasticsearch/api/actions/indices/close_spec.rb +13 -1
  579. data/spec/elasticsearch/api/actions/indices/create_spec.rb +13 -1
  580. data/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb +13 -1
  581. data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +15 -1
  582. data/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb +2 -1
  583. data/spec/elasticsearch/api/actions/indices/delete_spec.rb +24 -1
  584. data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +13 -1
  585. data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +2 -1
  586. data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +26 -1
  587. data/spec/elasticsearch/api/actions/indices/exists_spec.rb +24 -1
  588. data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +13 -1
  589. data/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb +3 -1
  590. data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +2 -1
  591. data/spec/elasticsearch/api/actions/indices/flush_spec.rb +46 -1
  592. data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +2 -1
  593. data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +25 -1
  594. data/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb +2 -1
  595. data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +13 -1
  596. data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +35 -1
  597. data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +35 -1
  598. data/spec/elasticsearch/api/actions/indices/get_spec.rb +2 -1
  599. data/spec/elasticsearch/api/actions/indices/open_spec.rb +13 -1
  600. data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +27 -1
  601. data/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb +2 -1
  602. data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +24 -1
  603. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +46 -1
  604. data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +13 -1
  605. data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +2 -1
  606. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +46 -1
  607. data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +13 -1
  608. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +46 -1
  609. data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +2 -1
  610. data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +3 -1
  611. data/spec/elasticsearch/api/actions/indices/split_spec.rb +3 -1
  612. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +68 -1
  613. data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +13 -1
  614. data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +2 -1
  615. data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +69 -1
  616. data/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +36 -0
  617. data/spec/elasticsearch/api/actions/inference/get_model_spec.rb +36 -0
  618. data/spec/elasticsearch/api/actions/inference/inference_spec.rb +36 -0
  619. data/spec/elasticsearch/api/actions/inference/put_model_spec.rb +36 -0
  620. data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
  621. data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +13 -1
  622. data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +2 -1
  623. data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +13 -1
  624. data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +13 -1
  625. data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +13 -1
  626. data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
  627. data/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb +13 -1
  628. data/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb +5 -1
  629. data/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb +2 -1
  630. data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb +3 -1
  631. data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb +3 -1
  632. data/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb +2 -1
  633. data/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb +4 -2
  634. data/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb +3 -1
  635. data/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb +3 -1
  636. data/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb +3 -1
  637. data/spec/elasticsearch/api/actions/mget_spec.rb +24 -1
  638. data/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb +2 -1
  639. data/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb +2 -1
  640. data/spec/elasticsearch/api/actions/msearch_spec.rb +35 -1
  641. data/spec/elasticsearch/api/actions/msearch_template_spec.rb +13 -1
  642. data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +2 -1
  643. data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +3 -1
  644. data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +3 -1
  645. data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +24 -1
  646. data/spec/elasticsearch/api/actions/nodes/info_spec.rb +46 -1
  647. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +35 -1
  648. data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +35 -1
  649. data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +2 -1
  650. data/spec/elasticsearch/api/actions/ping_spec.rb +2 -1
  651. data/spec/elasticsearch/api/actions/{synonyms/get_synonym_spec.rb → profiling/status_spec.rb} +6 -4
  652. data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
  653. data/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb +2 -1
  654. data/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb +2 -1
  655. data/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb +2 -1
  656. data/spec/elasticsearch/api/actions/rank_eval_spec.rb +13 -1
  657. data/spec/elasticsearch/api/actions/reindex_spec.rb +2 -1
  658. data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
  659. data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
  660. data/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb +3 -1
  661. data/spec/elasticsearch/api/actions/search_application/delete_spec.rb +2 -1
  662. data/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb +2 -1
  663. data/spec/elasticsearch/api/actions/search_application/get_spec.rb +2 -1
  664. data/spec/elasticsearch/api/actions/search_application/list_spec.rb +2 -1
  665. data/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb +3 -1
  666. data/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb +3 -1
  667. data/spec/elasticsearch/api/actions/search_application/put_spec.rb +2 -1
  668. data/spec/elasticsearch/api/actions/search_application/render_query_spec.rb +3 -1
  669. data/spec/elasticsearch/api/actions/search_application/search_spec.rb +2 -1
  670. data/spec/elasticsearch/api/actions/search_mvt_spec.rb +3 -1
  671. data/spec/elasticsearch/api/actions/search_shards_spec.rb +2 -1
  672. data/spec/elasticsearch/api/actions/search_spec.rb +24 -1
  673. data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
  674. data/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb +13 -1
  675. data/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb +14 -1
  676. data/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb +3 -1
  677. data/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb +15 -1
  678. data/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb +3 -1
  679. data/spec/elasticsearch/api/actions/security/create_api_key_spec.rb +4 -2
  680. data/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb +2 -1
  681. data/spec/elasticsearch/api/actions/security/create_service_token_spec.rb +15 -1
  682. data/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb +3 -1
  683. data/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb +2 -1
  684. data/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb +2 -1
  685. data/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb +2 -1
  686. data/spec/elasticsearch/api/actions/security/get_api_key_spec.rb +2 -1
  687. data/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb +2 -1
  688. data/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb +26 -1
  689. data/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb +3 -1
  690. data/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb +2 -1
  691. data/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb +2 -1
  692. data/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb +2 -1
  693. data/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb +2 -1
  694. data/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb +2 -1
  695. data/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb +2 -1
  696. data/spec/elasticsearch/api/actions/security/saml_logout_spec.rb +2 -1
  697. data/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb +2 -1
  698. data/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb +3 -1
  699. data/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb +2 -1
  700. data/spec/elasticsearch/api/actions/security/update_api_key_spec.rb +2 -1
  701. data/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb +3 -1
  702. data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +2 -1
  703. data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +13 -1
  704. data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +2 -1
  705. data/spec/elasticsearch/api/actions/{security/get_settings_spec.rb → simulate/ingest_spec.rb} +7 -6
  706. data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +4 -1
  707. data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +3 -1
  708. data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +3 -1
  709. data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +15 -1
  710. data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +3 -1
  711. data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +2 -1
  712. data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +3 -1
  713. data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +3 -1
  714. data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +3 -1
  715. data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +13 -1
  716. data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +3 -1
  717. data/spec/elasticsearch/api/actions/sql/delete_async_spec.rb +2 -1
  718. data/spec/elasticsearch/api/actions/sql/get_async_spec.rb +2 -1
  719. data/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb +2 -1
  720. data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +13 -1
  721. data/spec/elasticsearch/api/actions/tasks/get_spec.rb +2 -1
  722. data/spec/elasticsearch/api/actions/tasks/list_spec.rb +2 -1
  723. data/spec/elasticsearch/api/actions/terms_enum_spec.rb +2 -1
  724. data/spec/elasticsearch/api/actions/termvectors_spec.rb +13 -1
  725. data/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb +3 -1
  726. data/spec/elasticsearch/api/actions/update_by_query_spec.rb +2 -1
  727. data/spec/elasticsearch/api/actions/update_document_spec.rb +13 -1
  728. data/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb +2 -1
  729. data/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb +3 -2
  730. data/spec/elasticsearch/api/perform_request_spec.rb +86 -0
  731. data/spec/rest_api/rest_api_tests_helper.rb +1 -1
  732. data/spec/rest_api/rest_api_yaml_spec.rb +2 -0
  733. data/spec/rest_api/skipped_tests_free.yml +5 -3
  734. data/spec/rest_api/skipped_tests_platinum.yml +3 -0
  735. data/spec/spec_helper.rb +0 -4
  736. data/utils/endpoint_spec.rb +194 -0
  737. data/utils/{thor/generator/endpoint_specifics.rb → endpoint_specifics.rb} +4 -4
  738. data/utils/thor/generate_source.rb +14 -141
  739. data/utils/thor/templates/_body.erb +2 -2
  740. data/utils/thor/templates/_documentation_top.erb +22 -22
  741. data/utils/thor/templates/_method_setup.erb +10 -10
  742. data/utils/thor/templates/_perform_request.erb +11 -11
  743. data/utils/thor/templates/method.erb +28 -19
  744. metadata +99 -32
  745. data/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb +0 -34
@@ -0,0 +1,86 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+ require 'elastic-transport'
20
+ require_relative '../../../utils/endpoint_spec'
21
+ require_relative '../../../utils/thor/generator/files_helper'
22
+
23
+ describe 'Perform request args' do
24
+ Elasticsearch::API::FilesHelper.files.each do |filepath|
25
+ spec = Elasticsearch::API::EndpointSpec.new(filepath)
26
+ next if spec.module_namespace.flatten.first == '_internal'
27
+
28
+ # These are the path parts defined by the user in the method argument
29
+ defined_path_parts = spec.path_params.inject({}) do |params, part|
30
+ params.merge(part => 'testing')
31
+ end
32
+
33
+ # These are the required params, we must pass them to the method even when testing
34
+ required_params = spec.required_parts.inject({}) do |params, part|
35
+ params.merge(part.to_sym => 'testing')
36
+ end
37
+
38
+ let(:client_double) do
39
+ Class.new { include Elasticsearch::API }.new.tap do |client|
40
+ expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params|
41
+ # The create method ends up becoming an 'index' request
42
+ if expected_perform_request_params[:endpoint] == 'create'
43
+ expected_perform_request_params[:endpoint] = 'index'
44
+ end
45
+ # Check that the expected hash is passed to the perform_request method
46
+ expect(request_params).to eq(expected_perform_request_params)
47
+ end.and_return(response_double)
48
+ end
49
+ end
50
+
51
+ let(:response_double) do
52
+ double('response', status: 200, body: {}, headers: {})
53
+ end
54
+
55
+ context("'#{spec.endpoint_name}'") do
56
+ # The expected hash passed to perform_request contains the endpoint name and any defined path parts
57
+ let(:expected_perform_request_params) do
58
+ if defined_path_parts.empty?
59
+ { endpoint: spec.endpoint_name }
60
+ else
61
+ { endpoint: spec.endpoint_name, defined_params: defined_path_parts}
62
+ end
63
+ end
64
+
65
+ if spec.path_parts.empty?
66
+ it "passes the endpoint id to the request" do
67
+ if spec.module_namespace.empty?
68
+ client_double.send(spec.method_name, required_params)
69
+ else
70
+ client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params)
71
+ end
72
+ end
73
+ else
74
+ it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do
75
+ if spec.module_namespace.empty?
76
+ client_double.send(spec.method_name, required_params.merge(defined_path_parts))
77
+ else
78
+ client_double.send(
79
+ spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts)
80
+ )
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -97,4 +97,4 @@ REST_API_YAML_FILES = if ENV['RUN_SKIPPED_TESTS'] # only run the skipped tests i
97
97
  end
98
98
 
99
99
  # The features to skip
100
- REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector'].freeze
100
+ REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector', 'close_to'].freeze
@@ -22,6 +22,8 @@ require_relative './run_rspec_matchers'
22
22
  LOGGER = Logger.new($stdout)
23
23
 
24
24
  describe 'Rest API YAML tests' do
25
+ LOGGER.info "Elastic Transport version: #{Elastic::Transport::VERSION}"
26
+
25
27
  if REST_API_YAML_FILES.empty?
26
28
  LOGGER.error 'No test files found!'
27
29
  LOGGER.info 'Use rake rake elasticsearch:download_artifacts in the root directory of the project to download the test artifacts.'
@@ -25,7 +25,6 @@
25
25
  -
26
26
  :file: 'tsdb/80_index_resize.yml'
27
27
  :description: 'clone'
28
-
29
28
  -
30
29
  :file: 'cluster.desired_nodes/10_basic.yml'
31
30
  :description: 'Test update desired nodes is idempotent'
@@ -33,5 +32,8 @@
33
32
  :file: 'cluster.desired_nodes/10_basic.yml'
34
33
  :description: 'Test update desired nodes is idempotent with different order'
35
34
  -
36
- :file: 'cluster.desired_balance/10_basic.yml'
37
- :description: 'Test cluster_balance_stats'
35
+ :file: 'search.vectors/40_knn_search.yml'
36
+ :description: 'Direct kNN queries are disallowed'
37
+ -
38
+ :file: 'search.vectors/45_knn_search_byte.yml'
39
+ :description: 'Direct kNN queries are disallowed'
@@ -109,3 +109,6 @@
109
109
  -
110
110
  :file: 'spatial/70_script_doc_values.yml'
111
111
  :description: '*'
112
+ -
113
+ :file: 'esql/60_usage.yml'
114
+ :description: 'Basic ESQL usage output (telemetry)'
data/spec/spec_helper.rb CHANGED
@@ -61,10 +61,6 @@ RSpec.configure do |config|
61
61
  config.add_formatter('documentation')
62
62
  config.add_formatter('RspecJunitFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}-junit.xml")
63
63
  config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html")
64
- if ENV['BUILDKITE']
65
- require_relative "./rspec_formatter.rb"
66
- config.add_formatter('RSpecCustomFormatter')
67
- end
68
64
  config.color_mode = :on
69
65
  end
70
66
 
@@ -0,0 +1,194 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ # encoding: UTF-8
19
+
20
+ require_relative 'endpoint_specifics'
21
+
22
+ module Elasticsearch
23
+ module API
24
+ class EndpointSpec
25
+ include EndpointSpecifics
26
+
27
+ def initialize(filepath)
28
+ @path = Pathname(filepath)
29
+ json = MultiJson.load(File.read(@path))
30
+ @spec = json.values.first
31
+ @endpoint_name = json.keys.first
32
+
33
+ full_namespace = parse_full_namespace
34
+ @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0
35
+ @module_namespace = full_namespace[0, namespace_depth]
36
+ @method_name = full_namespace.last
37
+
38
+ @path_parts = parse_endpoint_parts(@spec)
39
+ @params = @spec['params'] || {}
40
+ @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url']
41
+ @path_params = path_variables.flatten.uniq.collect(&:to_sym)
42
+ @http_method = parse_http_method(@spec)
43
+ @deprecation_note = @spec['url']['paths'].last&.[]('deprecated')
44
+ @http_path = parse_http_path(@paths)
45
+ @required_parts = parse_required_parts(@spec)
46
+ end
47
+
48
+ attr_reader :module_namespace,
49
+ :method_name,
50
+ :endpoint_name,
51
+ :path,
52
+ :path_parts,
53
+ :params,
54
+ :deprecation_note,
55
+ :namespace_depth,
56
+ :http_path,
57
+ :required_parts,
58
+ :http_method,
59
+ :namespace_depth,
60
+ :path_params,
61
+ :perform_request_opts
62
+
63
+ def body
64
+ @spec['body']
65
+ end
66
+
67
+ def documentation
68
+ @spec['documentation']
69
+ end
70
+
71
+ def stability
72
+ @spec['stability']
73
+ end
74
+
75
+ # Function that adds the listified h param code
76
+ def specific_params
77
+ super(@module_namespace.first, @method_name)
78
+ end
79
+
80
+ private
81
+
82
+ def parse_full_namespace
83
+ names = @endpoint_name.split('.')
84
+ # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm'
85
+ names.map do |name|
86
+ name
87
+ .gsub(/^ml$/, 'machine_learning')
88
+ .gsub(/^ilm$/, 'index_lifecycle_management')
89
+ .gsub(/^ccr/, 'cross_cluster_replication')
90
+ .gsub(/^slm/, 'snapshot_lifecycle_management')
91
+ end
92
+ end
93
+
94
+ def parse_endpoint_parts(spec)
95
+ parts = spec['url']['paths'].select do |a|
96
+ a.keys.include?('parts')
97
+ end.map do |path|
98
+ path&.[]('parts')
99
+ end
100
+ (parts.inject(&:merge) || [])
101
+ end
102
+
103
+ def parse_http_method(spec)
104
+ return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index'
105
+ return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token'
106
+ return post_and_get if @endpoint_name == 'count'
107
+
108
+ default_method = spec['url']['paths'].map { |a| a['methods'] }.flatten.first
109
+ if spec['body'] && default_method == 'GET'
110
+ # When default method is GET and body is required, we should always use POST
111
+ if spec['body']['required']
112
+ 'Elasticsearch::API::HTTP_POST'
113
+ else
114
+ post_and_get
115
+ end
116
+ else
117
+ "Elasticsearch::API::HTTP_#{default_method}"
118
+ end
119
+ end
120
+
121
+ def parse_http_path(paths)
122
+ return "\"#{parse_path(paths.first)}\"" if paths.size == 1
123
+
124
+ result = ''
125
+ anchor_string = []
126
+ paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i|
127
+ var_string = extract_path_variables(path).map { |var| "_#{var}" }.join(' && ')
128
+ next if anchor_string.include? var_string
129
+
130
+ anchor_string << var_string
131
+ result += if i.zero?
132
+ "if #{var_string}\n"
133
+ elsif (i == paths.size - 1) || var_string.empty?
134
+ "else\n"
135
+ else
136
+ "elsif #{var_string}\n"
137
+ end
138
+ result += "\"#{parse_path(path)}\"\n"
139
+ end
140
+ result += 'end'
141
+ result
142
+ end
143
+
144
+ def parse_path(path)
145
+ path.gsub(/^\//, '')
146
+ .gsub(/\/$/, '')
147
+ .gsub('{', "\#{Utils.__listify(_")
148
+ .gsub('}', ')}')
149
+ end
150
+
151
+ def path_variables
152
+ @paths.map do |path|
153
+ extract_path_variables(path)
154
+ end
155
+ end
156
+
157
+ def parse_path_variables
158
+ @paths.map do |path|
159
+ extract_path_variables(path)
160
+ end
161
+ end
162
+
163
+ # extract values that are in the {var} format:
164
+ def extract_path_variables(path)
165
+ path.scan(/{(\w+)}/).flatten
166
+ end
167
+
168
+ # Find parts that are definitely required and should raise an error if
169
+ # they're not present
170
+ #
171
+ def parse_required_parts(spec)
172
+ required = []
173
+ return required if @endpoint_name == 'tasks.get'
174
+
175
+ required << 'body' if (spec['body'] && spec['body']['required'])
176
+ # Get required variables from paths:
177
+ req_variables = parse_path_variables.inject(:&) # find intersection
178
+ required << req_variables unless req_variables.empty?
179
+ required.flatten
180
+ end
181
+
182
+ def post_and_get
183
+ # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body`
184
+ <<~SRC
185
+ if body
186
+ Elasticsearch::API::HTTP_POST
187
+ else
188
+ Elasticsearch::API::HTTP_GET
189
+ end
190
+ SRC
191
+ end
192
+ end
193
+ end
194
+ end
@@ -55,10 +55,10 @@ module Elasticsearch
55
55
  recovery shards thread_pool].freeze
56
56
 
57
57
  # Function that adds the listified h param code
58
- def specific_params(namespace)
58
+ def specific_params(namespace, method_name)
59
59
  params = []
60
- if H_PARAMS.include?(@method_name) && namespace == 'cat'
61
- if @method_name == 'nodes'
60
+ if H_PARAMS.include?(method_name) && namespace == 'cat'
61
+ if method_name == 'nodes'
62
62
  params << 'params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]'
63
63
  else
64
64
  params << 'params[:h] = Utils.__listify(params[:h]) if params[:h]'
@@ -84,7 +84,7 @@ module Elasticsearch
84
84
  def ping_perform_request
85
85
  <<~SRC
86
86
  begin
87
- perform_request(method, path, params, body, headers).status == 200 ? true : false
87
+ perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false
88
88
  rescue Exception => e
89
89
  if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i
90
90
  false
@@ -23,7 +23,7 @@ require 'multi_json'
23
23
  require 'coderay'
24
24
  require 'pry'
25
25
  require_relative 'generator/files_helper'
26
- require_relative 'generator/endpoint_specifics'
26
+ require_relative '../endpoint_spec'
27
27
 
28
28
  module Elasticsearch
29
29
  module API
@@ -62,45 +62,25 @@ module Elasticsearch
62
62
  private
63
63
 
64
64
  def generate_source
65
- @output = FilesHelper.output_dir
66
- cleanup_directory!
65
+ output = FilesHelper.output_dir
66
+ cleanup_directory!(output)
67
67
 
68
68
  FilesHelper.files.each do |filepath|
69
- @path = Pathname(filepath)
70
- @json = MultiJson.load(File.read(@path))
71
- @spec = @json.values.first
72
- say_status 'json', @path, :yellow
73
-
74
- @spec['url'] ||= {}
75
-
76
- @endpoint_name = @json.keys.first
77
- @full_namespace = __full_namespace
78
- @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0
79
- @module_namespace = @full_namespace[0, @namespace_depth]
69
+ @spec = EndpointSpec.new(filepath)
70
+ say_status 'json', @spec.path, :yellow
80
71
 
81
72
  # Don't generate code for internal APIs:
82
- next if @module_namespace.flatten.first == '_internal'
83
-
84
- @method_name = @full_namespace.last
85
- @parts = __endpoint_parts
86
- @params = @spec['params'] || {}
87
- @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics
88
- @http_method = __http_method
89
- @paths = @spec['url']['paths'].map { |b| b['path'] }
90
- # Using Ruby's safe operator on array:
91
- @deprecation_note = @spec['url']['paths'].last&.[]('deprecated')
92
- @http_path = __http_path
93
- @required_parts = __required_parts
94
-
95
- @path_to_file = @output.join(@module_namespace.join('/')).join("#{@method_name}.rb")
96
- dir = @output.join(@module_namespace.join('/'))
73
+ next if @spec.module_namespace.flatten.first == '_internal'
74
+
75
+ path_to_file = output.join(@spec.module_namespace.join('/')).join("#{@spec.method_name}.rb")
76
+ dir = output.join(@spec.module_namespace.join('/'))
97
77
 
98
78
  empty_directory(dir, verbose: false)
99
79
 
100
80
  # Write the file with the ERB template:
101
- template('templates/method.erb', @path_to_file, force: true)
81
+ template('templates/method.erb', path_to_file, force: true)
102
82
 
103
- print_source_code(@path_to_file) if options[:verbose]
83
+ print_source_code(path_to_file) if options[:verbose]
104
84
 
105
85
  generate_tests if options[:tests]
106
86
 
@@ -137,122 +117,15 @@ module Elasticsearch
137
117
  match[1]
138
118
  end
139
119
 
140
- def __full_namespace
141
- names = @endpoint_name.split('.')
142
- # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm'
143
- names.map do |name|
144
- name
145
- .gsub(/^ml$/, 'machine_learning')
146
- .gsub(/^ilm$/, 'index_lifecycle_management')
147
- .gsub(/^ccr/, 'cross_cluster_replication')
148
- .gsub(/^slm/, 'snapshot_lifecycle_management')
149
- end
150
- end
151
-
152
120
  # Create the hierarchy of directories based on API namespaces
153
121
  #
154
- def __create_directories(key, value)
122
+ def create_directories(key, value)
155
123
  return if value['documentation']
156
124
 
157
125
  empty_directory @output.join(key)
158
126
  create_directory_hierarchy * value.to_a.first
159
127
  end
160
128
 
161
- # Extract parts from each path
162
- #
163
- def __endpoint_parts
164
- parts = @spec['url']['paths'].select do |a|
165
- a.keys.include?('parts')
166
- end.map do |path|
167
- path&.[]('parts')
168
- end
169
- (parts.inject(&:merge) || [])
170
- end
171
-
172
- def __http_method
173
- return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index'
174
- return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token'
175
- return post_and_get if @endpoint_name == 'count'
176
-
177
- default_method = @spec['url']['paths'].map { |a| a['methods'] }.flatten.first
178
- if @spec['body'] && default_method == 'GET'
179
- # When default method is GET and body is required, we should always use POST
180
- if @spec['body']['required']
181
- 'Elasticsearch::API::HTTP_POST'
182
- else
183
- post_and_get
184
- end
185
- else
186
- "Elasticsearch::API::HTTP_#{default_method}"
187
- end
188
- end
189
-
190
- def post_and_get
191
- # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body`
192
- <<~SRC
193
- if body
194
- Elasticsearch::API::HTTP_POST
195
- else
196
- Elasticsearch::API::HTTP_GET
197
- end
198
- SRC
199
- end
200
-
201
- def __http_path
202
- return "\"#{__parse_path(@paths.first)}\"" if @paths.size == 1
203
-
204
- result = ''
205
- anchor_string = []
206
- @paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i|
207
- var_string = __extract_path_variables(path).map { |var| "_#{var}" }.join(' && ')
208
- next if anchor_string.include? var_string
209
-
210
- anchor_string << var_string
211
- result += if i.zero?
212
- "if #{var_string}\n"
213
- elsif (i == @paths.size - 1) || var_string.empty?
214
- "else\n"
215
- else
216
- "elsif #{var_string}\n"
217
- end
218
- result += "\"#{__parse_path(path)}\"\n"
219
- end
220
- result += 'end'
221
- result
222
- end
223
-
224
- def __parse_path(path)
225
- path.gsub(/^\//, '')
226
- .gsub(/\/$/, '')
227
- .gsub('{', "\#{Utils.__listify(_")
228
- .gsub('}', ')}')
229
- end
230
-
231
- def __path_variables
232
- @paths.map do |path|
233
- __extract_path_variables(path)
234
- end
235
- end
236
-
237
- # extract values that are in the {var} format:
238
- def __extract_path_variables(path)
239
- path.scan(/{(\w+)}/).flatten
240
- end
241
-
242
- # Find parts that are definitely required and should raise an error if
243
- # they're not present
244
- #
245
- def __required_parts
246
- required = []
247
- return required if @endpoint_name == 'tasks.get'
248
-
249
- required << 'body' if (@spec['body'] && @spec['body']['required'])
250
- # Get required variables from paths:
251
- req_variables = __path_variables.inject(:&) # find intersection
252
- required << req_variables unless req_variables.empty?
253
- required.flatten
254
- end
255
-
256
129
  def docs_helper(name, info)
257
130
  info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings'
258
131
  info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer'
@@ -319,8 +192,8 @@ module Elasticsearch
319
192
  say_status('tree', lines.first + "\n" + lines[1, lines.size].map { |l| ' ' * 14 + l }.join("\n"))
320
193
  end
321
194
 
322
- def cleanup_directory!
323
- Dir["#{@output}/**/*.rb"].each do |file|
195
+ def cleanup_directory!(output)
196
+ Dir["#{output}/**/*.rb"].each do |file|
324
197
  # file = File.join(@output, f)
325
198
  File.delete(file) unless (['.', '..'].include? file) || Pathname(file).directory?
326
199
  end
@@ -17,7 +17,7 @@
17
17
  # under the License.
18
18
  %>
19
19
  <%-
20
- case @endpoint_name
20
+ case @spec.endpoint_name
21
21
  when 'mtermvectors'
22
22
  -%>
23
23
  body = if(ids = arguments.delete(:ids))
@@ -30,5 +30,5 @@ when 'mtermvectors'
30
30
  <%- when 'ml.find_file_structure' %>
31
31
  body = Utils.__bulkify(arguments.delete(:body))
32
32
  <%- else -%>
33
- <%= ' '*(@namespace_depth+3) %>body = <%= @spec['body'].nil? ? 'nil' : 'arguments.delete(:body)' %>
33
+ <%= ' '*(@spec.namespace_depth+3) %>body = <%= @spec.body.nil? ? 'nil' : 'arguments.delete(:body)' %>
34
34
  <%- end -%>
@@ -16,42 +16,42 @@
16
16
  # specific language governing permissions and limitations
17
17
  # under the License.
18
18
  %>
19
- <%- if @spec['documentation']['description'] -%>
20
- <%= ' '*(@namespace_depth+3) %># <%= @spec['documentation']['description'].gsub("\n", "\n#{' '*(@namespace_depth+3)}# ") -%>
19
+ <%- if @spec.documentation['description'] -%>
20
+ <%= ' '*(@spec.namespace_depth+3) %># <%= @spec.documentation['description'] .gsub("\n", "\n#{' '*(@spec.namespace_depth+3)}# ") -%>
21
21
  <%- else %>
22
- <%= ' '*(@namespace_depth+3) %># TODO: Description
22
+ <%= ' '*(@spec.namespace_depth+3) %># TODO: Description
23
23
  <%- end %>
24
- <%= stability_doc_helper(@spec['stability']) -%>
25
- <%= ' '*(@namespace_depth+3) %>#
26
- <%- unless @parts.nil? || @parts.empty? %><%# URL parts -%>
27
- <%- @parts.each do |name, info| -%>
24
+ <%= stability_doc_helper(@spec.stability) -%>
25
+ <%= ' '*(@spec.namespace_depth+3) %>#
26
+ <%- unless @spec.path_parts.nil? || @spec.path_parts.empty? %><%# URL parts -%>
27
+ <%- @spec.path_parts.each do |name, info| -%>
28
28
  <%= docs_helper(name, info) -%>
29
29
  <%- end -%>
30
30
  <%- end -%><%# Body -%>
31
31
  <%# URL parameters -%>
32
- <%- @params.each do |name, info| -%>
33
- <%= docs_helper(name, info) unless (!@parts.empty? && @parts.keys.include?(name)) -%>
32
+ <%- @spec.params.each do |name, info| -%>
33
+ <%= docs_helper(name, info) unless (!@spec.path_parts.empty? && @spec.path_parts.keys.include?(name)) -%>
34
34
  <%- end -%>
35
35
  # @option arguments [Hash] :headers Custom HTTP headers
36
- <%- if @spec['body'] -%>
37
- <%- if @method_name == 'bulk' -%>
38
- <%= bulk_doc_helper(@spec['body']['description']) -%>
36
+ <%- if @spec.body -%>
37
+ <%- if @spec.method_name == 'bulk' -%>
38
+ <%= bulk_doc_helper(@spec.body['description']) -%>
39
39
  <%- else -%>
40
- <%= ' '*(@namespace_depth+1) +
41
- '# @option arguments [Hash] :body ' + (@spec['body']['description'] ?
42
- @spec['body']['description'].strip : 'TODO: Description') +
43
- (@spec['body']['required'] ? ' (*Required*)' : '') + "\n"
40
+ <%= ' '*(@spec.namespace_depth+1) +
41
+ '# @option arguments [Hash] :body ' + (@spec.body['description'] ?
42
+ @spec.body['description'].strip : 'TODO: Description') +
43
+ (@spec.body['required'] ? ' (*Required*)' : '') + "\n"
44
44
  -%>
45
45
  <%- end -%>
46
46
  <%- end -%>
47
- <% if @deprecation_note -%>
47
+ <% if @spec.deprecation_note -%>
48
48
  #
49
49
  # *Deprecation notice*:
50
- # <%= @deprecation_note['description'] %>
51
- # Deprecated since version <%= @deprecation_note['version'] %>
50
+ # <%= @spec.deprecation_note['description'] %>
51
+ # Deprecated since version <%= @spec.deprecation_note['version'] %>
52
52
  #
53
53
  <% end -%>
54
- <%= ' '*(@namespace_depth+3) -%>#
54
+ <%= ' '*(@spec.namespace_depth+3) -%>#
55
55
  <%# Documentation link -%>
56
- <%= ' '*(@namespace_depth+3) %># @see <%= @spec['documentation']['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec['documentation']['url']) : "[TODO]" %>
57
- <%= ' '*(@namespace_depth+3) %>#
56
+ <%= ' '*(@spec.namespace_depth+3) %># @see <%= @spec.documentation['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec.documentation['url']) : "[TODO]" %>
57
+ <%= ' '*(@spec.namespace_depth+3) %>#