Skip to content

Commit 5617675

Browse files
Mpdreamzrusscam
authored andcommitted
5.5 (#2807)
* Code generation of elasticsearch's 5.5 branch * Update existing XPack API spec files * Add ml xpack api spec and new security endpoints * Add CRUD support for the new role mapping security API's * Add support for security token API's * fix failing codestandards tests after implementing xpack security 5.5 new features * fix overal bg_count now gets returned for sig_terms * fix stats matrix now also returns overal doc_count * fix change in GetAlias behavior, since 5.5 now returns 404 when some aliases suplied are not found * Sampler agg test for bg count should only be asserted 5.5.0 and up * Array.Empty not available for .NET 4.5 * Add force + operation_threading to RefreshRequest Removed in REST API spec elastic/elasticsearch#25234 - patched in to maintain binary compatibility * Set tests.default.yaml ES version to 5.5.0 * Update XML comments for LazyDocument * Minor language tweaks * Fix spelling * update SkipVersion for PutRoleMapping to <5.5.0
1 parent bef4b9d commit 5617675

File tree

132 files changed

+20565
-16723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+20565
-16723
lines changed

build/Clients.Common.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<Prefer32Bit>false</Prefer32Bit>
2929
<DefineConstants Condition="'$(TargetFramework)'=='netstandard1.3' OR '$(DotNetCoreOnly)'=='1'">$(DefineConstants);DOTNETCORE</DefineConstants>
3030
<DebugType Condition="'$(DotNetCoreOnly)'==''">embedded</DebugType>
31+
<DebugType Condition="'$(Configuration)'=='Debug'">full</DebugType>
3132
<SourceLink Condition="'$(DoSourceLink)'!=''">$(BaseIntermediateOutputPath)\sl-$(MsBuildProjectName)-$(TargetFramework).json</SourceLink>
3233
<RepoUri>https://raw.githubusercontent.com/elastic/elasticsearch-net</RepoUri>
3334
</PropertyGroup>

src/CodeGeneration/ApiGenerator/ApiGenerator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
</ItemGroup>
1616
<ItemGroup>
1717
<Folder Include="RestSpecification\XPack\Info" />
18+
<Folder Include="RestSpecification\XPack\MachineLearning" />
1819
</ItemGroup>
1920
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using ApiGenerator.Domain;
2+
3+
namespace ApiGenerator.Overrides.Descriptors
4+
{
5+
public class RefreshDescriptorOverrides : DescriptorOverridesBase
6+
{
7+
public override CsharpMethod PatchMethod(CsharpMethod method)
8+
{
9+
method.Url.Params.Add("force", new NoopApiQueryParameters() { Type = "boolean" });
10+
method.Url.Params.Add("operation_threading", new NoopApiQueryParameters());
11+
return method;
12+
}
13+
14+
private class NoopApiQueryParameters : ApiQueryParameters
15+
{
16+
public NoopApiQueryParameters()
17+
{
18+
this.Obsolete = "calling this is a noop";
19+
this.FluentGenerator = (queryStringParamName, mm, original, setter) => $"public {queryStringParamName} {mm.ToPascalCase()}({CsharpType(mm)} {mm}) => this;";
20+
}
21+
}
22+
}
23+
}

src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exists_source": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-get.html",
44
"methods": ["HEAD"],
55
"url": {
66
"path": "/{index}/{type}/{id}/_source",

src/CodeGeneration/ApiGenerator/RestSpecification/Core/field_caps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"field_caps": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-field-caps.html",
44
"methods": ["GET", "POST"],
55
"url": {
66
"path": "/_field_caps",

src/CodeGeneration/ApiGenerator/RestSpecification/Core/indices.refresh.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
"options" : ["open","closed","none","all"],
2626
"default" : "open",
2727
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
28-
},
29-
"force": {
30-
"type" : "boolean",
31-
"description" : "Force a refresh even if not required",
32-
"default": false
33-
},
34-
"operation_threading": {
35-
"description" : "TODO: ?"
3628
}
3729
}
3830
},

src/CodeGeneration/ApiGenerator/RestSpecification/Core/msearch_template.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"typed_keys": {
2525
"type" : "boolean",
2626
"description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
27+
},
28+
"max_concurrent_searches" : {
29+
"type" : "number",
30+
"description" : "Controls the maximum number of concurrent searches the multi search api will execute"
2731
}
2832
}
2933
},

src/CodeGeneration/ApiGenerator/RestSpecification/Core/remote.info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"remote.info": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/remote-info.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-remote-info.html",
44
"methods": ["GET"],
55
"url": {
66
"path": "/_remote/info",

src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html

Lines changed: 347 additions & 319 deletions
Large diffs are not rendered by default.

src/CodeGeneration/ApiGenerator/RestSpecification/Core/snapshot.get.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"ignore_unavailable": {
2626
"type": "boolean",
2727
"description": "Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"
28+
},
29+
"verbose": {
30+
"type": "boolean",
31+
"description": "Whether to show verbose snapshot info or only show the basic info found in the repository index blob"
2832
}
2933
}
3034
},

0 commit comments

Comments
 (0)