Skip to content

Commit

Permalink
Merge pull request #4 from bt-lemery/feature/adding_pagination_suppor…
Browse files Browse the repository at this point in the history
…t_to_usergroup_list_endpoint

Adding pagination support to swagger lib when contacting usergroup li…
  • Loading branch information
liger1978 authored Mar 25, 2022
2 parents 17be53e + d68b672 commit b1d8e1d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/harbor2_client/api/usergroup_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ def list_user_groups(opts = {})
# @param [Hash] opts the optional parameters
# @option opts [String] :x_request_id An unique ID for the request
# @return [Array<(Array<UserGroup>, Fixnum, Hash)>] Array<UserGroup> data, response status code and response headers
# @option opts [Integer] :page The page number
# @option opts [Integer] :page_size The size of per page
def list_user_groups_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsergroupApi.list_user_groups ...'
Expand All @@ -219,11 +221,17 @@ def list_user_groups_with_http_info(opts = {})
fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling UsergroupApi.list_user_groups, the character length must be great than or equal to 1.'
end

if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling UserApi.list_users, must be smaller than or equal to 100.'
end

# resource path
local_var_path = '/usergroups'

# query parameters
query_params = {}
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

# header parameters
header_params = {}
Expand Down

0 comments on commit b1d8e1d

Please sign in to comment.