Anonymitaet commented on a change in pull request #4374: [rest] improve
clusters rest endpoint by documenting the endpoints with more swagger
annotations
URL: https://github.com/apache/pulsar/pull/4374#discussion_r287593041
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
##########
@@ -354,12 +496,29 @@ private void deleteFailureDomain(String clusterPath) {
@GET
@Path("/{cluster}/namespaceIsolationPolicies/{policyName}")
- @ApiOperation(value = "Get a single namespace isolation policy assigned in
the cluster", response = NamespaceIsolationData.class)
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have
admin permission"),
+ @ApiOperation(
+ value = "Get a single namespace isolation policy assigned in the
cluster",
+ response = NamespaceIsolationData.class,
+ notes = "This operation requires Pulsar super-user privileges."
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "Don't have admin permission"),
@ApiResponse(code = 404, message = "Policy doesn't exist"),
- @ApiResponse(code = 412, message = "Cluster doesn't exist") })
- public NamespaceIsolationData
getNamespaceIsolationPolicy(@PathParam("cluster") String cluster,
- @PathParam("policyName") String policyName) throws Exception {
+ @ApiResponse(code = 412, message = "Cluster doesn't exist"),
+ @ApiResponse(code = 500, message = "Internal server error")
+ })
+ public NamespaceIsolationData getNamespaceIsolationPolicy(
+ @ApiParam(
+ value = "The cluster name",
+ required = true
+ )
+ @PathParam("cluster") String cluster,
+ @ApiParam(
+ value = "The namespace isolation policy name",
Review comment:
```suggestion
value = "The policy name of the namespace isolation",
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services