diff --git a/src/Elastic.Transport/Products/Elasticsearch/ErrorSerializationContext.cs b/src/Elastic.Transport/Products/Elasticsearch/ErrorSerializationContext.cs new file mode 100644 index 0000000..b2da2ae --- /dev/null +++ b/src/Elastic.Transport/Products/Elasticsearch/ErrorSerializationContext.cs @@ -0,0 +1,14 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; + +namespace Elastic.Transport.Products.Elasticsearch; + +/// Adds support for serializing Elasticsearch errors using +[JsonSerializable(typeof(Error))] +[JsonSerializable(typeof(ErrorCause))] +public partial class ErrorSerializerContext : JsonSerializerContext;