未验证 提交 ce29135c 编写于 作者: 冉小龙 提交者: GitHub

[Docs] Fix the Create subscribtion swagger of PersistentTopic (#6776)

* [Docs] Fix the Create subscribtion swagger of PersistentTopic
Signed-off-by: Nxiaolong.ran <rxl@apache.org>

* fix a little
Signed-off-by: Nxiaolong.ran <rxl@apache.org>

* fix a little
Signed-off-by: Nxiaolong.ran <rxl@apache.org>

* fix comments
Signed-off-by: Nxiaolong.ran <rxl@apache.org>

* fix comments
Signed-off-by: Nxiaolong.ran <rxl@apache.org>

* fix comments
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
上级 54f8d13b
......@@ -512,7 +512,7 @@ public class PersistentTopics extends PersistentTopicsBase {
@PUT
@Path("/{property}/{cluster}/{namespace}/{topic}/subscription/{subscriptionName}")
@ApiOperation(value = "Reset subscription to message position closest to given position.", notes = "Creates a subscription on the topic at the specified message id")
@ApiOperation(value = "Create a subscription on the topic.", notes = "Creates a subscription on the topic at the specified message id")
@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"),
......
......@@ -778,7 +778,7 @@ public class PersistentTopics extends PersistentTopicsBase {
@PUT
@Path("/{tenant}/{namespace}/{topic}/subscription/{subscriptionName}")
@ApiOperation(value = "Reset subscription to message position closest to given position.", notes = "Creates a subscription on the topic at the specified message id")
@ApiOperation(value = "Create a subscription on the topic.", notes = "Creates a subscription on the topic at the specified message id")
@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 or" +
......@@ -798,14 +798,17 @@ public class PersistentTopics extends PersistentTopicsBase {
@PathParam("topic") @Encoded String topic,
@ApiParam(value = "Subscription to create position on", required = true)
@PathParam("subscriptionName") String encodedSubName,
@ApiParam(value = "messageId where to create the subscription. " +
@ApiParam(value = "Is authentication required to perform this operation")
@QueryParam("authoritative") @DefaultValue("false") boolean authoritative,
@ApiParam(name = "messageId", value = "messageId where to create the subscription. " +
"It can be 'latest', 'earliest' or (ledgerId:entryId)",
defaultValue = "latest",
allowableValues = "latest,earliest,ledgerId:entryId"
)
@QueryParam("authoritative") @DefaultValue("false") boolean authoritative, MessageIdImpl messageId,
@ApiParam(value = "Is authentication required to perform this operation")
@QueryParam("replicated") boolean replicated) {
MessageIdImpl messageId,
@ApiParam(value = "Is replicated required to perform this operation")
@QueryParam("replicated") boolean replicated
) {
try {
validateTopicName(tenant, namespace, topic);
internalCreateSubscription(asyncResponse, decode(encodedSubName), messageId, authoritative, replicated);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册