-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
A couple of breaking changes went into the 6.6.0 branch on the rest-api-spec folder:
ccr.resume_follow.jsonchanged body from required to false.- Deprecate
_source_includeand_source_excludeurl parameters #33475 changed_source_includeto_source_includes- in the case of
get.jsonit added_source_includesnext to_source_include - in all other places it replaced the old notation with the new.
- @elastic/es-clients was pinged on this ticket 👍 but we did not pick it up 😢
- in the case of
Opening this issue to serve as a reminder that changes in rest-api-spec should be additive only.
The other is to discuss how we should denote deprecation more structurally
e.g in indices.clear_cache.json
"field_data": {
"type" : "boolean",
"description" : "Clear field data. This is deprecated. Prefer `fielddata`."
}, suggestion:
"field_data": {
"type" : "boolean",
"description" : "Clear field data.",
"deprecated": "fielddata"
}, Where an "" empty string denotes a removed but still supported param.
This would allow us to more clearly support an deprecation such as made #33475 as additive change in the rest spec.
In 7.0 we will also have deprecated paths.
In some cases the deprecated urls are removed completely from the spec, which is more clear cut since it basically only drops a prefix (_xpack in e.g the machinelearning API's). Removing is totally the right thing to do here.
In others index.json
"/{index}/{type}/{id}" is deprecated but still listed.
I think clients should keep generating this url to support users migrating but the spec needs to be able to signal its a deprecated API.
"url": {
"path": "/{index}/_doc",
"paths": ["/{index}/{type}", "/{index}/_doc/{id}", "/{index}/_doc"],
"deprecated_paths": ["/{index}/{type}/{id}"]