elastic / elastic/sense

Generating a diff between REST API Spec and Sense shows they have differences, here they are.

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
379
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Here are the differences between the 2.0 REST API Spec and the 2.0 Sense API model:

First, API endpoints that match the URL patterns but do not have HTTP Method found:

```
WARN! apiSpec [indices.exists_alias HEAD] does not match any sense patterns+methods
but did match pattern of [_post_alias,_delete_alias,_get_alias]
WARN! apiSpec [indices.exists_type HEAD] does not match any sense patterns+methods
but did match pattern of [index_doc_no_id,_get_index]
WARN! apiSpec [indices.exists HEAD] does not match any sense patterns+methods
but did match pattern of [__create_index__,__delete_indices__,_get_index]
WARN! apiSpec [exists HEAD] does not match any sense patterns+methods
but did match pattern of [_get_doc,_delete_doc,index_doc]
WARN! apiSpec [get_script GET] does not match any sense patterns+methods
but did match pattern of [_put_script]
WARN! apiSpec [delete_script DELETE] does not match any sense patterns+methods
but did match pattern of [_put_script]
WARN! apiSpec [snapshot.delete_repository DELETE] does not match any sense patterns+methods
but did match pattern of [put_repository]
WARN! apiSpec [indices.exists_template HEAD] does not match any sense patterns+methods
but did match pattern of [_delete_template,_get_template,_put_template]
WARN! apiSpec [snapshot.get_repository GET] does not match any sense patterns+methods
but did match pattern of [put_repository]
```

Sense specs that do not have patterns+HTTP Method that matches API spec:

```
WARN! unused sense specs: [_cluster/nodes/stats,create_doc,_delete_mapping,_put_mapping,_put_percolator,all_snapshots]
```

For those that match the URL pattern and HTTP Method but when comparing the URL query parameters of the REST API Spec against the union of matching Sense endpoints query parameters:

