diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/CredentialsController.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/CredentialsController.groovy index 1b7093b79b..be5e1f6be1 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/CredentialsController.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/CredentialsController.groovy @@ -97,11 +97,11 @@ class CredentialsController { @ApiParam(value = 'Value of the "@type" key for accounts to search for.', example = 'kubernetes') @PathVariable String accountType, @ApiParam('Maximum number of entries to return in results. Used for pagination.') - @RequestParam OptionalInt limit, + @RequestParam(required = false, defaultValue = "100") Integer limit, @ApiParam('Account name to start account definition listing from. Used for pagination.') - @RequestParam Optional startingAccountName + @RequestParam(required = false) String startingAccountName ) { - clouddriverService.getAccountDefinitionsByType(accountType, limit.isPresent() ? limit.getAsInt() : null, startingAccountName.orElse(null)) + clouddriverService.getAccountDefinitionsByType(accountType, limit, startingAccountName) } @PostMapping