diff --git a/src/ApiGenerator/Domain/Specification/QueryParameters.cs b/src/ApiGenerator/Domain/Specification/QueryParameters.cs index a58ddba074c..964e8edb56b 100644 --- a/src/ApiGenerator/Domain/Specification/QueryParameters.cs +++ b/src/ApiGenerator/Domain/Specification/QueryParameters.cs @@ -7,10 +7,7 @@ namespace ApiGenerator.Domain.Specification { public class QueryParameters { - private static readonly string[] FieldsParams = - { - "fields", "_source_includes", "_source_excludes", - }; + private static readonly string[] FieldsParams = { "fields", "_source_includes", "_source_excludes", }; public bool Skip { get; set; } @@ -72,7 +69,16 @@ public IEnumerable DescriptionHighLevel public string SetterLowLevel => "value"; - public string Type { get; set; } + private string _type; + + public string Type + { + // TODO support unions + get => !_type.Contains("|") + ? _type + : _type.Split('|', StringSplitOptions.RemoveEmptyEntries).First().Trim(); + set => _type = value; + } public string TypeHighLevel { diff --git a/src/ApiGenerator/RestSpecification/Core/cat.indices.json b/src/ApiGenerator/RestSpecification/Core/cat.indices.json index 68194bc652b..76c749cc7d3 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.indices.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.indices.json @@ -89,13 +89,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.nodes.json b/src/ApiGenerator/RestSpecification/Core/cat.nodes.json index eb3a965349b..ba3faa92c5e 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.nodes.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.nodes.json @@ -70,13 +70,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.pending_tasks.json b/src/ApiGenerator/RestSpecification/Core/cat.pending_tasks.json index 3ea0896ccf3..36fa33be495 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.pending_tasks.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.pending_tasks.json @@ -45,13 +45,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.recovery.json b/src/ApiGenerator/RestSpecification/Core/cat.recovery.json index 64c102d0897..7baf0b8ded6 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.recovery.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.recovery.json @@ -80,13 +80,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.shards.json b/src/ApiGenerator/RestSpecification/Core/cat.shards.json index 6eb170ac4a7..a13c0f6bf6d 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.shards.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.shards.json @@ -74,13 +74,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.snapshots.json b/src/ApiGenerator/RestSpecification/Core/cat.snapshots.json index 9bca1038726..757c2cfbe7d 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.snapshots.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.snapshots.json @@ -58,13 +58,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/cat.tasks.json b/src/ApiGenerator/RestSpecification/Core/cat.tasks.json index 1c04b05c985..ae25ab10c01 100644 --- a/src/ApiGenerator/RestSpecification/Core/cat.tasks.json +++ b/src/ApiGenerator/RestSpecification/Core/cat.tasks.json @@ -53,13 +53,13 @@ "type":"enum", "description":"The unit in which to display time values", "options":[ - "d (Days)", - "h (Hours)", - "m (Minutes)", - "s (Seconds)", - "ms (Milliseconds)", - "micros (Microseconds)", - "nanos (Nanoseconds)" + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" ] }, "v":{ diff --git a/src/ApiGenerator/RestSpecification/Core/reindex.json b/src/ApiGenerator/RestSpecification/Core/reindex.json index 0ebfddd9413..2fbaf86cab6 100644 --- a/src/ApiGenerator/RestSpecification/Core/reindex.json +++ b/src/ApiGenerator/RestSpecification/Core/reindex.json @@ -45,9 +45,9 @@ "default":"5m" }, "slices":{ - "type":"number", + "type":"number|string", "default":1, - "description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks." + "description":"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`." }, "max_docs":{ "type":"number", diff --git a/src/ApiGenerator/RestSpecification/Core/root.html b/src/ApiGenerator/RestSpecification/Core/root.html index 2c7dbba49b6..509344f502f 100644 --- a/src/ApiGenerator/RestSpecification/Core/root.html +++ b/src/ApiGenerator/RestSpecification/Core/root.html @@ -20,7 +20,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -116,7 +116,7 @@ - +