Browse Source

Update the schema for the REST API specification (#42346)

* Update the REST API specification

This patch updates the REST API spefication in JSON files to better encode deprecated entities,
to improve specification of URL paths, and to open up the schema for future extensions.

Notably, it changes the `paths` from a list of strings to a list of objects, where each
particular object encodes all the information for this particular path: the `parts` and the `methods`.

Among the benefits of this approach is eg. encoding the difference between using the `PUT` and `POST`
methods in the Index API, to either use a specific document ID, or let Elasticsearch generate one.

Also `documentation` becomes an object that supports an `url` and also a `description` which is a
new field.

* Adapt YAML runner to new REST API specification format

The logic for choosing the path to use when running tests has been
simplified, as a consequence of the path parts being listed under each
path in the spec. The special case for create and index has been removed.

Also the parsing code has been hardened so that errors are thrown earlier
when the structure of the spec differs from what expected, and their
error messages should be more helpful.
Karel Minarik 6 years ago
parent
commit
9166311622
100 changed files with 6211 additions and 4075 deletions
  1. 11 8
      modules/lang-painless/src/test/resources/rest-api-spec/api/scripts_painless_context.json
  2. 25 19
      plugins/examples/rest-handler/src/test/resources/rest-api-spec/api/cat.example.json
  3. 56 45
      rest-api-spec/README.markdown
  4. 89 55
      rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json
  5. 57 43
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json
  6. 74 48
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json
  7. 57 43
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json
  8. 78 52
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json
  9. 51 45
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json
  10. 25 19
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.help.json
  11. 87 64
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.indices.json
  12. 46 40
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json
  13. 46 40
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json
  14. 50 44
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodes.json
  15. 46 40
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json
  16. 46 38
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json
  17. 70 44
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.recovery.json
  18. 47 41
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json
  19. 66 40
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json
  20. 74 48
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.shards.json
  21. 58 46
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json
  22. 54 48
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json
  23. 57 43
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json
  24. 69 48
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json
  25. 33 20
      rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json
  26. 26 17
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.allocation_explain.json
  27. 33 26
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_settings.json
  28. 98 64
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.health.json
  29. 24 18
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.pending_tasks.json
  30. 30 22
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_settings.json
  31. 16 8
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.remote_info.json
  32. 50 35
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json
  33. 100 57
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json
  34. 35 21
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.stats.json
  35. 97 76
      rest-api-spec/src/main/resources/rest-api-spec/api/count.json
  36. 91 59
      rest-api-spec/src/main/resources/rest-api-spec/api/create.json
  37. 91 62
      rest-api-spec/src/main/resources/rest-api-spec/api/delete.json
  38. 178 157
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json
  39. 27 20
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query_rethrottle.json
  40. 29 22
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json
  41. 94 69
      rest-api-spec/src/main/resources/rest-api-spec/api/exists.json
  42. 91 66
      rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json
  43. 104 78
      rest-api-spec/src/main/resources/rest-api-spec/api/explain.json
  44. 58 40
      rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json
  45. 94 69
      rest-api-spec/src/main/resources/rest-api-spec/api/get.json
  46. 27 20
      rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json
  47. 91 66
      rest-api-spec/src/main/resources/rest-api-spec/api/get_source.json
  48. 138 74
      rest-api-spec/src/main/resources/rest-api-spec/api/index.json
  49. 35 18
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.analyze.json
  50. 66 47
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.clear_cache.json
  51. 36 26
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.clone.json
  52. 52 40
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.close.json
  53. 38 30
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.create.json
  54. 48 36
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete.json
  55. 48 26
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_alias.json
  56. 29 22
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_template.json
  57. 53 41
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists.json
  58. 59 35
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_alias.json
  59. 33 26
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_template.json
  60. 47 40
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_type.json
  61. 56 35
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush.json
  62. 47 34
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush_synced.json
  63. 58 39
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json
  64. 59 47
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
  65. 76 33
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_alias.json
  66. 109 55
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_field_mapping.json
  67. 92 51
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_mapping.json
  68. 92 46
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_settings.json
  69. 43 33
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_template.json
  70. 46 27
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_upgrade.json
  71. 52 40
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.open.json
  72. 52 27
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_alias.json
  73. 182 67
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json
  74. 64 44
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_settings.json
  75. 49 40
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_template.json
  76. 40 26
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.recovery.json
  77. 48 27
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.refresh.json
  78. 57 38
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.rollover.json
  79. 51 32
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.segments.json
  80. 56 32
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.shard_stores.json
  81. 39 31
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.shrink.json
  82. 39 31
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.split.json
  83. 145 68
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json
  84. 26 19
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.update_aliases.json
  85. 54 35
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.upgrade.json
  86. 110 74
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.validate_query.json
  87. 16 11
      rest-api-spec/src/main/resources/rest-api-spec/api/info.json
  88. 29 22
      rest-api-spec/src/main/resources/rest-api-spec/api/ingest.delete_pipeline.json
  89. 32 18
      rest-api-spec/src/main/resources/rest-api-spec/api/ingest.get_pipeline.json
  90. 16 11
      rest-api-spec/src/main/resources/rest-api-spec/api/ingest.processor_grok.json
  91. 32 24
      rest-api-spec/src/main/resources/rest-api-spec/api/ingest.put_pipeline.json
  92. 38 22
      rest-api-spec/src/main/resources/rest-api-spec/api/ingest.simulate.json
  93. 83 55
      rest-api-spec/src/main/resources/rest-api-spec/api/mget.json
  94. 70 48
      rest-api-spec/src/main/resources/rest-api-spec/api/msearch.json
  95. 60 38
      rest-api-spec/src/main/resources/rest-api-spec/api/msearch_template.json
  96. 100 79
      rest-api-spec/src/main/resources/rest-api-spec/api/mtermvectors.json
  97. 125 58
      rest-api-spec/src/main/resources/rest-api-spec/api/nodes.hot_threads.json
  98. 84 25
      rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json
  99. 32 18
      rest-api-spec/src/main/resources/rest-api-spec/api/nodes.reload_secure_settings.json
  100. 214 61
      rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json

+ 11 - 8
modules/lang-painless/src/test/resources/rest-api-spec/api/scripts_painless_context.json

@@ -1,16 +1,19 @@
 {
   "scripts_painless_context": {
     "stability": "experimental",
-    "methods": ["GET"],
     "url": {
-      "paths": ["/_scripts/painless/_context"],
-      "parts": {
-      },
-      "params": {
-        "context" : {
-          "type" : "string",
-          "description" : "Select a specific context to retrieve API information about"
+      "paths": [
+        {
+          "path": "/_scripts/painless/_context",
+          "methods": ["GET"],
+          "parts": {}
         }
+      ]
+    },
+    "params": {
+      "context" : {
+        "type" : "string",
+        "description" : "Select a specific context to retrieve API information about"
       }
     }
   }

+ 25 - 19
plugins/examples/rest-handler/src/test/resources/rest-api-spec/api/cat.example.json

@@ -1,27 +1,33 @@
 {
   "cat.example": {
-    "documentation": "",
+    "documentation": {
+      "url": "https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugin-authors.html",
+      "description": "Example"
+    },
     "stability" : "stable",
-    "methods": ["GET"],
     "url": {
-      "paths": ["/_cat/example"],
-      "parts": {},
-      "params": {
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": true
-        },
-        "message": {
-          "type": "string",
-          "description": "A simple message that will be printed out in the response",
-          "default": "Hello from Cat Example action"
+      "paths": [
+        {
+          "path" : "/_cat/example",
+          "methods" : ["GET"]
         }
+      ]
+    },
+    "params": {
+      "help": {
+        "type": "boolean",
+        "description": "Return help information",
+        "default": false
+      },
+      "v": {
+        "type": "boolean",
+        "description": "Verbose mode. Display column headers",
+        "default": true
+      },
+      "message": {
+        "type": "string",
+        "description": "A simple message that will be printed out in the response",
+        "default": "Hello from Cat Example action"
       }
     },
     "body": null

+ 56 - 45
rest-api-spec/README.markdown

@@ -9,23 +9,28 @@ Example for the ["Create Index"](http://www.elastic.co/guide/en/elasticsearch/re
 ```json
 {
   "indices.create": {
-    "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html",
+    "documentation":{
+      "url":"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html"
+    },
     "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["/{index}"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
-        }
-      },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}",
+          "method":"PUT",
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         }
+      ]
+    },
+    "params": {
+      "timeout": {
+        "type" : "time",
+        "description" : "Explicit operation timeout"
       }
     },
     "body": {
@@ -38,17 +43,17 @@ Example for the ["Create Index"](http://www.elastic.co/guide/en/elasticsearch/re
 The specification contains:
 
 * The _name_ of the API (`indices.create`), which usually corresponds to the client calls
-* Link to the documentation at <http://elastic.co>
+* Link to the documentation at the <http://elastic.co> website
 * `stability` indicating the state of the API, has to be declared explicitly or YAML tests will fail
-    * `experimental` highly likely to break in the near future (minor/path), no bwc guarantees. 
+    * `experimental` highly likely to break in the near future (minor/path), no bwc guarantees.
     Possibly removed in the future.
     * `beta` less likely to break or be removed but still reserve the right to do so
-    * `stable` No backwards breaking changes in a minor 
-* List of HTTP methods for the endpoint
-* URL specification: path, parts, parameters
-* Whether body is allowed for the endpoint or not and its description
+    * `stable` No backwards breaking changes in a minor
+* Request URL: HTTP method, path and parts
+* Request parameters
+* Request body specification
 
-**NOTE** 
+**NOTE**
 If an API is stable but it response should be treated as an arbitrary map of key values please notate this as followed
 
 ```json
@@ -62,28 +67,23 @@ If an API is stable but it response should be treated as an arbitrary map of key
 }
 ```
 
+## Backwards compatibility
 
-The `methods` and `url.paths` elements list all possible HTTP methods and URLs for the endpoint;
-it is the responsibility of the developer to use this information for a sensible API on the target platform.
-
-## Backwards compatibility 
+The specification follows the same backward compatibility guarantees as Elasticsearch.
 
-The specification follows the same backward compatibility guarantees as Elasticsearch. 
-
-- Within a Major, additions only. 
-  - If an item has been documented wrong it should be deprecated instead as removing these might break downstream clients.
+- Within a Major, additions only.
+- If an item has been documented wrong it should be deprecated instead as removing these might break downstream clients.
 - Major version change, may deprecate pieces or simply remove them given enough deprecation time.
 
 ## Deprecations
 
-The spec allows for deprecations of:
+The specification schema allows to codify API deprecations, either for an entire API, or for specific parts of the API, such as paths or parameters.
 
 #### Entire API:
 
 ```json
 {
   "api" : {
-    "documentation": "...",
     "deprecated" : {
       "version" : "7.0.0",
       "description" : "Reason API is being deprecated"
@@ -92,19 +92,35 @@ The spec allows for deprecations of:
 }
 ```
 
-#### Specific paths:
+#### Specific paths and their parts:
 
 ```json
 {
   "api": {
-    "documentation": "",
     "url": {
-      "paths": ["/_monitoring/bulk"],
-      "deprecated_paths" : [
+      "paths": [
         {
-          "version" : "7.0.0",
-          "path" : "/_monitoring/{type}/bulk",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/{type}/{id}/_create",
+          "method":"PUT",
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
       ]
     }
@@ -112,16 +128,11 @@ The spec allows for deprecations of:
 }
 ```
 
-Here `paths` describes the preferred paths and `deprecated_paths` indicates `paths` that will still work but are now 
-deprecated.
-
-#### Parameters 
+#### Parameters
 
 ```json
 {
   "api": {
-    "documentation": "",
-    "methods": ["GET"],
     "url": {
       "params": {
         "stored_fields": {

+ 89 - 55
rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json

@@ -1,64 +1,98 @@
 {
-  "bulk": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html",
-    "stability": "stable",
-    "methods": ["POST", "PUT"],
-    "url": {
-      "paths": ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "description" : "Default index for items which don't provide one"
-        },
-        "type": {
-          "type" : "string",
-          "description" : "Default document type for items which don't provide one"
-        }
-      },
-      "params": {
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)" 
-        },
-        "refresh": {
-          "type" : "enum",
-          "options": ["true", "false", "wait_for"],
-          "description" : "If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
-        },
-        "routing": {
-          "type" : "string",
-          "description" : "Specific routing value"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "type": {
-          "type" : "string",
-          "description" : "Default document type for items which don't provide one"
-        },
-        "_source": {
-          "type" : "list",
-          "description" : "True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"
-        },
-        "_source_excludes": {
-          "type" : "list",
-          "description" : "Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"
+  "bulk":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html",
+      "description":"Allows to perform multiple index/update/delete operations in a single request."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_bulk",
+          "methods":[
+            "POST",
+            "PUT"
+          ]
         },
-        "_source_includes": {
-          "type" : "list",
-          "description" : "Default list of fields to extract and return from the _source field, can be overridden on each sub-request"
+        {
+          "path":"/{index}/_bulk",
+          "methods":[
+            "POST",
+            "PUT"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"Default index for items which don't provide one"
+            }
+          }
         },
-        "pipeline" : {
-          "type" : "string",
-          "description" : "The pipeline id to preprocess incoming documents with"
+        {
+          "path":"/{index}/{type}/_bulk",
+          "methods":[
+            "POST",
+            "PUT"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"Default index for items which don't provide one"
+            },
+            "type":{
+              "type":"string",
+              "description":"Default document type for items which don't provide one"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
+      },
+      "refresh":{
+        "type":"enum",
+        "options":[
+          "true",
+          "false",
+          "wait_for"
+        ],
+        "description":"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
+      },
+      "routing":{
+        "type":"string",
+        "description":"Specific routing value"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "type":{
+        "type":"string",
+        "description":"Default document type for items which don't provide one"
+      },
+      "_source":{
+        "type":"list",
+        "description":"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"
+      },
+      "_source_excludes":{
+        "type":"list",
+        "description":"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"
+      },
+      "_source_includes":{
+        "type":"list",
+        "description":"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"
+      },
+      "pipeline":{
+        "type":"string",
+        "description":"The pipeline id to preprocess incoming documents with"
       }
     },
-    "body": {
-      "description" : "The operation definition and data (action-data pairs), separated by newlines",
-      "required" : true,
-      "serialize" : "bulk"
+    "body":{
+      "description":"The operation definition and data (action-data pairs), separated by newlines",
+      "required":true,
+      "serialize":"bulk"
     }
   }
 }

+ 57 - 43
rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json

@@ -1,49 +1,63 @@
 {
-  "cat.aliases": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/aliases", "/_cat/aliases/{name}"],
-      "parts": {
-        "name": {
-          "type" : "list",
-          "description" : "A comma-separated list of alias names to return"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.aliases":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html",
+      "description":"Shows information about currently configured aliases to indices including filter and routing infos."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/aliases",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/aliases/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of alias names to return"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 74 - 48
rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json

@@ -1,54 +1,80 @@
 {
-  "cat.allocation": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/allocation", "/_cat/allocation/{node_id}"],
-      "parts": {
-        "node_id": {
-          "type": "list",
-          "description": "A comma-separated list of node IDs or names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.allocation":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html",
+      "description":"Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/allocation",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/allocation/{node_id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "kb",
+          "m",
+          "mb",
+          "g",
+          "gb",
+          "t",
+          "tb",
+          "p",
+          "pb"
+        ]
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 57 - 43
rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json

@@ -1,49 +1,63 @@
 {
-  "cat.count": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/count", "/_cat/count/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.count":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html",
+      "description":"Provides quick access to the document count of the entire cluster, or individual indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/count",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/count/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 78 - 52
rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json

@@ -1,58 +1,84 @@
 {
-  "cat.fielddata": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/fielddata", "/_cat/fielddata/{fields}"],
-      "parts": {
-        "fields": {
-          "type": "list",
-          "description": "A comma-separated list of fields to return the fielddata size"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-          "type": "list",
-          "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.fielddata":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html",
+      "description":"Shows how much heap memory is currently being used by fielddata on every data node in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/fielddata",
+          "methods":[
+            "GET"
+          ]
         },
-        "fields": {
-          "type": "list",
-          "description": "A comma-separated list of fields to return in the output"
+        {
+          "path":"/_cat/fielddata/{fields}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "fields":{
+              "type":"list",
+              "description":"A comma-separated list of fields to return the fielddata size"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "kb",
+          "m",
+          "mb",
+          "g",
+          "gb",
+          "t",
+          "tb",
+          "p",
+          "pb"
+        ]
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      },
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields to return in the output"
+      }
+    }
   }
 }

+ 51 - 45
rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json

@@ -1,50 +1,56 @@
 {
-  "cat.health": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/health"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "ts": {
-          "type": "boolean",
-          "description": "Set to false to disable timestamping",
-          "default": true
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.health":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html",
+      "description":"Returns a concise representation of the cluster health."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/health",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "ts":{
+        "type":"boolean",
+        "description":"Set to false to disable timestamping",
+        "default":true
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 25 - 19
rest-api-spec/src/main/resources/rest-api-spec/api/cat.help.json

@@ -1,24 +1,30 @@
 {
-  "cat.help": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat"],
-      "parts": {
-      },
-      "params": {
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.help":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html",
+      "description":"Returns help for the Cat APIs."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      }
+    }
   }
 }

+ 87 - 64
rest-api-spec/src/main/resources/rest-api-spec/api/cat.indices.json

@@ -1,70 +1,93 @@
 {
-  "cat.indices": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/indices", "/_cat/indices/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "m", "g" ]
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "health": {
-          "type" : "enum",
-          "options" : ["green","yellow","red"],
-          "default" : null,
-          "description" : "A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "pri" : {
-          "type": "boolean",
-          "description": "Set to true to return stats only for primary shards",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.indices":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html",
+      "description":"Returns information about indices: number of primaries and replicas, document counts, disk size, ..."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/indices",
+          "methods":[
+            "GET"
+          ]
         },
-        "include_unloaded_segments": {
-          "type": "boolean",
-          "description": "If set to true segment stats will include stats for segments that are not currently loaded into memory",
-          "default": false
+        {
+          "path":"/_cat/indices/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "m",
+          "g"
+        ]
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "health":{
+        "type":"enum",
+        "options":[
+          "green",
+          "yellow",
+          "red"
+        ],
+        "default":null,
+        "description":"A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "pri":{
+        "type":"boolean",
+        "description":"Set to true to return stats only for primary shards",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      },
+      "include_unloaded_segments":{
+        "type":"boolean",
+        "description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
+        "default":false
+      }
+    }
   }
 }

+ 46 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json

@@ -1,45 +1,51 @@
 {
-  "cat.master": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/master"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.master":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html",
+      "description":"Returns information about the master node."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/master",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 46 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json

@@ -1,45 +1,51 @@
 {
-  "cat.nodeattrs": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/nodeattrs"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.nodeattrs":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html",
+      "description":"Returns information about custom node attributes."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/nodeattrs",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 50 - 44
rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodes.json

@@ -1,49 +1,55 @@
 {
-  "cat.nodes": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/nodes"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "full_id": {
-          "type" : "boolean",
-          "description" : "Return the full node ID instead of the shortened version (default: false)"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.nodes":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html",
+      "description":"Returns basic statistics about performance of cluster nodes."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/nodes",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "full_id":{
+        "type":"boolean",
+        "description":"Return the full node ID instead of the shortened version (default: false)"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 46 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json

@@ -1,45 +1,51 @@
 {
-  "cat.pending_tasks": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/pending_tasks"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.pending_tasks":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html",
+      "description":"Returns a concise representation of the cluster pending tasks."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/pending_tasks",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 46 - 38
rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json

@@ -1,43 +1,51 @@
 {
-  "cat.plugins": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/plugins"],
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.plugins":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html",
+      "description":"Returns information about installed plugins across nodes node."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/plugins",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 70 - 44
rest-api-spec/src/main/resources/rest-api-spec/api/cat.recovery.json

@@ -1,50 +1,76 @@
 {
-  "cat.recovery": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/recovery", "/_cat/recovery/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.recovery":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html",
+      "description":"Returns information about index shard recoveries, both on-going completed."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/recovery",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/recovery/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "kb",
+          "m",
+          "mb",
+          "g",
+          "gb",
+          "t",
+          "tb",
+          "p",
+          "pb"
+        ]
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 47 - 41
rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json

@@ -1,46 +1,52 @@
 {
-  "cat.repositories": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/repositories"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node",
-          "default": false
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-          "type": "list",
-          "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.repositories":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html",
+      "description":"Returns information about snapshot repositories registered in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/repositories",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node",
+        "default":false
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 66 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json

@@ -1,46 +1,72 @@
 {
-  "cat.segments": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/segments", "/_cat/segments/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.segments":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html",
+      "description":"Provides low-level information about the segments in the shards of an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/segments",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/segments/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "kb",
+          "m",
+          "mb",
+          "g",
+          "gb",
+          "t",
+          "tb",
+          "p",
+          "pb"
+        ]
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 74 - 48
rest-api-spec/src/main/resources/rest-api-spec/api/cat.shards.json

@@ -1,54 +1,80 @@
 {
-  "cat.shards": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/shards", "/_cat/shards/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "bytes": {
-          "type": "enum",
-          "description" : "The unit in which to display byte values",
-          "options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.shards":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html",
+      "description":"Provides a detailed view of shard allocation on nodes."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/shards",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/shards/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to limit the returned information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "bytes":{
+        "type":"enum",
+        "description":"The unit in which to display byte values",
+        "options":[
+          "b",
+          "k",
+          "kb",
+          "m",
+          "mb",
+          "g",
+          "gb",
+          "t",
+          "tb",
+          "p",
+          "pb"
+        ]
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 58 - 46
rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json

@@ -1,52 +1,64 @@
 {
-  "cat.snapshots": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [
-        "/_cat/snapshots",
-        "/_cat/snapshots/{repository}"],
-      "parts": {
-        "repository": {
-          "type" : "list",
-          "description": "Name of repository from which to fetch the snapshot information"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "ignore_unavailable": {
-          "type": "boolean",
-          "description": "Set to true to ignore unavailable snapshots",
-          "default": false
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-          "type": "list",
-          "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.snapshots":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html",
+      "description":"Returns all snapshots in a specific repository."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/snapshots",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/snapshots/{repository}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "repository":{
+              "type":"list",
+              "description":"Name of repository from which to fetch the snapshot information"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Set to true to ignore unavailable snapshots",
+        "default":false
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 54 - 48
rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json

@@ -1,53 +1,59 @@
 {
-  "cat.tasks": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/tasks"],
-      "parts": {
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "node_id": {
-          "type": "list",
-          "description": "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
-        },
-        "actions": {
-          "type": "list",
-          "description": "A comma-separated list of actions that should be returned. Leave empty to return all."
-        },
-        "detailed": {
-          "type": "boolean",
-          "description": "Return detailed task information (default: false)"
-        },
-        "parent_task": {
-          "type" : "number",
-          "description" : "Return tasks with specified parent task id. Set to -1 to return all."
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
-        },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+  "cat.tasks":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html",
+      "description":"Returns information about the tasks currently executing on one or more nodes in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/tasks",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "node_id":{
+        "type":"list",
+        "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+      },
+      "actions":{
+        "type":"list",
+        "description":"A comma-separated list of actions that should be returned. Leave empty to return all."
+      },
+      "detailed":{
+        "type":"boolean",
+        "description":"Return detailed task information (default: false)"
+      },
+      "parent_task":{
+        "type":"number",
+        "description":"Return tasks with specified parent task id. Set to -1 to return all."
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 57 - 43
rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json

@@ -1,49 +1,63 @@
 {
-  "cat.templates": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/templates", "/_cat/templates/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "description" : "A pattern that returned template names must match"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-          "type": "list",
-          "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.templates":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html",
+      "description":"Returns information about existing templates."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/templates",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/templates/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "name":{
+              "type":"string",
+              "description":"A pattern that returned template names must match"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 69 - 48
rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json

@@ -1,54 +1,75 @@
 {
-  "cat.thread_pool": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cat/thread_pool","/_cat/thread_pool/{thread_pool_patterns}"],
-      "parts": {
-        "thread_pool_patterns": {
-          "type": "list",
-          "description": "A comma-separated list of regular-expressions to filter the thread pools in the output"
-        }
-      },
-      "params": {
-        "format": {
-          "type" : "string",
-          "description" : "a short version of the Accept header, e.g. json, yaml"
-        },
-        "size": {
-          "type": "enum",
-          "description" : "The multiplier in which to display values",
-          "options": [ "", "k", "m", "g", "t", "p" ]
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "h": {
-            "type": "list",
-            "description" : "Comma-separated list of column names to display"
-        },
-        "help": {
-          "type": "boolean",
-          "description": "Return help information",
-          "default": false
-        },
-        "s": {
-          "type": "list",
-          "description" : "Comma-separated list of column names or column aliases to sort by"
+  "cat.thread_pool":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html",
+      "description":"Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cat/thread_pool",
+          "methods":[
+            "GET"
+          ]
         },
-        "v": {
-          "type": "boolean",
-          "description": "Verbose mode. Display column headers",
-          "default": false
+        {
+          "path":"/_cat/thread_pool/{thread_pool_patterns}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "thread_pool_patterns":{
+              "type":"list",
+              "description":"A comma-separated list of regular-expressions to filter the thread pools in the output"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "format":{
+        "type":"string",
+        "description":"a short version of the Accept header, e.g. json, yaml"
+      },
+      "size":{
+        "type":"enum",
+        "description":"The multiplier in which to display values",
+        "options":[
+          "",
+          "k",
+          "m",
+          "g",
+          "t",
+          "p"
+        ]
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "h":{
+        "type":"list",
+        "description":"Comma-separated list of column names to display"
+      },
+      "help":{
+        "type":"boolean",
+        "description":"Return help information",
+        "default":false
+      },
+      "s":{
+        "type":"list",
+        "description":"Comma-separated list of column names or column aliases to sort by"
+      },
+      "v":{
+        "type":"boolean",
+        "description":"Verbose mode. Display column headers",
+        "default":false
+      }
+    }
   }
 }

+ 33 - 20
rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json

@@ -1,27 +1,40 @@
 {
-  "clear_scroll": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": [ "/_search/scroll"],
-      "deprecated_paths" : [
+  "clear_scroll":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll",
+      "description":"Explicitly clears the search context for a scroll."
+    },
+    "stability":"stable",
+    "url":{
+      "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": {
-        "scroll_id": {
-          "type" : "list",
-          "description" : "A comma-separated list of scroll IDs to clear"
+          "path":"/_search/scroll",
+          "methods":[
+            "DELETE"
+          ]
+        },
+        {
+          "path":"/_search/scroll/{scroll_id}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "scroll_id":{
+              "type":"list",
+              "description":"A comma-separated list of scroll IDs to clear",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"A scroll id can be quite large and should be specified as part of the body"
+          }
         }
-      },
-      "params": {}
+      ]
     },
-    "body": {
-      "description": "A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"
+    "params":{},
+    "body":{
+      "description":"A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"
     }
   }
 }

+ 26 - 17
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.allocation_explain.json

@@ -1,24 +1,33 @@
 {
-  "cluster.allocation_explain": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_cluster/allocation/explain"],
-      "parts": {},
-      "params": {
-        "include_yes_decisions": {
-          "type": "boolean",
-          "description": "Return 'YES' decisions in explanation (default: false)"
-        },
-        "include_disk_info": {
-          "type": "boolean",
-          "description": "Return information about disk usage and shard sizes (default: false)"
+  "cluster.allocation_explain":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html",
+      "description":"Provides explanations for shard allocations in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/allocation/explain",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         }
+      ]
+    },
+    "params":{
+      "include_yes_decisions":{
+        "type":"boolean",
+        "description":"Return 'YES' decisions in explanation (default: false)"
+      },
+      "include_disk_info":{
+        "type":"boolean",
+        "description":"Return information about disk usage and shard sizes (default: false)"
       }
     },
-    "body": {
-      "description": "The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'"
+    "body":{
+      "description":"The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'"
     }
   }
 }

+ 33 - 26
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_settings.json

@@ -1,31 +1,38 @@
 {
-  "cluster.get_settings": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cluster/settings"],
-      "parts": {},
-      "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"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "include_defaults": {
-          "type": "boolean",
-          "description": "Whether to return all default clusters setting.",
-          "default": false
+  "cluster.get_settings":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
+      "description":"Returns cluster settings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/settings",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "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"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "include_defaults":{
+        "type":"boolean",
+        "description":"Whether to return all default clusters setting.",
+        "default":false
+      }
+    }
   }
 }

+ 98 - 64
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.health.json

@@ -1,70 +1,104 @@
 {
-  "cluster.health": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cluster/health", "/_cluster/health/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "Limit the information returned to a specific index"
-        }
-      },
-      "params": {
-        "expand_wildcards": {
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "all",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "level": {
-          "type" : "enum",
-          "options" : ["cluster","indices","shards"],
-          "default" : "cluster",
-          "description" : "Specify the level of detail for returned information"
-        },
-        "local": {
-          "type" : "boolean",
-          "description" : "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Wait until the specified number of shards is active"
-        },
-        "wait_for_nodes": {
-          "type" : "string",
-          "description" : "Wait until the specified number of nodes is available"
-        },
-        "wait_for_events": {
-          "type" : "enum",
-          "options" : ["immediate", "urgent", "high", "normal", "low", "languid"],
-          "description" : "Wait until all currently queued events with the given priority are processed"
-        },
-        "wait_for_no_relocating_shards": {
-          "type" : "boolean",
-          "description" : "Whether to wait until there are no relocating shards in the cluster"
-        },
-        "wait_for_no_initializing_shards": {
-          "type" : "boolean",
-          "description" : "Whether to wait until there are no initializing shards in the cluster"
+  "cluster.health":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html",
+      "description":"Returns basic information about the health of the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/health",
+          "methods":[
+            "GET"
+          ]
         },
-        "wait_for_status": {
-          "type" : "enum",
-          "options" : ["green","yellow","red"],
-          "default" : null,
-          "description" : "Wait until cluster is in a specific state"
+        {
+          "path":"/_cluster/health/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"Limit the information returned to a specific index"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"all",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "level":{
+        "type":"enum",
+        "options":[
+          "cluster",
+          "indices",
+          "shards"
+        ],
+        "default":"cluster",
+        "description":"Specify the level of detail for returned information"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Wait until the specified number of shards is active"
+      },
+      "wait_for_nodes":{
+        "type":"string",
+        "description":"Wait until the specified number of nodes is available"
+      },
+      "wait_for_events":{
+        "type":"enum",
+        "options":[
+          "immediate",
+          "urgent",
+          "high",
+          "normal",
+          "low",
+          "languid"
+        ],
+        "description":"Wait until all currently queued events with the given priority are processed"
+      },
+      "wait_for_no_relocating_shards":{
+        "type":"boolean",
+        "description":"Whether to wait until there are no relocating shards in the cluster"
+      },
+      "wait_for_no_initializing_shards":{
+        "type":"boolean",
+        "description":"Whether to wait until there are no initializing shards in the cluster"
+      },
+      "wait_for_status":{
+        "type":"enum",
+        "options":[
+          "green",
+          "yellow",
+          "red"
+        ],
+        "default":null,
+        "description":"Wait until cluster is in a specific state"
+      }
+    }
   }
 }

+ 24 - 18
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.pending_tasks.json

@@ -1,23 +1,29 @@
 {
-  "cluster.pending_tasks": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cluster/pending_tasks"],
-      "parts": {
-      },
-      "params": {
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type": "time",
-          "description": "Specify timeout for connection to master"
+  "cluster.pending_tasks":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html",
+      "description":"Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/pending_tasks",
+          "methods":[
+            "GET"
+          ]
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      }
+    }
   }
 }

+ 30 - 22
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_settings.json

@@ -1,29 +1,37 @@
 {
-  "cluster.put_settings": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
-    "stability": "stable",
-    "methods": ["PUT"],
-    "url": {
-      "paths": ["/_cluster/settings"],
-      "parts": {},
-      "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"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+  "cluster.put_settings":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
+      "description":"Updates the cluster settings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/settings",
+          "methods":[
+            "PUT"
+          ]
         }
+      ]
+    },
+    "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"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       }
     },
-    "body": {
-      "description": "The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).",
-      "required" : true
+    "body":{
+      "description":"The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).",
+      "required":true
     }
   }
 }

+ 16 - 8
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.remote_info.json

@@ -1,12 +1,20 @@
 {
-  "cluster.remote_info": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_remote/info"],
-      "params": {}
+  "cluster.remote_info":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html",
+      "description":"Returns the information about configured remote clusters."
     },
-    "body": null
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_remote/info",
+          "methods":[
+            "GET"
+          ]
+        }
+      ]
+    },
+    "params":{}
   }
 }

+ 50 - 35
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json

@@ -1,42 +1,57 @@
 {
-  "cluster.reroute": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_cluster/reroute"],
-      "parts": {
-      },
-      "params": {
-        "dry_run": {
-          "type" : "boolean",
-          "description" : "Simulate the operation only and return the resulting state"
-        },
-        "explain": {
-          "type" : "boolean",
-          "description" : "Return an explanation of why the commands can or cannot be executed"
-        },
-        "retry_failed": {
-          "type" : "boolean",
-          "description" : "Retries allocation of shards that are blocked due to too many subsequent allocation failures"
-        },
-        "metric": {
-          "type": "list",
-          "options": ["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"],
-          "description": "Limit the information returned to the specified metrics. Defaults to all but metadata"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+  "cluster.reroute":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html",
+      "description":"Allows to manually change the allocation of individual shards in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/reroute",
+          "methods":[
+            "POST"
+          ]
         }
+      ]
+    },
+    "params":{
+      "dry_run":{
+        "type":"boolean",
+        "description":"Simulate the operation only and return the resulting state"
+      },
+      "explain":{
+        "type":"boolean",
+        "description":"Return an explanation of why the commands can or cannot be executed"
+      },
+      "retry_failed":{
+        "type":"boolean",
+        "description":"Retries allocation of shards that are blocked due to too many subsequent allocation failures"
+      },
+      "metric":{
+        "type":"list",
+        "options":[
+          "_all",
+          "blocks",
+          "metadata",
+          "nodes",
+          "routing_table",
+          "master_node",
+          "version"
+        ],
+        "description":"Limit the information returned to the specified metrics. Defaults to all but metadata"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       }
     },
-    "body": {
-      "description" : "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
+    "body":{
+      "description":"The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
     }
   }
 }

+ 100 - 57
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json

@@ -1,65 +1,108 @@
 {
-  "cluster.state": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html",
-    "stability" : "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [
-        "/_cluster/state",
-        "/_cluster/state/{metric}",
-        "/_cluster/state/{metric}/{index}"
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        },
-        "metric" : {
-          "type" : "list",
-          "options" : ["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"],
-          "description" : "Limit the information returned to the specified metrics"
-        }
-      },
-      "params": {
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "master_timeout": {
-          "type": "time",
-          "description": "Specify timeout for connection to master"
-        },
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
-        },
-        "wait_for_metadata_version": {
-          "type": "number",
-          "description": "Wait for the metadata version to be equal or greater than the specified metadata version"
-        },
-        "wait_for_timeout" : {
-          "type": "time",
-          "description": "The maximum time to wait for wait_for_metadata_version before timing out"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+  "cluster.state":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html",
+      "description":"Returns a comprehensive information about the state of the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/state",
+          "methods":[
+            "GET"
+          ]
         },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+        {
+          "path":"/_cluster/state/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "blocks",
+                "metadata",
+                "nodes",
+                "routing_table",
+                "routing_nodes",
+                "master_node",
+                "version"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            }
+          }
         },
-        "expand_wildcards":{
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "open",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/_cluster/state/{metric}/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            },
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "blocks",
+                "metadata",
+                "nodes",
+                "routing_table",
+                "routing_nodes",
+                "master_node",
+                "version"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null,
-    "response": {
-      "treat_json_as_key_value" : true
+    "params":{
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "wait_for_metadata_version":{
+        "type":"number",
+        "description":"Wait for the metadata version to be equal or greater than the specified metadata version"
+      },
+      "wait_for_timeout":{
+        "type":"time",
+        "description":"The maximum time to wait for wait_for_metadata_version before timing out"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
     }
   }
 }

+ 35 - 21
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.stats.json

@@ -1,27 +1,41 @@
 {
-  "cluster.stats": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"],
-      "parts": {
-        "node_id": {
-          "type" : "list",
-          "description" : "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
-        }
-      },
-      "params": {
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
+  "cluster.stats":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html",
+      "description":"Returns high-level overview of cluster statistics."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cluster/stats",
+          "methods":[
+            "GET"
+          ]
         },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+        {
+          "path":"/_cluster/stats/nodes/{node_id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      }
+    }
   }
 }

+ 97 - 76
rest-api-spec/src/main/resources/rest-api-spec/api/count.json

@@ -1,85 +1,106 @@
 {
-  "count": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html",
-    "stability": "stable",
-    "methods": ["POST", "GET"],
-    "url": {
-      "paths": ["/_count", "/{index}/_count"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of indices to restrict the results"
+  "count":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html",
+      "description":"Returns number of documents matching a query."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_count",
+          "methods":[
+            "POST",
+            "GET"
+          ]
         },
-        "type": {
-          "type" : "list",
-          "description" : "A comma-separated list of types to restrict the results"
+        {
+          "path":"/{index}/_count",
+          "methods":[
+            "POST",
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of indices to restrict the results"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
       },
-      "params": {
-        "ignore_unavailable": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "ignore_throttled": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete, expanded or aliased indices should be ignored when throttled"
-        },
-        "allow_no_indices": {
-           "type" : "boolean",
-           "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "min_score": {
-          "type" : "number",
-          "description" : "Include only documents with a specific `_score` value in the result"
-        },
-        "preference": {
-          "type" : "string",
-          "description" : "Specify the node or shard the operation should be performed on (default: random)"
-        },
-        "routing": {
-          "type" : "list",
-          "description" : "A comma-separated list of specific routing values"
-        },
-        "q": {
-          "type" : "string",
-          "description" : "Query in the Lucene query string syntax"
-        },
-        "analyzer": {
-          "type" : "string",
-          "description" : "The analyzer to use for the query string"
-        },
-        "analyze_wildcard": {
-          "type" : "boolean",
-          "description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
-        },
-        "default_operator": {
-          "type" : "enum",
-          "options" : ["AND","OR"],
-          "default" : "OR",
-          "description" : "The default operator for query string query (AND or OR)"
-        },
-        "df": {
-          "type" : "string",
-          "description" : "The field to use as default where no field prefix is given in the query string"
-        },
-        "lenient": {
-          "type" : "boolean",
-          "description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
-        },
-        "terminate_after" : {
-          "type" : "number",
-          "description" : "The maximum count for each shard, upon reaching which the query execution will terminate early"
-        }
+      "ignore_throttled":{
+        "type":"boolean",
+        "description":"Whether specified concrete, expanded or aliased indices should be ignored when throttled"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "min_score":{
+        "type":"number",
+        "description":"Include only documents with a specific `_score` value in the result"
+      },
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random)"
+      },
+      "routing":{
+        "type":"list",
+        "description":"A comma-separated list of specific routing values"
+      },
+      "q":{
+        "type":"string",
+        "description":"Query in the Lucene query string syntax"
+      },
+      "analyzer":{
+        "type":"string",
+        "description":"The analyzer to use for the query string"
+      },
+      "analyze_wildcard":{
+        "type":"boolean",
+        "description":"Specify whether wildcard and prefix queries should be analyzed (default: false)"
+      },
+      "default_operator":{
+        "type":"enum",
+        "options":[
+          "AND",
+          "OR"
+        ],
+        "default":"OR",
+        "description":"The default operator for query string query (AND or OR)"
+      },
+      "df":{
+        "type":"string",
+        "description":"The field to use as default where no field prefix is given in the query string"
+      },
+      "lenient":{
+        "type":"boolean",
+        "description":"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
+      },
+      "terminate_after":{
+        "type":"number",
+        "description":"The maximum count for each shard, upon reaching which the query execution will terminate early"
       }
     },
-    "body": {
-      "description" : "A query to restrict the results specified with the Query DSL (optional)"
+    "body":{
+      "description":"A query to restrict the results specified with the Query DSL (optional)"
     }
   }
 }

+ 91 - 59
rest-api-spec/src/main/resources/rest-api-spec/api/create.json

@@ -1,69 +1,101 @@
 {
-  "create": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
-    "stability": "stable",
-    "methods": ["PUT","POST"],
-    "url": {
-      "paths": ["/{index}/_create/{id}"],
-      "deprecated_paths" : [
+  "create":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
+      "description":"Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}/_create",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "Document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_create/{id}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document"
+        {
+          "path":"/{index}/{type}/{id}/_create",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
       },
-      "params": {
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
-        },
-        "refresh": {
-          "type" : "enum",
-          "options": ["true", "false", "wait_for"],
-          "description" : "If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
-        },
-        "routing": {
-          "type" : "string",
-          "description" : "Specific routing value"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "version" : {
-          "type" : "number",
-          "description" : "Explicit version number for concurrency control"
-        },
-        "version_type": {
-          "type" : "enum",
-          "options" : ["internal", "external", "external_gte", "force"],
-          "description" : "Specific version type"
-        },
-        "pipeline" : {
-          "type" : "string",
-          "description" : "The pipeline id to preprocess incoming documents with"
-        }
+      "refresh":{
+        "type":"enum",
+        "options":[
+          "true",
+          "false",
+          "wait_for"
+        ],
+        "description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
+      },
+      "routing":{
+        "type":"string",
+        "description":"Specific routing value"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "version":{
+        "type":"number",
+        "description":"Explicit version number for concurrency control"
+      },
+      "version_type":{
+        "type":"enum",
+        "options":[
+          "internal",
+          "external",
+          "external_gte",
+          "force"
+        ],
+        "description":"Specific version type"
+      },
+      "pipeline":{
+        "type":"string",
+        "description":"The pipeline id to preprocess incoming documents with"
       }
     },
-    "body": {
-      "description" : "The document",
-      "required" : true
+    "body":{
+      "description":"The document",
+      "required":true
     }
   }
 }

+ 91 - 62
rest-api-spec/src/main/resources/rest-api-spec/api/delete.json

@@ -1,70 +1,99 @@
 {
-  "delete": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": ["/{index}/_doc/{id}"],
-      "deprecated_paths" : [
+  "delete":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html",
+      "description":"Removes a document from the index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_doc/{id}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document"
+        {
+          "path":"/{index}/{type}/{id}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
       },
-      "params": {
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
-        },
-        "refresh": {
-          "type" : "enum",
-          "options": ["true", "false", "wait_for"],
-          "description" : "If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
-        },
-        "routing": {
-          "type" : "string",
-          "description" : "Specific routing value"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "if_seq_no" : {
-          "type" : "number",
-          "description" : "only perform the delete operation if the last operation that has changed the document has the specified sequence number"
-        },
-        "if_primary_term" : {
-          "type" : "number",
-          "description" : "only perform the delete operation if the last operation that has changed the document has the specified primary term"
-        },
-        "version" : {
-          "type" : "number",
-          "description" : "Explicit version number for concurrency control"
-        },
-        "version_type": {
-          "type" : "enum",
-          "options" : ["internal", "external", "external_gte", "force"],
-          "description" : "Specific version type"
-        }
+      "refresh":{
+        "type":"enum",
+        "options":[
+          "true",
+          "false",
+          "wait_for"
+        ],
+        "description":"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
+      },
+      "routing":{
+        "type":"string",
+        "description":"Specific routing value"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "if_seq_no":{
+        "type":"number",
+        "description":"only perform the delete operation if the last operation that has changed the document has the specified sequence number"
+      },
+      "if_primary_term":{
+        "type":"number",
+        "description":"only perform the delete operation if the last operation that has changed the document has the specified primary term"
+      },
+      "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
+    }
   }
 }

+ 178 - 157
rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json

@@ -1,165 +1,186 @@
 {
-  "delete_by_query": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/{index}/_delete_by_query"],
-      "comment": "most things below this are just copied from search.json",
-      "parts": {
-        "index": {
-         "required" : true,
-         "type" : "list",
-         "description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
+  "delete_by_query":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html",
+      "description":"Deletes documents matching the provided query."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_delete_by_query",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "analyzer":{
+        "type":"string",
+        "description":"The analyzer to use for the query string"
       },
-      "params": {
-        "analyzer": {
-          "type" : "string",
-          "description" : "The analyzer to use for the query string"
-        },
-        "analyze_wildcard": {
-          "type" : "boolean",
-          "description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
-        },
-        "default_operator": {
-          "type" : "enum",
-          "options" : ["AND","OR"],
-          "default" : "OR",
-          "description" : "The default operator for query string query (AND or OR)"
-        },
-        "df": {
-          "type" : "string",
-          "description" : "The field to use as default where no field prefix is given in the query string"
-        },
-        "from": {
-          "type" : "number",
-          "description" : "Starting offset (default: 0)"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "conflicts": {
-            "note": "This is not copied from search",
-            "type" : "enum",
-            "options": ["abort", "proceed"],
-            "default": "abort",
-            "description" : "What to do when the delete by query hits version conflicts?"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "lenient": {
-          "type" : "boolean",
-          "description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
-        },
-        "preference": {
-          "type" : "string",
-          "description" : "Specify the node or shard the operation should be performed on (default: random)"
-        },
-        "q": {
-          "type" : "string",
-          "description" : "Query in the Lucene query string syntax"
-        },
-        "routing": {
-          "type" : "list",
-          "description" : "A comma-separated list of specific routing values"
-        },
-        "scroll": {
-          "type" : "time",
-          "description" : "Specify how long a consistent view of the index should be maintained for scrolled search"
-        },
-        "search_type": {
-          "type" : "enum",
-          "options" : ["query_then_fetch", "dfs_query_then_fetch"],
-          "description" : "Search operation type"
-        },
-        "search_timeout": {
-          "type" : "time",
-          "description" : "Explicit timeout for each search request. Defaults to no timeout."
-        },
-        "max_docs": {
-          "type" : "number",
-          "description" : "Maximum number of documents to process (default: all documents)"
-        },
-        "sort": {
-          "type" : "list",
-          "description" : "A comma-separated list of <field>:<direction> pairs"
-        },
-        "_source": {
-          "type" : "list",
-          "description" : "True or false to return the _source field or not, or a list of fields to return"
-        },
-        "_source_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "type" : "list",
-          "description" : "A list of fields to extract and return from the _source field"
-        },
-        "terminate_after": {
-          "type" : "number",
-          "description" : "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
-        },
-        "stats": {
-          "type" : "list",
-          "description" : "Specific 'tag' of the request for logging and statistical purposes"
-        },
-        "version": {
-          "type" : "boolean",
-          "description" : "Specify whether to return document version as part of a hit"
-        },
-        "request_cache": {
-          "type" : "boolean",
-          "description" : "Specify if request cache should be used for this request or not, defaults to index level setting"
-        },
-        "refresh": {
-          "type" : "boolean",
-          "description" : "Should the effected indexes be refreshed?"
-        },
-        "timeout": {
-          "type" : "time",
-          "default": "1m",
-          "description" : "Time each individual bulk request should wait for shards that are unavailable."
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
-        },
-        "scroll_size": {
-          "type": "number",
-          "defaut_value": 100,
-          "description": "Size on the scroll request powering the delete by query"
-        },
-        "wait_for_completion": {
-           "type" : "boolean",
-           "default": true,
-           "description" : "Should the request should block until the delete by query is complete."
-        },
-        "requests_per_second": {
-          "type": "number",
-          "default": 0,
-          "description": "The throttle for this request in sub-requests per second. -1 means no throttle."
-        },
-        "slices": {
-          "type": "number",
-          "default": 1,
-          "description": "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
-        }
+      "analyze_wildcard":{
+        "type":"boolean",
+        "description":"Specify whether wildcard and prefix queries should be analyzed (default: false)"
+      },
+      "default_operator":{
+        "type":"enum",
+        "options":[
+          "AND",
+          "OR"
+        ],
+        "default":"OR",
+        "description":"The default operator for query string query (AND or OR)"
+      },
+      "df":{
+        "type":"string",
+        "description":"The field to use as default where no field prefix is given in the query string"
+      },
+      "from":{
+        "type":"number",
+        "description":"Starting offset (default: 0)"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "conflicts":{
+        "note":"This is not copied from search",
+        "type":"enum",
+        "options":[
+          "abort",
+          "proceed"
+        ],
+        "default":"abort",
+        "description":"What to do when the delete by query hits version conflicts?"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "lenient":{
+        "type":"boolean",
+        "description":"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
+      },
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random)"
+      },
+      "q":{
+        "type":"string",
+        "description":"Query in the Lucene query string syntax"
+      },
+      "routing":{
+        "type":"list",
+        "description":"A comma-separated list of specific routing values"
+      },
+      "scroll":{
+        "type":"time",
+        "description":"Specify how long a consistent view of the index should be maintained for scrolled search"
+      },
+      "search_type":{
+        "type":"enum",
+        "options":[
+          "query_then_fetch",
+          "dfs_query_then_fetch"
+        ],
+        "description":"Search operation type"
+      },
+      "search_timeout":{
+        "type":"time",
+        "description":"Explicit timeout for each search request. Defaults to no timeout."
+      },
+      "max_docs":{
+        "type":"number",
+        "description":"Maximum number of documents to process (default: all documents)"
+      },
+      "sort":{
+        "type":"list",
+        "description":"A comma-separated list of <field>:<direction> pairs"
+      },
+      "_source":{
+        "type":"list",
+        "description":"True or false to return the _source field or not, or a list of fields to return"
+      },
+      "_source_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "type":"list",
+        "description":"A list of fields to extract and return from the _source field"
+      },
+      "terminate_after":{
+        "type":"number",
+        "description":"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
+      },
+      "stats":{
+        "type":"list",
+        "description":"Specific 'tag' of the request for logging and statistical purposes"
+      },
+      "version":{
+        "type":"boolean",
+        "description":"Specify whether to return document version as part of a hit"
+      },
+      "request_cache":{
+        "type":"boolean",
+        "description":"Specify if request cache should be used for this request or not, defaults to index level setting"
+      },
+      "refresh":{
+        "type":"boolean",
+        "description":"Should the effected indexes be refreshed?"
+      },
+      "timeout":{
+        "type":"time",
+        "default":"1m",
+        "description":"Time each individual bulk request should wait for shards that are unavailable."
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
+      },
+      "scroll_size":{
+        "type":"number",
+        "defaut_value":100,
+        "description":"Size on the scroll request powering the delete by query"
+      },
+      "wait_for_completion":{
+        "type":"boolean",
+        "default":true,
+        "description":"Should the request should block until the delete by query is complete."
+      },
+      "requests_per_second":{
+        "type":"number",
+        "default":0,
+        "description":"The throttle for this request in sub-requests per second. -1 means no throttle."
+      },
+      "slices":{
+        "type":"number",
+        "default":1,
+        "description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
       }
     },
-    "body": {
-      "description": "The search definition using the Query DSL",
-      "required": true
+    "body":{
+      "description":"The search definition using the Query DSL",
+      "required":true
     }
   }
 }

+ 27 - 20
rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query_rethrottle.json

@@ -1,25 +1,32 @@
 {
-  "delete_by_query_rethrottle": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_delete_by_query/{task_id}/_rethrottle"],
-      "parts": {
-        "task_id": {
-          "type": "string",
-          "required" : true,
-          "description": "The task id to rethrottle"
-        }
-      },
-      "params": {
-        "requests_per_second": {
-          "type": "number",
-          "required": true,
-          "description": "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."
+  "delete_by_query_rethrottle":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html",
+      "description":"Changes the number of requests per second for a particular Delete By Query operation."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_delete_by_query/{task_id}/_rethrottle",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "task_id":{
+              "type":"string",
+              "description":"The task id to rethrottle"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "requests_per_second":{
+        "type":"number",
+        "required":true,
+        "description":"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."
+      }
+    }
   }
 }

+ 29 - 22
rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json

@@ -1,28 +1,35 @@
 {
-  "delete_script": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": [ "/_scripts/{id}" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Script ID",
-          "required" : true
+  "delete_script":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
+      "description":"Deletes a script."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_scripts/{id}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Script ID"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params" : {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
-    },
-    "body": null
+    }
   }
 }

+ 94 - 69
rest-api-spec/src/main/resources/rest-api-spec/api/exists.json

@@ -1,77 +1,102 @@
 {
-  "exists": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
-    "stability": "stable",
-    "methods": ["HEAD"],
-    "url": {
-      "paths": ["/{index}/_doc/{id}"],
-      "deprecated_paths" : [
+  "exists":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
+      "description":"Returns information about whether a document exists in an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_doc/{id}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document (use `_all` to fetch the first document matching the ID across all types)"
+        {
+          "path":"/{index}/{type}/{id}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document (use `_all` to fetch the first document matching the ID across all types)",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "stored_fields":{
+        "type":"list",
+        "description":"A comma-separated list of stored fields to return in the response"
       },
-      "params": {
-        "stored_fields": {
-          "type": "list",
-          "description" : "A comma-separated list of stored fields to return in the response"
-        },
-        "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_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "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"
-        }
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "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
+    }
   }
 }

+ 91 - 66
rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json

@@ -1,74 +1,99 @@
 {
-  "exists_source": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
-    "stability": "stable",
-    "methods": ["HEAD"],
-    "url": {
-      "paths": ["/{index}/_source/{id}"],
-      "deprecated_paths" : [
+  "exists_source":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
+      "description":"Returns information about whether a document source exists in an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}/_source",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_source/{id}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "required" : false,
-          "description" : "The type of the document; deprecated and optional starting with 7.0"
+        {
+          "path":"/{index}/{type}/{id}/_source",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "required":false,
+              "description":"The type of the document; deprecated and optional starting with 7.0",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random)"
       },
-      "params": {
-        "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_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "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"
-        }
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "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
+    }
   }
 }

+ 104 - 78
rest-api-spec/src/main/resources/rest-api-spec/api/explain.json

@@ -1,88 +1,114 @@
 {
-  "explain": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/{index}/_explain/{id}"],
-      "deprecated_paths" : [
+  "explain":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html",
+      "description":"Returns information about why a specific matches (or doesn't match) a query."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}/_explain",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
+          "path":"/{index}/_explain/{id}",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
-        },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document"
+        {
+          "path":"/{index}/{type}/{id}/_explain",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "analyze_wildcard":{
+        "type":"boolean",
+        "description":"Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"
       },
-      "params": {
-        "analyze_wildcard": {
-          "type" : "boolean",
-          "description" : "Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"
-        },
-        "analyzer": {
-          "type" : "string",
-          "description" : "The analyzer for the query string query"
-        },
-        "default_operator": {
-          "type" : "enum",
-          "options" : ["AND","OR"],
-          "default" : "OR",
-          "description" : "The default operator for query string query (AND or OR)"
-        },
-        "df": {
-          "type" : "string",
-          "description" : "The default field for query string query (default: _all)"
-        },
-        "stored_fields": {
-          "type": "list",
-          "description" : "A comma-separated list of stored fields to return in the response"
-        },
-        "lenient": {
-          "type" : "boolean",
-          "description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
-        },
-        "preference": {
-          "type" : "string",
-          "description" : "Specify the node or shard the operation should be performed on (default: random)"
-        },
-        "q": {
-          "type" : "string",
-          "description" : "Query in the Lucene query string syntax"
-        },
-        "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_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "type" : "list",
-          "description" : "A list of fields to extract and return from the _source field"
-        }
+      "analyzer":{
+        "type":"string",
+        "description":"The analyzer for the query string query"
+      },
+      "default_operator":{
+        "type":"enum",
+        "options":[
+          "AND",
+          "OR"
+        ],
+        "default":"OR",
+        "description":"The default operator for query string query (AND or OR)"
+      },
+      "df":{
+        "type":"string",
+        "description":"The default field for query string query (default: _all)"
+      },
+      "stored_fields":{
+        "type":"list",
+        "description":"A comma-separated list of stored fields to return in the response"
+      },
+      "lenient":{
+        "type":"boolean",
+        "description":"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
+      },
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random)"
+      },
+      "q":{
+        "type":"string",
+        "description":"Query in the Lucene query string syntax"
+      },
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "type":"list",
+        "description":"A list of fields to extract and return from the _source field"
       }
     },
-    "body": {
-      "description" : "The query definition using the Query DSL"
+    "body":{
+      "description":"The query definition using the Query DSL"
     }
   }
 }

+ 58 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json

@@ -1,45 +1,63 @@
 {
-  "field_caps": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": [
-        "/_field_caps",
-        "/{index}/_field_caps"
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of field names"
-        },
-        "ignore_unavailable": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type" : "boolean",
-          "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "open",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+  "field_caps":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
+      "description":"Returns the information about the capabilities of fields among multiple indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_field_caps",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "include_unmapped": {
-          "type": "boolean",
-          "default": false,
-          "description": "Indicates whether unmapped fields should be included in the response."
+        {
+          "path":"/{index}/_field_caps",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of field names"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "include_unmapped":{
+        "type":"boolean",
+        "default":false,
+        "description":"Indicates whether unmapped fields should be included in the response."
+      }
+    }
   }
-}
+}

+ 94 - 69
rest-api-spec/src/main/resources/rest-api-spec/api/get.json

@@ -1,77 +1,102 @@
 {
-  "get": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/{index}/_doc/{id}"],
-      "deprecated_paths" : [
+  "get":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
+      "description":"Returns a document."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_doc/{id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document (use `_all` to fetch the first document matching the ID across all types)"
+        {
+          "path":"/{index}/{type}/{id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document (use `_all` to fetch the first document matching the ID across all types)",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "stored_fields":{
+        "type":"list",
+        "description":"A comma-separated list of stored fields to return in the response"
       },
-      "params": {
-        "stored_fields": {
-          "type": "list",
-          "description" : "A comma-separated list of stored fields to return in the response"
-        },
-        "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_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "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"
-        }
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "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
+    }
   }
 }

+ 27 - 20
rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json

@@ -1,24 +1,31 @@
 {
-  "get_script": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [ "/_scripts/{id}" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Script ID",
-          "required" : true
-        }
-      },
-      "params" : {
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
+  "get_script":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
+      "description":"Returns a script."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_scripts/{id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Script ID"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      }
+    }
   }
-}
+}

+ 91 - 66
rest-api-spec/src/main/resources/rest-api-spec/api/get_source.json

@@ -1,74 +1,99 @@
 {
-  "get_source": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/{index}/_source/{id}"],
-      "deprecated_paths" : [
+  "get_source":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
+      "description":"Returns the source of a document."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}/_source",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The document ID"
-        },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+          "path":"/{index}/_source/{id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "type": {
-          "type" : "string",
-          "required" : false,
-          "description" : "The type of the document; deprecated and optional starting with 7.0"
+        {
+          "path":"/{index}/{type}/{id}/_source",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"The document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "required":false,
+              "description":"The type of the document; deprecated and optional starting with 7.0",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random)"
       },
-      "params": {
-        "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_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
-        },
-        "_source_includes": {
-          "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"
-        }
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "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
+    }
   }
 }

+ 138 - 74
rest-api-spec/src/main/resources/rest-api-spec/api/index.json

@@ -1,87 +1,151 @@
 {
-  "index": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
-    "stability": "stable",
-    "methods": ["POST", "PUT"],
-    "url": {
-      "paths": ["/{index}/_doc/{id}", "/{index}/_doc"],
-      "deprecated_paths" : [
+  "index":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
+      "description":"Creates or updates a document in an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/_doc/{id}",
+          "methods":[
+            "POST",
+            "PUT"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/{id}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Document ID"
+          "path":"/{index}/_doc",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+        {
+          "path":"/{index}/{type}",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document"
+        {
+          "path":"/{index}/{type}/{id}",
+          "methods":[
+            "POST",
+            "PUT"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Document ID"
+            },
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
       },
-      "params": {
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
-        },
-        "op_type": {
-          "type" : "enum",
-          "options" : ["index", "create"],
-          "default" : "index",
-          "description" : "Explicit operation type"
-        },
-        "refresh": {
-          "type" : "enum",
-          "options": ["true", "false", "wait_for"],
-          "description" : "If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
-        },
-        "routing": {
-          "type" : "string",
-          "description" : "Specific routing value"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "version" : {
-          "type" : "number",
-          "description" : "Explicit version number for concurrency control"
-        },
-        "version_type": {
-          "type" : "enum",
-          "options" : ["internal", "external", "external_gte", "force"],
-          "description" : "Specific version type"
-        },
-        "if_seq_no" : {
-          "type" : "number",
-          "description" : "only perform the index operation if the last operation that has changed the document has the specified sequence number"
-        },
-        "if_primary_term" : {
-          "type" : "number",
-          "description" : "only perform the index operation if the last operation that has changed the document has the specified primary term"
-        },
-        "pipeline" : {
-          "type" : "string",
-          "description" : "The pipeline id to preprocess incoming documents with"
-        }
+      "op_type":{
+        "type":"enum",
+        "options":[
+          "index",
+          "create"
+        ],
+        "default":"index",
+        "description":"Explicit operation type"
+      },
+      "refresh":{
+        "type":"enum",
+        "options":[
+          "true",
+          "false",
+          "wait_for"
+        ],
+        "description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
+      },
+      "routing":{
+        "type":"string",
+        "description":"Specific routing value"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "version":{
+        "type":"number",
+        "description":"Explicit version number for concurrency control"
+      },
+      "version_type":{
+        "type":"enum",
+        "options":[
+          "internal",
+          "external",
+          "external_gte",
+          "force"
+        ],
+        "description":"Specific version type"
+      },
+      "if_seq_no":{
+        "type":"number",
+        "description":"only perform the index operation if the last operation that has changed the document has the specified sequence number"
+      },
+      "if_primary_term":{
+        "type":"number",
+        "description":"only perform the index operation if the last operation that has changed the document has the specified primary term"
+      },
+      "pipeline":{
+        "type":"string",
+        "description":"The pipeline id to preprocess incoming documents with"
       }
     },
-    "body": {
-      "description" : "The document",
-      "required" : true
+    "body":{
+      "description":"The document",
+      "required":true
     }
   }
 }

+ 35 - 18
rest-api-spec/src/main/resources/rest-api-spec/api/indices.analyze.json

@@ -1,25 +1,42 @@
 {
-  "indices.analyze": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_analyze", "/{index}/_analyze"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "description" : "The name of the index to scope the operation"
-        }
-      },
-      "params": {
-        "index": {
-          "type" : "string",
-          "description" : "The name of the index to scope the operation"
+  "indices.analyze":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html",
+      "description":"Performs the analysis process on a text and return the tokens breakdown of the text."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_analyze",
+          "methods":[
+            "GET",
+            "POST"
+          ]
+        },
+        {
+          "path":"/{index}/_analyze",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index to scope the operation"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "index":{
+        "type":"string",
+        "description":"The name of the index to scope the operation"
       }
     },
-    "body": {
-      "description" : "Define analyzer/tokenizer parameters and the text on which the analysis should be performed"
+    "body":{
+      "description":"Define analyzer/tokenizer parameters and the text on which the analysis should be performed"
     }
   }
 }

+ 66 - 47
rest-api-spec/src/main/resources/rest-api-spec/api/indices.clear_cache.json

@@ -1,53 +1,72 @@
 {
-  "indices.clear_cache": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_cache/clear", "/{index}/_cache/clear"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index name to limit the operation"
-        }
-      },
-      "params": {
-        "fielddata": {
-          "type" : "boolean",
-          "description" : "Clear field data"
-        },
-        "fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"
-        },
-        "query": {
-          "type" : "boolean",
-          "description" : "Clear query caches"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index name to limit the operation"
+  "indices.clear_cache":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html",
+      "description":"Clears all or specific caches for one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_cache/clear",
+          "methods":[
+            "POST"
+          ]
         },
-        "request": {
-          "type" : "boolean",
-          "description" : "Clear request cache"
+        {
+          "path":"/{index}/_cache/clear",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index name to limit the operation"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "fielddata":{
+        "type":"boolean",
+        "description":"Clear field data"
+      },
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"
+      },
+      "query":{
+        "type":"boolean",
+        "description":"Clear query caches"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "index":{
+        "type":"list",
+        "description":"A comma-separated list of index name to limit the operation"
+      },
+      "request":{
+        "type":"boolean",
+        "description":"Clear request cache"
+      }
+    }
   }
 }

+ 36 - 26
rest-api-spec/src/main/resources/rest-api-spec/api/indices.clone.json

@@ -1,35 +1,45 @@
 {
   "indices.clone": {
-    "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html",
+    "documentation": {
+      "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html",
+      "description": "Clones an index"
+    },
     "stability": "stable",
-    "methods": ["PUT", "POST"],
     "url": {
-      "paths": ["/{index}/_clone/{target}"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the source index to clone"
-        },
-        "target": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the target index to clone into"
+      "paths": [
+        {
+          "path": "/{index}/_clone/{target}",
+          "methods": [
+            "PUT",
+            "POST"
+          ],
+          "parts": {
+            "index": {
+              "type": "string",
+              "required": true,
+              "description": "The name of the source index to clone"
+            },
+            "target": {
+              "type": "string",
+              "required": true,
+              "description": "The name of the target index to clone into"
+            }
+          }
         }
+      ]
+    },
+    "params": {
+      "timeout": {
+        "type" : "time",
+        "description" : "Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Set the number of active shards to wait for on the cloned index before the operation returns."
-        }
+      "master_timeout": {
+        "type" : "time",
+        "description" : "Specify timeout for connection to master"
+      },
+      "wait_for_active_shards": {
+        "type" : "string",
+        "description" : "Set the number of active shards to wait for on the cloned index before the operation returns."
       }
     },
     "body": {

+ 52 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/indices.close.json

@@ -1,46 +1,58 @@
 {
-  "indices.close": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/{index}/_close"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma separated list of indices to close"
+  "indices.close":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html",
+      "description":"Closes an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_close",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma separated list of indices to close"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of active shards to wait for before the operation returns."
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of active shards to wait for before the operation returns."
       }
-    },
-    "body": null
+    }
   }
 }

+ 38 - 30
rest-api-spec/src/main/resources/rest-api-spec/api/indices.create.json

@@ -1,38 +1,46 @@
 {
-  "indices.create": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html",
-    "stability": "stable",
-    "methods": ["PUT"],
-    "url": {
-      "paths": ["/{index}"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the index"
+  "indices.create":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html",
+      "description":"Creates an index with optional settings and mappings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}",
+          "methods":[
+            "PUT"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be expected in the body of the mappings."
       },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be expected in the body of the mappings."
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Set the number of active shards to wait for before the operation returns." 
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Set the number of active shards to wait for before the operation returns."
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
     },
-    "body": {
-      "description" : "The configuration for the index (`settings` and `mappings`)"
+    "body":{
+      "description":"The configuration for the index (`settings` and `mappings`)"
     }
   }
 }

+ 48 - 36
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete.json

@@ -1,42 +1,54 @@
 {
-  "indices.delete": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": ["/{index}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"
+  "indices.delete":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html",
+      "description":"Deletes an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "ignore_unavailable": {
-          "type": "boolean",
-          "description": "Ignore unavailable indexes (default: false)"
-        },
-        "allow_no_indices": {
-          "type": "boolean",
-          "description": "Ignore if a wildcard expression resolves to no concrete indices (default: false)"
-        },
-        "expand_wildcards": {
-          "type": "enum",
-          "options": [ "open", "closed", "none", "all" ],
-          "default": "open",
-          "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Ignore unavailable indexes (default: false)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Ignore if a wildcard expression resolves to no concrete indices (default: false)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
       }
-    },
-    "body": null
+    }
   }
 }

+ 48 - 26
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_alias.json

@@ -1,33 +1,55 @@
 {
-  "indices.delete_alias": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of index names (supports wildcards); use `_all` for all indices"
+  "indices.delete_alias":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
+      "description":"Deletes an alias."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_alias/{name}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names (supports wildcards); use `_all` for all indices"
+            },
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."
+            }
+          }
         },
-        "name": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."
+        {
+          "path":"/{index}/_aliases/{name}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names (supports wildcards); use `_all` for all indices"
+            },
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit timestamp for the document"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit timestamp for the document"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
-    },
-    "body": null
+    }
   }
 }

