Skip to content

Commit

Permalink
Added support for askTotalCount on Roles GET endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnul97 authored and Coduz committed Feb 10, 2023
1 parent d92f0b0 commit c8c991f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class Roles extends AbstractKapuaResource {
public RoleListResult simpleQuery(
@PathParam("scopeId") ScopeId scopeId,
@QueryParam("name") String name,
@QueryParam("askTotalCount") boolean askTotalCount,
@QueryParam("offset") @DefaultValue("0") int offset,
@QueryParam("limit") @DefaultValue("50") int limit) throws KapuaException {
RoleQuery query = roleFactory.newQuery(scopeId);
Expand All @@ -102,6 +103,7 @@ public RoleListResult simpleQuery(
}
query.setPredicate(andPredicate);

query.setAskTotalCount(askTotalCount);
query.setOffset(offset);
query.setLimit(limit);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ paths:
description: The role name to filter results
schema:
type: string
- $ref: '../openapi.yaml#/components/parameters/askTotalCount'
- $ref: '../openapi.yaml#/components/parameters/limit'
- $ref: '../openapi.yaml#/components/parameters/offset'
responses:
Expand Down

0 comments on commit c8c991f

Please sign in to comment.