Skip to content

Commit

Permalink
feat: add roleId to search
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteenke committed Apr 8, 2024
1 parent 9dead2e commit 54b49fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/main/openapi/openapi-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ components:
type: array
items:
type: string
roleId:
type: string
pageNumber:
format: int32
description: The number of page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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()
Expand Down

0 comments on commit 54b49fa

Please sign in to comment.