+ 29 - 22
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_template.json

@@ -1,28 +1,35 @@
 {
-  "indices.delete_template": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
-    "stability": "stable",
-    "methods": ["DELETE"],
-    "url": {
-      "paths": ["/_template/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the template"
+  "indices.delete_template":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
+      "description":"Deletes an index template."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_template/{name}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "name":{
+              "type":"string",
+              "description":"The name of the template"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
-    },
-    "body": null
+    }
   }
 }

+ 53 - 41
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists.json

@@ -1,47 +1,59 @@
 {
-  "indices.exists": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html",
-    "stability": "stable",
-    "methods": [ "HEAD" ],
-    "url": {
-      "paths": [ "/{index}" ],
-      "parts": {
-        "index": {
-          "type": "list",
-          "required": true,
-          "description": "A comma-separated list of index names"
+  "indices.exists":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html",
+      "description":"Returns information about whether a particular index exists."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
       },
-      "params": {
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "ignore_unavailable": {
-          "type": "boolean",
-          "description": "Ignore unavailable indexes (default: false)"
-        },
-        "allow_no_indices": {
-          "type": "boolean",
-          "description": "Ignore if a wildcard expression resolves to no concrete indices (default: false)"
-        },
-        "expand_wildcards": {
-          "type": "enum",
-          "options": [ "open", "closed", "none", "all" ],
-          "default": "open",
-          "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)"
-        },
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
-        },
-        "include_defaults": {
-          "type": "boolean",
-          "description": "Whether to return all default setting for each of the indices.",
-          "default": false
-        }
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Ignore unavailable indexes (default: false)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Ignore if a wildcard expression resolves to no concrete indices (default: false)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "include_defaults":{
+        "type":"boolean",
+        "description":"Whether to return all default setting for each of the indices.",
+        "default":false
       }
-    },
-    "body": null
+    }
   }
 }

