Browse Source

adjusted enrich rest specs to new format

Martijn van Groningen 6 năm trước cách đây
mục cha
commit
ac0e5c9b17

+ 12 - 12
x-pack/plugin/src/test/resources/rest-api-spec/api/enrich.delete_policy.json

@@ -2,19 +2,19 @@
   "enrich.delete_policy": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html",
     "stability" : "stable",
-    "methods": [ "DELETE" ],
     "url": {
-      "path": "/_enrich/policy/{name}",
-      "paths": ["/_enrich/policy/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "description" : "The name of the enrich policy"
+      "paths": [
+        {
+          "path": "/_enrich/policy/{name}",
+          "methods": [ "DELETE" ],
+          "parts": {
+            "name": {
+              "type" : "string",
+              "description" : "The name of the enrich policy"
+            }
+          }
         }
-      },
-      "params": {
-      }
-    },
-    "body": null
+      ]
+    }
   }
 }

+ 12 - 12
x-pack/plugin/src/test/resources/rest-api-spec/api/enrich.execute_policy.json

@@ -2,19 +2,19 @@
   "enrich.execute_policy": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-execute-policy.html",
     "stability" : "stable",
-    "methods": [ "PUT" ],
     "url": {
-      "path": "/_enrich/policy/{name}/_execute",
-      "paths": ["/_enrich/policy/{name}/_execute"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "description" : "The name of the enrich policy"
+      "paths": [
+        {
+          "path": "/_enrich/policy/{name}/_execute",
+          "methods": [ "PUT" ],
+          "parts": {
+            "name": {
+              "type" : "string",
+              "description" : "The name of the enrich policy"
+            }
+          }
         }
-      },
-      "params": {
-      }
-    },
-    "body": null
+      ]
+    }
   }
 }

+ 12 - 12
x-pack/plugin/src/test/resources/rest-api-spec/api/enrich.get_policy.json

@@ -2,19 +2,19 @@
   "enrich.get_policy": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html",
     "stability" : "stable",
-    "methods": [ "GET" ],
     "url": {
-      "path": "/_enrich/policy/{name}",
-      "paths": ["/_enrich/policy/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "description" : "The name of the enrich policy"
+      "paths": [
+        {
+          "path": "/_enrich/policy/{name}",
+          "methods": [ "GET" ],
+          "parts": {
+            "name": {
+              "type" : "string",
+              "description" : "The name of the enrich policy"
+            }
+          }
         }
-      },
-      "params": {
-      }
-    },
-    "body": null
+      ]
+    }
   }
 }

+ 7 - 7
x-pack/plugin/src/test/resources/rest-api-spec/api/enrich.list_policy.json

@@ -2,13 +2,13 @@
   "enrich.list_policy": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-list-policy.html",
     "stability" : "stable",
-    "methods": [ "GET" ],
     "url": {
-      "path": "/_enrich/policy",
-      "paths": ["/_enrich/policy"],
-      "parts": {},
-      "params": {}
-    },
-    "body": null
+      "paths": [
+        {
+          "path": "/_enrich/policy",
+          "methods": [ "GET" ]
+        }
+      ]
+    }
   }
 }

+ 13 - 11
x-pack/plugin/src/test/resources/rest-api-spec/api/enrich.put_policy.json

@@ -2,21 +2,23 @@
   "enrich.put_policy": {
     "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-put-policy.html",
     "stability" : "stable",
-    "methods": [ "PUT" ],
     "url": {
-      "path": "/_enrich/policy/{name}",
-      "paths": ["/_enrich/policy/{name}"],
-      "parts": {
-        "name": {
-          "type" : "string",
-          "description" : "The name of the enrich policy"
+      "paths": [
+        {
+          "path": "/_enrich/policy/{name}",
+          "methods": [ "PUT" ],
+          "parts": {
+            "name": {
+              "type" : "string",
+              "description" : "The name of the enrich policy"
+            }
+          }
         }
-      },
-      "params": {
-      }
+      ]
     },
     "body": {
-      "description": "The enrich policy to register"
+      "description": "The enrich policy to register",
+      "required": true
     }
   }
 }