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

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


The following commit(s) were added to refs/heads/master by this push:
     new dc29f3a4b6c [fix][broker]Update rest api response class (#18965)
dc29f3a4b6c is described below

commit dc29f3a4b6c900cf2003c70c266bf3ab62fde87d
Author: Guangning E <[email protected]>
AuthorDate: Thu Dec 22 11:30:15 2022 +0800

    [fix][broker]Update rest api response class (#18965)
---
 .../pulsar/broker/admin/impl/TenantsBase.java      |   2 +-
 .../broker/admin/v2/NonPersistentTopics.java       |   5 +-
 .../pulsar/broker/admin/v2/PersistentTopics.java   | 107 ++++++++++++++-------
 3 files changed, 77 insertions(+), 37 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
index 32538eda1d1..b93f3e3c6eb 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
@@ -78,7 +78,7 @@ public class TenantsBase extends PulsarWebResource {
 
     @GET
     @Path("/{tenant}")
-    @ApiOperation(value = "Get the admin configuration for a given tenant.")
+    @ApiOperation(value = "Get the admin configuration for a given tenant.", 
response = TenantInfo.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "The requester 
doesn't have admin permissions"),
             @ApiResponse(code = 404, message = "Tenant does not exist")})
     public void getTenantAdmin(@Suspended final AsyncResponse asyncResponse,
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
index de1ee46fd8e..cc269d02831 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
@@ -184,7 +184,10 @@ public class NonPersistentTopics extends PersistentTopics {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/partitioned-stats")
-    @ApiOperation(value = "Get the stats for the partitioned topic.")
+    @ApiOperation(
+            value = "Get the stats for the partitioned topic.",
+            response = NonPersistentPartitionedTopicStatsImpl.class
+    )
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
index 0fb2ed8cec7..3e8219f08f1 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
@@ -54,14 +54,22 @@ import org.apache.pulsar.client.admin.PulsarAdminException;
 import org.apache.pulsar.client.api.SubscriptionType;
 import org.apache.pulsar.client.impl.MessageIdImpl;
 import org.apache.pulsar.client.impl.ResetCursorData;
+import org.apache.pulsar.common.api.proto.CommandSubscribe;
+import org.apache.pulsar.common.naming.PartitionedManagedLedgerInfo;
 import org.apache.pulsar.common.partition.PartitionedTopicMetadata;
 import org.apache.pulsar.common.policies.data.AuthAction;
+import org.apache.pulsar.common.policies.data.BacklogQuota;
 import org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType;
 import org.apache.pulsar.common.policies.data.DelayedDeliveryPolicies;
+import org.apache.pulsar.common.policies.data.DispatchRate;
 import org.apache.pulsar.common.policies.data.EntryFilters;
 import org.apache.pulsar.common.policies.data.InactiveTopicPolicies;
 import org.apache.pulsar.common.policies.data.OffloadPoliciesImpl;
+import org.apache.pulsar.common.policies.data.PartitionedTopicInternalStats;
 import org.apache.pulsar.common.policies.data.PersistencePolicies;
+import org.apache.pulsar.common.policies.data.PersistentOfflineTopicStats;
+import org.apache.pulsar.common.policies.data.PersistentTopicInternalStats;
+import org.apache.pulsar.common.policies.data.PersistentTopicStats;
 import org.apache.pulsar.common.policies.data.PolicyName;
 import org.apache.pulsar.common.policies.data.PolicyOperation;
 import org.apache.pulsar.common.policies.data.PublishRate;
@@ -72,6 +80,7 @@ import org.apache.pulsar.common.policies.data.TopicPolicies;
 import 
org.apache.pulsar.common.policies.data.impl.AutoSubscriptionCreationOverrideImpl;
 import org.apache.pulsar.common.policies.data.impl.BacklogQuotaImpl;
 import org.apache.pulsar.common.policies.data.impl.DispatchRateImpl;
+import org.apache.pulsar.common.policies.data.stats.PartitionedTopicStatsImpl;
 import org.apache.pulsar.common.util.Codec;
 import org.apache.pulsar.common.util.FutureUtil;
 import org.apache.pulsar.metadata.api.MetadataStoreException;
@@ -447,7 +456,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnConsumer")
-    @ApiOperation(value = "Get max unacked messages per consumer config on a 
topic.")
+    @ApiOperation(value = "Get max unacked messages per consumer config on a 
topic.", response = Integer.class)
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
             @ApiResponse(code = 500, message = "Internal server error"), })
@@ -517,7 +526,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/deduplicationSnapshotInterval")
-    @ApiOperation(value = "Get deduplicationSnapshotInterval config on a 
topic.")
+    @ApiOperation(value = "Get deduplicationSnapshotInterval config on a 
topic.", response = Integer.class)
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
             @ApiResponse(code = 500, message = "Internal server error"), })
@@ -590,7 +599,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/inactiveTopicPolicies")
-    @ApiOperation(value = "Get inactive topic policies on a topic.")
+    @ApiOperation(value = "Get inactive topic policies on a topic.", response 
= InactiveTopicPolicies.class)
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
             @ApiResponse(code = 500, message = "Internal server error"), })
@@ -659,7 +668,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxUnackedMessagesOnSubscription")
-    @ApiOperation(value = "Get max unacked messages per subscription config on 
a topic.")
+    @ApiOperation(value = "Get max unacked messages per subscription config on 
a topic.", response = Integer.class)
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
             @ApiResponse(code = 500, message = "Internal server error"), })
@@ -734,7 +743,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/delayedDelivery")
-    @ApiOperation(value = "Get delayed delivery messages config on a topic.")
+    @ApiOperation(value = "Get delayed delivery messages config on a topic.", 
response = DelayedDeliveryPolicies.class)
     @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
             @ApiResponse(code = 500, message = "Internal server error"), })