+ 59 - 35
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_alias.json

@@ -1,42 +1,66 @@
 {
-  "indices.exists_alias": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
-    "stability": "stable",
-    "methods": ["HEAD"],
-    "url": {
-      "paths": ["/_alias/{name}", "/{index}/_alias/{name}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names to filter aliases"
+  "indices.exists_alias":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
+      "description":"Returns information about whether a particular alias exists."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_alias/{name}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of alias names to return"
+            }
+          }
         },
-        "name": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of alias names to return"
+        {
+          "path":"/{index}/_alias/{name}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to filter aliases"
+            },
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of alias names to return"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
       },
-      "params": {
-        "ignore_unavailable": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type" : "boolean",
-          "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "all",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        }
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"all",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
       }
-    },
-    "body": null
+    }
   }
 }

+ 33 - 26
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_template.json

@@ -1,32 +1,39 @@
 {
-  "indices.exists_template": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
-    "stability": "stable",
-    "methods": ["HEAD"],
-    "url": {
-      "paths": [ "/_template/{name}" ],
-      "parts": {
-        "name": {
-          "type": "list",
-          "required": true,
-          "description": "The comma separated names of the index templates"
+  "indices.exists_template":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
+      "description":"Returns information about whether a particular index template exists."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_template/{name}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"The comma separated names of the index templates"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
       },
-      "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"
-        },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
       }
-    },
-    "body": null
+    }
   }
 }

