From 97c85108a044c77cb40b4528e545909104a32823 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Wed, 17 Dec 2025 14:32:12 +0100 Subject: [PATCH] Add `Experimental` attribute to `FilterPath` (#8802) (cherry picked from commit 0e15b585b8b80858daee3009ac6255f1bed9ceaa) --- Directory.Build.targets | 2 +- .../Elastic.Clients.Elasticsearch.csproj | 4 +--- .../_Shared/Core/Request/PlainRequest.cs | 13 ++++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index bc6f3c8d9b3..6015e35c180 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -5,7 +5,7 @@ $(SolutionRoot)\build\keys\keypair.snk - 1591,1572,1571,1573,1587,1570,NU5048 + $(NoWarn), 1591,1572,1571,1573,1587,1570,NU5048 false false true diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index 6c6f2135a4c..ca7c4f67419 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -22,9 +22,7 @@ true - + true diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs index af10ba9e64d..16110c75507 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/PlainRequest.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using Elastic.Transport; @@ -28,11 +29,17 @@ public bool? ErrorTrace /// /// A list of filters used to reduce the response. /// - /// Use of response filtering can result in a response from Elasticsearch - /// that cannot be correctly deserialized to the respective response type for the request. - /// In such situations, use the low level client to issue the request and handle response deserialization. + /// Use of response filtering can result in a response from Elasticsearch that cannot be correctly deserialized + /// to the respective response type for the request. In such situations, use the low level client to issue the + /// request and handle response deserialization. /// /// + [Experimental("ESCEXP0001", UrlFormat = "https://www.elastic.co/docs/reference/elasticsearch/clients/dotnet/experimental#{0}" +#if NET10_0_OR_GREATER + , Message = "Use of response filtering can result in a response from Elasticsearch that cannot be correctly deserialized " + + "to the respective response type for the request." +#endif + )] [JsonIgnore] public string[]? FilterPath {