ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [1/4] ambari git commit: AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)
Date Mon, 03 Apr 2017 05:12:10 GMT
Repository: ambari
Updated Branches:
  refs/heads/ambari-rest-api-explorer e250b9012 -> 3cb45e849


http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
index ad9c485..47515c9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
@@ -58,7 +58,7 @@ public class UserService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all users", notes = "Returns details of all users.", response
= UserResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all users", nickname = "UserService#getUsers", notes = "Returns
details of all users.", response = UserResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users/*",
dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue =
"Users/user_name.desc", dataType = "string", paramType = "query"),
@@ -85,7 +85,7 @@ public class UserService extends BaseService {
   @GET
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single user", notes = "Returns user details.", response = UserResponse.class)
+  @ApiOperation(value = "Get single user", nickname = "UserService#getUser", notes = "Returns
user details.", response = UserResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users",
dataType = "string", paramType = "query")
   })
@@ -123,7 +123,7 @@ public class UserService extends BaseService {
   @POST
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Create new user", notes = "Creates user resource.")
+  @ApiOperation(value = "Create new user", nickname = "UserService#createUser", notes = "Creates
user resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required =
true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
   })
@@ -148,7 +148,7 @@ public class UserService extends BaseService {
   @PUT
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Update user detail", notes = "Updates user resource.")
+  @ApiOperation(value = "Update user detail", nickname = "UserService#updateUser", notes
= "Updates user resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required =
true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
   })
@@ -169,7 +169,7 @@ public class UserService extends BaseService {
   @DELETE
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete single user", notes = "Delete user resource.")
+  @ApiOperation(value = "Delete single user", nickname = "UserService#deleteUser", notes
= "Delete user resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
index 388f454..a85dc20 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
@@ -70,13 +70,13 @@ public class ViewDataMigrationService extends BaseService {
    */
   @PUT
   @Path("{originVersion}/{originInstanceName}")
-  @ApiOperation(value = "Migrate view instance data", notes = "Migrates view instance persistence
data from origin view instance specified in the path params.")
+  @ApiOperation(value = "Migrate view instance data", nickname = "ViewDataMigrationService#migrateData",
notes = "Migrates view instance persistence data from origin view instance specified in the
path params.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}
   )
   public Response migrateData( @ApiParam(value = "view name") @PathParam("viewName") String
viewName,
-                               @ApiParam(value = "view version") @PathParam("viewVersion")
String viewVersion,
+                               @ApiParam(value = "view version") @PathParam("version") String
viewVersion,
                                @ApiParam(value = "instance name") @PathParam("instanceName")
String instanceName,
                                @ApiParam(value = "origin version") @PathParam("originVersion")
String originViewVersion,
                                @ApiParam(value = "origin instance name") @PathParam("originInstanceName")
String originInstanceName)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
index 9657c0e..639933a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
@@ -75,7 +75,7 @@ public class ViewInstanceService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all view instances", notes = "Returns all instances for a view
version.", response = ViewInstanceResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all view instances", nickname = "ViewInstanceService#getServices",
notes = "Returns all instances for a view version.", response = ViewInstanceResponse.class,
responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue
= "ViewInstanceInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue =
"ViewInstanceInfo/instance_name.desc", dataType = "string", paramType = "query"),
@@ -107,7 +107,7 @@ public class ViewInstanceService extends BaseService {
   @GET
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view instance", notes = "Returns view instance details.",
response = ViewInstanceResponse.class)
+  @ApiOperation(value = "Get single view instance", nickname = "ViewInstanceService#getService",
notes = "Returns view instance details.", response = ViewInstanceResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue
= "ViewInstanceInfo", dataType = "string", paramType = "query")
   })
@@ -137,7 +137,7 @@ public class ViewInstanceService extends BaseService {
   @POST
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Create view instance", notes = "Creates view instance resource.")
+  @ApiOperation(value = "Create view instance", nickname = "ViewInstanceService#createService",
notes = "Creates view instance resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required =
true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
   })
@@ -186,7 +186,7 @@ public class ViewInstanceService extends BaseService {
   @PUT
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Update view instance detail", notes = "Updates view instance resource.")
+  @ApiOperation(value = "Update view instance detail", nickname = "ViewInstanceService#updateService",
notes = "Updates view instance resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required =
true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
   })
