Skip to content

Commit

Permalink
Merge pull request #4078 from Agnul97/feature-ask_total_count_tags
Browse files Browse the repository at this point in the history
✨ [REST API] Added "askTotalCount" parameter for tags api
  • Loading branch information
Coduz authored Jul 10, 2024
2 parents 2d110c4 + 7337ba6 commit be2ee60
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 @@ -67,6 +67,7 @@ public class Tags extends AbstractKapuaResource {
public TagListResult 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 {
TagQuery query = tagFactory.newQuery(scopeId);
Expand All @@ -79,6 +80,7 @@ public TagListResult simpleQuery(

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

return query(scopeId, query);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ paths:
description: The tag 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 be2ee60

Please sign in to comment.