Commit 0be3d8cf authored by Siiri Tann's avatar Siiri Tann
Browse files

Resolve TEIS-1765

parent 72ffd207
package ee.sm.ti.teis.officegateway.proceedings.proceeding.inspection.topic;
import ee.sm.ti.teis.commongateway.classifier.ClassifierItemLightDto;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.UUID;
@Data
@Builder
@Deprecated(since = "1.23.0", forRemoval = true)
@NoArgsConstructor
@AllArgsConstructor
public class ProceedingTopicDto {
private UUID id;
private UUID proceedingId;
private ClassifierItemLightDto inspectionTopic;
private ObjectStatus objectStatus;
}
......@@ -23,6 +23,6 @@ public class UpdateProceedingInspectionTopicRequest extends AbstractDTO<UpdatePr
@NoArgsConstructor
public static class Parameters {
private UUID id;
private List<ClassifierItemLightDto> inspectionTopicCodes;
private List<ClassifierItemLightDto> inspectionTopics;
}
}
......@@ -2,11 +2,11 @@ package ee.sm.ti.teis.officegateway.proceedings.proceeding.inspection.topic.resp
import ee.sm.ti.teis.AbstractDTO;
import ee.sm.ti.teis.ErrorDTO;
import ee.sm.ti.teis.officegateway.proceedings.proceeding.inspection.topic.ProceedingTopicDto;
import ee.sm.ti.teis.officegateway.proceedings.proceeding.inspection.topic.ProceedingInspectionTopicDto;
import java.util.List;
public class UpdateProceedingInspectionTopicResponse extends AbstractDTO<List<ProceedingTopicDto>, ErrorDTO> {
public class UpdateProceedingInspectionTopicResponse extends AbstractDTO<List<ProceedingInspectionTopicDto>, ErrorDTO> {
public static final String ROUTING_KEY = "api.UpdateProceedingInspectionTopicResponse";
@Override
......
......@@ -26,7 +26,7 @@ class ProceedingInspectionTopicControllerTest extends OfficeApiGatewayTestBase {
}
@Test
void getTopics() {
void getTopics_success() {
assertThrows(NoResponseFromRabbitException.class, () -> controller.getTopics(randomUUID(), new RequestMetaDTO()));
}
}
......@@ -23,16 +23,16 @@ public class ProceedingInspectionTopicController extends TeisBaseController {
private final RequestProcessingService service;
@ApiOperation(value = "${teis.api.messages.proceeding.put-proceeding-inspection-topics}",
response = ProceedingTopicDto.class)
response = ProceedingInspectionTopicDto.class)
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "${teis.api.messages.proceeding.id}"))
@PutMapping
public List<ProceedingTopicDto> updateTopics(@PathVariable UUID id,
public List<ProceedingInspectionTopicDto> updateTopics(@PathVariable UUID id,
@RequestBody List<ClassifierItemLightDto> inspectionTopicCodes,
RequestMetaDTO requestMetaDTO) {
UpdateProceedingInspectionTopicRequest request = new UpdateProceedingInspectionTopicRequest();
request.setPayload(new UpdateProceedingInspectionTopicRequest.Parameters(id, inspectionTopicCodes), requestMetaDTO);
return (List<ProceedingTopicDto>) service.sendAndReceive(request);
return (List<ProceedingInspectionTopicDto>) service.sendAndReceive(request);
}
@ApiOperation(value = "${teis.api.messages.proceeding.get-proceeding-inspection-topics}",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment