Skip to content

Deprecation process for the rest spec #38102

@Mpdreamz

Description

@Mpdreamz

A couple of breaking changes went into the 6.6.0 branch on the rest-api-spec folder:

  • ccr.resume_follow.json changed body from required to false.
  • Deprecate _source_include and _source_exclude url parameters #33475 changed _source_include to _source_includes
    • in the case of get.json it added _source_includes next 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 😢

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}"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions