Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for stringified properties which are not marked properly in specification #7979

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;

using Elastic.Transport;

#if ELASTICSEARCH_SERVERLESS
Expand Down Expand Up @@ -42,7 +43,11 @@ public DefaultRequestResponseSerializer(IElasticsearchClientSettings settings) :
new IsADictionaryConverterFactory(),
new ResponseItemConverterFactory(),
new DictionaryResponseConverterFactory(settings),
new UnionConverter()
new UnionConverter(),
// TODO: Remove after https://github.com/elastic/elasticsearch-specification/issues/2238 is implemented
new StringifiedLongConverter(),
new StringifiedIntegerConverter(),
new StringifiedBoolConverter()
},
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.AllowNamedFloatingPointLiterals
Expand Down