Skip to content

Commit 032cd63

Browse files
committed
remove exist_source (new API in master not 5.3), include _common.json in project
1 parent e59bcb7 commit 032cd63

File tree

9 files changed

+1
-389
lines changed

9 files changed

+1
-389
lines changed

src/CodeGeneration/ApiGenerator/ApiGenerator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<Paket>True</Paket>
4040
</Content>
4141
<Content Include="RestSpecification\Core\root.html" />
42+
<Content Include="RestSpecification\Core\_common.json" />
4243
<Reference Include="System" />
4344
<Reference Include="System.Core" />
4445
<Reference Include="System.Xml.Linq" />

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

Lines changed: 0 additions & 71 deletions
This file was deleted.

src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,76 +2252,6 @@ public class DocumentExistsRequestParameters : FluentRequestParameters<DocumentE
22522252

22532253
}
22542254

2255-
///<summary>Request parameters descriptor for ExistsSource
2256-
///<pre>
2257-
///http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
2258-
///</pre>
2259-
///</summary>
2260-
public class ExistsSourceRequestParameters : FluentRequestParameters<ExistsSourceRequestParameters>
2261-
{
2262-
public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD;
2263-
2264-
///<summary>The ID of the parent document</summary>
2265-
public ExistsSourceRequestParameters Parent(string parent) => this.AddQueryString("parent", parent);
2266-
2267-
2268-
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
2269-
public ExistsSourceRequestParameters Preference(string preference) => this.AddQueryString("preference", preference);
2270-
2271-
2272-
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
2273-
public ExistsSourceRequestParameters Realtime(bool realtime) => this.AddQueryString("realtime", realtime);
2274-
2275-
2276-
///<summary>Refresh the shard containing the document before performing the operation</summary>
2277-
public ExistsSourceRequestParameters Refresh(bool refresh) => this.AddQueryString("refresh", refresh);
2278-
2279-
2280-
///<summary>Specific routing value</summary>
2281-
public ExistsSourceRequestParameters Routing(string routing) => this.AddQueryString("routing", routing);
2282-
2283-
2284-
///<summary>True or false to return the _source field or not, or a list of fields to return</summary>
2285-
public ExistsSourceRequestParameters SourceEnabled(params string[] source_enabled) => this.AddQueryString("_source", source_enabled);
2286-
2287-
2288-
///<summary>A list of fields to exclude from the returned _source field</summary>
2289-
public ExistsSourceRequestParameters SourceExclude(params string[] source_exclude) => this.AddQueryString("_source_exclude", source_exclude);
2290-
2291-
2292-
///<summary>A list of fields to extract and return from the _source field</summary>
2293-
public ExistsSourceRequestParameters SourceInclude(params string[] source_include) => this.AddQueryString("_source_include", source_include);
2294-
2295-
2296-
///<summary>Explicit version number for concurrency control</summary>
2297-
public ExistsSourceRequestParameters Version(long version) => this.AddQueryString("version", version);
2298-
2299-
2300-
///<summary>Specific version type</summary>
2301-
public ExistsSourceRequestParameters VersionType(VersionType version_type) => this.AddQueryString("version_type", version_type);
2302-
2303-
2304-
///<summary>Pretty format the returned JSON response.</summary>
2305-
public ExistsSourceRequestParameters Pretty(bool pretty) => this.AddQueryString("pretty", pretty);
2306-
2307-
2308-
///<summary>Return human readable values for statistics.</summary>
2309-
public ExistsSourceRequestParameters Human(bool human) => this.AddQueryString("human", human);
2310-
2311-
2312-
///<summary>Include the stack trace of returned errors.</summary>
2313-
public ExistsSourceRequestParameters ErrorTrace(bool error_trace) => this.AddQueryString("error_trace", error_trace);
2314-
2315-
2316-
///<summary>The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.</summary>
2317-
public ExistsSourceRequestParameters Source(string source) => this.AddQueryString("source", source);
2318-
2319-
2320-
///<summary>A comma-separated list of filters used to reduce the respone.</summary>
2321-
public ExistsSourceRequestParameters FilterPath(params string[] filter_path) => this.AddQueryString("filter_path", filter_path);
2322-
2323-
}
2324-
23252255
///<summary>Request parameters descriptor for Explain
23262256
///<pre>
23272257
///https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html

