ory-oathkeeper-client 0.38.5.beta1 → 0.38.9.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/docs/ApiApi.md +106 -37
  4. data/docs/CreateRuleCreated.md +8 -7
  5. data/docs/CreateRuleForbidden.md +8 -7
  6. data/docs/CreateRuleForbiddenBody.md +18 -17
  7. data/docs/CreateRuleInternalServerError.md +8 -7
  8. data/docs/CreateRuleInternalServerErrorBody.md +18 -17
  9. data/docs/CreateRuleUnauthorized.md +8 -7
  10. data/docs/CreateRuleUnauthorizedBody.md +18 -17
  11. data/docs/DecisionsForbidden.md +8 -7
  12. data/docs/DecisionsForbiddenBody.md +18 -17
  13. data/docs/DecisionsInternalServerError.md +8 -7
  14. data/docs/DecisionsInternalServerErrorBody.md +18 -17
  15. data/docs/DecisionsNotFound.md +8 -7
  16. data/docs/DecisionsNotFoundBody.md +18 -17
  17. data/docs/DecisionsUnauthorized.md +8 -7
  18. data/docs/DecisionsUnauthorizedBody.md +18 -17
  19. data/docs/DeleteRuleForbidden.md +8 -7
  20. data/docs/DeleteRuleForbiddenBody.md +18 -17
  21. data/docs/DeleteRuleInternalServerError.md +8 -7
  22. data/docs/DeleteRuleInternalServerErrorBody.md +18 -17
  23. data/docs/DeleteRuleNotFound.md +8 -7
  24. data/docs/DeleteRuleNotFoundBody.md +18 -17
  25. data/docs/DeleteRuleUnauthorized.md +8 -7
  26. data/docs/DeleteRuleUnauthorizedBody.md +18 -17
  27. data/docs/GetRuleForbidden.md +8 -7
  28. data/docs/GetRuleForbiddenBody.md +18 -17
  29. data/docs/GetRuleInternalServerError.md +8 -7
  30. data/docs/GetRuleInternalServerErrorBody.md +18 -17
  31. data/docs/GetRuleNotFound.md +8 -7
  32. data/docs/GetRuleNotFoundBody.md +18 -17
  33. data/docs/GetRuleOK.md +8 -7
  34. data/docs/GetRuleUnauthorized.md +8 -7
  35. data/docs/GetRuleUnauthorizedBody.md +18 -17
  36. data/docs/GetWellKnownForbidden.md +8 -7
  37. data/docs/GetWellKnownForbiddenBody.md +18 -17
  38. data/docs/GetWellKnownJSONWebKeysInternalServerError.md +8 -7
  39. data/docs/GetWellKnownJSONWebKeysInternalServerErrorBody.md +18 -17
  40. data/docs/GetWellKnownJSONWebKeysOK.md +8 -7
  41. data/docs/GetWellKnownOK.md +8 -7
  42. data/docs/GetWellKnownUnauthorized.md +8 -7
  43. data/docs/GetWellKnownUnauthorizedBody.md +18 -17
  44. data/docs/HealthApi.md +50 -15
  45. data/docs/HealthNotReadyStatus.md +8 -7
  46. data/docs/HealthStatus.md +8 -7
  47. data/docs/InlineResponse500.md +18 -17
  48. data/docs/IsInstanceAliveInternalServerError.md +8 -7
  49. data/docs/IsInstanceAliveInternalServerErrorBody.md +18 -17
  50. data/docs/IsInstanceAliveOK.md +8 -7
  51. data/docs/JsonWebKey.md +40 -39
  52. data/docs/JsonWebKeySet.md +8 -7
  53. data/docs/JudgeForbidden.md +8 -7
  54. data/docs/JudgeForbiddenBody.md +18 -17
  55. data/docs/JudgeInternalServerError.md +8 -7
  56. data/docs/JudgeInternalServerErrorBody.md +18 -17
  57. data/docs/JudgeNotFound.md +8 -7
  58. data/docs/JudgeNotFoundBody.md +18 -17
  59. data/docs/JudgeUnauthorized.md +8 -7
  60. data/docs/JudgeUnauthorizedBody.md +18 -17
  61. data/docs/ListRulesForbidden.md +8 -7
  62. data/docs/ListRulesForbiddenBody.md +18 -17
  63. data/docs/ListRulesInternalServerError.md +8 -7
  64. data/docs/ListRulesInternalServerErrorBody.md +18 -17
  65. data/docs/ListRulesOK.md +8 -7
  66. data/docs/ListRulesUnauthorized.md +8 -7
  67. data/docs/ListRulesUnauthorizedBody.md +18 -17
  68. data/docs/Rule.md +20 -19
  69. data/docs/RuleHandler.md +10 -9
  70. data/docs/RuleMatch.md +10 -9
  71. data/docs/SwaggerCreateRuleParameters.md +8 -7
  72. data/docs/SwaggerGetRuleParameters.md +8 -7
  73. data/docs/SwaggerHealthStatus.md +8 -7
  74. data/docs/SwaggerJSONWebKey.md +40 -39
  75. data/docs/SwaggerJSONWebKeySet.md +8 -7
  76. data/docs/SwaggerListRulesParameters.md +10 -9
  77. data/docs/SwaggerNotReadyStatus.md +8 -7
  78. data/docs/SwaggerRule.md +20 -19
  79. data/docs/SwaggerRuleHandler.md +10 -9
  80. data/docs/SwaggerRuleMatch.md +10 -9
  81. data/docs/SwaggerRuleResponse.md +8 -7
  82. data/docs/SwaggerRulesResponse.md +8 -7
  83. data/docs/SwaggerUpdateRuleParameters.md +10 -9
  84. data/docs/SwaggerVersion.md +8 -7
  85. data/docs/UpdateRuleForbidden.md +8 -7
  86. data/docs/UpdateRuleForbiddenBody.md +18 -17
  87. data/docs/UpdateRuleInternalServerError.md +8 -7
  88. data/docs/UpdateRuleInternalServerErrorBody.md +18 -17
  89. data/docs/UpdateRuleNotFound.md +8 -7
  90. data/docs/UpdateRuleNotFoundBody.md +18 -17
  91. data/docs/UpdateRuleOK.md +8 -7
  92. data/docs/UpdateRuleUnauthorized.md +8 -7
  93. data/docs/UpdateRuleUnauthorizedBody.md +18 -17
  94. data/docs/Upstream.md +12 -11
  95. data/docs/Version.md +8 -7
  96. data/docs/VersionApi.md +26 -9
  97. data/lib/ory-oathkeeper-client.rb +2 -2
  98. data/lib/ory-oathkeeper-client/api/api_api.rb +18 -14
  99. data/lib/ory-oathkeeper-client/api/health_api.rb +10 -8
  100. data/lib/ory-oathkeeper-client/api/version_api.rb +6 -5
  101. data/lib/ory-oathkeeper-client/api_client.rb +50 -48
  102. data/lib/ory-oathkeeper-client/api_error.rb +2 -2
  103. data/lib/ory-oathkeeper-client/configuration.rb +34 -7
  104. data/lib/ory-oathkeeper-client/models/create_rule_created.rb +20 -8
  105. data/lib/ory-oathkeeper-client/models/create_rule_forbidden.rb +20 -8
  106. data/lib/ory-oathkeeper-client/models/create_rule_forbidden_body.rb +21 -9
  107. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error.rb +20 -8
  108. data/lib/ory-oathkeeper-client/models/create_rule_internal_server_error_body.rb +21 -9
  109. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized.rb +20 -8
  110. data/lib/ory-oathkeeper-client/models/create_rule_unauthorized_body.rb +21 -9
  111. data/lib/ory-oathkeeper-client/models/decisions_forbidden.rb +20 -8
  112. data/lib/ory-oathkeeper-client/models/decisions_forbidden_body.rb +21 -9
  113. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error.rb +20 -8
  114. data/lib/ory-oathkeeper-client/models/decisions_internal_server_error_body.rb +21 -9
  115. data/lib/ory-oathkeeper-client/models/decisions_not_found.rb +20 -8
  116. data/lib/ory-oathkeeper-client/models/decisions_not_found_body.rb +21 -9
  117. data/lib/ory-oathkeeper-client/models/decisions_unauthorized.rb +20 -8
  118. data/lib/ory-oathkeeper-client/models/decisions_unauthorized_body.rb +21 -9
  119. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden.rb +20 -8
  120. data/lib/ory-oathkeeper-client/models/delete_rule_forbidden_body.rb +21 -9
  121. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error.rb +20 -8
  122. data/lib/ory-oathkeeper-client/models/delete_rule_internal_server_error_body.rb +21 -9
  123. data/lib/ory-oathkeeper-client/models/delete_rule_not_found.rb +20 -8
  124. data/lib/ory-oathkeeper-client/models/delete_rule_not_found_body.rb +21 -9
  125. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized.rb +20 -8
  126. data/lib/ory-oathkeeper-client/models/delete_rule_unauthorized_body.rb +21 -9
  127. data/lib/ory-oathkeeper-client/models/get_rule_forbidden.rb +20 -8
  128. data/lib/ory-oathkeeper-client/models/get_rule_forbidden_body.rb +21 -9
  129. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error.rb +20 -8
  130. data/lib/ory-oathkeeper-client/models/get_rule_internal_server_error_body.rb +21 -9
  131. data/lib/ory-oathkeeper-client/models/get_rule_not_found.rb +20 -8
  132. data/lib/ory-oathkeeper-client/models/get_rule_not_found_body.rb +21 -9
  133. data/lib/ory-oathkeeper-client/models/get_rule_ok.rb +20 -8
  134. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized.rb +20 -8
  135. data/lib/ory-oathkeeper-client/models/get_rule_unauthorized_body.rb +21 -9
  136. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden.rb +20 -8
  137. data/lib/ory-oathkeeper-client/models/get_well_known_forbidden_body.rb +21 -9
  138. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error.rb +20 -8
  139. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_internal_server_error_body.rb +21 -9
  140. data/lib/ory-oathkeeper-client/models/get_well_known_json_web_keys_ok.rb +20 -8
  141. data/lib/ory-oathkeeper-client/models/get_well_known_ok.rb +20 -8
  142. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized.rb +20 -8
  143. data/lib/ory-oathkeeper-client/models/get_well_known_unauthorized_body.rb +21 -9
  144. data/lib/ory-oathkeeper-client/models/health_not_ready_status.rb +20 -8
  145. data/lib/ory-oathkeeper-client/models/health_status.rb +20 -8
  146. data/lib/ory-oathkeeper-client/models/inline_response500.rb +20 -8
  147. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error.rb +20 -8
  148. data/lib/ory-oathkeeper-client/models/is_instance_alive_internal_server_error_body.rb +21 -9
  149. data/lib/ory-oathkeeper-client/models/is_instance_alive_ok.rb +20 -8
  150. data/lib/ory-oathkeeper-client/models/json_web_key.rb +20 -8
  151. data/lib/ory-oathkeeper-client/models/json_web_key_set.rb +20 -8
  152. data/lib/ory-oathkeeper-client/models/judge_forbidden.rb +20 -8
  153. data/lib/ory-oathkeeper-client/models/judge_forbidden_body.rb +21 -9
  154. data/lib/ory-oathkeeper-client/models/judge_internal_server_error.rb +20 -8
  155. data/lib/ory-oathkeeper-client/models/judge_internal_server_error_body.rb +21 -9
  156. data/lib/ory-oathkeeper-client/models/judge_not_found.rb +20 -8
  157. data/lib/ory-oathkeeper-client/models/judge_not_found_body.rb +21 -9
  158. data/lib/ory-oathkeeper-client/models/judge_unauthorized.rb +20 -8
  159. data/lib/ory-oathkeeper-client/models/judge_unauthorized_body.rb +21 -9
  160. data/lib/ory-oathkeeper-client/models/list_rules_forbidden.rb +20 -8
  161. data/lib/ory-oathkeeper-client/models/list_rules_forbidden_body.rb +21 -9
  162. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error.rb +20 -8
  163. data/lib/ory-oathkeeper-client/models/list_rules_internal_server_error_body.rb +21 -9
  164. data/lib/ory-oathkeeper-client/models/list_rules_ok.rb +20 -8
  165. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized.rb +20 -8
  166. data/lib/ory-oathkeeper-client/models/list_rules_unauthorized_body.rb +21 -9
  167. data/lib/ory-oathkeeper-client/models/rule.rb +20 -8
  168. data/lib/ory-oathkeeper-client/models/rule_handler.rb +20 -8
  169. data/lib/ory-oathkeeper-client/models/rule_match.rb +20 -8
  170. data/lib/ory-oathkeeper-client/models/swagger_create_rule_parameters.rb +20 -8
  171. data/lib/ory-oathkeeper-client/models/swagger_get_rule_parameters.rb +20 -8
  172. data/lib/ory-oathkeeper-client/models/swagger_health_status.rb +20 -8
  173. data/lib/ory-oathkeeper-client/models/swagger_json_web_key.rb +20 -8
  174. data/lib/ory-oathkeeper-client/models/swagger_json_web_key_set.rb +20 -8
  175. data/lib/ory-oathkeeper-client/models/swagger_list_rules_parameters.rb +20 -8
  176. data/lib/ory-oathkeeper-client/models/swagger_not_ready_status.rb +20 -8
  177. data/lib/ory-oathkeeper-client/models/swagger_rule.rb +20 -8
  178. data/lib/ory-oathkeeper-client/models/swagger_rule_handler.rb +20 -8
  179. data/lib/ory-oathkeeper-client/models/swagger_rule_match.rb +20 -8
  180. data/lib/ory-oathkeeper-client/models/swagger_rule_response.rb +20 -8
  181. data/lib/ory-oathkeeper-client/models/swagger_rules_response.rb +20 -8
  182. data/lib/ory-oathkeeper-client/models/swagger_update_rule_parameters.rb +20 -8
  183. data/lib/ory-oathkeeper-client/models/swagger_version.rb +20 -8
  184. data/lib/ory-oathkeeper-client/models/update_rule_forbidden.rb +20 -8
  185. data/lib/ory-oathkeeper-client/models/update_rule_forbidden_body.rb +21 -9
  186. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error.rb +20 -8
  187. data/lib/ory-oathkeeper-client/models/update_rule_internal_server_error_body.rb +21 -9
  188. data/lib/ory-oathkeeper-client/models/update_rule_not_found.rb +20 -8
  189. data/lib/ory-oathkeeper-client/models/update_rule_not_found_body.rb +21 -9
  190. data/lib/ory-oathkeeper-client/models/update_rule_ok.rb +20 -8
  191. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized.rb +20 -8
  192. data/lib/ory-oathkeeper-client/models/update_rule_unauthorized_body.rb +21 -9
  193. data/lib/ory-oathkeeper-client/models/upstream.rb +20 -8
  194. data/lib/ory-oathkeeper-client/models/version.rb +20 -8
  195. data/lib/ory-oathkeeper-client/version.rb +3 -3
  196. data/ory-oathkeeper-client.gemspec +4 -5
  197. data/spec/api_client_spec.rb +3 -3
  198. data/spec/configuration_spec.rb +2 -2
  199. data/spec/spec_helper.rb +2 -2
  200. metadata +81 -101
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # The standard error format
@@ -24,6 +25,11 @@ module OryHydraClient
24
25
  }
