Fix error when deleting tags/categories with special characters

birt-integration-copy
navodzoysa 2 years ago
parent a21c88f3a7
commit 578266a419

@ -157,12 +157,12 @@ public interface ApplicationManagementPublisherAdminAPI {
@PathParam("appId") int applicatioId); @PathParam("appId") int applicatioId);
@DELETE @DELETE
@Path("/tags/{tagName}") @Path("/tags")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApiOperation( @ApiOperation(
consumes = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON,
httpMethod = "GET", httpMethod = "DELETE",
value = "Delete application tag", value = "Delete application tag",
notes = "This will delete application tag", notes = "This will delete application tag",
tags = "Application Management", tags = "Application Management",
@ -185,10 +185,10 @@ public interface ApplicationManagementPublisherAdminAPI {
}) })
Response deleteTag( Response deleteTag(
@ApiParam( @ApiParam(
name = "tagName", name = "tag-name",
value = "Tag Name", value = "Tag Name",
required = true) required = true)
@PathParam("tagName") String tagName @QueryParam("tag-name") String tagName
); );
@POST @POST
@ -273,7 +273,7 @@ public interface ApplicationManagementPublisherAdminAPI {
); );
@DELETE @DELETE
@Path("/categories/{categoryName}") @Path("/categories")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApiOperation( @ApiOperation(
consumes = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON,
@ -301,10 +301,10 @@ public interface ApplicationManagementPublisherAdminAPI {
}) })
Response deleteCategory( Response deleteCategory(
@ApiParam( @ApiParam(
name = "categoryName", name = "category-name",
value = "Category Name", value = "Category Name",
required = true) required = true)
@PathParam("categoryName") String categoryName @QueryParam("category-name") String categoryName
); );
@PUT @PUT

@ -104,9 +104,9 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa
@DELETE @DELETE
@Override @Override
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@Path("/tags/{tagName}") @Path("/tags")
public Response deleteTag( public Response deleteTag(
@PathParam("tagName") String tagName) { @QueryParam("tag-name") String tagName) {
ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationManager applicationManager = APIUtil.getApplicationManager();
try { try {
applicationManager.deleteTag(tagName); applicationManager.deleteTag(tagName);
@ -169,9 +169,9 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa
@DELETE @DELETE
@Override @Override
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@Path("/categories/{categoryName}") @Path("/categories")
public Response deleteCategory( public Response deleteCategory(
@PathParam("categoryName") String categoryName) { @QueryParam("category-name") String categoryName) {
ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationManager applicationManager = APIUtil.getApplicationManager();
try { try {
applicationManager.deleteCategory(categoryName); applicationManager.deleteCategory(categoryName);

Loading…
Cancel
Save