replace query params with path params as required

pull/238/head
Isuri Mendis 11 months ago
parent a45f4712ba
commit c993051a07

@ -491,7 +491,7 @@ public interface DeviceOrganizationMgtService {
* @return A response indicating whether the organization exists or not.
*/
@GET
@Path("exists")
@Path("exists/{deviceId}/{parentDeviceId}")
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
@ -538,10 +538,10 @@ public interface DeviceOrganizationMgtService {
response = ErrorResponse.class)
})
Response isDeviceOrganizationExist(
@ApiParam(value = "The ID of the child device.", required = true)
@QueryParam("deviceId") int deviceId,
@ApiParam(value = "The ID of the parent device.")
@QueryParam("parentDeviceId") String parentDeviceId);
@ApiParam(name = "deviceId", value = "The ID of the child device.", required = true)
@PathParam("deviceId") int deviceId,
@ApiParam(name = "parentDeviceId", value = "The ID of the parent device.")
@PathParam("parentDeviceId") String parentDeviceId);
/**
@ -552,7 +552,7 @@ public interface DeviceOrganizationMgtService {
* @return A response containing the retrieved DeviceOrganization object, or null if not found.
*/
@GET
@Path("organization")
@Path("organization/{deviceId}/{parentDeviceId}")
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
@ -603,10 +603,10 @@ public interface DeviceOrganizationMgtService {
response = ErrorResponse.class)
})
Response getDeviceOrganizationByUniqueKey(
@ApiParam(value = "The ID of the child device.", required = true)
@QueryParam("deviceId") int deviceId,
@ApiParam(value = "The ID of the parent device.")
@QueryParam("parentDeviceId") String parentDeviceId);
@ApiParam(name = "deviceId", value = "The ID of the child device.", required = true)
@PathParam("deviceId") int deviceId,
@ApiParam(name = "parentDeviceId", value = "The ID of the parent device.")
@PathParam("parentDeviceId") String parentDeviceId);
/**
* Updates a device organization.
@ -786,7 +786,7 @@ public interface DeviceOrganizationMgtService {
response = ErrorResponse.class)
})
Response deleteDeviceAssociations(
@ApiParam(value = "The ID of the device for which associations should be deleted.", required = true)
@ApiParam(name = "deviceId", value = "The ID of the device for which associations should be deleted.", required = true)
@PathParam("deviceId") int deviceId);

@ -171,10 +171,10 @@ public class DeviceOrganizationMgtServiceImpl implements DeviceOrganizationMgtSe
@GET
@Override
@Path("exists")
@Path("exists/{deviceId}/{parentDeviceId}")
public Response isDeviceOrganizationExist(
@QueryParam("deviceId") int deviceId,
@QueryParam("parentDeviceId") String parentDeviceId) {
@PathParam("deviceId") int deviceId,
@PathParam("parentDeviceId") String parentDeviceId) {
try {
DeviceOrganizationService deviceOrganizationService = DeviceOrgAPIUtils.getDeviceOrganizationService();
boolean exists;
@ -196,10 +196,10 @@ public class DeviceOrganizationMgtServiceImpl implements DeviceOrganizationMgtSe
@GET
@Override
@Path("organization")
@Path("organization/{deviceId}/{parentDeviceId}")
public Response getDeviceOrganizationByUniqueKey(
@QueryParam("deviceId") int deviceId,
@QueryParam("parentDeviceId") String parentDeviceId) {
@PathParam("deviceId") int deviceId,
@PathParam("parentDeviceId") String parentDeviceId) {
try {
DeviceOrganizationService deviceOrganizationService = DeviceOrgAPIUtils.getDeviceOrganizationService();
DeviceOrganization organization;

Loading…
Cancel
Save