Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adjusted permission search criteria to align to svc #11

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/openapi/openapi-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,10 @@ components:
properties:
appId:
type: string
productName:
type: string
productNames:
type: array
items:
type: string
pageNumber:
format: int32
description: The number of page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ void searchPermissionsByCriteriaTest() {

PermissionSearchCriteria criteria = new PermissionSearchCriteria();
criteria.pageNumber(1).appId("app1").pageSize(1);
criteria.setProductNames(List.of("product1"));

PermissionPageResult pageResult = new PermissionPageResult();
Permission permission = new Permission();
permission.appId("app1").action("delete").id("id1");
permission.setProductName("product1");
pageResult.stream(List.of(permission)).size(1).number(1).totalElements(1L).totalPages(1L);

// create mock rest endpoint
Expand All @@ -53,7 +55,7 @@ void searchPermissionsByCriteriaTest() {
.withBody(JsonBody.json(pageResult)));

PermissionSearchCriteriaDTO criteriaDTO = new PermissionSearchCriteriaDTO();
criteriaDTO.pageNumber(1).appId("app1").pageSize(1);
criteriaDTO.pageNumber(1).appId("app1").pageSize(1).productNames(List.of("product1"));

var output = given()
.when()
Expand Down
Loading