This is an automated email from the ASF dual-hosted git repository.

abhioncbr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 960a1c3d01 [Doc] User API: Add hint for options available for 
'components' field (#14593)
960a1c3d01 is described below

commit 960a1c3d01292a4185d1e8f8c802d74453bec1e9
Author: Nihal Jain <[email protected]>
AuthorDate: Mon Dec 9 19:23:36 2024 +0530

    [Doc] User API: Add hint for options available for 'components' field 
(#14593)
    
    - Also fixed typo in method name
---
 .../api/resources/PinotAccessControlUserRestletResource.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotAccessControlUserRestletResource.java
 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotAccessControlUserRestletResource.java
index 559604daad..61da0ea860 100644
--- 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotAccessControlUserRestletResource.java
+++ 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotAccessControlUserRestletResource.java
@@ -21,6 +21,7 @@ package org.apache.pinot.controller.api.resources;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiKeyAuthDefinition;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.Authorization;
 import io.swagger.annotations.SecurityDefinition;
 import io.swagger.annotations.SwaggerDefinition;
@@ -98,7 +99,7 @@ public class PinotAccessControlUserRestletResource {
     @Path("/users")
     @Authorize(targetType = TargetType.CLUSTER, action = 
Actions.Cluster.GET_USER)
     @ApiOperation(value = "List all uses in cluster", notes = "List all users 
in cluster")
-    public String listUers() {
+    public String listUsers() {
         try {
             ZkHelixPropertyStore<ZNRecord> propertyStore = 
_pinotHelixResourceManager.getPropertyStore();
             Map<String, UserConfig> allUserInfo = 
ZKMetadataProvider.getAllUserInfo(propertyStore);
@@ -113,7 +114,8 @@ public class PinotAccessControlUserRestletResource {
     @Path("/users/{username}")
     @Authorize(targetType = TargetType.CLUSTER, action = 
Actions.Cluster.GET_USER)
     @ApiOperation(value = "Get an user in cluster", notes = "Get an user in 
cluster")
-    public String getUser(@PathParam("username") String username, 
@QueryParam("component") String componentTypeStr) {
+    public String getUser(@PathParam("username") String username,
+        @ApiParam(value = "CONTROLLER|SERVER|BROKER") @QueryParam("component") 
String componentTypeStr) {
         try {
             ZkHelixPropertyStore<ZNRecord> propertyStore = 
_pinotHelixResourceManager.getPropertyStore();
             ComponentType componentType = 
Constants.validateComponentType(componentTypeStr);
@@ -165,7 +167,7 @@ public class PinotAccessControlUserRestletResource {
     @Produces(MediaType.APPLICATION_JSON)
     @ApiOperation(value = "Delete a user", notes = "Delete a user")
     public SuccessResponse deleteUser(@PathParam("username") String username,
-        @QueryParam("component") String componentTypeStr) {
+        @ApiParam(value = "CONTROLLER|SERVER|BROKER") @QueryParam("component") 
String componentTypeStr) {
 
         List<String> usersDeleted = new LinkedList<>();
         String usernameWithComponentType = username + "_" + componentTypeStr;
@@ -199,7 +201,7 @@ public class PinotAccessControlUserRestletResource {
     @ApiOperation(value = "Update user config for a user", notes = "Update 
user config for user")
     public SuccessResponse updateUserConfig(
         @PathParam("username") String username,
-        @QueryParam("component") String componentTypeStr,
+        @ApiParam(value = "CONTROLLER|SERVER|BROKER") @QueryParam("component") 
String componentTypeStr,
         @QueryParam("passwordChanged") boolean passwordChanged,
         String userConfigString) {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to