Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support list for opensearch_version in PluginStats
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
Xtansia committed Feb 29, 2024

Verified

This commit was signed with the committer’s verified signature.
Xtansia Thomas Farr
1 parent cd4bd52 commit 17ebbeb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/OpenSearch.Client/CommonOptions/Stats/PluginStats.cs
Original file line number Diff line number Diff line change
@@ -27,7 +27,10 @@
*/

using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using OpenSearch.Net;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
{
@@ -41,7 +44,15 @@ public class PluginStats
public string Description { get; set; }

[DataMember(Name ="opensearch_version")]
public string OpenSearchVersion { get; set; }
[JsonFormatter(typeof(InterfaceReadOnlyCollectionSingleOrEnumerableFormatter<string>))]
public IReadOnlyCollection<string> OpenSearchVersions { get; set; }

[IgnoreDataMember]
public string OpenSearchVersion
{
get => OpenSearchVersions?.SingleOrDefault();
set => OpenSearchVersions = new [] { value };
}

[DataMember(Name ="extended_plugins")]
public IReadOnlyCollection<string> ExtendedPlugins { get; set; }

0 comments on commit 17ebbeb

Please sign in to comment.