Skip to content

Commit

Permalink
[Docs] Fix the Create subscribtion swagger of PersistentTopic (apache…
Browse files Browse the repository at this point in the history
…#6776)

* [Docs] Fix the Create subscribtion swagger of PersistentTopic

Signed-off-by: xiaolong.ran <[email protected]>

* fix a little

Signed-off-by: xiaolong.ran <[email protected]>

* fix a little

Signed-off-by: xiaolong.ran <[email protected]>

* fix comments

Signed-off-by: xiaolong.ran <[email protected]>

* fix comments

Signed-off-by: xiaolong.ran <[email protected]>

* fix comments

Signed-off-by: xiaolong.ran <[email protected]>
  • Loading branch information
wolfstudy authored May 12, 2020
1 parent 54f8d13 commit ce29135
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public void resetCursorOnPosition(@PathParam("property") String property, @PathP

@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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public void expireMessagesForAllSubscriptions(

@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" +
Expand All @@ -798,14 +798,17 @@ public void createSubscription(
@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);
Expand Down

0 comments on commit ce29135

Please sign in to comment.