+ 47 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_type.json

@@ -1,47 +1,54 @@
 {
-  "indices.exists_type": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html",
-    "stability": "stable",
-    "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"
+  "indices.exists_type":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html",
+      "description":"Returns information about whether a particular document type exists. (DEPRECATED)"
     },
-    "url": {
-      "paths": ["/{index}/_mapping/{type}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of index names; use `_all` to check the types across all indices"
-        },
-        "type": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of document types to check"
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_mapping/{type}",
+          "methods":[
+            "HEAD"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` to check the types across all indices"
+            },
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types to check"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
       },
-      "params": {
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "local": {
-            "type": "boolean",
-            "description": "Return local information, do not retrieve the state from master node (default: false)"
-        }
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
       }
-    },
-    "body": null
+    }
   }
 }

+ 56 - 35
rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush.json

@@ -1,41 +1,62 @@
 {
-  "indices.flush": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html",
-    "stability": "stable",
-    "methods": ["POST", "GET"],
-    "url": {
-      "paths": ["/_flush", "/{index}/_flush"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string for all indices"
-        }
-      },
-      "params": {
-        "force": {
-          "type" : "boolean",
-          "description" : "Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"
-        },
-        "wait_if_ongoing": {
-          "type" : "boolean",
-          "description" : "If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+  "indices.flush":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html",
+      "description":"Performs the flush operation on one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_flush",
+          "methods":[
+            "POST",
+            "GET"
+          ]
         },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_flush",
+          "methods":[
+            "POST",
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string for all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "force":{
+        "type":"boolean",
+        "description":"Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"
+      },
+      "wait_if_ongoing":{
+        "type":"boolean",
+        "description":"If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
+    }
   }
 }

+ 47 - 34
rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush_synced.json

@@ -1,41 +1,54 @@
 {
-  "indices.flush_synced": {
-    "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api",
-    "stability": "stable",
-    "methods": ["POST", "GET"],
-    "url": {
-      "paths": [
-        "/_flush/synced",
-        "/{index}/_flush/synced"
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string for all indices"
-        }
-      },
-      "params": {
-        "ignore_unavailable": {
-          "type": "boolean",
-          "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type": "boolean",
-          "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+  "indices.flush_synced":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api",
+      "description":"Performs a synced flush operation on one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_flush/synced",
+          "methods":[
+            "POST",
+            "GET"
+          ]
         },
-        "expand_wildcards": {
-          "type": "enum",
-          "options": [
-            "open",
-            "closed",
-            "none",
-            "all"
+        {
+          "path":"/{index}/_flush/synced",
+          "methods":[
+            "POST",
+            "GET"
           ],
-          "default": "open",
-          "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string for all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
+    }
   }
 }

+ 58 - 39
rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json

@@ -1,45 +1,64 @@
 {
-  "indices.forcemerge": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_forcemerge", "/{index}/_forcemerge"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "flush": {
-          "type" : "boolean",
-          "description" : "Specify whether the index should be flushed after performing the operation (default: true)"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "max_num_segments": {
-          "type" : "number",
-          "description" : "The number of segments the index should be merged into (default: dynamic)"
+  "indices.forcemerge":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html",
+      "description":"Performs the force merge operation on one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_forcemerge",
+          "methods":[
+            "POST"
+          ]
         },
-        "only_expunge_deletes": {
-          "type" : "boolean",
-          "description" : "Specify whether the operation should only expunge deleted documents"
+        {
+          "path":"/{index}/_forcemerge",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "flush":{
+        "type":"boolean",
+        "description":"Specify whether the index should be flushed after performing the operation (default: true)"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "max_num_segments":{
+        "type":"number",
+        "description":"The number of segments the index should be merged into (default: dynamic)"
+      },
+      "only_expunge_deletes":{
+        "type":"boolean",
+        "description":"Specify whether the operation should only expunge deleted documents"
+      }
+    }
   }
 }

+ 59 - 47
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json

@@ -1,55 +1,67 @@
 {
   "indices.get":{
-    "documentation":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html",
-    "stability": "stable",
-    "methods":[ "GET" ],
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html",
+      "description":"Returns information about one or more indices."
+    },
+    "stability":"stable",
     "url":{
-      "paths":[ "/{index}" ],
-      "parts":{
-        "index":{
-          "type":"list",
-          "required" : true,
-          "description":"A comma-separated list of index names"
+      "paths":[
+        {
+          "path":"/{index}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether to add the type name to the response (default: false)"
       },
-      "params":{
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether to add the type name to the response (default: false)"
-        },
-        "local":{
-          "type":"boolean",
-          "description":"Return local information, do not retrieve the state from master node (default: false)"
-        },
-        "ignore_unavailable":{
-          "type":"boolean",
-          "description":"Ignore unavailable indexes (default: false)"
-        },
-        "allow_no_indices":{
-          "type":"boolean",
-          "description":"Ignore if a wildcard expression resolves to no concrete indices (default: false)"
-        },
-        "expand_wildcards":{
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "open",
-          "description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
-        },
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
-        },
-        "include_defaults": {
-          "type": "boolean",
-          "description": "Whether to return all default setting for each of the indices.",
-          "default": false
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Ignore unavailable indexes (default: false)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Ignore if a wildcard expression resolves to no concrete indices (default: false)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether wildcard expressions should get expanded to open or closed indices (default: open)"
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "include_defaults":{
+        "type":"boolean",
+        "description":"Whether to return all default setting for each of the indices.",
+        "default":false
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
-    },
-    "body": null
+    }
   }
 }

+ 76 - 33
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_alias.json

@@ -1,41 +1,84 @@
 {
-  "indices.get_alias": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [ "/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names to filter aliases"
-        },
-        "name": {
-          "type" : "list",
-          "description" : "A comma-separated list of alias names to return"
-        }
-      },
-      "params": {
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+  "indices.get_alias":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
+      "description":"Returns an alias."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_alias",
+          "methods":[
+            "GET"
+          ]
         },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+        {
+          "path":"/_alias/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of alias names to return"
+            }
+          }
         },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "all",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_alias/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to filter aliases"
+            },
+            "name":{
+              "type":"list",
+              "description":"A comma-separated list of alias names to return"
+            }
+          }
         },
-        "local": {
-            "type": "boolean",
-            "description": "Return local information, do not retrieve the state from master node (default: false)"
+        {
+          "path":"/{index}/_alias",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to filter aliases"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"all",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      }
+    }
   }
 }

+ 109 - 55
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_field_mapping.json

@@ -1,66 +1,120 @@
 {
-  "indices.get_field_mapping": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"],
-      "deprecated_paths" : [
+  "indices.get_field_mapping":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html",
+      "description":"Returns mapping for one or more fields."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/_mapping/{type}/field/{fields}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/_mapping/field/{fields}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "fields":{
+              "type":"list",
+              "description":"A comma-separated list of fields"
+            }
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/_mapping/{type}/field/{fields}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names"
+          "path":"/{index}/_mapping/field/{fields}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            },
+            "fields":{
+              "type":"list",
+              "description":"A comma-separated list of fields"
+            }
+          }
         },
-        "type": {
-          "type" : "list",
-          "description" : "A comma-separated list of document types"
+        {
+          "path":"/_mapping/{type}/field/{fields}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types",
+              "deprecated":true
+            },
+            "fields":{
+              "type":"list",
+              "description":"A comma-separated list of fields"
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
-        "fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields",
-          "required" : true
+        {
+          "path":"/{index}/_mapping/{type}/field/{fields}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            },
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types",
+              "deprecated":true
+            },
+            "fields":{
+              "type":"list",
+              "description":"A comma-separated list of fields"
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be returned in the body of the mappings."
       },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be returned in the body of the mappings."
-        },
-        "include_defaults": {
-          "type" : "boolean",
-          "description" : "Whether the default mapping values should be returned as well"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
-        }
+      "include_defaults":{
+        "type":"boolean",
+        "description":"Whether the default mapping values should be returned as well"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
       }
-    },
-    "body": null
+    }
   }
 }

+ 92 - 51
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_mapping.json

@@ -1,61 +1,102 @@
 {
-  "indices.get_mapping": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_mapping", "/{index}/_mapping"],
-      "deprecated_paths" : [
+  "indices.get_mapping":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html",
+      "description":"Returns mappings for one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/_mapping/{type}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/_mapping",
+          "methods":[
+            "GET"
+          ]
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/_mapping/{type}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names"
-        },
-        "type": {
-          "type" : "list",
-          "description" : "A comma-separated list of document types"
-        }
-      },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether to add the type name to the response (default: false)"
+          "path":"/{index}/_mapping",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            }
+          }
         },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
+        {
+          "path":"/_mapping/{type}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
+        {
+          "path":"/{index}/_mapping/{type}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names"
+            },
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether to add the type name to the response (default: false)"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      }
+    }
   }
 }

+ 92 - 46
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_settings.json

@@ -1,54 +1,100 @@
 {
-  "indices.get_settings": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        },
-        "name": {
-          "type" : "list",
-          "description" : "The name of the settings that should be included"
-        }
-      },
-      "params": {
-        "master_timeout": {
-          "type": "time",
-          "description": "Specify timeout for connection to master"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : ["open","closed"],
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+  "indices.get_settings":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html",
+      "description":"Returns settings for one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_settings",
+          "methods":[
+            "GET"
+          ]
         },
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
+        {
+          "path":"/{index}/_settings",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
+        {
+          "path":"/{index}/_settings/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            },
+            "name":{
+              "type":"list",
+              "description":"The name of the settings that should be included"
+            }
+          }
         },
-        "include_defaults": {
-          "type": "boolean",
-          "description": "Whether to return all default setting for each of the indices.",
-          "default": false
+        {
+          "path":"/_settings/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"The name of the settings that should be included"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":[
+          "open",
+          "closed"
+        ],
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      },
+      "include_defaults":{
+        "type":"boolean",
+        "description":"Whether to return all default setting for each of the indices.",
+        "default":false
+      }
+    }
   }
 }

+ 43 - 33
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_template.json

@@ -1,39 +1,49 @@
 {
-  "indices.get_template": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [
-        "/_template",
-        "/_template/{name}"
-      ],
-      "parts": {
-        "name": {
-          "type": "list",
-          "required": false,
-          "description": "The comma separated names of the index templates"
-        }
-      },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be returned in the body of the mappings."
-        },
-        "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"
+  "indices.get_template":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
+      "description":"Returns an index template."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_template",
+          "methods":[
+            "GET"
+          ]
         },
-        "local": {
-          "type": "boolean",
-          "description": "Return local information, do not retrieve the state from master node (default: false)"
+        {
+          "path":"/_template/{name}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "name":{
+              "type":"list",
+              "description":"The comma separated names of the index templates"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be returned in the body of the mappings."
+      },
+      "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"
+      },
+      "local":{
+        "type":"boolean",
+        "description":"Return local information, do not retrieve the state from master node (default: false)"
+      }
+    }
   }
 }

+ 46 - 27
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_upgrade.json

@@ -1,33 +1,52 @@
 {
-  "indices.get_upgrade": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_upgrade", "/{index}/_upgrade"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+  "indices.get_upgrade":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html",
+      "description":"The _upgrade API is no longer useful and will be removed."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_upgrade",
+          "methods":[
+            "GET"
+          ]
         },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_upgrade",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
+    }
   }
 }

+ 52 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/indices.open.json

@@ -1,46 +1,58 @@
 {
-  "indices.open": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/{index}/_open"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma separated list of indices to open"
+  "indices.open":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html",
+      "description":"Opens an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_open",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma separated list of indices to open"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "ignore_unavailable": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type" : "boolean",
-          "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-           "type" : "enum",
-           "options" : ["open","closed","none","all"],
-           "default" : "closed",
-           "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Sets the number of active shards to wait for before the operation returns."
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"closed",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Sets the number of active shards to wait for before the operation returns."
       }
-    },
-    "body": null
+    }
   }
 }

+ 52 - 27
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_alias.json

@@ -1,36 +1,61 @@
 {
-  "indices.put_alias": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
-    "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "required" : true,
-          "description" : "A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."
+  "indices.put_alias":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
+      "description":"Creates or updates an alias."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_alias/{name}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."
+            },
+            "name":{
+              "type":"string",
+              "description":"The name of the alias to be created or updated"
+            }
+          }
         },
-        "name": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the alias to be created or updated"
+        {
+          "path":"/{index}/_aliases/{name}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."
+            },
+            "name":{
+              "type":"string",
+              "description":"The name of the alias to be created or updated"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit timestamp for the document"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit timestamp for the document"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
     },
-    "body": {
-      "description" : "The settings for the alias, such as `routing` or `filter`",
-      "required"    : false
+    "body":{
+      "description":"The settings for the alias, such as `routing` or `filter`",
+      "required":false
     }
   }
 }

+ 182 - 67
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json

@@ -1,89 +1,204 @@
 {
-  "indices.put_mapping": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html",
-    "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["{index}/_mapping"],
-      "deprecated_paths" : [
+  "indices.put_mapping":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html",
+      "description":"Updates the index mappings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/_mapping",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"{index}/_mapping",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            }
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/_mapping/{type}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/{type}/_mapping",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            },
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/_mappings",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/_mapping/{type}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            },
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/_mappings/{type}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/{type}/_mappings",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            },
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/_mappings/{type}",
-          "description" : "Specifying types in urls has been deprecated"
+          "path":"/{index}/_mappings/{type}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            },
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "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"
+          "path":"/_mappings/{type}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/_mapping/{type}",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+          "path":"{index}/_mappings",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"The plural mappings is accepted but only /_mapping is documented"
+          }
         },
-        "type": {
-          "type" : "string",
-          "description" : "The name of the document type"
+        {
+          "path":"/_mapping/{type}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "type":{
+              "type":"string",
+              "description":"The name of the document type",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be expected in the body of the mappings."
       },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be expected in the body of the mappings."
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "ignore_unavailable": {
-          "type" : "boolean",
-          "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type" : "boolean",
-          "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "open",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        }
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
       }
     },
-    "body": {
-      "description" : "The mapping definition",
-      "required" : true
+    "body":{
+      "description":"The mapping definition",
+      "required":true
     }
   }
 }

+ 64 - 44
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_settings.json

@@ -1,52 +1,72 @@
 {
-  "indices.put_settings": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html",
-    "stability": "stable",
-    "methods": ["PUT"],
-    "url": {
-      "paths": ["/_settings", "/{index}/_settings"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "master_timeout": {
-          "type": "time",
-          "description": "Specify timeout for connection to master"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "preserve_existing": {
-          "type": "boolean",
-          "description": "Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"
-        },
-        "ignore_unavailable": {
-          "type": "boolean",
-          "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-          "type": "boolean",
-          "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-          "type": "enum",
-          "options": ["open", "closed","none","all"],
-          "default": "open",
-          "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+  "indices.put_settings":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html",
+      "description":"Updates the index settings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_settings",
+          "methods":[
+            "PUT"
+          ]
         },
-        "flat_settings": {
-            "type": "boolean",
-            "description": "Return settings in flat format (default: false)"
+        {
+          "path":"/{index}/_settings",
+          "methods":[
+            "PUT"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "preserve_existing":{
+        "type":"boolean",
+        "description":"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
       }
     },
-    "body": {
-      "description": "The index settings to be updated",
-      "required": true
+    "body":{
+      "description":"The index settings to be updated",
+      "required":true
     }
   }
 }

+ 49 - 40
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_template.json

@@ -1,48 +1,57 @@
 {
-  "indices.put_template": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
-    "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["/_template/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the template"
+  "indices.put_template":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html",
+      "description":"Creates or updates an index template."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_template/{name}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "name":{
+              "type":"string",
+              "description":"The name of the template"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be returned in the body of the mappings."
       },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be returned in the body of the mappings."
-        },
-        "order": {
-          "type" : "number",
-          "description" : "The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"
-        },
-        "create" : {
-            "type" : "boolean",
-            "description" : "Whether the index template should only be added if new or can also replace an existing one",
-            "default" : false
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "flat_settings": {
-           "type": "boolean",
-           "description": "Return settings in flat format (default: false)"
-        }
+      "order":{
+        "type":"number",
+        "description":"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"
+      },
+      "create":{
+        "type":"boolean",
+        "description":"Whether the index template should only be added if new or can also replace an existing one",
+        "default":false
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
       }
     },
-    "body": {
-      "description" : "The template definition",
-      "required" : true
+    "body":{
+      "description":"The template definition",
+      "required":true
     }
   }
 }

+ 40 - 26
rest-api-spec/src/main/resources/rest-api-spec/api/indices.recovery.json

@@ -1,29 +1,43 @@
 {
-    "indices.recovery" : {
-        "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html",
-        "stability": "stable",
-        "methods": ["GET"],
-        "url": {
-            "paths": ["/_recovery", "/{index}/_recovery"],
-            "parts": {
-                "index": {
-                    "type" : "list",
-                    "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-                }
-            },
-            "params": {
-                "detailed" : {
-                    "type": "boolean",
-                    "description": "Whether to display detailed information about shard recovery",
-                    "default": false
-                },
-                "active_only" : {
-                    "type": "boolean",
-                    "description": "Display only those recoveries that are currently on-going",
-                    "default": false
-                }
-            }
+  "indices.recovery":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html",
+      "description":"Returns information about ongoing index shard recoveries."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_recovery",
+          "methods":[
+            "GET"
+          ]
         },
-        "body": null
+        {
+          "path":"/{index}/_recovery",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
+        }
+      ]
+    },
+    "params":{
+      "detailed":{
+        "type":"boolean",
+        "description":"Whether to display detailed information about shard recovery",
+        "default":false
+      },
+      "active_only":{
+        "type":"boolean",
+        "description":"Display only those recoveries that are currently on-going",
+        "default":false
+      }
     }
-}
+  }
+}

+ 48 - 27
rest-api-spec/src/main/resources/rest-api-spec/api/indices.refresh.json

@@ -1,33 +1,54 @@
 {
-  "indices.refresh": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html",
-    "stability": "stable",
-    "methods": ["POST", "GET"],
-    "url": {
-      "paths": ["/_refresh", "/{index}/_refresh"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+  "indices.refresh":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html",
+      "description":"Performs the refresh operation in one or more indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_refresh",
+          "methods":[
+            "POST",
+            "GET"
+          ]
         },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_refresh",
+          "methods":[
+            "POST",
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
+    }
   }
 }

+ 57 - 38
rest-api-spec/src/main/resources/rest-api-spec/api/indices.rollover.json

@@ -1,47 +1,66 @@
 {
-  "indices.rollover": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"],
-      "parts": {
-        "alias": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the alias to rollover"
+  "indices.rollover":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html",
+      "description":"Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{alias}/_rollover",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "alias":{
+              "type":"string",
+              "description":"The name of the alias to rollover"
+            }
+          }
         },
-        "new_index": {
-          "type" : "string",
-          "required" : false,
-          "description" : "The name of the rollover index"
+        {
+          "path":"/{alias}/_rollover/{new_index}",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "alias":{
+              "type":"string",
+              "description":"The name of the alias to rollover"
+            },
+            "new_index":{
+              "type":"string",
+              "description":"The name of the rollover index"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "include_type_name":{
+        "type":"boolean",
+        "description":"Whether a type should be included in the body of the mappings."
       },
-      "params": {
-        "include_type_name": {
-          "type" : "boolean",
-          "description" : "Whether a type should be included in the body of the mappings."
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "dry_run": {
-          "type" : "boolean",
-          "description" : "If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Set the number of active shards to wait for on the newly created rollover index before the operation returns."
-        }
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "dry_run":{
+        "type":"boolean",
+        "description":"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Set the number of active shards to wait for on the newly created rollover index before the operation returns."
       }
     },
-    "body": {
-      "description" : "The conditions that needs to be met for executing rollover"
+    "body":{
+      "description":"The conditions that needs to be met for executing rollover"
     }
   }
 }

+ 51 - 32
rest-api-spec/src/main/resources/rest-api-spec/api/indices.segments.json

@@ -1,38 +1,57 @@
 {
-  "indices.segments": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_segments", "/{index}/_segments"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+  "indices.segments":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html",
+      "description":"Provides low-level information about segments in a Lucene index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_segments",
+          "methods":[
+            "GET"
+          ]
         },
-        "verbose": {
-          "type": "boolean",
-          "description": "Includes detailed memory usage by Lucene.",
-          "default": false
+        {
+          "path":"/{index}/_segments",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "verbose":{
+        "type":"boolean",
+        "description":"Includes detailed memory usage by Lucene.",
+        "default":false
+      }
+    }
   }
 }

+ 56 - 32
rest-api-spec/src/main/resources/rest-api-spec/api/indices.shard_stores.json

@@ -1,38 +1,62 @@
 {
-  "indices.shard_stores": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_shard_stores", "/{index}/_shard_stores"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "status" : {
-            "type" : "list",
-            "options" : ["green", "yellow", "red", "all"],
-            "description" : "A comma-separated list of statuses used to filter on shards to get store information for"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+  "indices.shard_stores":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html",
+      "description":"Provides store information for shard copies of indices."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_shard_stores",
+          "methods":[
+            "GET"
+          ]
         },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_shard_stores",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "status":{
+        "type":"list",
+        "options":[
+          "green",
+          "yellow",
+          "red",
+          "all"
+        ],
+        "description":"A comma-separated list of statuses used to filter on shards to get store information for"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      }
+    }
   }
 }

+ 39 - 31
rest-api-spec/src/main/resources/rest-api-spec/api/indices.shrink.json

@@ -1,39 +1,47 @@
 {
-  "indices.shrink": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html",
-    "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["/{index}/_shrink/{target}"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the source index to shrink"
-        },
-        "target": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the target index to shrink into"
+  "indices.shrink":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html",
+      "description":"Allow to shrink an existing index into a new index with fewer primary shards."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_shrink/{target}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the source index to shrink"
+            },
+            "target":{
+              "type":"string",
+              "description":"The name of the target index to shrink into"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Set the number of active shards to wait for on the shrunken index before the operation returns."
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Set the number of active shards to wait for on the shrunken index before the operation returns."
       }
     },
-    "body": {
-      "description" : "The configuration for the target index (`settings` and `aliases`)"
+    "body":{
+      "description":"The configuration for the target index (`settings` and `aliases`)"
     }
   }
 }

+ 39 - 31
rest-api-spec/src/main/resources/rest-api-spec/api/indices.split.json

@@ -1,39 +1,47 @@
 {
-  "indices.split": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html",
-    "stability": "stable",
-    "methods": ["PUT", "POST"],
-    "url": {
-      "paths": ["/{index}/_split/{target}"],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the source index to split"
-        },
-        "target": {
-          "type" : "string",
-          "required" : true,
-          "description" : "The name of the target index to split into"
+  "indices.split":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html",
+      "description":"Allows you to split an existing index into a new index with more primary shards."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/{index}/_split/{target}",
+          "methods":[
+            "PUT",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the source index to split"
+            },
+            "target":{
+              "type":"string",
+              "description":"The name of the target index to split into"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
-        },
-        "wait_for_active_shards": {
-          "type" : "string",
-          "description" : "Set the number of active shards to wait for on the shrunken index before the operation returns."
-        }
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
+      },
+      "wait_for_active_shards":{
+        "type":"string",
+        "description":"Set the number of active shards to wait for on the shrunken index before the operation returns."
       }
     },
-    "body": {
-      "description" : "The configuration for the target index (`settings` and `aliases`)"
+    "body":{
+      "description":"The configuration for the target index (`settings` and `aliases`)"
     }
   }
 }

+ 145 - 68
rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json

@@ -1,76 +1,153 @@
 {
-  "indices.stats": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [
-        "/_stats",
-        "/_stats/{metric}",
-        "/{index}/_stats",
-        "/{index}/_stats/{metric}"
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        },
-        "metric" : {
-          "type" : "list",
-          "options" : ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"],
-          "description" : "Limit the information returned the specific metrics."
-        }
-      },
-      "params": {
-        "completion_fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"
-        },
-        "fielddata_fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` index metric (supports wildcards)"
-        },
-        "fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"
-        },
-        "groups": {
-          "type" : "list",
-          "description" : "A comma-separated list of search groups for `search` index metric"
-        },
-        "level": {
-          "type" : "enum",
-          "description": "Return stats aggregated at cluster, index or shard level",
-          "options" : ["cluster", "indices", "shards"],
-          "default" : "indices"
-        },
-        "types" : {
-          "type" : "list",
-          "description" : "A comma-separated list of document types for the `indexing` index metric"
-        },
-        "include_segment_file_sizes": {
-          "type": "boolean",
-          "description": "Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
-          "default": false
+  "indices.stats":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html",
+      "description":"Provides statistics on operations happening in an index."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_stats",
+          "methods":[
+            "GET"
+          ]
         },
