Skip to content

6.3.x support #3387

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a8d991e
updated core api's
Mpdreamz Aug 10, 2018
46868b3
add updated x-pack API's
Mpdreamz Aug 10, 2018
63334d6
Add new x-pack API's
Mpdreamz Aug 10, 2018
e9a2864
add obsolete json files for removed url parameters
Mpdreamz Aug 10, 2018
43528b3
ignore new API's for now
Mpdreamz Aug 10, 2018
5f94047
DescriptorsBase generated all the common properties on one line
Mpdreamz Aug 10, 2018
ef68ada
Ran code generation for 6.3 now that we've mapped the removed queryst…
Mpdreamz Aug 10, 2018
a3d2005
fix #3326 Add index_prefixes to Text property mapping (#3362)
Mpdreamz Aug 14, 2018
d215520
Fix #3327 Add span_gap query for use with span_near query (#3361)
Mpdreamz Aug 14, 2018
524f141
Fix #3328 Add periodic flush count to FlushStats (#3360)
Mpdreamz Aug 20, 2018
93400ac
Fix #3325 Add support for zero_terms_query to match_phrase query (#3363)
Mpdreamz Aug 20, 2018
9c7e599
Fix #3323 Add support for null_value, ignore_z_value on GeoPoint prop…
Mpdreamz Aug 20, 2018
5cc9a51
Fix #3318 Support 3rd dimension (Z value) to points for geo_point and…
Mpdreamz Aug 20, 2018
7ff63ab
Fix #3330 Add additional translog properties as per elastic/elasticse…
Mpdreamz Aug 20, 2018
69775d6
Fix #3317 and #3322 add after_key support to composite aggregation re…
Mpdreamz Aug 20, 2018
4250901
Fix #3315 obsolete the update_all_types querystring parameter (#3368)
Mpdreamz Aug 20, 2018
6007a70
Fix #3316 allow generated enum members to be obsoleted (#3369)
Mpdreamz Aug 20, 2018
bcdc1d6
Fix #3320 Add Painless script execute API (#3370)
Mpdreamz Aug 20, 2018
7e42dea
Feature/node stats 6.3 (#3359)
Mpdreamz Aug 20, 2018
1c26ece
Add MatchPattern to dynamic templates (#3374)
russcam Aug 23, 2018
5bf170d
Include Result property on IBulkResponseItem (#3376)
russcam Aug 23, 2018
017d8b6
Add support for geo_shape represented as Well-Known Text (WKT) (#3377)
russcam Aug 27, 2018
0f6aac0
Add note about filter_path and deserialization (#3379)
russcam Aug 29, 2018
0afe4fd
Add include_aliases and partial to Snapshot Restore request (#3380)
russcam Aug 29, 2018
491a4a4
Support Ids in MultiTermVectors API (#3382)
russcam Aug 29, 2018
e46c70d
Include LatLongDetector on DetectorsDescriptor<T> (#3384)
russcam Aug 29, 2018
75a70a4
bump Elastic abstractions, StartAsyncReads was called on dispose even…
Mpdreamz Aug 31, 2018
2311bdb
Bump Elastic.Xunit and make sure we emit output after node started, c…
Mpdreamz Sep 2, 2018
5bba8f7
switch back to netcoreapp2.1 for Tests
Mpdreamz Sep 3, 2018
3848aee
Expect Json used Id which tripped canary builds testing against the n…
Mpdreamz Sep 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion src/CodeGeneration/ApiGenerator/ApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,36 @@ public static void Generate(string downloadBranch, params string[] folders)

private static string[] IgnoredApis { get; } =
{
// these API's are not ready for primetime yet
"xpack.ml.delete_filter.json",
"xpack.ml.get_filters.json",
"xpack.ml.put_filter.json",
"rank_eval.json"
"rank_eval.json",
// these API's are new and need to be mapped
"xpack.license.get_basic_status.json",
"xpack.license.post_start_basic.json",
"xpack.ml.delete_calendar.json",
"xpack.ml.delete_calendar_event.json",
"xpack.ml.delete_calendar_job.json",
"xpack.ml.get_calendar_events.json",
"xpack.ml.get_calendars.json",
"xpack.ml.info.json",
"xpack.ml.post_calendar_events.json",
"xpack.ml.put_calendar.json",
"xpack.ml.put_calendar_job.json",
"xpack.ml.get_calendar_job.json",

"xpack.rollup.delete_job.json",
"xpack.rollup.get_jobs.json",
"xpack.rollup.get_rollup_caps.json",
"xpack.rollup.put_job.json",
"xpack.rollup.rollup_search.json",
"xpack.rollup.start_job.json",
"xpack.rollup.stop_job.json",
"xpack.sql.clear_cursor.json",
"xpack.sql.query.json",
"xpack.sql.translate.json",
"xpack.ssl.certificates.json",
};

private static RestApiSpec CreateRestApiSpecModel(string downloadBranch, string[] folders)
Expand Down
6 changes: 6 additions & 0 deletions src/CodeGeneration/ApiGenerator/Domain/ApiQueryParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ public IEnumerable<string> DescriptionHighLevel
case "_source":
yield return "Whether the _source should be included in the response.";
yield break;
case "filter_path":
yield return this.Description;
yield return "<para>Use of response filtering can result in a response from Elasticsearch ";
yield return "that cannot be correctly deserialized to the respective response type for the request. ";
yield return "In such situations, use the low level client to issue the request and handle response deserialization</para>";
yield break;
default:
yield return this.Description;
yield break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public abstract class EndpointOverridesBase: IEndpointOverrides

public virtual IDictionary<string, string> ObsoleteQueryStringParams { get; set; } = new Dictionary<string, string>();


public virtual CsharpMethod PatchMethod(CsharpMethod method) => method;
}
}
9 changes: 8 additions & 1 deletion src/CodeGeneration/ApiGenerator/Overrides/GlobalOverrides.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using ApiGenerator.Overrides.Descriptors;

Expand All @@ -11,6 +12,11 @@ public class GlobalOverrides : EndpointOverridesBase
"script_fields",
"docvalue_fields"
};
public IDictionary<string, Dictionary<string, string>> ObsoleteEnumMembers { get; set; } = new Dictionary<string, Dictionary<string, string>>
{
{ "NodesStatsIndexMetric", new Dictionary<string, string>{{"suggest", "As of 5.0 this option always returned an empty object in the response"}}},
{ "IndicesStatsMetric", new Dictionary<string, string>{{"suggest", "Suggest stats have folded under the search stats, this alias will be removed"}}}
};

public override IDictionary<string, string> RenameQueryStringParams { get; } = new Dictionary<string, string>
{
Expand All @@ -28,7 +34,8 @@ public class GlobalOverrides : EndpointOverridesBase

public override IDictionary<string, string> ObsoleteQueryStringParams { get; set; } = new Dictionary<string, string>
{
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."}
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."},
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"}
};

public override IEnumerable<string> SkipQueryStringParams { get; } = new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"filter_path": {
"type": "list",
"description": "A comma-separated list of filters used to reduce the respone."
"description": "A comma-separated list of filters used to reduce the response."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
"type": "boolean",
"description": "Return detailed task information (default: false)"
},
"parent_node": {
"type": "string",
"description": "Return tasks with specified parent node."
},
"parent_task": {
"type" : "number",
"description" : "Return tasks with specified parent task id. Set to -1 to return all."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cat.tasks": {
"url": {
"params": {
"parent_node": {
"type" : "string",
"description" : "Return tasks with the specified parent node",
"obsolete" : "Removed in 6.3.0 from the server see https://github.com/elastic/elasticsearch/pull/28841"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"type" : "enum",
"options": ["abort", "proceed"],
"default": "abort",
"description" : "What to do when the delete-by-query hits version conflicts?"
"description" : "What to do when the delete by query hits version conflicts?"
},
"expand_wildcards": {
"type" : "enum",
Expand Down Expand Up @@ -142,12 +142,12 @@
"scroll_size": {
"type": "number",
"defaut_value": 100,
"description": "Size on the scroll request powering the update_by_query"
"description": "Size on the scroll request powering the delete by query"
},
"wait_for_completion": {
"type" : "boolean",
"default": true,
"description" : "Should the request should block until the delete-by-query is complete."
"description" : "Should the request should block until the delete by query is complete."
},
"requests_per_second": {
"type": "number",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"params": {
"field_data": {
"type" : "boolean",
"description" : "Clear field data"
"description" : "Clear field data. This is deprecated. Prefer `fielddata`."
},
"fielddata": {
"type" : "boolean",
"description" : "Clear field data"
},
"fields": {
"type" : "list",
"description" : "A comma-separated list of fields to clear when using the `field_data` parameter (default: all)"
"description" : "A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"
},
"query": {
"type" : "boolean",
Expand All @@ -46,10 +46,6 @@
"type" : "list",
"description" : "A comma-separated list of index name to limit the operation"
},
"recycler": {
"type" : "boolean",
"description" : "Clear the recycler cache"
},
"request_cache": {
"type" : "boolean",
"description" : "Clear request cache"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"indices.clear_cache": {
"url": {
"params": {
"recycler": {
"type" : "boolean",
"description" : "Clear the recycle cache",
"obsolete" : "Removed in 6.3.0 from the server see https://github.com/elastic/elasticsearch/pull/28866"

}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"type": "time",
"description": "Specify timeout for connection to master"
},
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
},
"preserve_existing": {
"type": "boolean",
"description": "Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"
Expand All @@ -34,10 +38,10 @@
"default": "open",
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
},
"flat_settings": {
"type": "boolean",
"description": "Return settings in flat format (default: false)"
}
"flat_settings": {
"type": "boolean",
"description": "Return settings in flat format (default: false)"
}
}
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
}
},
"params": {
"human": {
"type": "boolean",
"description": "Whether to return time and byte values in human-readable format.",
"default": false
},
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
{
"rank_eval": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html",
"methods": ["POST"],
"url": {
"path": "/_rank_eval",
"paths": ["/_rank_eval", "/{index}/_rank_eval", "/{index}/{type}/_rank_eval"],
{
"rank_eval": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html",
"methods": ["GET", "POST"],
"url": {
"path": "/_rank_eval",
"paths": ["/_rank_eval", "/{index}/_rank_eval"],
"parts": {
"index": {
"type": "list",
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"params": {}
"params": {
"ignore_unavailable": {
"type" : "boolean",
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
},
"allow_no_indices": {
"type" : "boolean",
"description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
},
"expand_wildcards": {
"type" : "enum",
"options" : ["open","closed","none","all"],
"default" : "open",
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
}
}
},
"body": {
"description": "The search definition using the Query DSL and the prototype for the eval request.",
"required": true
}
}
"body": {
"description": "The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.",
"required": true
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"scripts_painless_execute": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html",
"methods": ["GET", "POST"],
"url": {
"path": "/_scripts/painless/_execute",
"paths": ["/_scripts/painless/_execute"],
"parts": {
},
"params": {
}
},
"body": {
"description": "The script to execute"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@
"type" : "boolean",
"description": "Indicate if the number of documents that match the query should be tracked"
},
"allow_partial_search_results": {
"type" : "boolean",
"default" : true,
"description": "Indicate if an error should be returned if there is a partial search failure or timeout"
},
"typed_keys": {
"type" : "boolean",
"description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"type": "list",
"description": "A comma-separated list of actions that should be cancelled. Leave empty to cancel all."
},
"parent_node": {
"type": "string",
"description": "Cancel tasks with specified parent node."
},
"parent_task_id": {
"type" : "string",
"description" : "Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"wait_for_completion": {
"type": "boolean",
"description": "Wait for the matching tasks to complete (default: false)"
},
"timeout": {
"type": "time",
"description": "Explicit operation timeout"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
"type": "boolean",
"description": "Return detailed task information (default: false)"
},
"parent_node": {
"type": "string",
"description": "Return tasks with specified parent node."
},
"parent_task_id": {
"type" : "string",
"description" : "Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."
Expand All @@ -36,6 +32,10 @@
"description": "Group tasks by nodes or parent/child relationships",
"options" : ["nodes", "parents", "none"],
"default" : "nodes"
},
"timeout": {
"type": "time",
"description": "Explicit operation timeout"
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tasks.list": {
"url": {
"params": {
"parent_node": {
"type": "string",
"description": "Return tasks with the specified parent node",
"obsolete": "Removed in 6.3.0 from the server see https://github.com/elastic/elasticsearch/pull/28841"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"scroll_size": {
"type": "number",
"defaut_value": 100,
"description": "Size on the scroll request powering the update_by_query"
"description": "Size on the scroll request powering the update by query"
},
"wait_for_completion": {
"type" : "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"paths": [ "/_xpack" ],
"parts": {},
"params": {
"human" : {
"type" : "boolean",
"description" : "Presents additional info for humans (feature descriptions and X-Pack tagline)"
},
"categories": {
"type": "list",
"description" : "Comma-separated list of info categories. Can be any of: build, license, features"
Expand Down
Loading