Skip to content

Stricter UpdateSettingsRequest parsing on the REST layer #29268

@olcbean

Description

@olcbean

In UpdateSettingsRequest every property is interpreted as a setting name. For example :

{
  "field3" : "value3"
}

will be parsed as the property field3 with value value3 ( similar to the ClusterUpdateSettingsRequest ).

But if there is a top-level key "settings" for a map

{
  "field1" : "value1",
  "field2" : "value2",
  "settings" : 
  {
    "field3" : "value3"
  }
}

then only "field3" : "value3" is parsed as a setting in the UpdateSettingsRequest#fromXContent and the other properties are silently ignored. ( I could not find a reference to this in the documentation )

Do we want such leniency in the UpdateSettingsRequst ?
Do we want to keep on supporting the possibility to wrap the settings as a "settings" map ?
Or should this be deprecated in 6.x and removed in 7.0 ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions