insights-rbac-api-client 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +49 -22
  4. data/client-meta.json +1 -1
  5. data/docs/Access.md +10 -9
  6. data/docs/AccessApi.md +39 -19
  7. data/docs/AccessPagination.md +12 -11
  8. data/docs/AddRoleToGroup200Response.md +18 -0
  9. data/docs/AdditionalGroup.md +12 -11
  10. data/docs/CrossAccountRequest.md +30 -0
  11. data/docs/CrossAccountRequestApi.md +386 -0
  12. data/docs/CrossAccountRequestByAccount.md +36 -0
  13. data/docs/CrossAccountRequestByUserId.md +32 -0
  14. data/docs/CrossAccountRequestDetail.md +49 -0
  15. data/docs/CrossAccountRequestDetailByAccount.md +38 -0
  16. data/docs/CrossAccountRequestDetailByUseId.md +34 -0
  17. data/docs/CrossAccountRequestIn.md +26 -0
  18. data/docs/CrossAccountRequestOut.md +34 -0
  19. data/docs/CrossAccountRequestPagination.md +22 -0
  20. data/docs/CrossAccountRequestPaginationAllOfDataInner.md +49 -0
  21. data/docs/CrossAccountRequestPatch.md +24 -0
  22. data/docs/CrossAccountRequestUpdateIn.md +22 -0
  23. data/docs/CrossAccountRequestWithRoles.md +32 -0
  24. data/docs/CrossAccountRequestWithRolesRolesInner.md +22 -0
  25. data/docs/Error.md +8 -7
  26. data/docs/Error403.md +8 -7
  27. data/docs/Error403ErrorsInner.md +22 -0
  28. data/docs/ErrorErrorsInner.md +20 -0
  29. data/docs/ErrorNotFound.md +18 -0
  30. data/docs/ErrorNotFoundErrorsInner.md +22 -0
  31. data/docs/Group.md +10 -9
  32. data/docs/GroupApi.md +369 -163
  33. data/docs/GroupOut.md +26 -23
  34. data/docs/GroupPagination.md +12 -11
  35. data/docs/GroupPrincipalIn.md +8 -7
  36. data/docs/GroupRoleIn.md +8 -7
  37. data/docs/GroupRolesPagination.md +12 -11
  38. data/docs/GroupWithPrincipals.md +18 -17
  39. data/docs/GroupWithPrincipalsAndRoles.md +20 -19
  40. data/docs/ListPagination.md +10 -9
  41. data/docs/PaginationLinks.md +14 -13
  42. data/docs/PaginationMeta.md +8 -7
  43. data/docs/Permission.md +26 -0
  44. data/docs/PermissionApi.md +185 -0
  45. data/docs/PermissionOptionsPagination.md +22 -0
  46. data/docs/PermissionPagination.md +22 -0
  47. data/docs/Policy.md +10 -9
  48. data/docs/PolicyApi.md +153 -69
  49. data/docs/PolicyExtended.md +20 -19
  50. data/docs/PolicyIn.md +14 -13
  51. data/docs/PolicyPagination.md +12 -11
  52. data/docs/Principal.md +20 -15
  53. data/docs/PrincipalApi.md +49 -23
  54. data/docs/PrincipalExternalSourceId.md +49 -0
  55. data/docs/PrincipalIn.md +8 -7
  56. data/docs/PrincipalMinimal.md +18 -0
  57. data/docs/PrincipalOut.md +22 -17
  58. data/docs/PrincipalPagination.md +12 -11
  59. data/docs/PrincipalPaginationAllOfDataInner.md +49 -0
  60. data/docs/ResourceDefinition.md +8 -7
  61. data/docs/ResourceDefinitionFilter.md +12 -11
  62. data/docs/ResourceDefinitionFilterValue.md +49 -0
  63. data/docs/ResourceDefinitionFilterValueOneOfInner.md +47 -0
  64. data/docs/Role.md +12 -9
  65. data/docs/RoleApi.md +279 -89
  66. data/docs/RoleIn.md +14 -11
  67. data/docs/RoleOut.md +34 -25
  68. data/docs/RoleOutDynamic.md +40 -29
  69. data/docs/RolePagination.md +12 -11
  70. data/docs/RolePaginationDynamic.md +12 -11
  71. data/docs/RolePatch.md +22 -0
  72. data/docs/RoleWithAccess.md +36 -27
  73. data/docs/Status.md +10 -17
  74. data/docs/StatusApi.md +27 -10
  75. data/docs/Timestamped.md +10 -9
  76. data/docs/UUID.md +8 -7
  77. data/git_push.sh +3 -4
  78. data/insights-rbac-api-client.gemspec +3 -4
  79. data/lib/insights-rbac-api-client/api/access_api.rb +21 -6
  80. data/lib/insights-rbac-api-client/api/cross_account_request_api.rb +423 -0
  81. data/lib/insights-rbac-api-client/api/group_api.rb +120 -55
  82. data/lib/insights-rbac-api-client/api/permission_api.rb +243 -0
  83. data/lib/insights-rbac-api-client/api/policy_api.rb +38 -23
  84. data/lib/insights-rbac-api-client/api/principal_api.rb +44 -12
  85. data/lib/insights-rbac-api-client/api/role_api.rb +154 -41
  86. data/lib/insights-rbac-api-client/api/status_api.rb +5 -4
  87. data/lib/insights-rbac-api-client/api_client.rb +57 -51
  88. data/lib/insights-rbac-api-client/api_error.rb +2 -1
  89. data/lib/insights-rbac-api-client/configuration.rb +62 -13
  90. data/lib/insights-rbac-api-client/models/access.rb +34 -22
  91. data/lib/insights-rbac-api-client/models/access_pagination.rb +32 -23
  92. data/lib/insights-rbac-api-client/models/{inline_response200.rb → add_role_to_group200_response.rb} +35 -25
  93. data/lib/insights-rbac-api-client/models/additional_group.rb +30 -22
  94. data/lib/insights-rbac-api-client/models/cross_account_request.rb +270 -0
  95. data/lib/insights-rbac-api-client/models/cross_account_request_by_account.rb +304 -0
  96. data/lib/insights-rbac-api-client/models/cross_account_request_by_user_id.rb +286 -0
  97. data/lib/insights-rbac-api-client/models/cross_account_request_detail.rb +105 -0
  98. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_account.rb +316 -0
  99. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_use_id.rb +296 -0
  100. data/lib/insights-rbac-api-client/models/cross_account_request_in.rb +280 -0
  101. data/lib/insights-rbac-api-client/models/cross_account_request_out.rb +295 -0
  102. data/lib/insights-rbac-api-client/models/cross_account_request_pagination.rb +248 -0
  103. data/lib/insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner.rb +105 -0
  104. data/lib/insights-rbac-api-client/models/cross_account_request_patch.rb +277 -0
  105. data/lib/insights-rbac-api-client/models/cross_account_request_update_in.rb +255 -0
  106. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles.rb +279 -0
  107. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner.rb +234 -0
  108. data/lib/insights-rbac-api-client/models/error.rb +33 -23
  109. data/lib/insights-rbac-api-client/models/error403.rb +33 -23
  110. data/lib/insights-rbac-api-client/models/{policy_extended_all_of.rb → error403_errors_inner.rb} +55 -50
  111. data/lib/insights-rbac-api-client/models/{group_with_principals_all_of.rb → error_errors_inner.rb} +49 -39
  112. data/lib/insights-rbac-api-client/models/{policy_in_all_of.rb → error_not_found.rb} +47 -50
  113. data/lib/insights-rbac-api-client/models/{principal_pagination_all_of.rb → error_not_found_errors_inner.rb} +61 -39
  114. data/lib/insights-rbac-api-client/models/group.rb +32 -22
  115. data/lib/insights-rbac-api-client/models/group_out.rb +65 -30
  116. data/lib/insights-rbac-api-client/models/group_pagination.rb +32 -23
  117. data/lib/insights-rbac-api-client/models/group_principal_in.rb +32 -22
  118. data/lib/insights-rbac-api-client/models/group_role_in.rb +32 -22
  119. data/lib/insights-rbac-api-client/models/group_roles_pagination.rb +32 -23
  120. data/lib/insights-rbac-api-client/models/group_with_principals.rb +42 -25
  121. data/lib/insights-rbac-api-client/models/group_with_principals_and_roles.rb +44 -25
  122. data/lib/insights-rbac-api-client/models/list_pagination.rb +30 -22
  123. data/lib/insights-rbac-api-client/models/pagination_links.rb +30 -22
  124. data/lib/insights-rbac-api-client/models/pagination_meta.rb +30 -22
  125. data/lib/insights-rbac-api-client/models/permission.rb +250 -0
  126. data/lib/insights-rbac-api-client/models/{policy_pagination_all_of.rb → permission_options_pagination.rb} +62 -27
  127. data/lib/insights-rbac-api-client/models/{group_pagination_all_of.rb → permission_pagination.rb} +62 -27
  128. data/lib/insights-rbac-api-client/models/policy.rb +32 -22
  129. data/lib/insights-rbac-api-client/models/policy_extended.rb +44 -25
  130. data/lib/insights-rbac-api-client/models/policy_in.rb +37 -24
  131. data/lib/insights-rbac-api-client/models/policy_pagination.rb +33 -24
  132. data/lib/insights-rbac-api-client/models/principal.rb +56 -26
  133. data/lib/insights-rbac-api-client/models/principal_external_source_id.rb +105 -0
  134. data/lib/insights-rbac-api-client/models/principal_in.rb +32 -22
  135. data/lib/insights-rbac-api-client/models/{access_pagination_all_of.rb → principal_minimal.rb} +45 -37
  136. data/lib/insights-rbac-api-client/models/principal_out.rb +55 -23
  137. data/lib/insights-rbac-api-client/models/principal_pagination.rb +34 -25
  138. data/lib/insights-rbac-api-client/models/principal_pagination_all_of_data_inner.rb +105 -0
  139. data/lib/insights-rbac-api-client/models/resource_definition.rb +32 -22
  140. data/lib/insights-rbac-api-client/models/resource_definition_filter.rb +37 -23
  141. data/lib/insights-rbac-api-client/models/resource_definition_filter_value.rb +105 -0
  142. data/lib/insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner.rb +104 -0
  143. data/lib/insights-rbac-api-client/models/role.rb +42 -23
  144. data/lib/insights-rbac-api-client/models/role_in.rb +45 -25
  145. data/lib/insights-rbac-api-client/models/role_out.rb +92 -30
  146. data/lib/insights-rbac-api-client/models/role_out_dynamic.rb +109 -30
  147. data/lib/insights-rbac-api-client/models/role_pagination.rb +32 -23
  148. data/lib/insights-rbac-api-client/models/role_pagination_dynamic.rb +33 -24
  149. data/lib/insights-rbac-api-client/models/{group_with_principals_and_roles_all_of.rb → role_patch.rb} +55 -52
  150. data/lib/insights-rbac-api-client/models/role_with_access.rb +91 -28
  151. data/lib/insights-rbac-api-client/models/status.rb +36 -62
  152. data/lib/insights-rbac-api-client/models/timestamped.rb +36 -24
  153. data/lib/insights-rbac-api-client/models/uuid.rb +32 -22
  154. data/lib/insights-rbac-api-client/version.rb +2 -2
  155. data/lib/insights-rbac-api-client.rb +31 -13
  156. data/openapi.json +1741 -162
  157. data/spec/api/access_api_spec.rb +4 -2
  158. data/spec/api/cross_account_request_api_spec.rb +105 -0
  159. data/spec/api/group_api_spec.rb +26 -16
  160. data/spec/api/permission_api_spec.rb +75 -0
  161. data/spec/api/policy_api_spec.rb +7 -7
  162. data/spec/api/principal_api_spec.rb +10 -5
  163. data/spec/api/role_api_spec.rb +32 -13
  164. data/spec/api/status_api_spec.rb +2 -2
  165. data/spec/api_client_spec.rb +6 -4
  166. data/spec/configuration_spec.rb +4 -4
  167. data/spec/models/access_pagination_spec.rb +9 -14
  168. data/spec/models/access_spec.rb +8 -13
  169. data/spec/models/add_role_to_group200_response_spec.rb +36 -0
  170. data/spec/models/additional_group_spec.rb +9 -14
  171. data/spec/models/cross_account_request_by_account_spec.rb +90 -0
  172. data/spec/models/cross_account_request_by_user_id_spec.rb +78 -0
  173. data/spec/models/cross_account_request_detail_by_account_spec.rb +96 -0
  174. data/spec/models/cross_account_request_detail_by_use_id_spec.rb +84 -0
  175. data/spec/models/cross_account_request_detail_spec.rb +32 -0
  176. data/spec/models/cross_account_request_in_spec.rb +60 -0
  177. data/spec/models/cross_account_request_out_spec.rb +84 -0
  178. data/spec/models/cross_account_request_pagination_all_of_data_inner_spec.rb +32 -0
  179. data/spec/models/cross_account_request_pagination_spec.rb +48 -0
  180. data/spec/models/cross_account_request_patch_spec.rb +58 -0
  181. data/spec/models/cross_account_request_spec.rb +72 -0
  182. data/spec/models/cross_account_request_update_in_spec.rb +48 -0
  183. data/spec/models/cross_account_request_with_roles_roles_inner_spec.rb +48 -0
  184. data/spec/models/cross_account_request_with_roles_spec.rb +78 -0
  185. data/spec/models/error403_errors_inner_spec.rb +48 -0
  186. data/spec/models/error403_spec.rb +7 -12
  187. data/spec/models/error_errors_inner_spec.rb +42 -0
  188. data/spec/models/error_not_found_errors_inner_spec.rb +48 -0
  189. data/spec/models/error_not_found_spec.rb +36 -0
  190. data/spec/models/error_spec.rb +7 -12
  191. data/spec/models/group_out_spec.rb +21 -20
  192. data/spec/models/group_pagination_spec.rb +9 -14
  193. data/spec/models/group_principal_in_spec.rb +7 -12
  194. data/spec/models/group_role_in_spec.rb +7 -12
  195. data/spec/models/group_roles_pagination_spec.rb +9 -14
  196. data/spec/models/group_spec.rb +8 -13
  197. data/spec/models/group_with_principals_and_roles_spec.rb +13 -18
  198. data/spec/models/group_with_principals_spec.rb +12 -17
  199. data/spec/models/list_pagination_spec.rb +8 -13
  200. data/spec/models/pagination_links_spec.rb +10 -15
  201. data/spec/models/pagination_meta_spec.rb +7 -12
  202. data/spec/models/permission_options_pagination_spec.rb +48 -0
  203. data/spec/models/permission_pagination_spec.rb +48 -0
  204. data/spec/models/permission_spec.rb +60 -0
  205. data/spec/models/policy_extended_spec.rb +13 -18
  206. data/spec/models/policy_in_spec.rb +10 -15
  207. data/spec/models/policy_pagination_spec.rb +9 -14
  208. data/spec/models/policy_spec.rb +8 -13
  209. data/spec/models/principal_external_source_id_spec.rb +32 -0
  210. data/spec/models/principal_in_spec.rb +7 -12
  211. data/spec/models/principal_minimal_spec.rb +36 -0
  212. data/spec/models/principal_out_spec.rb +24 -17
  213. data/spec/models/principal_pagination_all_of_data_inner_spec.rb +32 -0
  214. data/spec/models/principal_pagination_spec.rb +9 -14
  215. data/spec/models/principal_spec.rb +23 -16
  216. data/spec/models/resource_definition_filter_spec.rb +10 -15
  217. data/spec/models/resource_definition_filter_value_one_of_inner_spec.rb +32 -0
  218. data/spec/models/resource_definition_filter_value_spec.rb +32 -0
  219. data/spec/models/resource_definition_spec.rb +7 -12
  220. data/spec/models/role_in_spec.rb +15 -14
  221. data/spec/models/role_out_dynamic_spec.rb +48 -23
  222. data/spec/models/role_out_spec.rb +40 -21
  223. data/spec/models/role_pagination_dynamic_spec.rb +9 -14
  224. data/spec/models/role_pagination_spec.rb +9 -14
  225. data/spec/models/role_patch_spec.rb +48 -0
  226. data/spec/models/role_spec.rb +14 -13
  227. data/spec/models/role_with_access_spec.rb +41 -22
  228. data/spec/models/status_spec.rb +8 -37
  229. data/spec/models/timestamped_spec.rb +8 -13
  230. data/spec/models/uuid_spec.rb +7 -12
  231. data/spec/spec_helper.rb +1 -1
  232. metadata +161 -109
  233. data/docs/AccessPaginationAllOf.md +0 -17
  234. data/docs/GroupPaginationAllOf.md +0 -17
  235. data/docs/GroupWithPrincipalsAllOf.md +0 -17
  236. data/docs/GroupWithPrincipalsAndRolesAllOf.md +0 -19
  237. data/docs/InlineResponse200.md +0 -17
  238. data/docs/PolicyExtendedAllOf.md +0 -19
  239. data/docs/PolicyInAllOf.md +0 -19
  240. data/docs/PolicyPaginationAllOf.md +0 -17
  241. data/docs/PrincipalPaginationAllOf.md +0 -17
  242. data/docs/RoleInAllOf.md +0 -17
  243. data/docs/RoleOutDynamicAllOf.md +0 -29
  244. data/docs/RolePaginationDynamicAllOf.md +0 -17
  245. data/lib/insights-rbac-api-client/models/role_in_all_of.rb +0 -213
  246. data/lib/insights-rbac-api-client/models/role_out_dynamic_all_of.rb +0 -346
  247. data/lib/insights-rbac-api-client/models/role_pagination_dynamic_all_of.rb +0 -213
  248. data/spec/models/access_pagination_all_of_spec.rb +0 -41
  249. data/spec/models/group_pagination_all_of_spec.rb +0 -41
  250. data/spec/models/group_with_principals_all_of_spec.rb +0 -41
  251. data/spec/models/group_with_principals_and_roles_all_of_spec.rb +0 -47
  252. data/spec/models/inline_response200_spec.rb +0 -41
  253. data/spec/models/policy_extended_all_of_spec.rb +0 -47
  254. data/spec/models/policy_in_all_of_spec.rb +0 -47
  255. data/spec/models/policy_pagination_all_of_spec.rb +0 -41
  256. data/spec/models/principal_pagination_all_of_spec.rb +0 -41
  257. data/spec/models/role_in_all_of_spec.rb +0 -41
  258. data/spec/models/role_out_dynamic_all_of_spec.rb +0 -77
  259. data/spec/models/role_pagination_dynamic_all_of_spec.rb +0 -41
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -19,26 +19,26 @@ module RBACApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create a roles for a tenant
22
+ # Create a role for a tenant
23
23
  # @param role_in [RoleIn] Role to create
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [RoleWithAccess]
26
- def create_roles(role_in, opts = {})
27
- data, _status_code, _headers = create_roles_with_http_info(role_in, opts)
26
+ def create_role(role_in, opts = {})
27
+ data, _status_code, _headers = create_role_with_http_info(role_in, opts)
28
28
  data
29
29
  end
30
30
 
31
- # Create a roles for a tenant
31
+ # Create a role for a tenant
32
32
  # @param role_in [RoleIn] Role to create
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(RoleWithAccess, Integer, Hash)>] RoleWithAccess data, response status code and response headers
35
- def create_roles_with_http_info(role_in, opts = {})
35
+ def create_role_with_http_info(role_in, opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: RoleApi.create_roles ...'
37
+ @api_client.config.logger.debug 'Calling API: RoleApi.create_role ...'
38
38
  end
39
39
  # verify the required parameter 'role_in' is set
40
40
  if @api_client.config.client_side_validation && role_in.nil?
41
- fail ArgumentError, "Missing the required parameter 'role_in' when calling RoleApi.create_roles"
41
+ fail ArgumentError, "Missing the required parameter 'role_in' when calling RoleApi.create_role"
42
42
  end
43
43
  # resource path
44
44
  local_var_path = '/roles/'
@@ -51,21 +51,25 @@ module RBACApiClient
51
51
  # HTTP header 'Accept' (if needed)
52
52
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
53
  # HTTP header 'Content-Type'
54
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
55
58
 
56
59
  # form parameters
57
60
  form_params = opts[:form_params] || {}
58
61
 
59
62
  # http body (model)
60
- post_body = opts[:body] || @api_client.object_to_http_body(role_in)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(role_in)
61
64
 
62
65
  # return_type
63
- return_type = opts[:return_type] || 'RoleWithAccess'
66
+ return_type = opts[:debug_return_type] || 'RoleWithAccess'
64
67
 
65
68
  # auth_names
66
- auth_names = opts[:auth_names] || ['basic_auth']
69
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
67
70
 
68
71
  new_options = opts.merge(
72
+ :operation => :"RoleApi.create_role",
69
73
  :header_params => header_params,
70
74
  :query_params => query_params,
71
75
  :form_params => form_params,
@@ -76,7 +80,7 @@ module RBACApiClient
76
80
 
77
81
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
82
  if @api_client.config.debugging
79
- @api_client.config.logger.debug "API called: RoleApi#create_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ @api_client.config.logger.debug "API called: RoleApi#create_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
84
  end
81
85
  return data, status_code, headers
82
86
  end
@@ -117,15 +121,16 @@ module RBACApiClient
117
121
  form_params = opts[:form_params] || {}
118
122
 
119
123
  # http body (model)
120
- post_body = opts[:body]
124
+ post_body = opts[:debug_body]
121
125
 
122
126
  # return_type
123
- return_type = opts[:return_type]
127
+ return_type = opts[:debug_return_type]
124
128
 
125
129
  # auth_names
126
- auth_names = opts[:auth_names] || ['basic_auth']
130
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
127
131
 
128
132
  new_options = opts.merge(
133
+ :operation => :"RoleApi.delete_role",
129
134
  :header_params => header_params,
130
135
  :query_params => query_params,
131
136
  :form_params => form_params,
@@ -144,6 +149,7 @@ module RBACApiClient
144
149
  # Get a role in the tenant
145
150
  # @param uuid [String] ID of role to get
146
151
  # @param [Hash] opts the optional parameters
152
+ # @option opts [String] :scope Parameter for filtering resource by scope. (default to 'account')
147
153
  # @return [RoleWithAccess]
148
154
  def get_role(uuid, opts = {})
149
155
  data, _status_code, _headers = get_role_with_http_info(uuid, opts)
@@ -153,6 +159,7 @@ module RBACApiClient
153
159
  # Get a role in the tenant
154
160
  # @param uuid [String] ID of role to get
155
161
  # @param [Hash] opts the optional parameters
162
+ # @option opts [String] :scope Parameter for filtering resource by scope. (default to 'account')
156
163
  # @return [Array<(RoleWithAccess, Integer, Hash)>] RoleWithAccess data, response status code and response headers
157
164
  def get_role_with_http_info(uuid, opts = {})
158
165
  if @api_client.config.debugging
@@ -162,11 +169,16 @@ module RBACApiClient
162
169
  if @api_client.config.client_side_validation && uuid.nil?
163
170
  fail ArgumentError, "Missing the required parameter 'uuid' when calling RoleApi.get_role"
164
171
  end
172
+ allowable_values = ["account", "principal"]
173
+ if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope'])
174
+ fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}"
175
+ end
165
176
  # resource path
166
177
  local_var_path = '/roles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
167
178
 
168
179
  # query parameters
169
180
  query_params = opts[:query_params] || {}
181
+ query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
170
182
 
171
183
  # header parameters
172
184
  header_params = opts[:header_params] || {}
@@ -177,15 +189,16 @@ module RBACApiClient
177
189
  form_params = opts[:form_params] || {}
178
190
 
179
191
  # http body (model)
180
- post_body = opts[:body]
192
+ post_body = opts[:debug_body]
181
193
 
182
194
  # return_type
183
- return_type = opts[:return_type] || 'RoleWithAccess'
195
+ return_type = opts[:debug_return_type] || 'RoleWithAccess'
184
196
 
185
197
  # auth_names
186
- auth_names = opts[:auth_names] || ['basic_auth']
198
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
187
199
 
188
200
  new_options = opts.merge(
201
+ :operation => :"RoleApi.get_role",
189
202
  :header_params => header_params,
190
203
  :query_params => query_params,
191
204
  :form_params => form_params,
@@ -215,8 +228,8 @@ module RBACApiClient
215
228
  # Get access for a role in the tenant
216
229
  # @param uuid [String] ID of the role
217
230
  # @param [Hash] opts the optional parameters
218
- # @option opts [Integer] :limit Parameter for selecting the amount of data returned.
219
- # @option opts [Integer] :offset Parameter for selecting the offset of data.
231
+ # @option opts [Integer] :limit Parameter for selecting the amount of data returned. (default to 10)
232
+ # @option opts [Integer] :offset Parameter for selecting the offset of data. (default to 0)
220
233
  # @return [Array<(AccessPagination, Integer, Hash)>] AccessPagination data, response status code and response headers
221
234
  def get_role_access_with_http_info(uuid, opts = {})
222
235
  if @api_client.config.debugging
@@ -255,15 +268,16 @@ module RBACApiClient
255
268
  form_params = opts[:form_params] || {}
256
269
 
257
270
  # http body (model)
258
- post_body = opts[:body]
271
+ post_body = opts[:debug_body]
259
272
 
260
273
  # return_type
261
- return_type = opts[:return_type] || 'AccessPagination'
274
+ return_type = opts[:debug_return_type] || 'AccessPagination'
262
275
 
263
276
  # auth_names
264
- auth_names = opts[:auth_names] || ['basic_auth']
277
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
265
278
 
266
279
  new_options = opts.merge(
280
+ :operation => :"RoleApi.get_role_access",
267
281
  :header_params => header_params,
268
282
  :query_params => query_params,
269
283
  :form_params => form_params,
@@ -285,10 +299,16 @@ module RBACApiClient
285
299
  # @option opts [Integer] :limit Parameter for selecting the amount of data returned. (default to 10)
286
300
  # @option opts [Integer] :offset Parameter for selecting the offset of data. (default to 0)
287
301
  # @option opts [String] :name Parameter for filtering resource by name using string contains search.
302
+ # @option opts [Boolean] :system Parameter for filtering resource by system flag.
303
+ # @option opts [String] :display_name Parameter for filtering resource by display_name using string contains search.
304
+ # @option opts [String] :name_match Parameter for specifying the matching criteria for an object&#39;s name or display_name.
288
305
  # @option opts [String] :scope Parameter for filtering resource by scope. (default to 'account')
289
- # @option opts [String] :order_by Parameter for ordering resource by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name
306
+ # @option opts [String] :order_by Parameter for ordering roles by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name
290
307
  # @option opts [Array<String>] :add_fields Parameter for add list of fields to display for roles.
291
308
  # @option opts [String] :username Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header).
309
+ # @option opts [String] :application The application name(s) to filter roles by, from permissions or external tenant name. This is an exact match. You may also use a comma-separated list to match on multiple applications.
310
+ # @option opts [String] :permission The permission(s) to filter roles by. This is an exact match. You may also use a comma-separated list to match on multiple permissions.
311
+ # @option opts [String] :external_tenant Parameter for filtering roles by external tenant name using string search.
292
312
  # @return [RolePaginationDynamic]
293
313
  def list_roles(opts = {})
294
314
  data, _status_code, _headers = list_roles_with_http_info(opts)
@@ -298,13 +318,19 @@ module RBACApiClient
298
318
  # List the roles for a tenant
299
319
  # By default, responses are sorted in ascending order by role name
300
320
  # @param [Hash] opts the optional parameters
301
- # @option opts [Integer] :limit Parameter for selecting the amount of data returned.
302
- # @option opts [Integer] :offset Parameter for selecting the offset of data.
321
+ # @option opts [Integer] :limit Parameter for selecting the amount of data returned. (default to 10)
322
+ # @option opts [Integer] :offset Parameter for selecting the offset of data. (default to 0)
303
323
  # @option opts [String] :name Parameter for filtering resource by name using string contains search.
304
- # @option opts [String] :scope Parameter for filtering resource by scope.
305
- # @option opts [String] :order_by Parameter for ordering resource by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name
324
+ # @option opts [Boolean] :system Parameter for filtering resource by system flag.
325
+ # @option opts [String] :display_name Parameter for filtering resource by display_name using string contains search.
326
+ # @option opts [String] :name_match Parameter for specifying the matching criteria for an object&#39;s name or display_name.
327
+ # @option opts [String] :scope Parameter for filtering resource by scope. (default to 'account')
328
+ # @option opts [String] :order_by Parameter for ordering roles by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name
306
329
  # @option opts [Array<String>] :add_fields Parameter for add list of fields to display for roles.
307
330
  # @option opts [String] :username Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header).
331
+ # @option opts [String] :application The application name(s) to filter roles by, from permissions or external tenant name. This is an exact match. You may also use a comma-separated list to match on multiple applications.
332
+ # @option opts [String] :permission The permission(s) to filter roles by. This is an exact match. You may also use a comma-separated list to match on multiple permissions.
333
+ # @option opts [String] :external_tenant Parameter for filtering roles by external tenant name using string search.
308
334
  # @return [Array<(RolePaginationDynamic, Integer, Hash)>] RolePaginationDynamic data, response status code and response headers
309
335
  def list_roles_with_http_info(opts = {})
310
336
  if @api_client.config.debugging
@@ -322,11 +348,19 @@ module RBACApiClient
322
348
  fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling RoleApi.list_roles, must be greater than or equal to 0.'
323
349
  end
324
350
 
351
+ allowable_values = ["partial", "exact"]
352
+ if @api_client.config.client_side_validation && opts[:'name_match'] && !allowable_values.include?(opts[:'name_match'])
353
+ fail ArgumentError, "invalid value for \"name_match\", must be one of #{allowable_values}"
354
+ end
325
355
  allowable_values = ["account", "principal"]
326
356
  if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope'])
327
357
  fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}"
328
358
  end
329
- allowable_values = ["groups_in", "groups_in_count"]
359
+ allowable_values = ["name", "display_name", "modified", "policyCount"]
360
+ if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by'])
361
+ fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}"
362
+ end
363
+ allowable_values = ["groups_in", "groups_in_count", "access"]
330
364
  if @api_client.config.client_side_validation && opts[:'add_fields'] && !opts[:'add_fields'].all? { |item| allowable_values.include?(item) }
331
365
  fail ArgumentError, "invalid value for \"add_fields\", must include one of #{allowable_values}"
332
366
  end
@@ -338,10 +372,16 @@ module RBACApiClient
338
372
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
339
373
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
340
374
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
375
+ query_params[:'system'] = opts[:'system'] if !opts[:'system'].nil?
376
+ query_params[:'display_name'] = opts[:'display_name'] if !opts[:'display_name'].nil?
377
+ query_params[:'name_match'] = opts[:'name_match'] if !opts[:'name_match'].nil?
341
378
  query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
342
379
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
343
380
  query_params[:'add_fields'] = @api_client.build_collection_param(opts[:'add_fields'], :csv) if !opts[:'add_fields'].nil?
344
381
  query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?
382
+ query_params[:'application'] = opts[:'application'] if !opts[:'application'].nil?
383
+ query_params[:'permission'] = opts[:'permission'] if !opts[:'permission'].nil?
384
+ query_params[:'external_tenant'] = opts[:'external_tenant'] if !opts[:'external_tenant'].nil?
345
385
 
346
386
  # header parameters
347
387
  header_params = opts[:header_params] || {}
@@ -352,15 +392,16 @@ module RBACApiClient
352
392
  form_params = opts[:form_params] || {}
353
393
 
354
394
  # http body (model)
355
- post_body = opts[:body]
395
+ post_body = opts[:debug_body]
356
396
 
357
397
  # return_type
358
- return_type = opts[:return_type] || 'RolePaginationDynamic'
398
+ return_type = opts[:debug_return_type] || 'RolePaginationDynamic'
359
399
 
360
400
  # auth_names
361
- auth_names = opts[:auth_names] || ['basic_auth']
401
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
362
402
 
363
403
  new_options = opts.merge(
404
+ :operation => :"RoleApi.list_roles",
364
405
  :header_params => header_params,
365
406
  :query_params => query_params,
366
407
  :form_params => form_params,
@@ -376,9 +417,77 @@ module RBACApiClient
376
417
  return data, status_code, headers
377
418
  end
378
419
 
379
- # Update a Role in the tenant
420
+ # Patch a role in the tenant
421
+ # @param uuid [String] ID of role to update
422
+ # @param [Hash] opts the optional parameters
423
+ # @option opts [RolePatch] :role_patch Patch to a role
424
+ # @return [RoleWithAccess]
425
+ def patch_role(uuid, opts = {})
426
+ data, _status_code, _headers = patch_role_with_http_info(uuid, opts)
427
+ data
428
+ end
429
+
430
+ # Patch a role in the tenant
431
+ # @param uuid [String] ID of role to update
432
+ # @param [Hash] opts the optional parameters
433
+ # @option opts [RolePatch] :role_patch Patch to a role
434
+ # @return [Array<(RoleWithAccess, Integer, Hash)>] RoleWithAccess data, response status code and response headers
435
+ def patch_role_with_http_info(uuid, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: RoleApi.patch_role ...'
438
+ end
439
+ # verify the required parameter 'uuid' is set
440
+ if @api_client.config.client_side_validation && uuid.nil?
441
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling RoleApi.patch_role"
442
+ end
443
+ # resource path
444
+ local_var_path = '/roles/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+
449
+ # header parameters
450
+ header_params = opts[:header_params] || {}
451
+ # HTTP header 'Accept' (if needed)
452
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
453
+ # HTTP header 'Content-Type'
454
+ content_type = @api_client.select_header_content_type(['application/json'])
455
+ if !content_type.nil?
456
+ header_params['Content-Type'] = content_type
457
+ end
458
+
459
+ # form parameters
460
+ form_params = opts[:form_params] || {}
461
+
462
+ # http body (model)
463
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'role_patch'])
464
+
465
+ # return_type
466
+ return_type = opts[:debug_return_type] || 'RoleWithAccess'
467
+
468
+ # auth_names
469
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
470
+
471
+ new_options = opts.merge(
472
+ :operation => :"RoleApi.patch_role",
473
+ :header_params => header_params,
474
+ :query_params => query_params,
475
+ :form_params => form_params,
476
+ :body => post_body,
477
+ :auth_names => auth_names,
478
+ :return_type => return_type
479
+ )
480
+
481
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
482
+ if @api_client.config.debugging
483
+ @api_client.config.logger.debug "API called: RoleApi#patch_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
484
+ end
485
+ return data, status_code, headers
486
+ end
487
+
488
+ # Update a role in the tenant
380
489
  # @param uuid [String] ID of role to update
381
- # @param role_with_access [RoleWithAccess] Update to a Role
490
+ # @param role_with_access [RoleWithAccess] Update to a role
382
491
  # @param [Hash] opts the optional parameters
383
492
  # @return [nil]
384
493
  def update_role(uuid, role_with_access, opts = {})
@@ -386,9 +495,9 @@ module RBACApiClient
386
495
  nil
387
496
  end
388
497
 
389
- # Update a Role in the tenant
498
+ # Update a role in the tenant
390
499
  # @param uuid [String] ID of role to update
391
- # @param role_with_access [RoleWithAccess] Update to a Role
500
+ # @param role_with_access [RoleWithAccess] Update to a role
392
501
  # @param [Hash] opts the optional parameters
393
502
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
394
503
  def update_role_with_http_info(uuid, role_with_access, opts = {})
@@ -414,21 +523,25 @@ module RBACApiClient
414
523
  # HTTP header 'Accept' (if needed)
415
524
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
416
525
  # HTTP header 'Content-Type'
417
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
526
+ content_type = @api_client.select_header_content_type(['application/json'])
527
+ if !content_type.nil?
528
+ header_params['Content-Type'] = content_type
529
+ end
418
530
 
419
531
  # form parameters
420
532
  form_params = opts[:form_params] || {}
421
533
 
422
534
  # http body (model)
423
- post_body = opts[:body] || @api_client.object_to_http_body(role_with_access)
535
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(role_with_access)
424
536
 
425
537
  # return_type
426
- return_type = opts[:return_type]
538
+ return_type = opts[:debug_return_type]
427
539
 
428
540
  # auth_names
429
- auth_names = opts[:auth_names] || ['basic_auth']
541
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
430
542
 
431
543
  new_options = opts.merge(
544
+ :operation => :"RoleApi.update_role",
432
545
  :header_params => header_params,
433
546
  :query_params => query_params,
434
547
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -49,15 +49,16 @@ module RBACApiClient
49
49
  form_params = opts[:form_params] || {}
50
50
 
51
51
  # http body (model)
52
- post_body = opts[:body]
52
+ post_body = opts[:debug_body]
53
53
 
54
54
  # return_type
55
- return_type = opts[:return_type] || 'Status'
55
+ return_type = opts[:debug_return_type] || 'Status'
56
56
 
57
57
  # auth_names
58
- auth_names = opts[:auth_names] || ['basic_auth']
58
+ auth_names = opts[:debug_auth_names] || ['basic_auth']
59
59
 
60
60
  new_options = opts.merge(
61
+ :operation => :"StatusApi.get_status",
61
62
  :header_params => header_params,
62
63
  :query_params => query_params,
63
64
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
+ require 'time'
17
18
  require 'typhoeus'
18
19
 
19
20
  module RBACApiClient
@@ -86,12 +87,13 @@ module RBACApiClient
86
87
  # @option opts [Object] :body HTTP body (JSON/XML)
87
88
  # @return [Typhoeus::Request] A Typhoeus Request
88
89
  def build_request(http_method, path, opts = {})
89
- url = build_request_url(path)
90
+ url = build_request_url(path, opts)
90
91
  http_method = http_method.to_sym.downcase
91
92
 
92
93
  header_params = @default_headers.merge(opts[:header_params] || {})
93
94
  query_params = opts[:query_params] || {}
94
95
  form_params = opts[:form_params] || {}
96
+ follow_location = opts[:follow_location] || true
95
97
 
96
98
  update_params_for_auth! header_params, query_params, opts[:auth_names]
97
99
 
@@ -108,7 +110,8 @@ module RBACApiClient
108
110
  :ssl_verifyhost => _verify_ssl_host,
109
111
  :sslcert => @config.cert_file,
110
112
  :sslkey => @config.key_file,
111
- :verbose => @config.debugging
113
+ :verbose => @config.debugging,
114
+ :followlocation => follow_location
112
115
  }
113
116
 
114
117
  # set custom cert, if provided
@@ -155,6 +158,44 @@ module RBACApiClient
155
158
  data
156
159
  end
157
160
 
161
+ # Save response body into a file in (the defined) temporary folder, using the filename
162
+ # from the "Content-Disposition" header if provided, otherwise a random filename.
163
+ # The response body is written to the file in chunks in order to handle files which
164
+ # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
165
+ # process can use.
166
+ #
167
+ # @see Configuration#temp_folder_path
168
+ def download_file(request)
169
+ tempfile = nil
170
+ encoding = nil
171
+ request.on_headers do |response|
172
+ content_disposition = response.headers['Content-Disposition']
173
+ if content_disposition && content_disposition =~ /filename=/i
174
+ filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
175
+ prefix = sanitize_filename(filename)
176
+ else
177
+ prefix = 'download-'
178
+ end
179
+ prefix = prefix + '-' unless prefix.end_with?('-')
180
+ encoding = response.body.encoding
181
+ tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
182
+ @tempfile = tempfile
183
+ end
184
+ request.on_body do |chunk|
185
+ chunk.force_encoding(encoding)
186
+ tempfile.write(chunk)
187
+ end
188
+ request.on_complete do |response|
189
+ if tempfile
190
+ tempfile.close
191
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
192
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
193
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
194
+ "explicitly with `tempfile.delete`"
195
+ end
196
+ end
197
+ end
198
+
158
199
  # Check if the given MIME is a JSON MIME.
159
200
  # JSON MIME examples:
160
201
  # application/json
@@ -184,14 +225,14 @@ module RBACApiClient
184
225
  return body if return_type == 'String'
185
226
 
186
227
  # ensuring a default content type
187
- content_type = response.headers&.dig('Content-Type') || 'application/json'
228
+ content_type = response.headers['Content-Type'] || 'application/json'
188
229
 
189
230
  fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
190
231
 
191
232
  begin
192
233
  data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
193
234
  rescue JSON::ParserError => e
194
- if %w(String Date DateTime).include?(return_type)
235
+ if %w(String Date Time).include?(return_type)
195
236
  data = body
196
237
  else
197
238
  raise e
@@ -216,9 +257,9 @@ module RBACApiClient
216
257
  data.to_f
217
258
  when 'Boolean'
218
259
  data == true
219
- when 'DateTime'
260
+ when 'Time'
220
261
  # parse date time (expecting ISO 8601 format)
221
- DateTime.parse data
262
+ Time.parse data
222
263
  when 'Date'
223
264
  # parse date time (expecting ISO 8601 format)
224
265
  Date.parse data
@@ -236,44 +277,9 @@ module RBACApiClient
236
277
  data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
237
278
  end
238
279
  else
239
- # models, e.g. Pet
240
- RBACApiClient.const_get(return_type).build_from_hash(data)
241
- end
242
- end
243
-
244
- # Save response body into a file in (the defined) temporary folder, using the filename
245
- # from the "Content-Disposition" header if provided, otherwise a random filename.
246
- # The response body is written to the file in chunks in order to handle files which
247
- # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
248
- # process can use.
249
- #
250
- # @see Configuration#temp_folder_path
251
- def download_file(request)
252
- tempfile = nil
253
- encoding = nil
254
- request.on_headers do |response|
255
- content_disposition = response.headers['Content-Disposition']
256
- if content_disposition && content_disposition =~ /filename=/i
257
- filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
258
- prefix = sanitize_filename(filename)
259
- else
260
- prefix = 'download-'
261
- end
262
- prefix = prefix + '-' unless prefix.end_with?('-')
263
- encoding = response.body.encoding
264
- tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
265
- @tempfile = tempfile
266
- end
267
- request.on_body do |chunk|
268
- chunk.force_encoding(encoding)
269
- tempfile.write(chunk)
270
- end
271
- request.on_complete do |response|
272
- tempfile.close if tempfile
273
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
274
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
275
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
276
- "explicitly with `tempfile.delete`"
280
+ # models (e.g. Pet) or oneOf
281
+ klass = RBACApiClient.const_get(return_type)
282
+ klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
277
283
  end
278
284
  end
279
285
 
@@ -286,13 +292,13 @@ module RBACApiClient
286
292
  filename.gsub(/.*[\/\\]/, '')
287
293
  end
288
294
 
289
- def build_request_url(path)
295
+ def build_request_url(path, opts = {})
290
296
  # Add leading and trailing slashes to path
291
297
  path = "/#{path}".gsub(/\/+/, '/')
292
- @config.base_url + path
298
+ @config.base_url(opts[:operation]) + path
293
299
  end
294
300
 
295
- # Update hearder and query params based on authentication settings.
301
+ # Update header and query params based on authentication settings.
296
302
  #
297
303
  # @param [Hash] header_params Header parameters
298
304
  # @param [Hash] query_params Query parameters
@@ -304,7 +310,7 @@ module RBACApiClient
304
310
  case auth_setting[:in]
305
311
  when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
306
312
  when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
307
- else fail ArgumentError, 'Authentication token must be in `query` of `header`'
313
+ else fail ArgumentError, 'Authentication token must be in `query` or `header`'
308
314
  end
309
315
  end
310
316
  end
@@ -331,8 +337,8 @@ module RBACApiClient
331
337
  # @param [Array] content_types array for Content-Type
332
338
  # @return [String] the Content-Type header (e.g. application/json)
333
339
  def select_header_content_type(content_types)
334
- # use application/json by default
335
- return 'application/json' if content_types.nil? || content_types.empty?
340
+ # return nil by default
341
+ return if content_types.nil? || content_types.empty?
336
342
  # use JSON when present, otherwise use the first one
337
343
  json_content_type = content_types.find { |s| json_mime?(s) }
338
344
  json_content_type || content_types.first
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,7 @@ module RBACApiClient
32
32
  end
33
33
  else
34
34
  super arg
35
+ @message = arg
35
36
  end
36
37
  end
37
38