src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,38 +1990,6 @@ public ElasticsearchResponse<T> Exists<T>(string index, string type, string id,
19901990
public Task<ElasticsearchResponse<T>> ExistsAsync<T>(string index, string type, string id, Func<DocumentExistsRequestParameters, DocumentExistsRequestParameters> requestParameters = null, CancellationToken cancellationToken = default(CancellationToken))
19911991
where T : class => this.DoRequestAsync<T>(HEAD, Url($"{index.NotNull("index")}/{type.NotNull("type")}/{id.NotNull("id")}"), cancellationToken, null, _params(requestParameters, allow404: true));
19921992

1993-
///<summary>Represents a HEAD on /{index}/{type}/{id}/_source
1994-
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; where the behavior depends on the type of T:
1995-
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>
1996-
///<para> - byte[], no deserialization, but the response stream will be closed </para>
1997-
///<para> - Stream, no deserialization, response stream is your responsibility </para>
1998-
///<para> - VoidResponse, no deserialization, response stream never read and closed </para>
1999-
///<para> - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth </para>
2000-
///<para>See also: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html </para>
2001-
///</summary>
2002-
///<param name="index">The name of the index</param>
2003-
///<param name="type">The type of the document; use `_all` to fetch the first document matching the ID across all types</param>
2004-
///<param name="id">The document ID</param>
2005-
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2006-
public ElasticsearchResponse<T> ExistsSource<T>(string index, string type, string id, Func<ExistsSourceRequestParameters, ExistsSourceRequestParameters> requestParameters = null)
2007-
where T : class => this.DoRequest<T>(HEAD, Url($"{index.NotNull("index")}/{type.NotNull("type")}/{id.NotNull("id")}/_source"), null, _params(requestParameters));
2008-
2009-
///<summary>Represents a HEAD on /{index}/{type}/{id}/_source
2010-
///<para></para>Returns: A task of ElasticsearchResponse&lt;T&gt; where the behaviour depends on the type of T:
2011-
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>
2012-
///<para> - byte[], no deserialization, but the response stream will be closed </para>
2013-
///<para> - Stream, no deserialization, response stream is your responsibility </para>
2014-
///<para> - VoidResponse, no deserialization, response stream never read and closed </para>
2015-
///<para> - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth </para>
2016-
///<para>See also: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html </para>
2017-
///</summary>
2018-
///<param name="index">The name of the index</param>
2019-
///<param name="type">The type of the document; use `_all` to fetch the first document matching the ID across all types</param>
2020-
///<param name="id">The document ID</param>
2021-
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
2022-
public Task<ElasticsearchResponse<T>> ExistsSourceAsync<T>(string index, string type, string id, Func<ExistsSourceRequestParameters, ExistsSourceRequestParameters> requestParameters = null, CancellationToken cancellationToken = default(CancellationToken))
2023-
where T : class => this.DoRequestAsync<T>(HEAD, Url($"{index.NotNull("index")}/{type.NotNull("type")}/{id.NotNull("id")}/_source"), cancellationToken, null, _params(requestParameters));
2024-
20251993
///<summary>Represents a GET on /{index}/{type}/{id}/_explain
20261994
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; where the behavior depends on the type of T:
20271995
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>

src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,36 +1857,6 @@ public partial interface IElasticLowLevelClient
18571857
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
18581858
Task<ElasticsearchResponse<T>> ExistsAsync<T>(string index, string type, string id, Func<DocumentExistsRequestParameters, DocumentExistsRequestParameters> requestParameters = null, CancellationToken cancellationToken = default(CancellationToken)) where T : class;
18591859

1860-
///<summary>Represents a HEAD on /{index}/{type}/{id}/_source
1861-
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; where the behavior depends on the type of T:
1862-
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>
1863-
///<para> - byte[], no deserialization, but the response stream will be closed </para>
1864-
///<para> - Stream, no deserialization, response stream is your responsibility </para>
1865-
///<para> - VoidResponse, no deserialization, response stream never read and closed </para>
1866-
///<para> - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth </para>
1867-
///<para>See also: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html </para>
1868-
///</summary>
1869-
///<param name="index">The name of the index</param>
1870-
///<param name="type">The type of the document; use `_all` to fetch the first document matching the ID across all types</param>
1871-
///<param name="id">The document ID</param>
1872-
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
1873-
ElasticsearchResponse<T> ExistsSource<T>(string index, string type, string id, Func<ExistsSourceRequestParameters, ExistsSourceRequestParameters> requestParameters = null) where T : class;
1874-
1875-
///<summary>Represents a HEAD on /{index}/{type}/{id}/_source
1876-
///<para></para>Returns: A task of ElasticsearchResponse&lt;T&gt; where the behaviour depends on the type of T:
1877-
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>
1878-
///<para> - byte[], no deserialization, but the response stream will be closed </para>
1879-
///<para> - Stream, no deserialization, response stream is your responsibility </para>
1880-
///<para> - VoidResponse, no deserialization, response stream never read and closed </para>
1881-
///<para> - DynamicDictionary, a dynamic aware dictionary that can be safely traversed to any depth </para>
1882-
///<para>See also: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html </para>
1883-
///</summary>
1884-
///<param name="index">The name of the index</param>
1885-
///<param name="type">The type of the document; use `_all` to fetch the first document matching the ID across all types</param>
1886-
///<param name="id">The document ID</param>
1887-
///<param name="requestParameters">A func that allows you to describe the querystring parameters &amp; request specific connection settings.</param>
1888-
Task<ElasticsearchResponse<T>> ExistsSourceAsync<T>(string index, string type, string id, Func<ExistsSourceRequestParameters, ExistsSourceRequestParameters> requestParameters = null, CancellationToken cancellationToken = default(CancellationToken)) where T : class;
1889-
18901860
///<summary>Represents a GET on /{index}/{type}/{id}/_explain
18911861
///<para></para>Returns: ElasticsearchResponse&lt;T&gt; where the behavior depends on the type of T:
18921862
///<para> - T, an object you own that the elasticsearch response will be deserialized to </para>

src/Nest/_Generated/_Descriptors.generated.cs

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,90 +2025,6 @@ public DocumentExistsDescriptor(IndexName index, TypeName type, Id id) : base(r=
20252025

20262026
}
20272027

2028-
///<summary>descriptor for ExistsSource <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html</pre></summary>
2029-
public partial class ExistsSourceDescriptor : RequestDescriptorBase<ExistsSourceDescriptor,ExistsSourceRequestParameters, IExistsSourceRequest>, IExistsSourceRequest
2030-
{
2031-
Id IExistsSourceRequest.Id => Self.RouteValues.Get<Id>("id");
2032-
IndexName IExistsSourceRequest.Index => Self.RouteValues.Get<IndexName>("index");
2033-
TypeName IExistsSourceRequest.Type => Self.RouteValues.Get<TypeName>("type");
2034-
/// <summary>/{index}/{type}/{id}/_source</summary>
2035-
///<param name="index"> this parameter is required</param>
2036-
///<param name="type"> this parameter is required</param>
2037-
///<param name="id"> this parameter is required</param>
2038-
public ExistsSourceDescriptor(IndexName index, TypeName type, Id id) : base(r=>r.Required("index", index).Required("type", type).Required("id", id)){}
2039-
2040-
2041-
///<summary>The name of the index</summary>
2042-
public ExistsSourceDescriptor Index(IndexName index) => Assign(a=>a.RouteValues.Required("index", index));
2043-
2044-
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
2045-
public ExistsSourceDescriptor Index<TOther>() where TOther : class => Assign(a=>a.RouteValues.Required("index", (IndexName)typeof(TOther)));
2046-
2047-
///<summary>The type of the document; use `_all` to fetch the first document matching the ID across all types</summary>
2048-
public ExistsSourceDescriptor Type(TypeName type) => Assign(a=>a.RouteValues.Required("type", type));
2049-
2050-
///<summary>a shortcut into calling Type(typeof(TOther))</summary>
2051-
public ExistsSourceDescriptor Type<TOther>() where TOther : class => Assign(a=>a.RouteValues.Required("type", (TypeName)typeof(TOther)));
2052-
2053-
2054-
///<summary>The ID of the parent document</summary>
2055-
public ExistsSourceDescriptor Parent(string parent) => AssignParam(p=>p.Parent(parent));
2056-
2057-
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
2058-
public ExistsSourceDescriptor Preference(string preference) => AssignParam(p=>p.Preference(preference));
2059-
2060-
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
2061-
public ExistsSourceDescriptor Realtime(bool realtime = true) => AssignParam(p=>p.Realtime(realtime));
2062-
2063-
///<summary>Refresh the shard containing the document before performing the operation</summary>
2064-
public ExistsSourceDescriptor Refresh(bool refresh = true) => AssignParam(p=>p.Refresh(refresh));
2065-
2066-
///<summary>Specific routing value</summary>
2067-
public ExistsSourceDescriptor Routing(string routing) => AssignParam(p=>p.Routing(routing));
2068-
2069-
///<summary>True or false to return the _source field or not, or a list of fields to return</summary>
2070-
public ExistsSourceDescriptor SourceEnabled(params string[] source_enabled) => AssignParam(p=>p.SourceEnabled(source_enabled));
2071-
2072-
///<summary>A list of fields to exclude from the returned _source field</summary>
2073-
public ExistsSourceDescriptor SourceExclude(params string[] source_exclude) => AssignParam(p=>p.SourceExclude(source_exclude));
2074-
2075-
///<summary>A list of fields to exclude from the returned _source field</summary>
2076-
public ExistsSourceDescriptor SourceExclude<T>(params Expression<Func<T, object>>[] fields) where T : class =>
2077-
AssignParam(p=>p._SourceExclude(fields));
2078-
2079-
///<summary>A list of fields to extract and return from the _source field</summary>
2080-
public ExistsSourceDescriptor SourceInclude(params string[] source_include) => AssignParam(p=>p.SourceInclude(source_include));
2081-
2082-
///<summary>A list of fields to extract and return from the _source field</summary>
2083-
public ExistsSourceDescriptor SourceInclude<T>(params Expression<Func<T, object>>[] fields) where T : class =>
2084-
AssignParam(p=>p._SourceInclude(fields));
2085-
2086-
///<summary>Explicit version number for concurrency control</summary>
2087-
public ExistsSourceDescriptor Version(long version) => AssignParam(p=>p.Version(version));
2088-
2089-
///<summary>Specific version type</summary>
2090-
public ExistsSourceDescriptor VersionType(VersionType version_type) => AssignParam(p=>p.VersionType(version_type));
2091-
2092-
///<summary>Pretty format the returned JSON response.</summary>
2093-
public ExistsSourceDescriptor Pretty(bool pretty = true) => AssignParam(p=>p.Pretty(pretty));
2094-
2095-
///<summary>Return human readable values for statistics.</summary>
2096-
public ExistsSourceDescriptor Human(bool human = true) => AssignParam(p=>p.Human(human));
2097-
2098-
///<summary>Include the stack trace of returned errors.</summary>
2099-
public ExistsSourceDescriptor ErrorTrace(bool error_trace = true) => AssignParam(p=>p.ErrorTrace(error_trace));
2100-
2101-
///<summary>The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.</summary>
2102-
public ExistsSourceDescriptor Source(string source) => AssignParam(p=>p.Source(source));
2103-
2104-
///<summary>A comma-separated list of filters used to reduce the respone.</summary>
2105-
public ExistsSourceDescriptor FilterPath(params string[] filter_path) => AssignParam(p=>p.FilterPath(filter_path));
2106-
2107-
//TODO THIS METHOD IS UNMAPPED!
2108-
2109-
2110-
}
2111-
21122028
///<summary>descriptor for Explain <pre>https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html</pre></summary>
21132029
public partial class ExplainDescriptor<TDocument> : RequestDescriptorBase<ExplainDescriptor<TDocument>,ExplainRequestParameters, IExplainRequest<TDocument>>, IExplainRequest<TDocument>
21142030
{

0 commit comments

Comments
 (0)