From 0c7310936be529ad99496d32a08de975da126379 Mon Sep 17 00:00:00 2001 From: Yogesh Gaikwad <902768+bizybot@users.noreply.github.com> Date: Wed, 27 Feb 2019 12:40:15 +1100 Subject: [PATCH] Fixed required fields and paths list (#39358) (#39428) Some small fix for the `x-pack` rest api spec. * In both `security.enable_user.json` and `security.disable_user.json` the `username` parameter was `false` instead of `true` (the documentation is already correct). * In `security.get_privileges.json` there were missing all the possible paths since the path parameters are not required. This fix aligns the document with the rest of the spec, where all the possible combinations are listed. --- .../test/resources/rest-api-spec/api/security.disable_user.json | 2 +- .../test/resources/rest-api-spec/api/security.enable_user.json | 2 +- .../resources/rest-api-spec/api/security.get_privileges.json | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.disable_user.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.disable_user.json index cfc04b52ad3..3aa50467fb5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.disable_user.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.disable_user.json @@ -11,7 +11,7 @@ "username": { "type" : "string", "description" : "The username of the user to disable", - "required" : false + "required" : true } }, "params": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.enable_user.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.enable_user.json index aa50ddce9ac..950a2b54939 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.enable_user.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.enable_user.json @@ -11,7 +11,7 @@ "username": { "type" : "string", "description" : "The username of the user to enable", - "required" : false + "required" : true } }, "params": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.get_privileges.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.get_privileges.json index 95a39bd313a..2cf10a872d5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/security.get_privileges.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/security.get_privileges.json @@ -5,6 +5,8 @@ "url": { "path": "/_security/privilege/{application}/{name}", "paths": [ + "/_security/privilege", + "/_security/privilege/{application}", "/_security/privilege/{application}/{name}" ], "parts": {