-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previous changes aligned HEAD requests to be consistent with GET requests to the same endpoint. This commit aligns the REST spec for the impacted endpoints. Relates #23313
- Loading branch information
1 parent
2f3f9b9
commit e579629
Showing
4 changed files
with
119 additions
and
27 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"exists_source": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", | ||
"methods": ["HEAD"], | ||
"url": { | ||
"path": "/{index}/{type}/{id}/_source", | ||
"paths": ["/{index}/{type}/{id}/_source"], | ||
"parts": { | ||
"id": { | ||
"type" : "string", | ||
"required" : true, | ||
"description" : "The document ID" | ||
}, | ||
"index": { | ||
"type" : "string", | ||
"required" : true, | ||
"description" : "The name of the index" | ||
}, | ||
"type": { | ||
"type" : "string", | ||
"required" : true, | ||
"description" : "The type of the document; use `_all` to fetch the first document matching the ID across all types" | ||
} | ||
}, | ||
"params": { | ||
"parent": { | ||
"type" : "string", | ||
"description" : "The ID of the parent document" | ||
}, | ||
"preference": { | ||
"type" : "string", | ||
"description" : "Specify the node or shard the operation should be performed on (default: random)" | ||
}, | ||
"realtime": { | ||
"type" : "boolean", | ||
"description" : "Specify whether to perform the operation in realtime or search mode" | ||
}, | ||
"refresh": { | ||
"type" : "boolean", | ||
"description" : "Refresh the shard containing the document before performing the operation" | ||
}, | ||
"routing": { | ||
"type" : "string", | ||
"description" : "Specific routing value" | ||
}, | ||
"_source": { | ||
"type" : "list", | ||
"description" : "True or false to return the _source field or not, or a list of fields to return" | ||
}, | ||
"_source_exclude": { | ||
"type" : "list", | ||
"description" : "A list of fields to exclude from the returned _source field" | ||
}, | ||
"_source_include": { | ||
"type" : "list", | ||
"description" : "A list of fields to extract and return from the _source field" | ||
}, | ||
"version" : { | ||
"type" : "number", | ||
"description" : "Explicit version number for concurrency control" | ||
}, | ||
"version_type": { | ||
"type" : "enum", | ||
"options" : ["internal", "external", "external_gte", "force"], | ||
"description" : "Specific version type" | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
41 changes: 29 additions & 12 deletions
41
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,19 @@ | |
"methods": ["HEAD"], | ||
"url": { | ||
"path": "/_template/{name}", | ||
"paths": ["/_template/{name}"], | ||
"paths": [ "/_template/{name}" ], | ||
"parts": { | ||
"name": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The name of the template" | ||
"type": "list", | ||
"required": false, | ||
This comment has been minimized.
Sorry, something went wrong.
Mpdreamz
Member
|
||
"description": "The comma separated names of the index templates" | ||
} | ||
}, | ||
"params": { | ||
"flat_settings": { | ||
"type": "boolean", | ||
"description": "Return settings in flat format (default: false)" | ||
}, | ||
"master_timeout": { | ||
"type": "time", | ||
"description": "Explicit operation timeout for connection to master node" | ||
|
@jasontedor I agree the
HEAD
request on the removed path here does not make a whole lot of sense but on5.x
this will constitute a breaking change for me as it removed one of my overloads, impeding on binary backwards compatibility. I can hack around this in my code generator butget_alias
still has this endpoint too, in the spirit of makingGET
andHEAD
equal should we add this back in?