```
[indices.get_upgrade] api matches sense [_upgrade_status]
WARN: [indices.get_upgrade] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [human]
only in SENSE []
[cat.thread_pool] api matches sense [_cat/thread_pool]
WARN: [cat.thread_pool] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h, full_id]
only in SENSE [bytes]
[count_percolate] api matches sense [_percolate_count]
WARN: [count_percolate] query parameters do not match
in both [routing, preference, ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [percolate_index, percolate_type, version, version_type]
only in SENSE [percolate_format]
[get] api matches sense [_get_doc]
WARN: [get] query parameters do not match
in both [parent, routing, _source, _source_exclude, _source_include, version]
only in API [fields, preference, realtime, refresh, version_type]
only in SENSE []
[cat.indices] api matches sense [_cat/indices]
WARN: [cat.indices] query parameters do not match
in both [bytes, h, help, pri, v]
only in API [local, master_timeout]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[nodes.stats] api matches sense [_nodes/stats]
WARN: [nodes.stats] query parameters do not match
in both []
only in API [completion_fields, fielddata_fields, fields, groups, human, level, types, timeout]
only in SENSE []
[cluster.state] api matches sense [_cluster/state]
WARN: [cluster.state] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local, master_timeout, flat_settings]
only in SENSE []
[snapshot.restore] api matches sense [restore_snapshot]
WARN: [snapshot.restore] query parameters do not match
in both [wait_for_completion]
only in API [master_timeout]
only in SENSE []
[count] api matches sense [_count]
WARN: [count] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards, min_score, preference, routing]
only in API [q, analyzer, analyze_wildcard, default_operator, df, lenient, lowercase_expanded_terms]
only in SENSE [terminate_after]
[cluster.reroute] api matches sense [_cluster/reroute]
WARN: [cluster.reroute] query parameters do not match
in both [dry_run, explain]
only in API [metric, master_timeout, timeout]
only in SENSE []
[cat.aliases] api matches sense [_cat/aliases]
WARN: [cat.aliases] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[cat.health] api matches sense [_cat/health]
WARN: [cat.health] query parameters do not match
in both [help, ts, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[indices.put_mapping] api matches sense [_put_type_mapping]
WARN: [indices.put_mapping] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [timeout, master_timeout, update_all_types]
only in SENSE []
[indices.get_mapping] api matches sense [_get_mapping]
WARN: [indices.get_mapping] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local]
only in SENSE []
[indices.delete] api matches sense [__delete_indices__]
WARN: [indices.delete] query parameters do not match
in both []
only in API [timeout, master_timeout]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[delete_template] api matches sense [_get_delete_search_template]
WARN: [delete_template] query parameters do not match
in both []
only in API [version, version_type]
only in SENSE []
[indices.clear_cache] api matches sense [_cache/clear]
WARN: [indices.clear_cache] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [field_data, fielddata, fields, query, index, recycler, request]
only in SENSE []
[cat.segments] api matches sense [_cat/segments]
WARN: [cat.segments] query parameters do not match
in both [help, v]
only in API [h]
only in SENSE [bytes]
[cluster.pending_tasks] api matches sense [_cluster/pending_tasks]
WARN: [cluster.pending_tasks] query parameters do not match
in both []
only in API [local, master_timeout]
only in SENSE []
[cat.nodes] api matches sense [_cat/nodes]
WARN: [cat.nodes] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[index] api matches sense [index_doc,index_doc_no_id]
[indices.recovery] api matches sense [_recovery]
WARN: [indices.recovery] query parameters do not match
in both [detailed, active_only, human]
only in API []
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[nodes.hot_threads] api matches sense [_nodes/hot_threads]
WARN: [nodes.hot_threads] query parameters do not match
in both []
only in API [interval, snapshots, threads, ignore_idle_threads, type, timeout]
only in SENSE []
[search] api matches sense [_search]
WARN: [search] query parameters do not match
in both [analyzer, analyze_wildcard, default_operator, df, explain, fields, from, ignore_unavailable, allow_no_indices, expand_wildcards, lowercase_expanded_terms, preference, q, routing, scroll, search_type, size, sort, _source, _source_exclude, _source_include, terminate_after, timeout, track_scores, request_cache]
only in API [fielddata_fields, lenient, stats, suggest_field, suggest_mode, suggest_size, suggest_text, version]
only in SENSE [scroll_id]
[indices.delete_template] api matches sense [_delete_template]
WARN: [indices.delete_template] query parameters do not match
in both []
only in API [timeout, master_timeout]
only in SENSE []
[indices.flush] api matches sense [_flush]
[indices.delete_alias] api matches sense [_delete_alias]
WARN: [indices.delete_alias] query parameters do not match
in both []
only in API [timeout, master_timeout]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[indices.refresh] api matches sense [_refresh]
WARN: [indices.refresh] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [force, operation_threading]
only in SENSE []
[snapshot.create] api matches sense [put_snapshot]
WARN: [snapshot.create] query parameters do not match
in both [wait_for_completion]
only in API [master_timeout]
only in SENSE []
[cat.plugins] api matches sense [_cat/plugins]
WARN: [cat.plugins] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[cluster.put_settings] api matches sense [put_cluster/settings]
WARN: [cluster.put_settings] query parameters do not match
in both []
only in API [flat_settings, master_timeout, timeout]
only in SENSE []
[indices.get_field_mapping] api matches sense [_get_field_mapping]
WARN: [indices.get_field_mapping] query parameters do not match
in both [include_defaults, ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local]
only in SENSE []
[indices.shard_stores] api matches sense [_shard_stores]
WARN: [indices.shard_stores] query parameters do not match
in both [status, ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [operation_threading]
only in SENSE []
[indices.put_template] api matches sense [_put_template]
WARN: [indices.put_template] query parameters do not match
in both []
only in API [order, create, timeout, master_timeout, flat_settings]
only in SENSE []
[indices.update_aliases] api matches sense [_post_aliases]
WARN: [indices.update_aliases] query parameters do not match
in both []
only in API [timeout, master_timeout]
only in SENSE []
[snapshot.create_repository] api matches sense [put_repository]
WARN: [snapshot.create_repository] query parameters do not match
in both []
only in API [master_timeout, timeout, verify]
only in SENSE []
[cluster.get_settings] api matches sense [get_cluster/settings]
WARN: [cluster.get_settings] query parameters do not match
in both []
only in API [flat_settings, master_timeout, timeout]
only in SENSE []
[indices.create] api matches sense [__create_index__]
WARN: [indices.create] query parameters do not match
in both []
only in API [timeout, master_timeout, update_all_types]
only in SENSE []
[cat.nodeattrs] api matches sense [_cat/nodeattrs]
WARN: [cat.nodeattrs] query parameters do not match
in both [h, help, v]
only in API [local, master_timeout]
only in SENSE []
[cluster.health] api matches sense [_cluster/health]
WARN: [cluster.health] query parameters do not match
in both [level]
only in API [local, master_timeout, timeout, wait_for_active_shards, wait_for_nodes, wait_for_relocating_shards, wait_for_status]
only in SENSE []
[cat.master] api matches sense [_cat/master]
WARN: [cat.master] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[percolate] api matches sense [_percolate,_percolate_id]
[field_stats] api matches sense [_field_stats]
[cat.allocation] api matches sense [_cat/allocation]
WARN: [cat.allocation] query parameters do not match
in both [bytes, help, v]
only in API [local, master_timeout, h]
only in SENSE []
[indices.put_warmer] api matches sense [_put_warmer]
WARN: [indices.put_warmer] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [master_timeout, request_cache]
only in SENSE []
[put_script] api matches sense [_put_script]
WARN: [put_script] query parameters do not match
in both []
only in API [op_type, version, version_type]
only in SENSE []
[indices.put_alias] api matches sense [_post_alias]
WARN: [indices.put_alias] query parameters do not match
in both []
only in API [timeout, master_timeout]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[termvectors] api matches sense [_termvectors,_termvectors_id]
WARN: [termvectors] query parameters do not match
in both [term_statistics, field_statistics, dfs, fields, offsets, positions, payloads, preference, routing, parent, version, version_type]
only in API [realtime]
only in SENSE []
[indices.put_settings] api matches sense [_put_settings]
WARN: [indices.put_settings] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [master_timeout, flat_settings]
only in SENSE []
[delete] api matches sense [_delete_doc]
WARN: [delete] query parameters do not match
in both [parent, routing, version, version_type]
only in API [consistency, refresh, timeout]
only in SENSE []
[get_template] api matches sense [_get_delete_search_template]
WARN: [get_template] query parameters do not match
in both []
only in API [version, version_type]
only in SENSE []
[update] api matches sense [_update]
WARN: [update] query parameters do not match
in both [consistency, fields, parent, refresh, retry_on_conflict, routing, timeout, timestamp, version, version_type]
only in API [lang, script, script_id, scripted_upsert, ttl, detect_noop]
only in SENSE []
[indices.upgrade] api matches sense [_upgrade]
WARN: [indices.upgrade] query parameters do not match
in both [allow_no_indices, expand_wildcards, ignore_unavailable, wait_for_completion]
only in API [only_ancient_segments]
only in SENSE []
[indices.stats] api matches sense [_stats]
WARN: [indices.stats] query parameters do not match
in both [completion_fields, fielddata_fields, fields, level, types]
only in API [groups, human]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[indices.get_warmer] api matches sense [_get_warmer]
WARN: [indices.get_warmer] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local]
only in SENSE []
[indices.delete_warmer] api matches sense [_delete_warmer]
WARN: [indices.delete_warmer] query parameters do not match
in both []
only in API [master_timeout, name]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[indices.analyze] api matches sense [_analyze]
WARN: [indices.analyze] query parameters do not match
in both [analyzer, char_filters, field, filters, text, tokenizer]
only in API [index, prefer_local, format]
only in SENSE [ignore_unavailable, allow_no_indices, expand_wildcards]
[indices.segments] api matches sense [_segments]
WARN: [indices.segments] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [human, operation_threading]
only in SENSE []
[indices.flush_synced] api matches sense [_flush_synced]
[search_shards] api matches sense [_search_shards]
[search_template] api matches sense [_search_template]
WARN: [search_template] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [preference, routing, scroll, search_type]
only in SENSE []
[snapshot.status] api matches sense [_snapshot_status]
WARN: [snapshot.status] query parameters do not match
in both []
only in API [master_timeout]
only in SENSE []
[indices.get_alias] api matches sense [_get_alias]
WARN: [indices.get_alias] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local]
only in SENSE []
[cat.recovery] api matches sense [_cat/recovery]
WARN: [cat.recovery] query parameters do not match
in both [bytes, help, v]
only in API [master_timeout, h]
only in SENSE []
[indices.get_template] api matches sense [_get_template]
WARN: [indices.get_template] query parameters do not match
in both []
only in API [flat_settings, master_timeout, local]
only in SENSE []
[snapshot.get] api matches sense [single_snapshot]
WARN: [snapshot.get] query parameters do not match
in both []
only in API [master_timeout]
only in SENSE []
[put_template] api matches sense [_put_search_template]
WARN: [put_template] query parameters do not match
in both []
only in API [op_type, version, version_type]
only in SENSE []
[get_source] api matches sense [_get_doc_source]
WARN: [get_source] query parameters do not match
in both [parent, routing, _source_exclude, _source_include, version]
only in API [preference, realtime, refresh, _source, version_type]
only in SENSE []
[indices.get] api matches sense [_get_index]
WARN: [indices.get] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards]
only in API [local, flat_settings, human]
only in SENSE []
[cat.count] api matches sense [_cat/count]
WARN: [cat.count] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[render_search_template] api matches sense [_render_search_template,_render_search_template_with_id]
[indices.get_aliases] api matches sense [_get_aliases]
WARN: [indices.get_aliases] query parameters do not match
in both []
only in API [timeout, local]
only in SENSE []
[cat.pending_tasks] api matches sense [_cat/pending_tasks]
WARN: [cat.pending_tasks] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[cat.shards] api matches sense [_cat/shards]
WARN: [cat.shards] query parameters do not match
in both [help, v]
only in API [local, master_timeout, h]
only in SENSE [bytes]
[indices.get_settings] api matches sense [_get_index_settings,_get_settings]
WARN: [indices.get_settings] query parameters do not match
in both [ignore_unavailable, allow_no_indices, expand_wildcards, flat_settings]
only in API [local, human]
only in SENSE []
[indices.validate_query] api matches sense [_validate_query]
WARN: [indices.validate_query] query parameters do not match
in both [explain, ignore_unavailable, allow_no_indices, expand_wildcards, rewrite]
only in API [operation_threading, q, analyzer, analyze_wildcard, default_operator, df, lenient, lowercase_expanded_terms]
only in SENSE []
[nodes.info] api matches sense [_nodes/info]
WARN: [nodes.info] query parameters do not match
in both []
only in API [flat_settings, human, timeout]
only in SENSE []
[snapshot.delete] api matches sense [single_snapshot]
WARN: [snapshot.delete] query parameters do not match
in both []
only in API [master_timeout]
only in SENSE []
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.