api: Move SettingDefinition into `setting.definition`
The field `type` conflict with Rancher API resource.type, result in no further
fields exposed for the Setting object.
@@ -57,7 +57,7 @@ type Setting struct {
client.Resource
Name string `json:"name"`
Value string `json:"value"`
- types.SettingDefinition
+ Definition types.SettingDefinition `json:"definition"`
}
type Instance struct {
@@ -347,11 +347,12 @@ func toSettingResource(setting *longhorn.Setting) *Setting {
Resource: client.Resource{
Id: setting.Name,
Type: "setting",
+ Links: map[string]string{},
},
Name: setting.Name,
Value: setting.Value,
- SettingDefinition: types.SettingDefinitions[types.SettingName(setting.Name)],
+ Definition: types.SettingDefinitions[types.SettingName(setting.Name)],
}
}