25
26
  end
26
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
27
33
  # Attribute type mapping.
28
34
  def self.openapi_types
29
35
  {
@@ -103,7 +109,9 @@ module OryHydraClient
103
109
  def build_from_hash(attributes)
104
110
  return nil unless attributes.is_a?(Hash)
105
111
  self.class.openapi_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
107
115
  # check to ensure the input is an array given that the attribute
108
116
  # is documented as an array but the input is not
109
117
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -111,7 +119,7 @@ module OryHydraClient
111
119
  end
112
120
  elsif !attributes[self.class.attribute_map[key]].nil?
113
121
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- end # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
115
123
  end
116
124
 
117
125
  self
@@ -123,8 +131,8 @@ module OryHydraClient
123
131
  # @return [Object] Deserialized data
124
132
  def _deserialize(type, value)
125
133
  case type.to_sym
126
- when :DateTime
127
- DateTime.parse(value)
134
+ when :Time
135
+ Time.parse(value)
128
136
  when :Date
129
137
  Date.parse(value)
130
138
  when :String
@@ -154,7 +162,9 @@ module OryHydraClient
154
162
  end
155
163
  end
156
164
  else # model
157
- OryHydraClient.const_get(type).build_from_hash(value)
165
+ # models (e.g. Pet) or oneOf
166
+ klass = OryHydraClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
158
168
  end
159
169
  end
160
170
 
@@ -180,7 +190,7 @@ module OryHydraClient
180
190
  is_nullable = self.class.openapi_nullable.include?(attr)
181
191
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
192
  end
183
-
193
+
184
194
  hash[param] = _to_hash(value)
185
195
  end
186
196
  hash
@@ -203,5 +213,7 @@ module OryHydraClient
203
213
  value
204
214
  end
205
215
  end
216
+
206
217
  end
218
+
207
219
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # DecisionsUnauthorizedBody DecisionsUnauthorizedBody decisions unauthorized body
@@ -45,11 +46,16 @@ module OryHydraClient
45
46
  }