-        "include_unloaded_segments": {
-          "type": "boolean",
-          "description": "If set to true segment stats will include stats for segments that are not currently loaded into memory",
-          "default": false
+        {
+          "path":"/_stats/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "completion",
+                "docs",
+                "fielddata",
+                "query_cache",
+                "flush",
+                "get",
+                "indexing",
+                "merge",
+                "request_cache",
+                "refresh",
+                "search",
+                "segments",
+                "store",
+                "warmer",
+                "suggest"
+              ],
+              "description":"Limit the information returned the specific metrics."
+            }
+          }
         },
-        "expand_wildcards": {
-          "type" : "enum",
-          "options" : ["open","closed","none","all"],
-          "default" : "open",
-          "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
+        {
+          "path":"/{index}/_stats",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         },
-        "forbid_closed_indices": {
-          "type": "boolean",
-          "description": "If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices",
-          "default": true
+        {
+          "path":"/{index}/_stats/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            },
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "completion",
+                "docs",
+                "fielddata",
+                "query_cache",
+                "flush",
+                "get",
+                "indexing",
+                "merge",
+                "request_cache",
+                "refresh",
+                "search",
+                "segments",
+                "store",
+                "warmer",
+                "suggest"
+              ],
+              "description":"Limit the information returned the specific metrics."
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "completion_fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"
+      },
+      "fielddata_fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"
+      },
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"
+      },
+      "groups":{
+        "type":"list",
+        "description":"A comma-separated list of search groups for `search` index metric"
+      },
+      "level":{
+        "type":"enum",
+        "description":"Return stats aggregated at cluster, index or shard level",
+        "options":[
+          "cluster",
+          "indices",
+          "shards"
+        ],
+        "default":"indices"
+      },
+      "types":{
+        "type":"list",
+        "description":"A comma-separated list of document types for the `indexing` index metric"
+      },
+      "include_segment_file_sizes":{
+        "type":"boolean",
+        "description":"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
+        "default":false
+      },
+      "include_unloaded_segments":{
+        "type":"boolean",
+        "description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
+        "default":false
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "forbid_closed_indices":{
+        "type":"boolean",
+        "description":"If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices",
+        "default":true
+      }
+    }
   }
 }

