diff --git a/src/CodeGeneration/ApiGenerator/ApiGenerator.cs b/src/CodeGeneration/ApiGenerator/ApiGenerator.cs index a50ad9eaf32..d0fd721825d 100644 --- a/src/CodeGeneration/ApiGenerator/ApiGenerator.cs +++ b/src/CodeGeneration/ApiGenerator/ApiGenerator.cs @@ -133,13 +133,27 @@ private static KeyValuePair CreateApiEndpoint(string jsonFi var endpoint = officialJsonSpec.ToObject>().First(); endpoint.Value.RestSpecName = endpoint.Key; endpoint.Value.CsharpMethodName = CreateMethodName(endpoint.Key); + + PatchUrlParts(jsonFile, endpoint.Value.Url); return endpoint; } + private static void PatchUrlParts(string jsonFile, ApiUrl url) + { + if (url.IsPartless) return; + foreach (var kv in url.Parts) + { + var required = url.ExposedApiPaths.All(p => p.Path.Contains($"{{{kv.Key}}}")); + if (kv.Value.Required != required) + Warnings.Add($"{jsonFile} has part: {kv.Key} listed as {kv.Value.Required} but should be {required}"); + kv.Value.Required = required; + } + } + private static void PatchOfficialSpec(JObject original, string jsonFile) { var directory = Path.GetDirectoryName(jsonFile); - var patchFile = Path.Combine(directory, Path.GetFileNameWithoutExtension(jsonFile)) + ".patch.json"; + var patchFile = Path.Combine(directory,"..", "_Patches", Path.GetFileNameWithoutExtension(jsonFile)) + ".patch.json"; if (!File.Exists(patchFile)) return; var patchedJson = JObject.Parse(File.ReadAllText(patchFile)); diff --git a/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj b/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj index 838d31bb185..b683b347f92 100644 --- a/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj +++ b/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/CodeGeneration/ApiGenerator/CodeConfiguration.cs b/src/CodeGeneration/ApiGenerator/CodeConfiguration.cs index 7ae22d450b3..b608ae56d56 100644 --- a/src/CodeGeneration/ApiGenerator/CodeConfiguration.cs +++ b/src/CodeGeneration/ApiGenerator/CodeConfiguration.cs @@ -56,6 +56,7 @@ public static class CodeConfiguration "indices.unfreeze.json", "ccr.follow_info.json", + "ccr.forget_follower.json" }; diff --git a/src/CodeGeneration/ApiGenerator/Domain/ApiUrl.cs b/src/CodeGeneration/ApiGenerator/Domain/ApiUrl.cs index 27739d3b7aa..cff7c203202 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/ApiUrl.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/ApiUrl.cs @@ -20,7 +20,7 @@ public IEnumerable Paths set => _paths = (value ?? Enumerable.Empty()).ToList(); } - public IDictionary Parts { private get; set; } + public IDictionary Parts { get; set; } public IEnumerable ExposedApiPaths { diff --git a/src/CodeGeneration/ApiGenerator/Program.cs b/src/CodeGeneration/ApiGenerator/Program.cs index d455c98cd1e..599550ea64b 100644 --- a/src/CodeGeneration/ApiGenerator/Program.cs +++ b/src/CodeGeneration/ApiGenerator/Program.cs @@ -10,14 +10,14 @@ public static class Program private static void Main(string[] args) { var redownloadCoreSpecification = false; + var generateCode = false; var downloadBranch = DownloadBranch; var answer = "invalid"; while (answer != "y" && answer != "n" && answer != "") { - Console.Write("Download online rest specifications? [Y/N] (default N): "); - //answer = Console.ReadLine()?.Trim().ToLowerInvariant(); - answer = "n"; + Console.Write("Download online rest specifications? [y/N] (default N): "); + answer = Console.ReadLine()?.Trim().ToLowerInvariant(); redownloadCoreSpecification = answer == "y"; } @@ -40,7 +40,15 @@ private static void Main(string[] args) if (redownloadCoreSpecification) RestSpecDownloader.Download(downloadBranch); - ApiGenerator.Generate(downloadBranch, "Core", "XPack"); + answer = "invalid"; + while (answer != "y" && answer != "n" && answer != "") + { + Console.Write("Generate code from the specification files on disk? [Y/n] (default Y): "); + answer = Console.ReadLine()?.Trim().ToLowerInvariant(); + generateCode = answer == "y" || answer == ""; + } + if (generateCode) + ApiGenerator.Generate(downloadBranch, "Core", "XPack"); } } } diff --git a/src/CodeGeneration/ApiGenerator/RestSpecDownloader.cs b/src/CodeGeneration/ApiGenerator/RestSpecDownloader.cs index 395bfa508be..c353e9d5a94 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecDownloader.cs +++ b/src/CodeGeneration/ApiGenerator/RestSpecDownloader.cs @@ -15,6 +15,7 @@ public class RestSpecDownloader private static readonly Dictionary OnlineSpecifications = new Dictionary { { "Core", "https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/api" }, + { "XPack", "https://github.com/elastic/elasticsearch/tree/{version}/x-pack/plugin/src/test/resources/rest-api-spec/api"} }; private static readonly ProgressBarOptions SubProgressBarOptions = new ProgressBarOptions @@ -32,7 +33,6 @@ private RestSpecDownloader(string branch) let url = kv.Value.Replace("{version}", branch) select new Specification { FolderOnDisk = kv.Key, Branch = branch, GithubListingUrl = url }).ToList(); - using (var pbar = new ProgressBar(specifications.Count, "Downloading specifications", MainProgressBarOptions)) { foreach (var spec in specifications) diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/bulk.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/bulk.json index 07146d2dad4..a07f362bef0 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/bulk.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/bulk.json @@ -4,14 +4,7 @@ "methods": ["POST", "PUT"], "url": { "path": "/_bulk", - "paths": ["/_bulk", "/{index}/_bulk"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_bulk", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"], "parts": { "index": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/clear_scroll.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/clear_scroll.json index b3fc40b36ee..6b82d1dc474 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/clear_scroll.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/clear_scroll.json @@ -3,15 +3,8 @@ "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html", "methods": ["DELETE"], "url": { - "path": "/_search/scroll", - "paths": [ "/_search/scroll"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/_search/scroll/{scroll_id}", - "description" : "A scroll id can be quite large and should be specified as part of the body" - } - ], + "path": "/_search/scroll/{scroll_id}", + "paths": ["/_search/scroll/{scroll_id}", "/_search/scroll"], "parts": { "scroll_id": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/count.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/count.json index 64759fcd6a0..d14f4ab784a 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/count.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/count.json @@ -4,14 +4,7 @@ "methods": ["POST", "GET"], "url": { "path": "/_count", - "paths": ["/_count", "/{index}/_count"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_count", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_count", "/{index}/_count", "/{index}/{type}/_count"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/create.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/create.json index 35dfc1684d6..6a21620423d 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/create.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/create.json @@ -4,14 +4,7 @@ "methods": ["PUT","POST"], "url": { "path": "/{index}/_create/{id}", - "paths": ["/{index}/_create/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}/_create", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_create/{id}", "/{index}/{type}/{id}/_create"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete.json index ca0720eb802..4b698b371a1 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete.json @@ -4,14 +4,7 @@ "methods": ["DELETE"], "url": { "path": "/{index}/_doc/{id}", - "paths": ["/{index}/_doc/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/{type}/{id}", "/{index}/_doc/{id}"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete_by_query.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete_by_query.json index 3a829440e50..dfdc0068082 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete_by_query.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete_by_query.json @@ -4,14 +4,7 @@ "methods": ["POST"], "url": { "path": "/{index}/_delete_by_query", - "paths": ["/{index}/_delete_by_query"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_delete_by_query", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_delete_by_query", "/{index}/{type}/_delete_by_query"], "comment": "most things below this are just copied from search.json", "parts": { "index": { diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists.json index 5fb62c1c451..1d3749a5d8c 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists.json @@ -4,14 +4,7 @@ "methods": ["HEAD"], "url": { "path": "/{index}/_doc/{id}", - "paths": ["/{index}/_doc/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_doc/{id}", "/{index}/{type}/{id}"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json index 5a62b0ea213..a3edff1d111 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json @@ -4,14 +4,7 @@ "methods": ["HEAD"], "url": { "path": "/{index}/_source/{id}", - "paths": ["/{index}/_source/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}/_source", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_source/{id}", "/{index}/{type}/{id}/_source"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/explain.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/explain.json index bc174f9f040..005cbadccb0 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/explain.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/explain.json @@ -4,14 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/{index}/_explain/{id}", - "paths": ["/{index}/_explain/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}/_explain", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_explain/{id}", "/{index}/{type}/{id}/_explain"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get.json index ef8bf0d2f86..ac3024c9c24 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get.json @@ -4,14 +4,7 @@ "methods": ["GET"], "url": { "path": "/{index}/_doc/{id}", - "paths": ["/{index}/_doc/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_doc/{id}", "/{index}/{type}/{id}"], "parts": { "id": { "type" : "string", @@ -65,6 +58,14 @@ "type" : "list", "description" : "A list of fields to extract and return from the _source field" }, + "_source_exclude": { + "type" : "list", + "description" : "A list of fields to exclude from the returned _source field" + }, + "_source_include": { + "type" : "list", + "description" : "A list of fields to extract and return from the _source field" + }, "version" : { "type" : "number", "description" : "Explicit version number for concurrency control" diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get_source.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get_source.json index ad6069df7e7..cd737e32d6c 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get_source.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/get_source.json @@ -4,14 +4,7 @@ "methods": ["GET"], "url": { "path": "/{index}/_source/{id}", - "paths": ["/{index}/_source/{id}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}/_source", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/_source/{id}", "/{index}/{type}/{id}/_source"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/index.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/index.json index ff378d23137..dcba05f6a38 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/index.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/index.json @@ -4,19 +4,7 @@ "methods": ["POST", "PUT"], "url": { "path": "/{index}/_doc", - "paths": ["/{index}/_doc/{id}", "/{index}/_doc"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/{type}/{id}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/{index}/{type}", "/{index}/{type}/{id}", "/{index}/_doc/{id}", "/{index}/_doc"], "parts": { "id": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.exists_type.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.exists_type.json index e00f2d915e7..d793199bc27 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.exists_type.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.exists_type.json @@ -2,10 +2,6 @@ "indices.exists_type": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html", "methods": ["HEAD"], - "deprecated" : { - "version" : "7.0", - "description" : "Types are being removed from elasticsearch and therefor this API is on the way out. Read more here: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html" - }, "url": { "path": "/{index}/_mapping/{type}", "paths": ["/{index}/_mapping/{type}"], diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_field_mapping.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_field_mapping.json index bf999242aee..3ce610153b5 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_field_mapping.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_field_mapping.json @@ -4,19 +4,7 @@ "methods": ["GET"], "url": { "path": "/_mapping/field/{fields}", - "paths": ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/_mapping/{type}/field/{fields}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/_mapping/{type}/field/{fields}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}", "/_mapping/{type}/field/{fields}", "/{index}/_mapping/{type}/field/{fields}"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_mapping.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_mapping.json index 734cb4e29f1..d9016ec4024 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_mapping.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.get_mapping.json @@ -4,19 +4,7 @@ "methods": ["GET"], "url": { "path": "/_mapping", - "paths": ["/_mapping", "/{index}/_mapping"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/_mapping/{type}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/_mapping/{type}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_mapping", "/{index}/_mapping", "/_mapping/{type}", "/{index}/_mapping/{type}"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.put_mapping.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.put_mapping.json index 37b85cd343f..cc55ffccdd1 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.put_mapping.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.put_mapping.json @@ -3,49 +3,11 @@ "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html", "methods": ["PUT", "POST"], "url": { - "path": "{index}/_mapping", - "paths": ["{index}/_mapping"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_mapping", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/_mapping/{type}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/{type}/_mappings", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/{index}/_mappings/{type}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "/_mappings/{type}", - "description" : "Specifying types in urls has been deprecated" - }, - { - "version" : "7.0", - "path" : "{index}/_mappings", - "description" : "The plural mappings is accepted but only /_mapping is documented" - }, - { - "version" : "7.0", - "path" : "/_mapping/{type}", - "description" : "Specifying types in urls has been deprecated" - } - ], + "path": "/{index}/{type}/_mapping", + "paths": ["/{index}/{type}/_mapping", "/{index}/_mapping/{type}", "/_mapping/{type}", "/{index}/{type}/_mappings", "/{index}/_mappings/{type}", "/_mappings/{type}", "{index}/_mappings", "{index}/_mapping"], "parts": { "index": { "type" : "list", - "required" : true, "description" : "A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices." }, "type": { diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.validate_query.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.validate_query.json index 48bc57143cf..2f9aac05438 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.validate_query.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.validate_query.json @@ -4,14 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/_validate/query", - "paths": ["/_validate/query", "/{index}/_validate/query"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_validate/query", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_validate/query", "/{index}/_validate/query", "/{index}/{type}/_validate/query"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mget.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mget.json index 7404019821a..62fbb59a4e4 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mget.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mget.json @@ -4,14 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/_mget", - "paths": ["/_mget", "/{index}/_mget"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_mget", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_mget", "/{index}/_mget", "/{index}/{type}/_mget"], "parts": { "index": { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch.json index 0e1e66228dc..398dcbd2951 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch.json @@ -4,14 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/_msearch", - "paths": ["/_msearch", "/{index}/_msearch"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_msearch", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_msearch", "/{index}/_msearch", "/{index}/{type}/_msearch"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch_template.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch_template.json index 06787765429..e89f96e0696 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch_template.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch_template.json @@ -4,14 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/_msearch/template", - "paths": ["/_msearch/template", "/{index}/_msearch/template"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_msearch/template", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths": ["/_msearch/template", "/{index}/_msearch/template", "/{index}/{type}/_msearch/template"], "parts": { "index": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mtermvectors.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mtermvectors.json index 8849a4bdcad..58978b7d190 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mtermvectors.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/mtermvectors.json @@ -4,14 +4,7 @@ "methods" : ["GET", "POST"], "url" : { "path" : "/_mtermvectors", - "paths" : ["/_mtermvectors", "/{index}/_mtermvectors"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/{index}/{type}/_mtermvectors", - "description" : "Specifying types in urls has been deprecated" - } - ], + "paths" : ["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"], "parts" : { "index" : { "type" : "string", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/nodes.hot_threads.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/nodes.hot_threads.json index 342770b1bf9..854cde1a9e7 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/nodes.hot_threads.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/nodes.hot_threads.json @@ -4,39 +4,7 @@ "methods": ["GET"], "url": { "path": "/_nodes/hot_threads", - "paths": ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], - "deprecated_paths" : [ - { - "version" : "7.0", - "path" : "/_cluster/nodes/hotthreads", - "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented" - }, - { - "version" : "7.0", - "path" : "/_cluster/nodes/{node_id}/hotthreads", - "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented" - }, - { - "version" : "7.0", - "path" : "/_nodes/hotthreads", - "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented" - }, - { - "version" : "7.0", - "path" : "/_nodes/{node_id}/hotthreads", - "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented" - }, - { - "version" : "7.0", - "path" : "/_cluster/nodes/hot_threads", - "description" : "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons" - }, - { - "version" : "7.0", - "path" :"/_cluster/nodes/{node_id}/hot_threads", - "description" : "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons" - } - ], + "paths": ["/_cluster/nodes/hotthreads", "/_cluster/nodes/hot_threads", "/_cluster/nodes/{node_id}/hotthreads", "/_cluster/nodes/{node_id}/hot_threads", "/_nodes/hotthreads", "/_nodes/hot_threads", "/_nodes/{node_id}/hotthreads", "/_nodes/{node_id}/hot_threads"], "parts": { "node_id": { "type" : "list", diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/reindex.json b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/reindex.json index fc701c29d60..e85eadb5bc4 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/reindex.json +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/reindex.json @@ -30,6 +30,11 @@ "default": 0, "description": "The throttle to set on this request in sub-requests per second. -1 means no throttle." }, + "scroll": { + "type" : "time", + "description" : "Control how long to keep the search context alive", + "default" : "5m" + }, "slices": { "type": "number", "default": 1, diff --git a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html index da0bf584e42..e6eec40994f 100644 --- a/src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html +++ b/src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html @@ -18,9 +18,9 @@ - - - + + + @@ -28,7 +28,7 @@ - elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/api at v6.6.2 · elastic/elasticsearch · GitHub + elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/api at 7.0 · elastic/elasticsearch · GitHub @@ -41,7 +41,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -70,23 +70,23 @@ - + - + - + - + - + - + @@ -117,8 +117,7 @@ - -