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

adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit e88c3847aa1d5133c29b5941c38a964bdfd5f45f
Author: Gabor Boros <6317425+g-bo...@users.noreply.github.com>
AuthorDate: Wed Apr 4 13:49:19 2018 +0200

    AMBARI-23436 - make swagger wrapper classes unique, otherwise not parsed
    correctly
    
    Change-Id: Iad4f318b76cd7a93342940412bd11fdb065101da
---
 .../java/org/apache/ambari/server/api/services/HostService.java     | 5 +++--
 .../org/apache/ambari/server/api/services/RootServiceService.java   | 4 ++--
 .../ambari/server/api/services/views/ViewPrivilegeService.java      | 6 +++---
 .../main/java/org/apache/ambari/server/controller/HostResponse.java | 2 +-
 .../org/apache/ambari/server/controller/ViewPrivilegeResponse.java  | 2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index 58d1d1d..4e6eada 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -90,7 +90,7 @@ public class HostService extends BaseService {
   @GET
   @Path("{hostName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Returns information about a single host", response = 
HostResponse.Wrapper.class)
+  @ApiOperation(value = "Returns information about a single host", response = 
HostResponse.HostResponseWrapper.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
   })
@@ -118,7 +118,8 @@ public class HostService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Returns a collection of all hosts", response = 
HostResponse.Wrapper.class, responseContainer = "List")
+  @ApiOperation(value = "Returns a collection of all hosts", response = 
HostResponse.HostResponseWrapper.class,
+          responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
defaultValue = "Hosts/*", dataType = DATA_TYPE_STRING, paramType = 
PARAM_TYPE_QUERY),
     @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, 
defaultValue = "Hosts/host_name.asc", dataType = DATA_TYPE_STRING, paramType = 
PARAM_TYPE_QUERY),
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
index 1ab2797..0414436 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
@@ -138,7 +138,7 @@ public class RootServiceService extends BaseService {
   @Path("{serviceName}/hosts")
   @Produces(MediaType.TEXT_PLAIN)
   @ApiOperation(value = "Returns the list of hosts for the given root-level 
service",
-    response = HostResponse.Wrapper.class, responseContainer = 
RESPONSE_CONTAINER_LIST)
+    response = HostResponse.HostResponseWrapper.class, responseContainer = 
RESPONSE_CONTAINER_LIST)
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
       defaultValue = DEFAULT_FIELDS_HOSTS),
@@ -158,7 +158,7 @@ public class RootServiceService extends BaseService {
   @GET
   @Path("{serviceName}/hosts/{hostName}")
   @Produces(MediaType.TEXT_PLAIN)
-  @ApiOperation(value = "Returns information about the given host", response = 
HostResponse.Wrapper.class)
+  @ApiOperation(value = "Returns information about the given host", response = 
HostResponse.HostResponseWrapper.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
       defaultValue = DEFAULT_FIELDS_HOST),
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 59e5b5d..2b40aec 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
@@ -59,7 +59,7 @@ import io.swagger.annotations.ApiResponses;
 @Api(tags = "Views", description = "Endpoint for view specific operations")
 public class ViewPrivilegeService extends BaseService {
 
-  public static final String PRIVILEGE_INFO_REQUEST_TYPE = 
"org.apache.ambari.server.controller.ViewPrivilegeResponse.Wrapper";
+  public static final String PRIVILEGE_INFO_REQUEST_TYPE = 
"org.apache.ambari.server.controller.ViewPrivilegeResponse.ViewPrivilegeResponseWrapper";
 
   /**
    * Handles: GET  
/views/{viewName}/versions/{version}/instances/{instanceName}/privileges
@@ -75,7 +75,7 @@ public class ViewPrivilegeService extends BaseService {
    */
   @GET
   @Produces(MediaType.TEXT_PLAIN)
-  @ApiOperation(value = "Get all view instance privileges", response = 
ViewPrivilegeResponse.Wrapper.class, responseContainer = "List")
+  @ApiOperation(value = "Get all view instance privileges", response = 
ViewPrivilegeResponse.ViewPrivilegeResponseWrapper.class, responseContainer = 
"List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
defaultValue = "PrivilegeInfo/*", dataType = DATA_TYPE_STRING, paramType = 
PARAM_TYPE_QUERY),
     @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, 
dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
@@ -114,7 +114,7 @@ public class ViewPrivilegeService extends BaseService {
   @GET
   @Path("/{privilegeId}")
   @Produces(MediaType.TEXT_PLAIN)
-  @ApiOperation(value = "Get single view instance privilege", response = 
ViewPrivilegeResponse.Wrapper.class)
+  @ApiOperation(value = "Get single view instance privilege", response = 
ViewPrivilegeResponse.ViewPrivilegeResponseWrapper.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, 
defaultValue = "PrivilegeInfo/*", dataType = DATA_TYPE_STRING, paramType = 
PARAM_TYPE_QUERY),
   })
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
index 9d02a0b..32035a5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
@@ -428,7 +428,7 @@ public class HostResponse {
     this.recoveryReport = recoveryReport;
   }
 
-  public interface Wrapper extends ApiModel {
+  public interface HostResponseWrapper extends ApiModel {
     @ApiModelProperty(name = HostResourceProvider.RESPONSE_KEY)
     @SuppressWarnings("unused")
     HostResponse getHostResponse();
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
index 5419d17..0d6a320 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
@@ -54,7 +54,7 @@ public class ViewPrivilegeResponse extends PrivilegeResponse 
implements ApiModel
     return type;
   }
 
-  public interface Wrapper extends ApiModel {
+  public interface ViewPrivilegeResponseWrapper extends ApiModel {
     @ApiModelProperty(name = ViewPrivilegeResourceProvider.PRIVILEGE_INFO)
     @SuppressWarnings("unused")
     ViewPrivilegeResponse getViewPrivilegeResponse();

-- 
To stop receiving notification emails like this one, please contact
adorosz...@apache.org.

Reply via email to