+ 26 - 19
rest-api-spec/src/main/resources/rest-api-spec/api/indices.update_aliases.json

@@ -1,26 +1,33 @@
 {
-  "indices.update_aliases": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_aliases"],
-      "parts": {
-      },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Request timeout"
-        },
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Specify timeout for connection to master"
+  "indices.update_aliases":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html",
+      "description":"Updates index aliases."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_aliases",
+          "methods":[
+            "POST"
+          ]
         }
+      ]
+    },
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Request timeout"
+      },
+      "master_timeout":{
+        "type":"time",
+        "description":"Specify timeout for connection to master"
       }
     },
-    "body": {
-      "description" : "The definition of `actions` to perform",
-      "required" : true
+    "body":{
+      "description":"The definition of `actions` to perform",
+      "required":true
     }
   }
 }

+ 54 - 35
rest-api-spec/src/main/resources/rest-api-spec/api/indices.upgrade.json

@@ -1,41 +1,60 @@
 {
-  "indices.upgrade": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_upgrade", "/{index}/_upgrade"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
-        }
-      },
-      "params": {
-        "allow_no_indices": {
-          "type" : "boolean",
-          "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "wait_for_completion": {
-           "type" : "boolean",
-           "description" : "Specify whether the request should block until the all segments are upgraded (default: false)"
+  "indices.upgrade":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html",
+      "description":"The _upgrade API is no longer useful and will be removed."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_upgrade",
+          "methods":[
+            "POST"
+          ]
         },
-        "only_ancient_segments": {
-          "type" : "boolean",
-          "description" : "If true, only ancient (an older Lucene major release) segments will be upgraded"
+        {
+          "path":"/{index}/_upgrade",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "wait_for_completion":{
+        "type":"boolean",
+        "description":"Specify whether the request should block until the all segments are upgraded (default: false)"
+      },
+      "only_ancient_segments":{
+        "type":"boolean",
+        "description":"If true, only ancient (an older Lucene major release) segments will be upgraded"
+      }
+    }
   }
 }