46
47
  end
47
48
 
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
48
54
  # Attribute type mapping.
49
55
  def self.openapi_types
50
56
  {
51
57
  :'code' => :'Integer',
52
- :'details' => :'Array<Hash<String, Object>>',
58
+ :'details' => :'Array<Object>',
53
59
  :'message' => :'String',
54
60
  :'reason' => :'String',
55
61
  :'request' => :'String',
@@ -156,7 +162,9 @@ module OryHydraClient
156
162
  def build_from_hash(attributes)
157
163
  return nil unless attributes.is_a?(Hash)
158
164
  self.class.openapi_types.each_pair do |key, type|
159
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
160
168
  # check to ensure the input is an array given that the attribute
161
169
  # is documented as an array but the input is not
162
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -164,7 +172,7 @@ module OryHydraClient
164
172
  end
165
173
  elsif !attributes[self.class.attribute_map[key]].nil?
166
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
168
176
  end
169
177
 
170
178
  self
@@ -176,8 +184,8 @@ module OryHydraClient
176
184
  # @return [Object] Deserialized data
177
185
  def _deserialize(type, value)
178
186
  case type.to_sym
179
- when :DateTime
180
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
181
189
  when :Date
182
190
  Date.parse(value)
183
191
  when :String
@@ -207,7 +215,9 @@ module OryHydraClient
207
215
  end
208
216
  end
209
217
  else # model
210
- OryHydraClient.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = OryHydraClient.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
221
  end
212
222
  end
213
223
 
@@ -233,7 +243,7 @@ module OryHydraClient
233
243
  is_nullable = self.class.openapi_nullable.include?(attr)
234
244
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
245
  end
236
-
246
+
237
247
  hash[param] = _to_hash(value)
238
248
  end
239
249
  hash
@@ -256,5 +266,7 @@ module OryHydraClient
256
266
  value
257
267
  end
258
268
  end
269
+
259
270
  end
271
+
260
272
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # The standard error format
@@ -24,6 +25,11 @@ module OryHydraClient
24
25
  }
25
26
  end
26
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
27
33
  # Attribute type mapping.
28
34
  def self.openapi_types
29
35
  {
@@ -103,7 +109,9 @@ module OryHydraClient
103
109
  def build_from_hash(attributes)
104
110
  return nil unless attributes.is_a?(Hash)
105
111
  self.class.openapi_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
107
115
  # check to ensure the input is an array given that the attribute
108
116
  # is documented as an array but the input is not
109
117
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -111,7 +119,7 @@ module OryHydraClient
111
119
  end
112
120
  elsif !attributes[self.class.attribute_map[key]].nil?
113
121
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- end # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
115
123
  end
116
124
 
117
125
  self
@@ -123,8 +131,8 @@ module OryHydraClient
123
131
  # @return [Object] Deserialized data
124
132
  def _deserialize(type, value)
125
133
  case type.to_sym
126
- when :DateTime
127
- DateTime.parse(value)
134
+ when :Time
135
+ Time.parse(value)
128
136
  when :Date
129
137
  Date.parse(value)
130
138
  when :String
@@ -154,7 +162,9 @@ module OryHydraClient
154
162
  end
155
163
  end
156
164
  else # model
157
- OryHydraClient.const_get(type).build_from_hash(value)
165
+ # models (e.g. Pet) or oneOf
166
+ klass = OryHydraClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
158
168
  end
159
169
  end
160
170
 
@@ -180,7 +190,7 @@ module OryHydraClient
180
190
  is_nullable = self.class.openapi_nullable.include?(attr)
181
191
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
192
  end
183
-
193
+
184
194
  hash[param] = _to_hash(value)
185
195
  end
186
196
  hash
@@ -203,5 +213,7 @@ module OryHydraClient
203
213
  value
204
214
  end
205
215
  end
216
+
206
217
  end
218
+
207
219
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # DeleteRuleForbiddenBody DeleteRuleForbiddenBody DeleteRuleForbiddenBody DeleteRuleForbiddenBody DeleteRuleForbiddenBody DeleteRuleForbiddenBody DeleteRuleForbiddenBody delete rule forbidden body
@@ -45,11 +46,16 @@ module OryHydraClient
45
46
  }