@@ -902,7 +911,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/partitions")
-    @ApiOperation(value = "Get partitioned topic metadata.")
+    @ApiOperation(value = "Get partitioned topic metadata.", response = 
PartitionedTopicMetadata.class)
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -938,7 +947,7 @@ public class PersistentTopics extends PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/properties")
-    @ApiOperation(value = "Get topic properties.")
+    @ApiOperation(value = "Get topic properties.", response = String.class, 
responseContainer = "Map")
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -1156,7 +1165,11 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/subscriptions")
-    @ApiOperation(value = "Get the list of persistent subscriptions for a 
given topic.")
+    @ApiOperation(
+            value = "Get the list of persistent subscriptions for a given 
topic.",
+            response = String.class,
+            responseContainer = "List"
+    )
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -1188,7 +1201,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/stats")
-    @ApiOperation(value = "Get the stats for the topic.")
+    @ApiOperation(value = "Get the stats for the topic.", response = 
PersistentTopicStats.class)
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -1229,7 +1242,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/internalStats")
-    @ApiOperation(value = "Get the internal stats for the topic.")
+    @ApiOperation(value = "Get the internal stats for the topic.", response = 
PersistentTopicInternalStats.class)
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -1263,7 +1276,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/internal-info")
-    @ApiOperation(value = "Get the stored topic metadata.")
+    @ApiOperation(value = "Get the stored topic metadata.", response = 
PartitionedManagedLedgerInfo.class)
     @ApiResponses(value = {
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
             @ApiResponse(code = 403, message = "Don't have admin permission"),
@@ -1287,7 +1300,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/partitioned-stats")
-    @ApiOperation(value = "Get the stats for the partitioned topic.")
+    @ApiOperation(value = "Get the stats for the partitioned topic.", response 
= PartitionedTopicStatsImpl.class)
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -1329,7 +1342,10 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/partitioned-internalStats")
-    @ApiOperation(value = "Get the stats-internal for the partitioned topic.")
+    @ApiOperation(
+            value = "Get the stats-internal for the partitioned topic.",
+            response = PartitionedTopicInternalStats.class
+    )
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources on this tenant"),
@@ -2025,7 +2041,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("{tenant}/{namespace}/{topic}/backlog")
-    @ApiOperation(value = "Get estimated backlog for offline topic.")
+    @ApiOperation(value = "Get estimated backlog for offline topic.", response 
= PersistentOfflineTopicStats.class)
     @ApiResponses(value = {
             @ApiResponse(code = 404, message = "Namespace does not exist"),
             @ApiResponse(code = 412, message = "Topic name is not valid"),
@@ -2059,7 +2075,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @PUT
     @Path("/{tenant}/{namespace}/{topic}/backlogSize")
-    @ApiOperation(value = "Calculate backlog size by a message ID (in bytes).")
+    @ApiOperation(value = "Calculate backlog size by a message ID (in 
bytes).", response = Long.class)
     @ApiResponses(value = {
             @ApiResponse(code = 403, message = "Don't have admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic does not 
exist"),
@@ -2082,7 +2098,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/backlogQuotaMap")
-    @ApiOperation(value = "Get backlog quota map on a topic.")
+    @ApiOperation(value = "Get backlog quota map on a topic.", response = 
BacklogQuota.class, responseContainer = "Map")
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Topic policy or namespace does 
not exist"),
             @ApiResponse(code = 405,
@@ -2162,7 +2178,11 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/replication")
-    @ApiOperation(value = "Get the replication clusters for a topic")
+    @ApiOperation(
+            value = "Get the replication clusters for a topic",
+            response = String.class,
+            responseContainer = "List"
+    )
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405, message =
@@ -2244,7 +2264,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/messageTTL")
-    @ApiOperation(value = "Get message TTL in seconds for a topic")
+    @ApiOperation(value = "Get message TTL in seconds for a topic", response = 
Integer.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405, message =
@@ -2333,7 +2353,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/deduplicationEnabled")
-    @ApiOperation(value = "Get deduplication configuration of a topic.")
+    @ApiOperation(value = "Get deduplication configuration of a topic.", 
response = Boolean.class)
     @ApiResponses(value = {
             @ApiResponse(code = 403, message = "Don't have admin permission"),
             @ApiResponse(code = 404, message = "Tenant or cluster or namespace 
or topic doesn't exist"),
@@ -2411,7 +2431,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/retention")
-    @ApiOperation(value = "Get retention configuration for specified topic.")
+    @ApiOperation(value = "Get retention configuration for specified topic.", 
response = RetentionPolicies.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2506,7 +2526,10 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/persistence")
-    @ApiOperation(value = "Get configuration of persistence policies for 
specified topic.")
+    @ApiOperation(
+            value = "Get configuration of persistence policies for specified 
topic.",
+            response = PersistencePolicies.class
+    )
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2547,7 +2570,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
             @QueryParam("authoritative") @DefaultValue("false") boolean 
authoritative,
             @QueryParam("isGlobal") @DefaultValue("false") boolean isGlobal,
             @ApiParam(value = "Bookkeeper persistence policies for specified 
topic")
-            PersistencePolicies persistencePolicies) {
+                                           PersistencePolicies 
persistencePolicies) {
         validateTopicName(tenant, namespace, encodedTopic);
         preValidation(authoritative)
             .thenCompose(__ -> internalSetPersistence(persistencePolicies, 
isGlobal))
@@ -2602,7 +2625,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxSubscriptionsPerTopic")
-    @ApiOperation(value = "Get maxSubscriptionsPerTopic config for specified 
topic.")
+    @ApiOperation(value = "Get maxSubscriptionsPerTopic config for specified 
topic.", response = Integer.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2689,7 +2712,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/replicatorDispatchRate")
-    @ApiOperation(value = "Get replicatorDispatchRate config for specified 
topic.")
+    @ApiOperation(value = "Get replicatorDispatchRate config for specified 
topic.", response = DispatchRate.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2776,7 +2799,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxProducers")
-    @ApiOperation(value = "Get maxProducers config for specified topic.")
+    @ApiOperation(value = "Get maxProducers config for specified topic.", 
response = Integer.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2867,7 +2890,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxConsumers")
-    @ApiOperation(value = "Get maxConsumers config for specified topic.")
+    @ApiOperation(value = "Get maxConsumers config for specified topic.", 
response = Integer.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -2958,7 +2981,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxMessageSize")
-    @ApiOperation(value = "Get maxMessageSize config for specified topic.")
+    @ApiOperation(value = "Get maxMessageSize config for specified topic.", 
response = Integer.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3385,7 +3408,10 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/subscriptionDispatchRate")
-    @ApiOperation(value = "Get subscription message dispatch rate 
configuration for specified topic.")
+    @ApiOperation(
+            value = "Get subscription message dispatch rate configuration for 
specified topic.",
+            response = DispatchRate.class
+    )
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3583,7 +3609,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/compactionThreshold")
-    @ApiOperation(value = "Get compaction threshold configuration for 
specified topic.")
+    @ApiOperation(value = "Get compaction threshold configuration for 
specified topic.", response = Long.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3678,7 +3704,10 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/maxConsumersPerSubscription")
-    @ApiOperation(value = "Get max consumers per subscription configuration 
for specified topic.")
+    @ApiOperation(
+            value = "Get max consumers per subscription configuration for 
specified topic.",
+            response = Integer.class
+    )
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3775,7 +3804,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/publishRate")
-    @ApiOperation(value = "Get publish rate configuration for specified 
topic.")
+    @ApiOperation(value = "Get publish rate configuration for specified 
topic.", response = PublishRate.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3872,7 +3901,11 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/subscriptionTypesEnabled")
-    @ApiOperation(value = "Get is enable sub type fors specified topic.")
+    @ApiOperation(
+            value = "Get is enable sub type fors specified topic.",
+            response = CommandSubscribe.SubType.class,
+            responseContainer = "List"
+    )
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -3969,7 +4002,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/subscribeRate")
-    @ApiOperation(value = "Get subscribe rate configuration for specified 
topic.")
+    @ApiOperation(value = "Get subscribe rate configuration for specified 
topic.", response = SubscribeRate.class)
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have 
admin permission"),
             @ApiResponse(code = 404, message = "Namespace or topic doesn't 
exist"),
             @ApiResponse(code = 405,
@@ -4142,7 +4175,11 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     
@Path("/{tenant}/{namespace}/{topic}/subscription/{subName}/replicatedSubscriptionStatus")
-    @ApiOperation(value = "Get replicated subscription status on a topic.")
+    @ApiOperation(
+            value = "Get replicated subscription status on a topic.",
+            response = Boolean.class,
+            responseContainer = "Map"
+    )
     @ApiResponses(value = {
             @ApiResponse(code = 401, message = "Don't have permission to 
administrate resources"),
             @ApiResponse(code = 403, message = "Don't have admin permission"),
@@ -4167,7 +4204,7 @@ public class PersistentTopics extends 
PersistentTopicsBase {
 
     @GET
     @Path("/{tenant}/{namespace}/{topic}/schemaCompatibilityStrategy")
-    @ApiOperation(value = "Get schema compatibility strategy on a topic")
+    @ApiOperation(value = "Get schema compatibility strategy on a topic", 
response = SchemaCompatibilityStrategy.class)
     @ApiResponses(value = {
             @ApiResponse(code = 307, message = "Current broker doesn't serve 
the namespace of this topic"),
             @ApiResponse(code = 403, message = "Don't have admin permission"),

Reply via email to