Skip to content

Commit bb013c6

Browse files
olcbeanrjernst
authored andcommitted
Fix inconsistencies in the rest api specs for *_script (#26971)
1 parent 2310c8e commit bb013c6

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

core/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestPutStoredScriptAction.java

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public RestPutStoredScriptAction(Settings settings, RestController controller) {
4141

4242
controller.registerHandler(POST, "/_scripts/{id}", this);
4343
controller.registerHandler(PUT, "/_scripts/{id}", this);
44+
controller.registerHandler(POST, "/_scripts/{id}/{context}", this);
4445
controller.registerHandler(PUT, "/_scripts/{id}/{context}", this);
4546
}
4647

rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json

-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"type" : "string",
1111
"description" : "Script ID",
1212
"required" : true
13-
},
14-
"lang" : {
15-
"type" : "string",
16-
"description" : "Script language",
17-
"required" : true
1813
}
1914
},
2015
"params" : {

rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json

-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"type" : "string",
1111
"description" : "Script ID",
1212
"required" : true
13-
},
14-
"lang" : {
15-
"type" : "string",
16-
"description" : "Script language",
17-
"required" : true
1813
}
1914
},
2015
"params" : {

rest-api-spec/src/main/resources/rest-api-spec/api/put_script.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
"description" : "Script ID",
1212
"required" : true
1313
},
14-
"lang" : {
14+
"context" : {
1515
"type" : "string",
16-
"description" : "Script language",
17-
"required" : true
16+
"description" : "Script context"
1817
}
1918
},
2019
"params" : {

0 commit comments

Comments
 (0)