46
47
  end
47
48
 
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
48
54
  # Attribute type mapping.
49
55
  def self.openapi_types
50
56
  {
51
57
  :'code' => :'Integer',
52
- :'details' => :'Array<Hash<String, Object>>',
58
+ :'details' => :'Array<Object>',
53
59
  :'message' => :'String',
54
60
  :'reason' => :'String',
55
61
  :'request' => :'String',
@@ -156,7 +162,9 @@ module OryHydraClient
156
162
  def build_from_hash(attributes)
157
163
  return nil unless attributes.is_a?(Hash)
158
164
  self.class.openapi_types.each_pair do |key, type|
159
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
160
168
  # check to ensure the input is an array given that the attribute
161
169
  # is documented as an array but the input is not
162
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -164,7 +172,7 @@ module OryHydraClient
164
172
  end
165
173
  elsif !attributes[self.class.attribute_map[key]].nil?
166
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
168
176
  end
169
177
 
170
178
  self
@@ -176,8 +184,8 @@ module OryHydraClient
176
184
  # @return [Object] Deserialized data
177
185
  def _deserialize(type, value)
178
186
  case type.to_sym
179
- when :DateTime
180
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
181
189
  when :Date
182
190
  Date.parse(value)
183
191
  when :String
@@ -207,7 +215,9 @@ module OryHydraClient
207
215
  end
208
216
  end
209
217
  else # model
210
- OryHydraClient.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = OryHydraClient.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
221
  end
212
222
  end
213
223
 
@@ -233,7 +243,7 @@ module OryHydraClient
233
243
  is_nullable = self.class.openapi_nullable.include?(attr)
234
244
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
245
  end
236
-
246
+
237
247
  hash[param] = _to_hash(value)
238
248
  end
239
249
  hash
@@ -256,5 +266,7 @@ module OryHydraClient
256
266
  value
257
267
  end
258
268
  end
269
+
259
270
  end
271
+
260
272
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # The standard error format
@@ -24,6 +25,11 @@ module OryHydraClient
24
25
  }