+ 110 - 74
rest-api-spec/src/main/resources/rest-api-spec/api/indices.validate_query.json

@@ -1,84 +1,120 @@
 {
-  "indices.validate_query": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_validate/query", "/{index}/_validate/query"],
-      "deprecated_paths" : [
+  "indices.validate_query":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html",
+      "description":"Allows a user to validate a potentially expensive query without executing it."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/_validate/query",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"
-        },
-        "type": {
-          "type" : "list",
-          "description" : "A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types"
-        }
-      },
-      "params": {
-        "explain": {
-          "type" : "boolean",
-          "description" : "Return detailed information about the error"
-        },
-        "ignore_unavailable": {
-            "type" : "boolean",
-            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
-        },
-        "allow_no_indices": {
-            "type" : "boolean",
-            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
-        },
-        "expand_wildcards": {
-            "type" : "enum",
-            "options" : ["open","closed","none","all"],
-            "default" : "open",
-            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
-        },
-        "q": {
-          "type" : "string",
-          "description" : "Query in the Lucene query string syntax"
-        },
-        "analyzer": {
-          "type" : "string",
-          "description" : "The analyzer to use for the query string"
-        },
-        "analyze_wildcard": {
-          "type" : "boolean",
-          "description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
-        },
-        "default_operator": {
-          "type" : "enum",
-          "options" : ["AND","OR"],
-          "default" : "OR",
-          "description" : "The default operator for query string query (AND or OR)"
-        },
-        "df": {
-          "type" : "string",
-          "description" : "The field to use as default where no field prefix is given in the query string"
-        },
-        "lenient": {
-          "type" : "boolean",
-          "description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
+          "path":"/_validate/query",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "rewrite": {
-          "type": "boolean",
-          "description": "Provide a more detailed explanation showing the actual Lucene query that will be executed."
+        {
+          "path":"/{index}/_validate/query",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"
+            }
+          }
         },
-        "all_shards": {
-          "type": "boolean",
-          "description": "Execute validation on all shards instead of one random shard per index"
+        {
+          "path":"/{index}/{type}/_validate/query",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"
+            },
+            "type":{
+              "type":"list",
+              "description":"A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "explain":{
+        "type":"boolean",
+        "description":"Return detailed information about the error"
+      },
+      "ignore_unavailable":{
+        "type":"boolean",
+        "description":"Whether specified concrete indices should be ignored when unavailable (missing or closed)"
+      },
+      "allow_no_indices":{
+        "type":"boolean",
+        "description":"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
+      },
+      "expand_wildcards":{
+        "type":"enum",
+        "options":[
+          "open",
+          "closed",
+          "none",
+          "all"
+        ],
+        "default":"open",
+        "description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
+      },
+      "q":{
+        "type":"string",
+        "description":"Query in the Lucene query string syntax"
+      },
+      "analyzer":{
+        "type":"string",
+        "description":"The analyzer to use for the query string"
+      },
+      "analyze_wildcard":{
+        "type":"boolean",
+        "description":"Specify whether wildcard and prefix queries should be analyzed (default: false)"
+      },
+      "default_operator":{
+        "type":"enum",
+        "options":[
+          "AND",
+          "OR"
+        ],
+        "default":"OR",
+        "description":"The default operator for query string query (AND or OR)"
+      },
+      "df":{
+        "type":"string",
+        "description":"The field to use as default where no field prefix is given in the query string"
+      },
+      "lenient":{
+        "type":"boolean",
+        "description":"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
+      },
+      "rewrite":{
+        "type":"boolean",
+        "description":"Provide a more detailed explanation showing the actual Lucene query that will be executed."
+      },
+      "all_shards":{
+        "type":"boolean",
+        "description":"Execute validation on all shards instead of one random shard per index"
       }
     },
-    "body": {
-      "description" : "The query definition specified with the Query DSL"
+    "body":{
+      "description":"The query definition specified with the Query DSL"
     }
   }
 }

+ 16 - 11
rest-api-spec/src/main/resources/rest-api-spec/api/info.json

@@ -1,15 +1,20 @@
 {
-  "info": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/"],
-      "parts": {
-      },
-      "params": {
-      }
+  "info":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/",
+      "description":"Returns basic information about the cluster."
     },
-    "body": null
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/",
+          "methods":[
+            "GET"
+          ]
+        }
+      ]
+    },
+    "params":{}
   }
 }

+ 29 - 22
rest-api-spec/src/main/resources/rest-api-spec/api/ingest.delete_pipeline.json

@@ -1,28 +1,35 @@
 {
-  "ingest.delete_pipeline": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html",
-    "stability": "stable",
-    "methods": [ "DELETE" ],
-    "url": {
-      "paths": [ "/_ingest/pipeline/{id}" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Pipeline ID",
-          "required" : true
+  "ingest.delete_pipeline":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html",
+      "description":"Deletes a pipeline."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_ingest/pipeline/{id}",
+          "methods":[
+            "DELETE"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Pipeline ID"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
       },
-      "params": {
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        }
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       }
-    },
-    "body": null
+    }
   }
 }

+ 32 - 18
rest-api-spec/src/main/resources/rest-api-spec/api/ingest.get_pipeline.json

@@ -1,23 +1,37 @@
 {
-  "ingest.get_pipeline": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html",
-    "stability": "stable",
-    "methods": [ "GET" ],
-    "url": {
-      "paths": [ "/_ingest/pipeline", "/_ingest/pipeline/{id}" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Comma separated list of pipeline ids. Wildcards supported"
-        }
-      },
-      "params": {
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
+  "ingest.get_pipeline":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html",
+      "description":"Returns a pipeline."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_ingest/pipeline",
+          "methods":[
+            "GET"
+          ]
+        },
+        {
+          "path":"/_ingest/pipeline/{id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Comma separated list of pipeline ids. Wildcards supported"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
+      }
+    }
   }
 }

+ 16 - 11
rest-api-spec/src/main/resources/rest-api-spec/api/ingest.processor_grok.json

@@ -1,15 +1,20 @@
 {
-  "ingest.processor_grok": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get",
-    "stability": "stable",
-    "methods": [ "GET" ],
-    "url": {
-      "paths": ["/_ingest/processor/grok"],
-      "parts": {
-      },
-      "params": {
-      }
+  "ingest.processor_grok":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get",
+      "description":"Returns a list of the built-in patterns."
     },
-    "body": null
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_ingest/processor/grok",
+          "methods":[
+            "GET"
+          ]
+        }
+      ]
+    },
+    "params":{}
   }
 }

+ 32 - 24
rest-api-spec/src/main/resources/rest-api-spec/api/ingest.put_pipeline.json

@@ -1,31 +1,39 @@
 {
-  "ingest.put_pipeline": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html",
-    "stability": "stable",
-    "methods": [ "PUT" ],
-    "url": {
-      "paths": [ "/_ingest/pipeline/{id}" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Pipeline ID",
-          "required" : true
+  "ingest.put_pipeline":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html",
+      "description":"Creates or updates a pipeline."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_ingest/pipeline/{id}",
+          "methods":[
+            "PUT"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Pipeline ID"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "master_timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout for connection to master node"
       },
-      "params": {
-        "master_timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout for connection to master node"
-        },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
-        }
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
       }
     },
-    "body": {
-      "description" : "The ingest definition",
-      "required" : true
-    }    
+    "body":{
+      "description":"The ingest definition",
+      "required":true
+    }
   }
 }

+ 38 - 22
rest-api-spec/src/main/resources/rest-api-spec/api/ingest.simulate.json

@@ -1,28 +1,44 @@
 {
-  "ingest.simulate": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html",
-    "stability": "stable",
-    "methods": [ "GET", "POST" ],
-    "url": {
-      "paths": [ "/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate" ],
-      "parts": {
-        "id": {
-          "type" : "string",
-          "description" : "Pipeline ID",
-          "required" : false
-        }
-      },
-      "params": {
-        "verbose": {
-          "type" : "boolean",
-          "description" : "Verbose mode. Display data output for each processor in executed pipeline",
-          "default" : false
+  "ingest.simulate":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html",
+      "description":"Allows to simulate a pipeline with example documents."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_ingest/pipeline/_simulate",
+          "methods":[
+            "GET",
+            "POST"
+          ]
+        },
+        {
+          "path":"/_ingest/pipeline/{id}/_simulate",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "id":{
+              "type":"string",
+              "description":"Pipeline ID"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "verbose":{
+        "type":"boolean",
+        "description":"Verbose mode. Display data output for each processor in executed pipeline",
+        "default":false
       }
     },
-    "body": {
-      "description" : "The simulate definition",
-      "required" : true
-    }    
+    "body":{
+      "description":"The simulate definition",
+      "required":true
+    }
   }
 }

+ 83 - 55
rest-api-spec/src/main/resources/rest-api-spec/api/mget.json

@@ -1,65 +1,93 @@
 {
-  "mget": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_mget", "/{index}/_mget"],
-      "deprecated_paths" : [
+  "mget":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html",
+      "description":"Allows to get multiple documents in one request."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/{index}/{type}/_mget",
-          "description" : "Specifying types in urls has been deprecated"
-        }
-      ],
-      "parts": {
-        "index": {
-          "type" : "string",
-          "description" : "The name of the index"
-        },
-        "type": {
-          "type" : "string",
-          "description" : "The type of the document"
-        }
-      },
-      "params": {
-        "stored_fields": {
-          "type": "list",
-          "description" : "A comma-separated list of stored fields to return in the response"
-        },
-        "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"
+          "path":"/_mget",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "_source_excludes": {
-          "type" : "list",
-          "description" : "A list of fields to exclude from the returned _source field"
+        {
+          "path":"/{index}/_mget",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            }
+          }
         },
-        "_source_includes": {
-          "type" : "list",
-          "description" : "A list of fields to extract and return from the _source field"
+        {
+          "path":"/{index}/{type}/_mget",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The name of the index"
+            },
+            "type":{
+              "type":"string",
+              "description":"The type of the document",
+              "deprecated":true
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"Specifying types in urls has been deprecated"
+          }
         }
+      ]
+    },
+    "params":{
+      "stored_fields":{
+        "type":"list",
+        "description":"A comma-separated list of stored fields to return in the response"
+      },
+      "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_excludes":{
+        "type":"list",
+        "description":"A list of fields to exclude from the returned _source field"
+      },
+      "_source_includes":{
+        "type":"list",
+        "description":"A list of fields to extract and return from the _source field"
       }
     },
-    "body": {
-      "description" : "Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.",
-      "required" : true
+    "body":{
+      "description":"Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.",
+      "required":true
     }
   }
 }

+ 70 - 48
rest-api-spec/src/main/resources/rest-api-spec/api/msearch.json

