diff --git a/src/main/java/org/tkit/onecx/permission/bff/rs/mappers/AssignmentMapper.java b/src/main/java/org/tkit/onecx/permission/bff/rs/mappers/AssignmentMapper.java index 422101a..350baa5 100644 --- a/src/main/java/org/tkit/onecx/permission/bff/rs/mappers/AssignmentMapper.java +++ b/src/main/java/org/tkit/onecx/permission/bff/rs/mappers/AssignmentMapper.java @@ -13,7 +13,7 @@ public interface AssignmentMapper { AssignmentDTO map(Assignment assignment); - @Mapping(target = "appId", source = "appIds") + @Mapping(target = "appIds", source = "appIds") AssignmentSearchCriteria map(AssignmentSearchCriteriaDTO assignmentSearchCriteriaDTO); @Mapping(target = "removeStreamItem", ignore = true) diff --git a/src/main/openapi/openapi-bff.yaml b/src/main/openapi/openapi-bff.yaml index 3c1ddef..d9deb1b 100644 --- a/src/main/openapi/openapi-bff.yaml +++ b/src/main/openapi/openapi-bff.yaml @@ -668,6 +668,8 @@ components: type: array items: type: string + roleId: + type: string pageNumber: format: int32 description: The number of page. diff --git a/src/test/java/org/tkit/onecx/permission/rs/AssignmentRestControllerTest.java b/src/test/java/org/tkit/onecx/permission/rs/AssignmentRestControllerTest.java index 0d7170e..ca777c4 100644 --- a/src/test/java/org/tkit/onecx/permission/rs/AssignmentRestControllerTest.java +++ b/src/test/java/org/tkit/onecx/permission/rs/AssignmentRestControllerTest.java @@ -105,7 +105,7 @@ void createAssignmentEmptyBodyTest() { @Test void searchAssignmentByCriteriaTest() { AssignmentSearchCriteria criteria = new AssignmentSearchCriteria(); - criteria.pageNumber(1).pageSize(1).appId(List.of("app1")); + criteria.pageNumber(1).pageSize(1).roleId("role1").appIds(List.of("app1")); AssignmentPageResult pageResult = new AssignmentPageResult(); Assignment assignment = new Assignment(); @@ -121,7 +121,7 @@ void searchAssignmentByCriteriaTest() { .withBody(JsonBody.json(pageResult))); AssignmentSearchCriteriaDTO criteriaDTO = new AssignmentSearchCriteriaDTO(); - criteriaDTO.pageNumber(1).appIds(List.of("app1")).pageSize(1); + criteriaDTO.pageNumber(1).roleId("role1").appIds(List.of("app1")).pageSize(1); var output = given() .when()