25
26
  end
26
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
27
33
  # Attribute type mapping.
28
34
  def self.openapi_types
29
35
  {
@@ -103,7 +109,9 @@ module OryHydraClient
103
109
  def build_from_hash(attributes)
104
110
  return nil unless attributes.is_a?(Hash)
105
111
  self.class.openapi_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
107
115
  # check to ensure the input is an array given that the attribute
108
116
  # is documented as an array but the input is not
109
117
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -111,7 +119,7 @@ module OryHydraClient
111
119
  end
112
120
  elsif !attributes[self.class.attribute_map[key]].nil?
113
121
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- end # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
115
123
  end
116
124
 
117
125
  self
@@ -123,8 +131,8 @@ module OryHydraClient
123
131
  # @return [Object] Deserialized data
124
132
  def _deserialize(type, value)
125
133
  case type.to_sym
126
- when :DateTime
127
- DateTime.parse(value)
134
+ when :Time
135
+ Time.parse(value)
128
136
  when :Date
129
137
  Date.parse(value)
130
138
  when :String
@@ -154,7 +162,9 @@ module OryHydraClient
154
162
  end
155
163
  end
156
164
  else # model
157
- OryHydraClient.const_get(type).build_from_hash(value)
165
+ # models (e.g. Pet) or oneOf
166
+ klass = OryHydraClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
158
168
  end
159
169
  end
160
170
 
@@ -180,7 +190,7 @@ module OryHydraClient
180
190
  is_nullable = self.class.openapi_nullable.include?(attr)
181
191
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
192
  end
183
-
193
+
184
194
  hash[param] = _to_hash(value)
185
195
  end
186
196
  hash
@@ -203,5 +213,7 @@ module OryHydraClient
203
213
  value
204
214
  end
205
215
  end
216
+
206
217
  end
218
+
207
219
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
5
5
 
6
- The version of the OpenAPI document: v0.0.0-alpha.37
6
+ The version of the OpenAPI document: v0.0.0
7
7
  Contact: hi@ory.am
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody DeleteRuleInternalServerErrorBody delete rule internal server error body
@@ -45,11 +46,16 @@ module OryHydraClient
45
46
  }
