Prechádzať zdrojové kódy

[SPEC] Various API fixes
Including:
* change some string params to list
* make some params or bodies required
* removed incorrect URLs
* removed incorrect params
* Fixed name of pending_tasks

Clinton Gormley 11 rokov pred
rodič
commit
67ec840d00

+ 2 - 1
rest-api-spec/api/bulk.json

@@ -50,7 +50,8 @@
       }
     },
     "body": {
-      "description" : "The operation definition and data (action-data pairs), separated by newlines"
+      "description" : "The operation definition and data (action-data pairs), separated by newlines",
+      "required" : true
     }
   }
 }

+ 1 - 0
rest-api-spec/api/clear_scroll.json

@@ -8,6 +8,7 @@
       "parts": {
         "scroll_id": {
           "type" : "list",
+          "required" : "true",
           "description" : "A comma-separated list of scroll IDs to clear"
         }
       },

+ 1 - 1
rest-api-spec/api/cluster.pending_tasks.json

@@ -1,5 +1,5 @@
 {
-  "cluster.tasks": {
+  "cluster.pending_tasks": {
     "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-pending.html",
     "methods": ["GET"],
     "url": {

+ 1 - 1
rest-api-spec/api/cluster.stats.json

@@ -4,7 +4,7 @@
     "methods": ["GET"],
     "url": {
       "path": "/_cluster/stats",
-      "paths": ["/_cluster/stats", "/_cluster/stats/nodes/{nodeId}"],
+      "paths": ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"],
       "parts": {
         "node_id": {
           "type" : "list",

+ 2 - 1
rest-api-spec/api/indices.delete_warmer.json

@@ -4,7 +4,7 @@
     "methods": ["DELETE"],
     "url": {
       "path": "/{index}/_warmer/{name}",
-      "paths": ["/{index}/_warmer", "/{index}/_warmer/{name}", "/{index}/_warmers", "/{index}/_warmers/{name}"],
+      "paths": ["/{index}/_warmer/{name}", "/{index}/_warmers/{name}"],
       "parts": {
         "index": {
           "type" : "list",
@@ -13,6 +13,7 @@
         },
         "name" : {
           "type" : "list",
+          "required" : true,
           "description" : "A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters."
         }
       },

+ 1 - 5
rest-api-spec/api/indices.get_settings.json

@@ -11,7 +11,7 @@
           "description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
         },
         "name": {
-          "type" : "string",
+          "type" : "list",
           "description" : "The name of the settings that should be included"
         }
       },
@@ -30,10 +30,6 @@
             "default" : ["open","closed"],
             "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
         },
-        "prefix" : {
-           "type" : "string",
-           "description" : "The prefix all settings must have in order to be included"
-        },
         "flat_settings": {
           "type": "boolean",
           "description": "Return settings in flat format (default: false)"

+ 1 - 2
rest-api-spec/api/indices.get_warmer.json

@@ -8,11 +8,10 @@
       "parts": {
         "index": {
           "type" : "list",
-          "required" : true,
           "description" : "A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices"
         },
         "name": {
-          "type" : "string",
+          "type" : "list",
           "description" : "The name of the warmer (supports wildcards); leave empty to get all warmers"
         },
         "type": {

+ 0 - 4
rest-api-spec/api/indices.update_aliases.json

@@ -6,10 +6,6 @@
       "path": "/_aliases",
       "paths": ["/_aliases"],
       "parts": {
-        "index": {
-          "type" : "list",
-          "description" : "A comma-separated list of index names to filter aliases"
-        }
       },
       "params": {
         "timeout": {

+ 2 - 0
rest-api-spec/api/snapshot.create.json

@@ -8,10 +8,12 @@
       "parts": {
         "repository": {
           "type": "string",
+          "required" : true,
           "description": "A repository name"
         },
         "snapshot": {
           "type": "string",
+          "required" : true,
           "description": "A snapshot name"
         }
       },

+ 1 - 0
rest-api-spec/api/snapshot.create_repository.json

@@ -8,6 +8,7 @@
       "parts": {
         "repository": {
           "type": "string",
+          "required" : true,
           "description": "A repository name"
         }
       },

+ 2 - 0
rest-api-spec/api/snapshot.delete.json

@@ -8,10 +8,12 @@
       "parts": {
         "repository": {
           "type": "string",
+          "required" : true,
           "description": "A repository name"
         },
         "snapshot": {
           "type": "string",
+          "required" : true,
           "description": "A snapshot name"
         }
       },

+ 1 - 0
rest-api-spec/api/snapshot.delete_repository.json

@@ -8,6 +8,7 @@
       "parts": {
         "repository": {
           "type": "list",
+          "required" : true,
           "description": "A comma-separated list of repository names"
         }
       },

+ 2 - 0
rest-api-spec/api/snapshot.get.json

@@ -8,10 +8,12 @@
       "parts": {
         "repository": {
           "type": "list",
+          "required" : true,
           "description": "A comma-separated list of repository names"
         },
         "snapshot": {
           "type": "list",
+          "required" : true,
           "description": "A comma-separated list of snapshot names"
         }
       },

+ 2 - 0
rest-api-spec/api/snapshot.restore.json

@@ -8,10 +8,12 @@
       "parts": {
         "repository": {
           "type": "string",
+          "required" : true,
           "description": "A repository name"
         },
         "snapshot": {
           "type": "string",
+          "required" : true,
           "description": "A snapshot name"
         }
       },

+ 2 - 1
rest-api-spec/api/suggest.json

@@ -41,7 +41,8 @@
       }
     },
     "body": {
-      "description" : "The request definition"
+      "description" : "The request definition",
+      "required" : true
     }
   }
 }