Ver Fonte

Fix inconsistencies in the rest api specs for *_script (#26971)

olcbean há 8 anos atrás
pai
commit
bb013c60b5

+ 1 - 0
core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java

@@ -41,6 +41,7 @@ public class RestPutStoredScriptAction extends BaseRestHandler {
 
         controller.registerHandler(POST, "/_scripts/{id}", this);
         controller.registerHandler(PUT, "/_scripts/{id}", this);
+        controller.registerHandler(POST, "/_scripts/{id}/{context}", this);
         controller.registerHandler(PUT, "/_scripts/{id}/{context}", this);
     }
 

+ 0 - 5
rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json

@@ -10,11 +10,6 @@
           "type" : "string",
           "description" : "Script ID",
           "required" : true
-        },
-        "lang" : {
-          "type" : "string",
-          "description" : "Script language",
-          "required" : true
         }
       },
       "params" : {

+ 0 - 5
rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json

@@ -10,11 +10,6 @@
           "type" : "string",
           "description" : "Script ID",
           "required" : true
-        },
-        "lang" : {
-          "type" : "string",
-          "description" : "Script language",
-          "required" : true
         }
       },
       "params" : {

+ 2 - 3
rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json

@@ -11,10 +11,9 @@
           "description" : "Script ID",
           "required" : true
         },
-        "lang" : {
+        "context" : {
           "type" : "string",
-          "description" : "Script language",
-          "required" : true
+          "description" : "Script context"
         }
       },
       "params" : {