mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 14:05:27 +00:00
* fix #35262 define deprecations of API's as a whole and urls * document hot threads deprecated paths * deprecate scroll_id as part of the URL, documented only as part of the body which is a safer behaviour as well * use version numbers up to patch version * rest spec parser picks up deprecated paths as paths too (cherry picked from commit 7e06023e7603b7584bfd9ee4e8a1ccd82c208ce7)
This commit is contained in:
parent
d8a2970fa4
commit
85b9dc18a7
@ -3,8 +3,15 @@
|
|||||||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html",
|
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html",
|
||||||
"methods": ["DELETE"],
|
"methods": ["DELETE"],
|
||||||
"url": {
|
"url": {
|
||||||
|
"path": "/_search/scroll",
|
||||||
|
"paths": [ "/_search/scroll"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
"path" : "/_search/scroll/{scroll_id}",
|
"path" : "/_search/scroll/{scroll_id}",
|
||||||
"paths": ["/_search/scroll/{scroll_id}", "/_search/scroll"],
|
"description" : "A scroll id can be quite large and should be specified as part of the body"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"scroll_id": {
|
"scroll_id": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["POST", "GET"],
|
"methods": ["POST", "GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_count",
|
"path": "/_count",
|
||||||
"paths": ["/_count", "/{index}/_count", "/{index}/{type}/_count"],
|
"paths": ["/_count", "/{index}/_count"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_count",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["PUT","POST"],
|
"methods": ["PUT","POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_create/{id}",
|
"path": "/{index}/_create/{id}",
|
||||||
"paths": ["/{index}/_create/{id}", "/{index}/{type}/{id}/_create"],
|
"paths": ["/{index}/_create/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_create",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["DELETE"],
|
"methods": ["DELETE"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_doc/{id}",
|
"path": "/{index}/_doc/{id}",
|
||||||
"paths": ["/{index}/{type}/{id}", "/{index}/_doc/{id}"],
|
"paths": ["/{index}/_doc/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["POST"],
|
"methods": ["POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_delete_by_query",
|
"path": "/{index}/_delete_by_query",
|
||||||
"paths": ["/{index}/_delete_by_query", "/{index}/{type}/_delete_by_query"],
|
"paths": ["/{index}/_delete_by_query"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_delete_by_query",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"comment": "most things below this are just copied from search.json",
|
"comment": "most things below this are just copied from search.json",
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["HEAD"],
|
"methods": ["HEAD"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_doc/{id}",
|
"path": "/{index}/_doc/{id}",
|
||||||
"paths": ["/{index}/_doc/{id}", "/{index}/{type}/{id}"],
|
"paths": ["/{index}/_doc/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["HEAD"],
|
"methods": ["HEAD"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_source/{id}",
|
"path": "/{index}/_source/{id}",
|
||||||
"paths": ["/{index}/_source/{id}", "/{index}/{type}/{id}/_source"],
|
"paths": ["/{index}/_source/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_source",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_explain/{id}",
|
"path": "/{index}/_explain/{id}",
|
||||||
"paths": ["/{index}/_explain/{id}", "/{index}/{type}/{id}/_explain"],
|
"paths": ["/{index}/_explain/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_explain",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET"],
|
"methods": ["GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_doc/{id}",
|
"path": "/{index}/_doc/{id}",
|
||||||
"paths": ["/{index}/_doc/{id}", "/{index}/{type}/{id}"],
|
"paths": ["/{index}/_doc/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET"],
|
"methods": ["GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_source/{id}",
|
"path": "/{index}/_source/{id}",
|
||||||
"paths": ["/{index}/_source/{id}", "/{index}/{type}/{id}/_source"],
|
"paths": ["/{index}/_source/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_source",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,19 @@
|
|||||||
"methods": ["POST", "PUT"],
|
"methods": ["POST", "PUT"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_doc",
|
"path": "/{index}/_doc",
|
||||||
"paths": ["/{index}/{type}", "/{index}/{type}/{id}", "/{index}/_doc/{id}", "/{index}/_doc"],
|
"paths": ["/{index}/_doc/{id}", "/{index}/_doc"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
"indices.exists_type": {
|
"indices.exists_type": {
|
||||||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html",
|
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html",
|
||||||
"methods": ["HEAD"],
|
"methods": ["HEAD"],
|
||||||
|
"deprecated" : {
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"description" : "Types are being removed from elasticsearch and therefor this API is on the way out. Read more here: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html"
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_mapping/{type}",
|
"path": "/{index}/_mapping/{type}",
|
||||||
"paths": ["/{index}/_mapping/{type}"],
|
"paths": ["/{index}/_mapping/{type}"],
|
||||||
|
@ -4,7 +4,19 @@
|
|||||||
"methods": ["GET"],
|
"methods": ["GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_mapping/field/{fields}",
|
"path": "/_mapping/field/{fields}",
|
||||||
"paths": ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}", "/_mapping/{type}/field/{fields}", "/{index}/_mapping/{type}/field/{fields}"],
|
"paths": ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_mapping/{type}/field/{fields}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/_mapping/{type}/field/{fields}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,19 @@
|
|||||||
"methods": ["GET"],
|
"methods": ["GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_mapping",
|
"path": "/_mapping",
|
||||||
"paths": ["/_mapping", "/{index}/_mapping", "/_mapping/{type}", "/{index}/_mapping/{type}"],
|
"paths": ["/_mapping", "/{index}/_mapping"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_mapping/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/_mapping/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -3,8 +3,45 @@
|
|||||||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html",
|
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html",
|
||||||
"methods": ["PUT", "POST"],
|
"methods": ["PUT", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
|
"path": "{index}/_mapping",
|
||||||
|
"paths": ["{index}/_mapping"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
"path" : "/{index}/{type}/_mapping",
|
"path" : "/{index}/{type}/_mapping",
|
||||||
"paths": ["/{index}/{type}/_mapping", "/{index}/_mapping/{type}", "/_mapping/{type}", "/{index}/{type}/_mappings", "/{index}/_mappings/{type}", "/_mappings/{type}", "{index}/_mappings", "{index}/_mapping"],
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/_mapping/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_mappings",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/_mappings/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_mappings/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "{index}/_mappings",
|
||||||
|
"description" : "The plural mappings is accepted but only /_mapping is documented"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_mapping/{type}",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_validate/query",
|
"path": "/_validate/query",
|
||||||
"paths": ["/_validate/query", "/{index}/_validate/query", "/{index}/{type}/_validate/query"],
|
"paths": ["/_validate/query", "/{index}/_validate/query"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_validate/query",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_mget",
|
"path": "/_mget",
|
||||||
"paths": ["/_mget", "/{index}/_mget", "/{index}/{type}/_mget"],
|
"paths": ["/_mget", "/{index}/_mget"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_mget",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_msearch",
|
"path": "/_msearch",
|
||||||
"paths": ["/_msearch", "/{index}/_msearch", "/{index}/{type}/_msearch"],
|
"paths": ["/_msearch", "/{index}/_msearch"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_msearch",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_msearch/template",
|
"path": "/_msearch/template",
|
||||||
"paths": ["/_msearch/template", "/{index}/_msearch/template", "/{index}/{type}/_msearch/template"],
|
"paths": ["/_msearch/template", "/{index}/_msearch/template"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_msearch/template",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods" : ["GET", "POST"],
|
"methods" : ["GET", "POST"],
|
||||||
"url" : {
|
"url" : {
|
||||||
"path" : "/_mtermvectors",
|
"path" : "/_mtermvectors",
|
||||||
"paths" : ["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"],
|
"paths" : ["/_mtermvectors", "/{index}/_mtermvectors"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_mtermvectors",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts" : {
|
"parts" : {
|
||||||
"index" : {
|
"index" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,39 @@
|
|||||||
"methods": ["GET"],
|
"methods": ["GET"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_nodes/hot_threads",
|
"path": "/_nodes/hot_threads",
|
||||||
"paths": ["/_cluster/nodes/hotthreads", "/_cluster/nodes/hot_threads", "/_cluster/nodes/{node_id}/hotthreads", "/_cluster/nodes/{node_id}/hot_threads", "/_nodes/hotthreads", "/_nodes/hot_threads", "/_nodes/{node_id}/hotthreads", "/_nodes/{node_id}/hot_threads"],
|
"paths": ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_cluster/nodes/hotthreads",
|
||||||
|
"description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_cluster/nodes/{node_id}/hotthreads",
|
||||||
|
"description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_nodes/hotthreads",
|
||||||
|
"description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_nodes/{node_id}/hotthreads",
|
||||||
|
"description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_cluster/nodes/hot_threads",
|
||||||
|
"description" : "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" :"/_cluster/nodes/{node_id}/hot_threads",
|
||||||
|
"description" : "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"node_id": {
|
"node_id": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_search/scroll",
|
"path": "/_search/scroll",
|
||||||
"paths": ["/_search/scroll", "/_search/scroll/{scroll_id}"],
|
"paths": ["/_search/scroll"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_search/scroll/{scroll_id}",
|
||||||
|
"description" : "A scroll id can be quite large and should be specified as part of the body"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"scroll_id": {
|
"scroll_id": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_search",
|
"path": "/_search",
|
||||||
"paths": ["/_search", "/{index}/_search", "/{index}/{type}/_search"],
|
"paths": ["/_search", "/{index}/_search"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_search",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_search/template",
|
"path": "/_search/template",
|
||||||
"paths": ["/_search/template", "/{index}/_search/template", "/{index}/{type}/_search/template"],
|
"paths": ["/_search/template", "/{index}/_search/template"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_search/template",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,8 +4,19 @@
|
|||||||
"methods" : ["GET", "POST"],
|
"methods" : ["GET", "POST"],
|
||||||
"url" : {
|
"url" : {
|
||||||
"path" : "/{index}/_termvectors/{id}",
|
"path" : "/{index}/_termvectors/{id}",
|
||||||
"paths" : ["/{index}/_termvectors/{id}", "/{index}/_termvectors/",
|
"paths" : ["/{index}/_termvectors/{id}", "/{index}/_termvectors"],
|
||||||
"/{index}/{type}/{id}/_termvectors", "/{index}/{type}/_termvectors"],
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_termvectors",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_termvectors",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts" : {
|
"parts" : {
|
||||||
"index" : {
|
"index" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["POST"],
|
"methods": ["POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_update/{id}",
|
"path": "/{index}/_update/{id}",
|
||||||
"paths": ["/{index}/_update/{id}", "/{index}/{type}/{id}/_update"],
|
"paths": ["/{index}/_update/{id}"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/{id}/_update",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["POST"],
|
"methods": ["POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_update_by_query",
|
"path": "/{index}/_update_by_query",
|
||||||
"paths": ["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"],
|
"paths": ["/{index}/_update_by_query"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_update_by_query",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"comment": "most things below this are just copied from search.json",
|
"comment": "most things below this are just copied from search.json",
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
|
@ -70,11 +70,16 @@ public class ClientYamlSuiteRestApiParser {
|
|||||||
}
|
}
|
||||||
if (parser.currentToken() == XContentParser.Token.START_ARRAY && "paths".equals(currentFieldName)) {
|
if (parser.currentToken() == XContentParser.Token.START_ARRAY && "paths".equals(currentFieldName)) {
|
||||||
while (parser.nextToken() == XContentParser.Token.VALUE_STRING) {
|
while (parser.nextToken() == XContentParser.Token.VALUE_STRING) {
|
||||||
String path = parser.text();
|
addPathToApi(parser.text(), restApi);
|
||||||
if (restApi.getPaths().contains(path)) {
|
}
|
||||||
throw new IllegalArgumentException("Found duplicate path [" + path + "]");
|
}
|
||||||
|
if (parser.currentToken() == XContentParser.Token.START_ARRAY && "deprecated_paths".equals(currentFieldName)) {
|
||||||
|
while (parser.nextToken() != XContentParser.Token.END_ARRAY) {
|
||||||
|
if (parser.currentToken() == XContentParser.Token.FIELD_NAME && "path".equals(parser.currentName()))
|
||||||
|
{
|
||||||
|
parser.nextToken();
|
||||||
|
addPathToApi(parser.text(), restApi);
|
||||||
}
|
}
|
||||||
restApi.addPath(path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +147,13 @@ public class ClientYamlSuiteRestApiParser {
|
|||||||
return restApi;
|
return restApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addPathToApi(String path, ClientYamlSuiteRestApi restApi) {
|
||||||
|
if (restApi.getPaths().contains(path)) {
|
||||||
|
throw new IllegalArgumentException("Found duplicate path [" + path + "]");
|
||||||
|
}
|
||||||
|
restApi.addPath(path);
|
||||||
|
}
|
||||||
|
|
||||||
private static class Parameter {
|
private static class Parameter {
|
||||||
private boolean required;
|
private boolean required;
|
||||||
public boolean isRequired() {
|
public boolean isRequired() {
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["GET", "POST"],
|
"methods": ["GET", "POST"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_graph/explore",
|
"path": "/{index}/_graph/explore",
|
||||||
"paths": ["/{index}/_graph/explore", "/{index}/{type}/_graph/explore"],
|
"paths": ["/{index}/_graph/explore"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/{index}/{type}/_graph/explore",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts" : {
|
"parts" : {
|
||||||
"index": {
|
"index": {
|
||||||
"type" : "list",
|
"type" : "list",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": ["POST", "PUT"],
|
"methods": ["POST", "PUT"],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/_monitoring/bulk",
|
"path": "/_monitoring/bulk",
|
||||||
"paths": ["/_monitoring/bulk", "/_monitoring/{type}/bulk"],
|
"paths": ["/_monitoring/bulk"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "/_monitoring/{type}/bulk",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"type": {
|
"type": {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"methods": [ "GET", "POST" ],
|
"methods": [ "GET", "POST" ],
|
||||||
"url": {
|
"url": {
|
||||||
"path": "/{index}/_rollup_search",
|
"path": "/{index}/_rollup_search",
|
||||||
"paths": [ "{index}/_rollup_search", "{index}/{type}/_rollup_search" ],
|
"paths": [ "{index}/_rollup_search"],
|
||||||
|
"deprecated_paths" : [
|
||||||
|
{
|
||||||
|
"version" : "7.0.0",
|
||||||
|
"path" : "{index}/{type}/_rollup_search",
|
||||||
|
"description" : "Specifying types in urls has been deprecated"
|
||||||
|
}
|
||||||
|
],
|
||||||
"parts": {
|
"parts": {
|
||||||
"index": {
|
"index": {
|
||||||
"type": "list",
|
"type": "list",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user