From 920677af6fa27ae4aac7f4dfaefb3a5a50bb257a Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Tue, 26 May 2020 12:33:57 -0500 Subject: [PATCH] 7.x only REST specification fixes (#56736) Fixes for the REST specification specific to 7.x * remove ignore "cat.thread_pool.json" and add the "" as valid option. #55984 deprecated this field since it these params here have no effect on this specific API * remove ignore "indices.put_mapping.json" by adding the required / in the path to pass validation. --- rest-api-spec/build.gradle | 5 ----- .../main/resources/rest-api-spec/api/cat.thread_pool.json | 2 +- .../resources/rest-api-spec/api/indices.put_mapping.json | 2 +- rest-api-spec/src/main/resources/schema.json | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rest-api-spec/build.gradle b/rest-api-spec/build.gradle index 3f9224b981a9d..2144dc1765af9 100644 --- a/rest-api-spec/build.gradle +++ b/rest-api-spec/build.gradle @@ -10,8 +10,3 @@ artifacts { restSpecs(new File(projectDir, "src/main/resources/rest-api-spec/api")) restTests(new File(projectDir, "src/main/resources/rest-api-spec/test")) } - -validateRestSpec { - ignore "cat.thread_pool.json" - ignore "indices.put_mapping.json" -} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json index 372d6e732d2b0..710c297dbbe75 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json @@ -44,7 +44,7 @@ "p" ], "deprecated":{ - "version":"7.8.0", + "version":"7.7.0", "description":"Setting this value has no effect and will be removed from the specification." } }, diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json index deb7bb728f733..b93e423fcee4d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json @@ -127,7 +127,7 @@ } }, { - "path":"{index}/_mappings", + "path":"/{index}/_mappings", "methods":[ "PUT", "POST" diff --git a/rest-api-spec/src/main/resources/schema.json b/rest-api-spec/src/main/resources/schema.json index 6ae10164ee7b8..ae6759e704424 100644 --- a/rest-api-spec/src/main/resources/schema.json +++ b/rest-api-spec/src/main/resources/schema.json @@ -201,7 +201,7 @@ "type": "array", "items": { "type": "string", - "pattern": "^[a-zA-Z_]+$" + "pattern": "^\\d*|[a-zA-Z_]+$" }, "title": "Valid options when type is an enum" },