@@ -1,56 +1,78 @@
 {
-  "msearch": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_msearch", "/{index}/_msearch"],
-      "parts": {
-        "index": {
-         "type" : "list",
-         "description" : "A comma-separated list of index names to use as default"
-        }
-      },
-      "params": {
-        "search_type": {
-          "type" : "enum",
-          "options" : ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"],
-          "description" : "Search operation type"
-        },
-        "max_concurrent_searches" : {
-          "type" : "number",
-          "description" : "Controls the maximum number of concurrent searches the multi search api will execute"
-        },
-        "typed_keys": {
-          "type" : "boolean",
-          "description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
-        },
-        "pre_filter_shard_size" : {
-          "type" : "number",
-          "description" : "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.",
-          "default" : 128
-        },
-        "max_concurrent_shard_requests" : {
-          "type" : "number",
-          "description" : "The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests",
-          "default" : 5
-        },
-        "rest_total_hits_as_int" : {
-          "type" : "boolean",
-          "description" : "Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
-          "default" : false
+  "msearch":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html",
+      "description":"Allows to execute several search operations in one request."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_msearch",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "ccs_minimize_roundtrips": {
-          "type" : "boolean",
-          "description" : "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution",
-          "default" : "true"
+        {
+          "path":"/{index}/_msearch",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to use as default"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "search_type":{
+        "type":"enum",
+        "options":[
+          "query_then_fetch",
+          "query_and_fetch",
+          "dfs_query_then_fetch",
+          "dfs_query_and_fetch"
+        ],
+        "description":"Search operation type"
+      },
+      "max_concurrent_searches":{
+        "type":"number",
+        "description":"Controls the maximum number of concurrent searches the multi search api will execute"
+      },
+      "typed_keys":{
+        "type":"boolean",
+        "description":"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
+      },
+      "pre_filter_shard_size":{
+        "type":"number",
+        "description":"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.",
+        "default":128
+      },
+      "max_concurrent_shard_requests":{
+        "type":"number",
+        "description":"The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests",
+        "default":5
+      },
+      "rest_total_hits_as_int":{
+        "type":"boolean",
+        "description":"Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
+        "default":false
+      },
+      "ccs_minimize_roundtrips":{
+        "type":"boolean",
+        "description":"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution",
+        "default":"true"
       }
     },
-    "body": {
-      "description": "The request definitions (metadata-search request definition pairs), separated by newlines",
-      "required" : true,
-      "serialize" : "bulk"
+    "body":{
+      "description":"The request definitions (metadata-search request definition pairs), separated by newlines",
+      "required":true,
+      "serialize":"bulk"
     }
   }
 }

+ 60 - 38
rest-api-spec/src/main/resources/rest-api-spec/api/msearch_template.json

@@ -1,46 +1,68 @@
 {
-  "msearch_template": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html",
-    "stability": "stable",
-    "methods": ["GET", "POST"],
-    "url": {
-      "paths": ["/_msearch/template", "/{index}/_msearch/template"],
-      "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names to use as default"
-        }
-      },
-      "params": {
-        "search_type": {
-          "type" : "enum",
-          "options" : ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"],
-          "description" : "Search operation type"
-        },
-        "typed_keys": {
-          "type" : "boolean",
-          "description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
-        },
-        "max_concurrent_searches" : {
-          "type" : "number",
-          "description" : "Controls the maximum number of concurrent searches the multi search api will execute"
-        },
-        "rest_total_hits_as_int" : {
-          "type" : "boolean",
-          "description" : "Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
-          "default" : false
+  "msearch_template":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html",
+      "description":"Allows to execute several search template operations in one request."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_msearch/template",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "ccs_minimize_roundtrips": {
-          "type" : "boolean",
-          "description" : "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution",
-          "default" : "true"
+        {
+          "path":"/{index}/_msearch/template",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"list",
+              "description":"A comma-separated list of index names to use as default"
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "search_type":{
+        "type":"enum",
+        "options":[
+          "query_then_fetch",
+          "query_and_fetch",
+          "dfs_query_then_fetch",
+          "dfs_query_and_fetch"
+        ],
+        "description":"Search operation type"
+      },
+      "typed_keys":{
+        "type":"boolean",
+        "description":"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
+      },
+      "max_concurrent_searches":{
+        "type":"number",
+        "description":"Controls the maximum number of concurrent searches the multi search api will execute"
+      },
+      "rest_total_hits_as_int":{
+        "type":"boolean",
+        "description":"Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
+        "default":false
+      },
+      "ccs_minimize_roundtrips":{
+        "type":"boolean",
+        "description":"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution",
+        "default":"true"
       }
     },
-    "body": {
-      "description": "The request definitions (metadata-search request definition pairs), separated by newlines",
-      "required" : true,
-      "serialize" : "bulk"
+    "body":{
+      "description":"The request definitions (metadata-search request definition pairs), separated by newlines",
+      "required":true,
+      "serialize":"bulk"
     }
   }
 }

+ 100 - 79
rest-api-spec/src/main/resources/rest-api-spec/api/mtermvectors.json

@@ -1,87 +1,108 @@
 {
-  "mtermvectors" : {
-    "documentation" : "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html",
-    "stability": "stable",
-    "methods" : ["GET", "POST"],
-    "url" : {
-      "paths" : ["/_mtermvectors", "/{index}/_mtermvectors"],
-      "parts" : {
-        "index" : {
-         "type" : "string",
-         "description" : "The index in which the document resides."
-        }
-      },
-      "params" : {
-        "ids" : {
-          "type" : "list",
-          "description" : "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body",
-          "required" : false
-        },
-        "term_statistics" : {
-          "type" : "boolean",
-          "description" : "Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "default" : false,
-          "required" : false
-        },
-        "field_statistics" : {
-           "type" : "boolean",
-           "description" : "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-           "default" : true,
-           "required" : false
-        },
-        "fields" : {
-          "type" : "list",
-          "description" : "A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "required" : false
-        },
-        "offsets" : {
-          "type" : "boolean",
-          "description" : "Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "default" : true,
-          "required" : false
-        },
-        "positions" : {
-          "type" : "boolean",
-          "description" : "Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "default" : true,
-          "required" : false
-        },
-        "payloads" : {
-          "type" : "boolean",
-          "description" : "Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "default" : true,
-          "required" : false
-        },
-        "preference" : {
-          "type" : "string",
-          "description" : "Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "required" : false
-        },
-        "routing" : {
-          "type" : "string",
-          "description" : "Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
-          "required" : false
-        },
-        "realtime": {
-          "type": "boolean",
-          "description": "Specifies if requests are real-time as opposed to near-real-time (default: true).",
-          "required": false
-        },
-        "version" : {
-          "type" : "number",
-          "description" : "Explicit version number for concurrency control"
+  "mtermvectors":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html",
+      "description":"Returns multiple termvectors in one request."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_mtermvectors",
+          "methods":[
+            "GET",
+            "POST"
+          ]
         },
-        "version_type": {
-          "type" : "enum",
-          "options" : ["internal", "external", "external_gte", "force"],
-          "description" : "Specific version type"
+        {
+          "path":"/{index}/_mtermvectors",
+          "methods":[
+            "GET",
+            "POST"
+          ],
+          "parts":{
+            "index":{
+              "type":"string",
+              "description":"The index in which the document resides."
+            }
+          }
         }
+      ]
+    },
+    "params":{
+      "ids":{
+        "type":"list",
+        "description":"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body",
+        "required":false
+      },
+      "term_statistics":{
+        "type":"boolean",
+        "description":"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "default":false,
+        "required":false
+      },
+      "field_statistics":{
+        "type":"boolean",
+        "description":"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "default":true,
+        "required":false
+      },
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "required":false
+      },
+      "offsets":{
+        "type":"boolean",
+        "description":"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "default":true,
+        "required":false
+      },
+      "positions":{
+        "type":"boolean",
+        "description":"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "default":true,
+        "required":false
+      },
+      "payloads":{
+        "type":"boolean",
+        "description":"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "default":true,
+        "required":false
+      },
+      "preference":{
+        "type":"string",
+        "description":"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "required":false
+      },
+      "routing":{
+        "type":"string",
+        "description":"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
+        "required":false
+      },
+      "realtime":{
+        "type":"boolean",
+        "description":"Specifies if requests are real-time as opposed to near-real-time (default: true).",
+        "required":false
+      },
+      "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" : {
-        "description" : "Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.",
-        "required" : false
-
+    "body":{
+      "description":"Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.",
+      "required":false
     }
   }
 }

+ 125 - 58
rest-api-spec/src/main/resources/rest-api-spec/api/nodes.hot_threads.json

@@ -1,76 +1,143 @@
 {
-  "nodes.hot_threads": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_nodes/hot_threads",  "/_nodes/{node_id}/hot_threads"],
-      "deprecated_paths" : [
+  "nodes.hot_threads":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html",
+      "description":"Returns information about hot threads on each node in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
         {
-          "version" : "7.0.0",
-          "path" : "/_cluster/nodes/hotthreads",
-          "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
+          "path":"/_nodes/hot_threads",
+          "methods":[
+            "GET"
+          ]
         },
         {
-          "version" : "7.0.0",
-          "path" : "/_cluster/nodes/{node_id}/hotthreads",
-          "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
+          "path":"/_nodes/{node_id}/hot_threads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" : "/_nodes/hotthreads",
-          "description" : "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
+          "path":"/_cluster/nodes/hotthreads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{},
+          "deprecated":{
+            "version":"7.0.0",
+            "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"
+          "path":"/_cluster/nodes/{node_id}/hotthreads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "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"
+          "path":"/_nodes/hotthreads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{},
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
+          }
         },
         {
-          "version" : "7.0.0",
-          "path" :"/_cluster/nodes/{node_id}/hot_threads",
-          "description" : "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
-        }
-      ],
-      "parts": {
-        "node_id": {
-          "type" : "list",
-          "description" : "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
-        }
-      },
-      "params": {
-        "interval": {
-          "type" : "time",
-          "description" : "The interval for the second sampling of threads"
+          "path":"/_nodes/{node_id}/hotthreads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
+          }
         },
-        "snapshots": {
-          "type" : "number",
-          "description" : "Number of samples of thread stacktrace (default: 10)"
-        },
-        "threads": {
-          "type" : "number",
-          "description" : "Specify the number of threads to provide information for (default: 3)"
-        },
-        "ignore_idle_threads": {
-          "type" : "boolean",
-          "description" : "Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"
-        },
-        "type": {
-          "type" : "enum",
-          "options" : ["cpu", "wait", "block"],
-          "description" : "The type to sample (default: cpu)"
+        {
+          "path":"/_cluster/nodes/hot_threads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{},
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
+          }
         },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+        {
+          "path":"/_cluster/nodes/{node_id}/hot_threads",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          },
+          "deprecated":{
+            "version":"7.0.0",
+            "description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "interval":{
+        "type":"time",
+        "description":"The interval for the second sampling of threads"
+      },
+      "snapshots":{
+        "type":"number",
+        "description":"Number of samples of thread stacktrace (default: 10)"
+      },
+      "threads":{
+        "type":"number",
+        "description":"Specify the number of threads to provide information for (default: 3)"
+      },
+      "ignore_idle_threads":{
+        "type":"boolean",
+        "description":"Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"
+      },
+      "type":{
+        "type":"enum",
+        "options":[
+          "cpu",
+          "wait",
+          "block"
+        ],
+        "description":"The type to sample (default: cpu)"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      }
+    }
   }
 }

+ 84 - 25
rest-api-spec/src/main/resources/rest-api-spec/api/nodes.info.json

@@ -1,32 +1,91 @@
 {
-  "nodes.info": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"],
-      "parts": {
-        "node_id": {
-          "type": "list",
-          "description": "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+  "nodes.info":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html",
+      "description":"Returns information about nodes in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_nodes",
+          "methods":[
+            "GET"
+          ]
         },
-        "metric": {
-          "type": "list",
-          "options": ["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"],
-          "description": "A comma-separated list of metrics you wish returned. Leave empty to return all."
-        }
-      },
-      "params": {
-        "flat_settings": {
-          "type": "boolean",
-          "description": "Return settings in flat format (default: false)"
+        {
+          "path":"/_nodes/{node_id}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
+        },
+        {
+          "path":"/_nodes/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "settings",
+                "os",
+                "process",
+                "jvm",
+                "thread_pool",
+                "transport",
+                "http",
+                "plugins",
+                "ingest"
+              ],
+              "description":"A comma-separated list of metrics you wish returned. Leave empty to return all."
+            }
+          }
         },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+        {
+          "path":"/_nodes/{node_id}/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            },
+            "metric":{
+              "type":"list",
+              "options":[
+                "settings",
+                "os",
+                "process",
+                "jvm",
+                "thread_pool",
+                "transport",
+                "http",
+                "plugins",
+                "ingest"
+              ],
+              "description":"A comma-separated list of metrics you wish returned. Leave empty to return all."
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "flat_settings":{
+        "type":"boolean",
+        "description":"Return settings in flat format (default: false)"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      }
+    }
   }
 }

+ 32 - 18
rest-api-spec/src/main/resources/rest-api-spec/api/nodes.reload_secure_settings.json

@@ -1,23 +1,37 @@
 {
-  "nodes.reload_secure_settings": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings",
-    "stability": "stable",
-    "methods": ["POST"],
-    "url": {
-      "paths": ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"],
-      "parts": {
-        "node_id": {
-          "type": "list",
-          "description": "A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."
-        }
-      },
-      "params": {
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+  "nodes.reload_secure_settings":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings",
+      "description":"Reloads secure settings."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_nodes/reload_secure_settings",
+          "methods":[
+            "POST"
+          ]
+        },
+        {
+          "path":"/_nodes/{node_id}/reload_secure_settings",
+          "methods":[
+            "POST"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      }
+    }
   }
 }

+ 214 - 61
rest-api-spec/src/main/resources/rest-api-spec/api/nodes.stats.json

@@ -1,71 +1,224 @@
 {
-  "nodes.stats": {
-    "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html",
-    "stability": "stable",
-    "methods": ["GET"],
-    "url": {
-      "paths": [
-        "/_nodes/stats",
-        "/_nodes/{node_id}/stats",
-        "/_nodes/stats/{metric}",
-        "/_nodes/{node_id}/stats/{metric}",
-        "/_nodes/stats/{metric}/{index_metric}",
-        "/_nodes/{node_id}/stats/{metric}/{index_metric}"
-      ],
-      "parts": {
-        "metric" : {
-          "type" : "list",
-          "options" : ["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery"],
-          "description" : "Limit the information returned to the specified metrics"
-        },
-        "index_metric" : {
-          "type" : "list",
-          "options" : ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"],
-          "description" : "Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."
-        },
-        "node_id": {
-          "type" : "list",
-          "description" : "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
-        }
-      },
-      "params": {
-        "completion_fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"
-        },
-        "fielddata_fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` index metric (supports wildcards)"
-        },
-        "fields": {
-          "type" : "list",
-          "description" : "A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"
+  "nodes.stats":{
+    "documentation":{
+      "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html",
+      "description":"Returns statistical information about nodes in the cluster."
+    },
+    "stability":"stable",
+    "url":{
+      "paths":[
+        {
+          "path":"/_nodes/stats",
+          "methods":[
+            "GET"
+          ]
         },
-        "groups": {
-          "type" : "boolean",
-          "description" : "A comma-separated list of search groups for `search` index metric"
+        {
+          "path":"/_nodes/{node_id}/stats",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
         },
-        "level": {
-          "type" : "enum",
-          "description": "Return indices stats aggregated at index, node or shard level",
-          "options" : ["indices", "node", "shards"],
-          "default" : "node"
+        {
+          "path":"/_nodes/stats/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "breaker",
+                "fs",
+                "http",
+                "indices",
+                "jvm",
+                "os",
+                "process",
+                "thread_pool",
+                "transport",
+                "discovery"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            }
+          }
         },
-        "types" : {
-          "type" : "list",
-          "description" : "A comma-separated list of document types for the `indexing` index metric"
+        {
+          "path":"/_nodes/{node_id}/stats/{metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "breaker",
+                "fs",
+                "http",
+                "indices",
+                "jvm",
+                "os",
+                "process",
+                "thread_pool",
+                "transport",
+                "discovery"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            },
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
         },
-        "timeout": {
-          "type" : "time",
-          "description" : "Explicit operation timeout"
+        {
+          "path":"/_nodes/stats/{metric}/{index_metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "breaker",
+                "fs",
+                "http",
+                "indices",
+                "jvm",
+                "os",
+                "process",
+                "thread_pool",
+                "transport",
+                "discovery"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            },
+            "index_metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "completion",
+                "docs",
+                "fielddata",
+                "query_cache",
+                "flush",
+                "get",
+                "indexing",
+                "merge",
+                "request_cache",
+                "refresh",
+                "search",
+                "segments",
+                "store",
+                "warmer",
+                "suggest"
+              ],
+              "description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."
+            }
+          }
         },
-        "include_segment_file_sizes": {
-          "type": "boolean",
-          "description": "Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
-          "default": false
+        {
+          "path":"/_nodes/{node_id}/stats/{metric}/{index_metric}",
+          "methods":[
+            "GET"
+          ],
+          "parts":{
+            "metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "breaker",
+                "fs",
+                "http",
+                "indices",
+                "jvm",
+                "os",
+                "process",
+                "thread_pool",
+                "transport",
+                "discovery"
+              ],
+              "description":"Limit the information returned to the specified metrics"
+            },
+            "index_metric":{
+              "type":"list",
+              "options":[
+                "_all",
+                "completion",
+                "docs",
+                "fielddata",
+                "query_cache",
+                "flush",
+                "get",
+                "indexing",
+                "merge",
+                "request_cache",
+                "refresh",
+                "search",
+                "segments",
+                "store",
+                "warmer",
+                "suggest"
+              ],
+              "description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."
+            },
+            "node_id":{
+              "type":"list",
+              "description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+            }
+          }
         }
-      }
+      ]
     },
-    "body": null
+    "params":{
+      "completion_fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"
+      },
+      "fielddata_fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"
+      },
+      "fields":{
+        "type":"list",
+        "description":"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"
+      },
+      "groups":{
+        "type":"boolean",
+        "description":"A comma-separated list of search groups for `search` index metric"
+      },
+      "level":{
+        "type":"enum",
+        "description":"Return indices stats aggregated at index, node or shard level",
+        "options":[
+          "indices",
+          "node",
+          "shards"
+        ],
+        "default":"node"
+      },
+      "types":{
+        "type":"list",
+        "description":"A comma-separated list of document types for the `indexing` index metric"
+      },
+      "timeout":{
+        "type":"time",
+        "description":"Explicit operation timeout"
+      },
+      "include_segment_file_sizes":{
+        "type":"boolean",
+        "description":"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
+        "default":false
+      }
+    }
   }
 }

Some files were not shown because too many files changed in this diff