Skip to content

Commit 7c9b72a

Browse files
committed
Add force + operation_threading to RefreshRequest
Removed in REST API spec elastic/elasticsearch#25234 - patched in to maintain binary compatibility
1 parent 81800de commit 7c9b72a

File tree

5 files changed

+16520
-16473
lines changed

5 files changed

+16520
-16473
lines changed
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+
}

0 commit comments

Comments
 (0)