Skip to content

Commit

Permalink
feat(policy-store-api):[eclipse-tractusx#750] fix checkstyle warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed Jul 12, 2024
1 parent 1a95e50 commit 27860eb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public class PolicyStoreController {
public static final String SEARCH = "search";
public static final String POLICY_API_TAG = "Policy Store API";
public static final String API_KEY = "api_key";
public static final int MAX_AUTOCOMPLETE_LIMIT = 100;

private final PolicyStoreService service;

Expand Down Expand Up @@ -250,7 +251,7 @@ public List<String> autocomplete(
message = "Parameter 's' contains invalid characters") @RequestParam("s") final String value,

@Parameter(description = "Limit for the number of results, default is 10 and max is 100") @RequestParam(
name = "limit", required = false, defaultValue = "10") @Max(value = 100,
name = "limit", required = false, defaultValue = "10") @Max(value = MAX_AUTOCOMPLETE_LIMIT,
message = "Parameter 'limit' is above max") final int limit) {

final Map<String, List<Policy>> bpnToPoliciesMap = service.getPolicies(null);
Expand Down

0 comments on commit 27860eb

Please sign in to comment.