46
47
  end
47
48
 
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
48
54
  # Attribute type mapping.
49
55
  def self.openapi_types
50
56
  {
51
57
  :'code' => :'Integer',
52
- :'details' => :'Array<Hash<String, Object>>',
58
+ :'details' => :'Array<Object>',
53
59
  :'message' => :'String',
54
60
  :'reason' => :'String',
55
61
  :'request' => :'String',
@@ -156,7 +162,9 @@ module OryHydraClient
156
162
  def build_from_hash(attributes)
157
163
  return nil unless attributes.is_a?(Hash)
158
164
  self.class.openapi_types.each_pair do |key, type|
159
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
160
168
  # check to ensure the input is an array given that the attribute
161
169
  # is documented as an array but the input is not
162
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -164,7 +172,7 @@ module OryHydraClient
164
172
  end
165
173
  elsif !attributes[self.class.attribute_map[key]].nil?
166
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
168
176
  end
169
177
 
170
178
  self
@@ -176,8 +184,8 @@ module OryHydraClient
176
184
  # @return [Object] Deserialized data
177
185
  def _deserialize(type, value)
178
186
  case type.to_sym
179
- when :DateTime
180
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
181
189
  when :Date
182
190
  Date.parse(value)
183
191
  when :String
@@ -207,7 +215,9 @@ module OryHydraClient
207
215
  end
208
216
  end
209
217
  else # model
210
- OryHydraClient.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = OryHydraClient.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
221
  end
212
222
  end
213
223
 
@@ -233,7 +243,7 @@ module OryHydraClient
233
243
  is_nullable = self.class.openapi_nullable.include?(attr)
234
244
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
245
  end
236
-
246
+
237
247
  hash[param] = _to_hash(value)
238
248
  end
239
249
  hash
@@ -256,5 +266,7 @@ module OryHydraClient
256
266
  value
257
267
  end
258
268
  end
269
+
259
270
  end
271
+
260
272
  end