Skip to content

Commit f1fd5d9

Browse files
authored
Move to Elastic.Transport nuget package (#5071)
1 parent 7183940 commit f1fd5d9

File tree

327 files changed

+1922
-16044
lines changed

Some content is hidden

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

327 files changed

+1922
-16044
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<ItemGroup>
4343
<PackageReference Condition="'$(OS)' != 'Windows_NT' and $(DefineConstants.Contains(FULLFRAMEWORK))" Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0-preview.2"/>
4444
</ItemGroup>
45+
4546

4647

4748
<!---

Elasticsearch.sln

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiGenerator", "src\ApiGene
6565
EndProject
6666
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocGenerator", "src\DocGenerator\DocGenerator.csproj", "{AB8A08CC-FCA5-49AF-901A-9120DAAA11D6}"
6767
EndProject
68-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Transport.VirtualizedCluster", "src\Elastic.Transport.VirtualizedCluster\Elastic.Transport.VirtualizedCluster.csproj", "{CFE97627-8DD3-470B-B7CF-78B62E1D305D}"
69-
EndProject
7068
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "src\ExamplesGenerator\ExamplesGenerator.csproj", "{1B9CCE9F-10CE-410A-BF9B-80935F3710A7}"
7169
EndProject
7270
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "tests\Examples\Examples.csproj", "{393913C6-36ED-4F20-8864-2DA03E5606F0}"
@@ -79,10 +77,6 @@ ProjectSection(SolutionItems) = preProject
7977
Directory.Build.targets = Directory.Build.targets
8078
EndProjectSection
8179
EndProject
82-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Transport", "src\Elastic.Transport\Elastic.Transport.csproj", "{F510A0DE-8758-4A90-AE10-E25BE87A6D3D}"
83-
EndProject
84-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Transport.Tests", "tests\Elastic.Transport.Tests\Elastic.Transport.Tests.csproj", "{CB131DE7-72C9-4383-86F0-B6D268904EC8}"
85-
EndProject
8680
Global
8781
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8882
Debug|Any CPU = Debug|Any CPU
@@ -110,15 +104,12 @@ Global
110104
{072BA7DA-7B60-407D-8B6E-95E3186BE70C} = {3EA11364-0513-44B7-AD6D-A675485E7448}
111105
{CA508E92-50AE-4858-BD94-8637E88A8FAC} = {3EA11364-0513-44B7-AD6D-A675485E7448}
112106
{AB8A08CC-FCA5-49AF-901A-9120DAAA11D6} = {3EA11364-0513-44B7-AD6D-A675485E7448}
113-
{CFE97627-8DD3-470B-B7CF-78B62E1D305D} = {3EA11364-0513-44B7-AD6D-A675485E7448}
114107
{1B9CCE9F-10CE-410A-BF9B-80935F3710A7} = {3EA11364-0513-44B7-AD6D-A675485E7448}
115108
{393913C6-36ED-4F20-8864-2DA03E5606F0} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635}
116109
{3D4B5CC3-43E1-44BD-A0EA-63798563B475} = {3EA11364-0513-44B7-AD6D-A675485E7448}
117110
{D6997ADC-E933-418E-831C-DE1A78897493} = {29E53C13-34F7-4F0D-8D28-41EF768793E7}
118111
{5A9C1B95-9280-433E-8D1B-1F5396126166} = {29E53C13-34F7-4F0D-8D28-41EF768793E7}
119112
{432D5575-2347-4D3C-BF8C-3E38410C46CA} = {29E53C13-34F7-4F0D-8D28-41EF768793E7}
120-
{F510A0DE-8758-4A90-AE10-E25BE87A6D3D} = {3EA11364-0513-44B7-AD6D-A675485E7448}
121-
{CB131DE7-72C9-4383-86F0-B6D268904EC8} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635}
122113
EndGlobalSection
123114
GlobalSection(ProjectConfigurationPlatforms) = postSolution
124115
{5B393962-7586-49BA-BD99-3B1E35F48E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -181,10 +172,6 @@ Global
181172
{AB8A08CC-FCA5-49AF-901A-9120DAAA11D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
182173
{AB8A08CC-FCA5-49AF-901A-9120DAAA11D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
183174
{AB8A08CC-FCA5-49AF-901A-9120DAAA11D6}.Release|Any CPU.Build.0 = Release|Any CPU
184-
{CFE97627-8DD3-470B-B7CF-78B62E1D305D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
185-
{CFE97627-8DD3-470B-B7CF-78B62E1D305D}.Debug|Any CPU.Build.0 = Debug|Any CPU
186-
{CFE97627-8DD3-470B-B7CF-78B62E1D305D}.Release|Any CPU.ActiveCfg = Release|Any CPU
187-
{CFE97627-8DD3-470B-B7CF-78B62E1D305D}.Release|Any CPU.Build.0 = Release|Any CPU
188175
{1B9CCE9F-10CE-410A-BF9B-80935F3710A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
189176
{1B9CCE9F-10CE-410A-BF9B-80935F3710A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
190177
{1B9CCE9F-10CE-410A-BF9B-80935F3710A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -197,13 +184,5 @@ Global
197184
{3D4B5CC3-43E1-44BD-A0EA-63798563B475}.Debug|Any CPU.Build.0 = Debug|Any CPU
198185
{3D4B5CC3-43E1-44BD-A0EA-63798563B475}.Release|Any CPU.ActiveCfg = Release|Any CPU
199186
{3D4B5CC3-43E1-44BD-A0EA-63798563B475}.Release|Any CPU.Build.0 = Release|Any CPU
200-
{F510A0DE-8758-4A90-AE10-E25BE87A6D3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
201-
{F510A0DE-8758-4A90-AE10-E25BE87A6D3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
202-
{F510A0DE-8758-4A90-AE10-E25BE87A6D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
203-
{F510A0DE-8758-4A90-AE10-E25BE87A6D3D}.Release|Any CPU.Build.0 = Release|Any CPU
204-
{CB131DE7-72C9-4383-86F0-B6D268904EC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
205-
{CB131DE7-72C9-4383-86F0-B6D268904EC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
206-
{CB131DE7-72C9-4383-86F0-B6D268904EC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
207-
{CB131DE7-72C9-4383-86F0-B6D268904EC8}.Release|Any CPU.Build.0 = Release|Any CPU
208187
EndGlobalSection
209188
EndGlobal

docs/client-concepts/connection-pooling/building-blocks/connection-pooling.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ A cloud connection pool can be created using credentials and a `cloudId`
9292

9393
[source,csharp]
9494
----
95-
var credentials = new BasicAuthenticationCredentials("username", "password"); <1>
95+
var credentials = new BasicAuthentication("username", "password"); <1>
9696
var pool = new CloudConnectionPool(cloudId, credentials); <2>
9797
var client = new ElasticClient(new ConnectionSettings(pool));
9898
----

docs/client-concepts/connection-pooling/building-blocks/keeping-track-of-nodes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Nodes are considered equal if they have the same endpoint, no matter what other
111111
[source,csharp]
112112
----
113113
var node = new Node(new Uri("http://localhost:9200"));
114-
var nodeAsMaster = new Node(new Uri("http://localhost:9200"), ElasticsearchNodeFeatures.MasterEligableOnly);
114+
var nodeAsMaster = new Node(new Uri("http://localhost:9200"), ElasticsearchNodeFeatures.MasterEligibleOnly);
115115
116116
(node == nodeAsMaster).Should().BeTrue();
117117
(node != nodeAsMaster).Should().BeFalse();

docs/client-concepts/connection-pooling/building-blocks/request-pipelines.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the whole coordination of the request is deferred to a new instance in a `using`
2323

2424
[source,csharp]
2525
----
26-
var pipeline = new RequestPipeline(
26+
var pipeline = new RequestPipeline<IConnectionSettingsValues>(
2727
settings,
2828
DateTimeProvider.Default,
2929
new RecyclableMemoryStreamFactory(),
@@ -38,15 +38,15 @@ to create them
3838

3939
[source,csharp]
4040
----
41-
var requestPipelineFactory = new RequestPipelineFactory();
41+
var requestPipelineFactory = new RequestPipelineFactory<IConnectionSettingsValues>();
4242
var requestPipeline = requestPipelineFactory.Create(
4343
settings,
4444
DateTimeProvider.Default, <1>
4545
new RecyclableMemoryStreamFactory(),
4646
new SearchRequestParameters()
4747
);
4848
49-
requestPipeline.Should().BeOfType<RequestPipeline>();
49+
requestPipeline.Should().BeOfType<RequestPipeline<IConnectionSettingsValues>>();
5050
requestPipeline.GetType().Should().Implement<IDisposable>();
5151
----
5252
<1> An <<date-time-providers,`IDateTimeProvider`>> implementation

docs/client-concepts/connection-pooling/sniffing/on-connection-failure.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void SniffUrlAssert(Audit a, string host, int expectedPort)
188188
HostAssert(a, host, expectedPort);
189189
var sniffUri = new UriBuilder(a.Node.Uri)
190190
{
191-
Path = RequestPipeline.SniffPath,
191+
Path = ElasticsearchProductRegistration.SniffPath,
192192
Query = "flat_settings=true&timeout=2s"
193193
}.Uri;
194194
sniffUri.PathEquals(a.Path, nameof(SniffUrlAssert));

docs/client-concepts/connection-pooling/sniffing/on-startup.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ Sniffing prefers to run on master eligible nodes
141141
----
142142
var audit = new Auditor(() => Virtual.Elasticsearch
143143
.Bootstrap(new[] {
144-
new Node(new Uri("http://localhost:9200"), NotMasterEligable),
145-
new Node(new Uri("http://localhost:9201"), NotMasterEligable),
144+
new Node(new Uri("http://localhost:9200"), NotMasterEligible),
145+
new Node(new Uri("http://localhost:9201"), NotMasterEligible),
146146
new Node(new Uri("http://localhost:9202")),
147147
})
148148
.Sniff(s => s.Succeeds(Always))
@@ -168,7 +168,7 @@ var audit = new Auditor(() => Virtual.Elasticsearch
168168
.Bootstrap(new[] {
169169
new Node(new Uri("http://localhost:9200")),
170170
new Node(new Uri("http://localhost:9201")),
171-
new Node(new Uri("http://localhost:9202"), NotMasterEligable),
171+
new Node(new Uri("http://localhost:9202"), NotMasterEligible),
172172
})
173173
.Sniff(s => s.Fails(Always))
174174
.Sniff(s => s.OnPort(9202).Succeeds(Always))

docs/client-concepts/connection/configuration-options.asciidoc

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,105 +26,113 @@ The following is a list of available connection configuration options on `Connec
2626
`ConnectionSettings` derives from `ConnectionConfiguration`, these options are available for both
2727
the low level and high level client:
2828

29-
`ApiKeyAuthentication`::
29+
`Authentication`::
3030

31-
Api Key to send with all requests to Elasticsearch
32-
33-
`BasicAuthentication`::
34-
35-
Basic Authentication credentials to send with all requests to Elasticsearch
31+
An implementation of `IAuthenticationHeader` describing what http header to use to authenticate with the product.
32+
+
33+
`BasicAuthentication` for basic authentication
34+
+
35+
`ApiKey` for simple secret token
36+
+
37+
`Base64ApiKey` for Elastic Cloud style encoded api keys
3638

3739
`ClientCertificate`::
3840

39-
Use a `X509Certificate` to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`
41+
Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`
4042

4143
`ClientCertificates`::
4244

4345
Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`
4446

4547
`ConnectionLimit`::
4648

47-
Limits the number of concurrent connections that can be opened to an endpoint. Defaults to `80` for all IConnection implementations that are not based on `System.Net.Http.CurlHandler` . For those based on System.Net.Http.CurlHandler, defaults to `Environment.ProcessorCount` .
49+
Limits the number of concurrent connections that can be opened to an endpoint. Defaults to 80 (see `DefaultConnectionLimit` ).
4850
+
4951
For Desktop CLR, this setting applies to the DefaultConnectionLimit property on the ServicePointManager object when creating ServicePoint objects, affecting the default `IConnection` implementation.
5052
+
5153
For Core CLR, this setting applies to the MaxConnectionsPerServer property on the HttpClientHandler instances used by the HttpClient inside the default `IConnection` implementation
5254

5355
`DeadTimeout`::
5456

55-
Sets the default dead timeout factor when a node has been marked dead. Some connection pools may use a flat timeout whilst others take this factor and increase it exponentially
57+
The time to put dead nodes out of rotation (this will be multiplied by the number of times they've been dead)
5658

5759
`DisableAutomaticProxyDetection`::
5860

59-
Disables the automatic detection of a proxy
61+
Disabled proxy detection on the webrequest, in some cases this may speed up the first connection your appdomain makes, in other cases it will actually increase the time for the first connection. No silver bullet! use with care!
6062

6163
`DisableDirectStreaming`::
6264

63-
Ensures the response bytes are always available on the `ITransportResponse`
64-
+
65-
IMPORTANT: Depending on the registered serializer, this may cause the response to be buffered in memory first, potentially affecting performance.
65+
When set to true will disable (de)serializing directly to the request and response stream and return a byte[] copy of the raw request and response. Defaults to false
6666

6767
`DisablePing`::
6868

69-
When a node is used for the very first time or when it's used for the first time after it has been marked dead a ping with a very low timeout is send to the node to make sure that when it's still dead it reports it as fast as possible. You can disable these pings globally here if you rather have it fail on the possible slower original request
69+
This signals that we do not want to send initial pings to unknown/previously dead nodes and just send the call straightaway
70+
71+
`DnsRefreshTimeout`::
72+
73+
DnsRefreshTimeout for the connections. Defaults to 5 minutes.
7074

7175
`EnableDebugMode`::
7276

7377
Turns on settings that aid in debugging like DisableDirectStreaming() and PrettyJson() so that the original request and response JSON can be inspected. It also always asks the server for the full stack trace on errors
7478

7579
`EnableHttpCompression`::
7680

77-
Enables gzip compressed requests and responses.
81+
Enable gzip compressed requests and responses
7882

7983
`EnableHttpPipelining`::
8084

81-
Allows for requests to be pipelined. http://en.wikipedia.org/wiki/HTTP_pipelining
82-
+
83-
NOTE: HTTP pipelining must also be enabled in e.g Elasticsearch for this to work properly.
85+
Whether HTTP pipelining is enabled. The default is `true`
8486

8587
`EnableTcpKeepAlive`::
8688

8789
Sets the keep-alive option on a TCP connection.
8890
+
8991
For Desktop CLR, sets ServicePointManager.SetTcpKeepAlive
9092

93+
`EnableTcpStats`::
94+
95+
Enable statistics about TCP connections to be collected when making a request >
96+
9197
`GlobalHeaders`::
9298

93-
A collection of headers that will be sent with every request. Useful in situations where you always need to pass a header e.g. a custom auth header
99+
Try to send these headers for every request
94100

95101
`GlobalQueryStringParameters`::
96102

97-
A collection of query string parameters that will be sent with every request. Useful in situations where you always need to pass a parameter e.g. an API key.
103+
Append these query string parameters automatically to every request
98104

99105
`MaxDeadTimeout`::
100106

101-
Sets the maximum time a node can be marked dead. Different implementations of `IConnectionPool` may choose a different default.
107+
The maximum amount of time a node is allowed to marked dead
102108

103109
`MaximumRetries`::
104110

105-
The maximum number of retries for a given request
111+
When a retryable exception occurs or status code is returned this controls the maximum amount of times we should retry the call to Elasticsearch
106112

107113
`MaxRetryTimeout`::
108114

109-
Limits the total runtime, including retries, separately from `RequestTimeout`
110-
+
111-
When not specified, defaults to `RequestTimeout` , which itself defaults to `60` seconds
115+
Limits the total runtime including retries separately from `RequestTimeout` When not specified defaults to `RequestTimeout` which itself defaults to 60 seconds
116+
117+
`MemoryStreamFactory`::
118+
119+
Provides a memory stream factory
112120

113121
`NodePredicate`::
114122

115123
Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an `IConnectionPool` implementation that supports reseeding of nodes, this will default to omitting master only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim.
116124

117125
`OnRequestCompleted`::
118126

119-
Registers an `Action<T>` that is called when a response is received. This can be useful for implementing custom logging. Multiple callbacks can be registered by calling this multiple times
127+
Allows you to register a callback every time a an API call is returned
120128

121129
`OnRequestDataCreated`::
122130

123-
Registers an `Action<T>` that is called when `RequestData` is created. Multiple callbacks can be registered by calling this multiple times
131+
An action to run when the `RequestData` for a request has been created.
124132

125133
`PingTimeout`::
126134

127-
Sets the default ping timeout in milliseconds for ping requests, which are used to determine whether a node is alive. Pings should fail as fast as possible.
135+
The timeout in milliseconds to use for ping requests, which are issued to determine whether a node is alive
128136

129137
`PrettyJson`::
130138

@@ -138,27 +146,27 @@ If your connection has to go through proxy, use this method to specify the proxy
138146

139147
`RequestTimeout`::
140148

141-
Sets the default timeout in milliseconds for each request. Defaults to `60` seconds.
149+
The timeout in milliseconds for each request to Elasticsearch
142150

143151
`ServerCertificateValidationCallback`::
144152

145-
Register a ServerCertificateValidationCallback, this is called per endpoint until it returns true. After this callback returns true that endpoint is validated for the lifetime of the ServiceEndpoint for that host.
153+
Register a ServerCertificateValidationCallback per request
146154

147155
`SkipDeserializationForStatusCodes`::
148156

149-
Configure the client to skip deserialization of certain status codes e.g: you run Elasticsearch behind a proxy that returns a HTML for 401, 500
157+
Configure the client to skip deserialization of certain status codes e.g: you run Elasticsearch behind a proxy that returns an unexpected json format
150158

151159
`SniffLifeSpan`::
152160

153-
Set the duration after which a cluster state is considered stale and a sniff should be performed again. An `IConnectionPool` has to signal it supports reseeding, otherwise sniffing will never happen. Defaults to 1 hour. Set to null to disable completely. Sniffing will only ever happen on ConnectionPools that return true for SupportsReseeding
161+
Force a new sniff for the cluster when the cluster state information is older than the specified timespan
154162

155163
`SniffOnConnectionFault`::
156164

157-
Enables resniffing of the cluster when a call fails, if the connection pool supports reseeding. Defaults to `true`
165+
Force a new sniff for the cluster state every time a connection dies
158166

159167
`SniffOnStartup`::
160168

161-
Enables sniffing on first usage of a connection pool if that pool supports reseeding. Defaults to `true`
169+
Sniff the cluster state immediately on startup
162170

163171
`ThrowExceptions`::
164172

@@ -168,7 +176,7 @@ Reasons for such exceptions could be search parser errors, index missing excepti
168176

169177
`TransferEncodingChunked`::
170178

171-
Whether the request should be sent with chunked Transfer-Encoding. Default is `false`
179+
Whether the request should be sent with chunked Transfer-Encoding.
172180

173181
`UserAgent`::
174182

docs/client-concepts/connection/modifying-default-connection.asciidoc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,22 @@ provides some examples
101101
----
102102
public class MyCustomHttpConnection : HttpConnection
103103
{
104-
protected override HttpRequestMessage CreateRequestMessage(RequestData requestData)
104+
protected override void SetAuthenticationIfNeeded(HttpRequestMessage requestMessage, RequestData requestData)
105+
105106
{
106-
var message = base.CreateRequestMessage(requestData);
107107
var header = string.Empty;
108-
message.Headers.Authorization = new AuthenticationHeaderValue("Negotiate", header);
109-
return message;
108+
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Negotiate", header);
110109
}
111110
}
112111
113112
public class KerberosConnection : HttpConnection
114113
{
115-
protected override HttpRequestMessage CreateRequestMessage(RequestData requestData)
114+
protected override void SetAuthenticationIfNeeded(HttpRequestMessage requestMessage, RequestData requestData)
116115
{
117-
var message = base.CreateRequestMessage(requestData);
118116
var header = string.Empty;
119-
message.Headers.Authorization = new AuthenticationHeaderValue("Negotiate", header);
120-
return message;
117+
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Negotiate", header);
121118
}
119+
122120
}
123121
----
124122

docs/x-pack/security/api-key/security-api-key-usage.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ TryGetExtendedValue<CreateApiKeyResponse>("response", out var response);
2525
if (response == null)
2626
return d => d;
2727
28-
return d => d.RequestConfiguration(r => r.ApiKeyAuthentication(response.Id, response.ApiKey));
28+
return d => d.RequestConfiguration(r => r.Authentication(new Base64ApiKey(response.Id, response.ApiKey)));
2929
----
3030

3131
==== Object Initializer syntax example
@@ -42,7 +42,7 @@ return new NodesInfoRequest
4242
{
4343
RequestConfiguration = new RequestConfiguration
4444
{
45-
ApiKeyAuthenticationCredentials = new ApiKeyAuthenticationCredentials(response.Id, response.ApiKey)
45+
AuthenticationHeader = new Base64ApiKey(response.Id, response.ApiKey)
4646
}
4747
};
4848
----

src/ApiGenerator/Domain/Code/HighLevel/Requests/DescriptorPartialImplementation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public class DescriptorPartialImplementation
1717
public IReadOnlyCollection<UrlPath> Paths { get; set; }
1818
public IReadOnlyCollection<QueryParameters> Params { get; set; }
1919
public bool HasBody { get; set; }
20-
20+
public string MethodName { get; set; }
21+
2122
public IEnumerable<FluentRouteSetter> GetFluentRouteSetters()
2223
{
2324
var setters = new List<FluentRouteSetter>();

src/ApiGenerator/Domain/Code/HighLevel/Requests/RequestPartialImplementation.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class RequestPartialImplementation
1818
public IReadOnlyCollection<QueryParameters> Params { get; set; }
1919
public IReadOnlyCollection<Constructor> Constructors { get; set; }
2020
public IReadOnlyCollection<Constructor> GenericConstructors { get; set; }
21+
public string MethodName { get; set; }
2122
public bool HasBody { get; set; }
2223

2324
private bool GenerateOnlyGenericInterface => CodeConfiguration.GenericOnlyInterfaces.Contains(CsharpNames.RequestInterfaceName);

0 commit comments

Comments
 (0)