Skip to content

Commit

Permalink
Changed field opensearch_version of type NodesInfoPlugin to json.RawM…
Browse files Browse the repository at this point in the history
…essage

As opensearch 3.0.0 uses an array instead of string

Signed-off-by: Jakob Hahn <[email protected]>
  • Loading branch information
Jakob3xD committed Mar 7, 2024
1 parent 81a9126 commit 106106d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `github.com/aws/aws-sdk-go` from 1.48.13 to 1.50.21
- Bumps `github.com/aws/aws-sdk-go-v2/config` from 1.25.11 to 1.27.0
### Added
- Added new struct fields introduced by opensearch 2.12 ([#???](https://github.com/opensearch-project/opensearch-go/pull/))
- Added new struct fields introduced by opensearch 2.12 ([#482](https://github.com/opensearch-project/opensearch-go/pull/482))
### Changed
- Changed field opensearch_version of type NodesInfoPlugin to json.RawMessage as opensearch 3.0.0 uses an array instead of string ([#482](https://github.com/opensearch-project/opensearch-go/pull/482))
### Deprecated
### Removed
### Fixed
Expand Down
18 changes: 9 additions & 9 deletions opensearchapi/api_nodes-info.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ type NodesInfoHTTP struct {

// NodesInfoPlugin is a sub type of NodesInfo containing information about a plugin
type NodesInfoPlugin struct {
Name string `json:"name"`
Version string `json:"version"`
OpensearchVersion string `json:"opensearch_version"`
JavaVersion string `json:"java_version"`
Description string `json:"description"`
Classname string `json:"classname"`
CustomFoldername string `json:"custom_foldername"`
ExtendedPlugins []string `json:"extended_plugins"`
HasNativeController bool `json:"has_native_controller"`
Name string `json:"name"`
Version string `json:"version"`
OpensearchVersion json.RawMessage `json:"opensearch_version"`
JavaVersion string `json:"java_version"`
Description string `json:"description"`
Classname string `json:"classname"`
CustomFoldername string `json:"custom_foldername"`
ExtendedPlugins []string `json:"extended_plugins"`
HasNativeController bool `json:"has_native_controller"`
}

// NodesInfoIngest is a sub type of NodesInfo containing information about ingest processors
Expand Down

0 comments on commit 106106d

Please sign in to comment.