@@ -234,7 +234,7 @@ public class ViewInstanceService extends BaseService {
   @DELETE
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete view instance", notes = "Delete view resource.")
+  @ApiOperation(value = "Delete view instance", nickname = "ViewInstanceService#deleteService",
notes = "Delete view resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
index cbc037b..f8e2a56 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
@@ -68,7 +68,7 @@ public class ViewPermissionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all permissions for a view", notes = "Returns all permission
details for the version of a view.", response = ViewPermissionResponse.class, responseContainer
= "List")
+  @ApiOperation(value = "Get all permissions for a view", nickname = "ViewPermissionService#getPermissions",
notes = "Returns all permission details for the version of a view.", response = ViewPermissionResponse.class,
responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PermissionInfo/*",
dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned
for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
@@ -100,7 +100,7 @@ public class ViewPermissionService extends BaseService {
   @GET
   @Path("{permissionId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view permission", notes = "Returns permission details
for a single version of a view.", response = ViewPermissionResponse.class)
+  @ApiOperation(value = "Get single view permission", nickname = "ViewPermissionService#getPermission",
notes = "Returns permission details for a single version of a view.", response = ViewPermissionResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view permission details", defaultValue
= "PermissionInfo", dataType = "string", paramType = "query")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
index e6d817f..047d463 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
@@ -67,7 +67,7 @@ public class ViewPrivilegeService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all view instance privileges", notes = "Returns all privileges
for the resource.", response = ViewPrivilegeResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all view instance privileges", nickname = "ViewPrivilegeService#getPrivileges",
notes = "Returns all privileges for the resource.", response = ViewPrivilegeResponse.class,
responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PrivilegeInfo/*",
dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort privileges (asc | desc)", defaultValue
= "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -98,7 +98,7 @@ public class ViewPrivilegeService extends BaseService {
   @GET
   @Path("/{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view instance privilege", notes = "Returns privilege
details.", response = ViewPrivilegeResponse.class)
+  @ApiOperation(value = "Get single view instance privilege", nickname = "ViewPrivilegeService#getPrivilege",
notes = "Returns privilege details.", response = ViewPrivilegeResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privilege details", defaultValue =
"PrivilegeInfo", dataType = "string", paramType = "query")
   })
@@ -129,7 +129,7 @@ public class ViewPrivilegeService extends BaseService {
    */
   @POST
   @Produces("text/plain")
-  @ApiOperation(value = "Create view instance privilege", notes = "Create privilege resource
for view instance.")
+  @ApiOperation(value = "Create view instance privilege", nickname = "ViewPrivilegeService#createPrivilege",
notes = "Create privilege resource for view instance.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required =
true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
   })
@@ -240,7 +240,7 @@ public class ViewPrivilegeService extends BaseService {
   @DELETE
   @Path("{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete view instance privilege", notes = "Delete view instance privilege
resource.")
+  @ApiOperation(value = "Delete view instance privilege", nickname = "ViewPrivilegeService#deletePrivilege",
notes = "Delete view instance privilege resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
index 1936d5b..7005d8c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
@@ -65,7 +65,7 @@ public class ViewService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all views", notes = "Returns details of all views.", response
= ViewResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all views", nickname = "ViewService#getViews", notes = "Returns
details of all views.", response = ViewResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo/*",
dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue =
"ViewInfo/view_name.asc", dataType = "string", paramType = "query"),
@@ -93,7 +93,7 @@ public class ViewService extends BaseService {
   @GET
   @Path("{viewName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view", notes = "Returns view details.", response = ViewResponse.class)
+  @ApiOperation(value = "Get single view", nickname = "ViewService#getView", notes = "Returns
view details.", response = ViewResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo",
dataType = "string", paramType = "query")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
index ed6ddb1..95ebb39 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
@@ -67,7 +67,7 @@ public class ViewVersionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all versions for a view", notes = "Returns details of all versions
for a view.", response = ViewVersionResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all versions for a view", nickname = "ViewVersionService#getVersions",
notes = "Returns details of all versions for a view.", response = ViewVersionResponse.class,
responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view version details", defaultValue
= "ViewVersionInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue =
"ViewVersionInfo/version.desc", dataType = "string", paramType = "query"),
@@ -99,14 +99,14 @@ public class ViewVersionService extends BaseService {
   @GET
   @Path("{version}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view version", notes = "Returns view details.", response
= ViewVersionResponse.class)
+  @ApiOperation(value = "Get single view version", nickname = "ViewVersionService#getVersion",
notes = "Returns view details.", response = ViewVersionResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewVersionInfo",
dataType = "string", paramType = "query")
   })
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class)}
   )
-  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo
ui,
+  public Response getVersion(String body, @Context HttpHeaders headers, @Context UriInfo
ui,
                               @ApiParam(value = "view name") @PathParam("viewName") String
viewName,
                               @PathParam("version") String version) {
 


Mime
View raw message