Skip to content

Commit

Permalink
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]>
  • Loading branch information
Xtansia committed Feb 29, 2024
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
Expand Up @@ -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
{
Expand All @@ -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; }
Expand Down

0 comments on commit 17ebbeb

Please sign in to comment.