ory-hydra-client 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/docs/AcceptConsentRequest.md +18 -17
  4. data/docs/AcceptLoginRequest.md +18 -17
  5. data/docs/AdminApi.md +815 -303
  6. data/docs/CompletedRequest.md +8 -7
  7. data/docs/ConsentRequest.md +30 -29
  8. data/docs/ConsentRequestSession.md +10 -9
  9. data/docs/ContainerWaitOKBodyError.md +8 -7
  10. data/docs/FlushInactiveOAuth2TokensRequest.md +8 -7
  11. data/docs/GenericError.md +14 -13
  12. data/docs/HealthNotReadyStatus.md +8 -7
  13. data/docs/HealthStatus.md +8 -7
  14. data/docs/JSONWebKey.md +40 -39
  15. data/docs/JSONWebKeySet.md +8 -7
  16. data/docs/JsonWebKeySetGeneratorRequest.md +12 -11
  17. data/docs/LoginRequest.md +24 -23
  18. data/docs/LogoutRequest.md +14 -13
  19. data/docs/OAuth2Client.md +72 -71
  20. data/docs/OAuth2TokenIntrospection.md +34 -33
  21. data/docs/Oauth2TokenResponse.md +18 -17
  22. data/docs/OpenIDConnectContext.md +16 -15
  23. data/docs/PluginConfig.md +38 -37
  24. data/docs/PluginConfigArgs.md +14 -13
  25. data/docs/PluginConfigInterface.md +10 -9
  26. data/docs/PluginConfigLinux.md +12 -11
  27. data/docs/PluginConfigNetwork.md +8 -7
  28. data/docs/PluginConfigRootfs.md +10 -9
  29. data/docs/PluginConfigUser.md +10 -9
  30. data/docs/PluginDevice.md +14 -13
  31. data/docs/PluginEnv.md +14 -13
  32. data/docs/PluginInterfaceType.md +12 -11
  33. data/docs/PluginMount.md +20 -19
  34. data/docs/PluginSettings.md +14 -13
  35. data/docs/PreviousConsentSession.md +20 -19
  36. data/docs/PublicApi.md +201 -60
  37. data/docs/RejectRequest.md +16 -15
  38. data/docs/UserinfoResponse.md +44 -43
  39. data/docs/Version.md +8 -7
  40. data/docs/VolumeUsageData.md +10 -9
  41. data/docs/WellKnown.md +58 -57
  42. data/lib/ory-hydra-client.rb +2 -2
  43. data/lib/ory-hydra-client/api/admin_api.rb +122 -92
  44. data/lib/ory-hydra-client/api/public_api.rb +34 -26
  45. data/lib/ory-hydra-client/api_client.rb +50 -48
  46. data/lib/ory-hydra-client/api_error.rb +2 -2
  47. data/lib/ory-hydra-client/configuration.rb +34 -7
  48. data/lib/ory-hydra-client/models/accept_consent_request.rb +21 -9
  49. data/lib/ory-hydra-client/models/accept_login_request.rb +20 -8
  50. data/lib/ory-hydra-client/models/completed_request.rb +20 -8
  51. data/lib/ory-hydra-client/models/consent_request.rb +20 -8
  52. data/lib/ory-hydra-client/models/consent_request_session.rb +20 -8
  53. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +20 -8
  54. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +21 -9
  55. data/lib/ory-hydra-client/models/generic_error.rb +20 -8
  56. data/lib/ory-hydra-client/models/health_not_ready_status.rb +20 -8
  57. data/lib/ory-hydra-client/models/health_status.rb +20 -8
  58. data/lib/ory-hydra-client/models/json_web_key.rb +20 -8
  59. data/lib/ory-hydra-client/models/json_web_key_set.rb +20 -8
  60. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +20 -8
  61. data/lib/ory-hydra-client/models/login_request.rb +20 -8
  62. data/lib/ory-hydra-client/models/logout_request.rb +20 -8
  63. data/lib/ory-hydra-client/models/o_auth2_client.rb +22 -10
  64. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +20 -8
  65. data/lib/ory-hydra-client/models/oauth2_token_response.rb +20 -8
  66. data/lib/ory-hydra-client/models/open_id_connect_context.rb +20 -8
  67. data/lib/ory-hydra-client/models/plugin_config.rb +20 -8
  68. data/lib/ory-hydra-client/models/plugin_config_args.rb +20 -8
  69. data/lib/ory-hydra-client/models/plugin_config_interface.rb +20 -8
  70. data/lib/ory-hydra-client/models/plugin_config_linux.rb +20 -8
  71. data/lib/ory-hydra-client/models/plugin_config_network.rb +20 -8
  72. data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +20 -8
  73. data/lib/ory-hydra-client/models/plugin_config_user.rb +20 -8
  74. data/lib/ory-hydra-client/models/plugin_device.rb +20 -8
  75. data/lib/ory-hydra-client/models/plugin_env.rb +20 -8
  76. data/lib/ory-hydra-client/models/plugin_interface_type.rb +20 -8
  77. data/lib/ory-hydra-client/models/plugin_mount.rb +20 -8
  78. data/lib/ory-hydra-client/models/plugin_settings.rb +20 -8
  79. data/lib/ory-hydra-client/models/previous_consent_session.rb +21 -9
  80. data/lib/ory-hydra-client/models/reject_request.rb +20 -8
  81. data/lib/ory-hydra-client/models/userinfo_response.rb +20 -8
  82. data/lib/ory-hydra-client/models/version.rb +20 -8
  83. data/lib/ory-hydra-client/models/volume_usage_data.rb +20 -8
  84. data/lib/ory-hydra-client/models/well_known.rb +20 -8
  85. data/lib/ory-hydra-client/version.rb +3 -3
  86. data/ory-hydra-client.gemspec +4 -5
  87. data/spec/api_client_spec.rb +3 -3
  88. data/spec/configuration_spec.rb +2 -2
  89. data/spec/spec_helper.rb +2 -2
  90. metadata +32 -52
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  class PluginConfig
@@ -78,6 +79,11 @@ module OryHydraClient
78
79
  }
79
80
  end
80
81
 
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ attribute_map.values
85
+ end
86
+
81
87
  # Attribute type mapping.
82
88
  def self.openapi_types
83
89
  {
@@ -318,7 +324,9 @@ module OryHydraClient
318
324
  def build_from_hash(attributes)
319
325
  return nil unless attributes.is_a?(Hash)
320
326
  self.class.openapi_types.each_pair do |key, type|
321
- if type =~ /\AArray<(.*)>/i
327
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
328
+ self.send("#{key}=", nil)
329
+ elsif type =~ /\AArray<(.*)>/i
322
330
  # check to ensure the input is an array given that the attribute
323
331
  # is documented as an array but the input is not
324
332
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -326,7 +334,7 @@ module OryHydraClient
326
334
  end
327
335
  elsif !attributes[self.class.attribute_map[key]].nil?
328
336
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
329
- end # or else data not found in attributes(hash), not an issue as the data can be optional
337
+ end
330
338
  end
331
339
 
332
340
  self
@@ -338,8 +346,8 @@ module OryHydraClient
338
346
  # @return [Object] Deserialized data
339
347
  def _deserialize(type, value)
340
348
  case type.to_sym
341
- when :DateTime
342
- DateTime.parse(value)
349
+ when :Time
350
+ Time.parse(value)
343
351
  when :Date
344
352
  Date.parse(value)
345
353
  when :String
@@ -369,7 +377,9 @@ module OryHydraClient
369
377
  end
370
378
  end
371
379
  else # model
372
- OryHydraClient.const_get(type).build_from_hash(value)
380
+ # models (e.g. Pet) or oneOf
381
+ klass = OryHydraClient.const_get(type)
382
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
373
383
  end
374
384
  end
375
385
 
@@ -395,7 +405,7 @@ module OryHydraClient
395
405
  is_nullable = self.class.openapi_nullable.include?(attr)
396
406
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
397
407
  end
398
-
408
+
399
409
  hash[param] = _to_hash(value)
400
410
  end
401
411
  hash
@@ -418,5 +428,7 @@ module OryHydraClient
418
428
  value
419
429
  end
420
430
  end
431
+
421
432
  end
433
+
422
434
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  # PluginConfigArgs plugin config args
@@ -37,6 +38,11 @@ module OryHydraClient
37
38
  }
38
39
  end
39
40
 
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
40
46
  # Attribute type mapping.
41
47
  def self.openapi_types
42
48
  {
@@ -158,7 +164,9 @@ module OryHydraClient
158
164
  def build_from_hash(attributes)
159
165
  return nil unless attributes.is_a?(Hash)
160
166
  self.class.openapi_types.each_pair do |key, type|
161
- if type =~ /\AArray<(.*)>/i
167
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
168
+ self.send("#{key}=", nil)
169
+ elsif type =~ /\AArray<(.*)>/i
162
170
  # check to ensure the input is an array given that the attribute
163
171
  # is documented as an array but the input is not
164
172
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -166,7 +174,7 @@ module OryHydraClient
166
174
  end
167
175
  elsif !attributes[self.class.attribute_map[key]].nil?
168
176
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
- end # or else data not found in attributes(hash), not an issue as the data can be optional
177
+ end
170
178
  end
171
179
 
172
180
  self
@@ -178,8 +186,8 @@ module OryHydraClient
178
186
  # @return [Object] Deserialized data
179
187
  def _deserialize(type, value)
180
188
  case type.to_sym
181
- when :DateTime
182
- DateTime.parse(value)
189
+ when :Time
190
+ Time.parse(value)
183
191
  when :Date
184
192
  Date.parse(value)
185
193
  when :String
@@ -209,7 +217,9 @@ module OryHydraClient
209
217
  end
210
218
  end
211
219
  else # model
212
- OryHydraClient.const_get(type).build_from_hash(value)
220
+ # models (e.g. Pet) or oneOf
221
+ klass = OryHydraClient.const_get(type)
222
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
223
  end
214
224
  end
215
225
 
@@ -235,7 +245,7 @@ module OryHydraClient
235
245
  is_nullable = self.class.openapi_nullable.include?(attr)
236
246
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
247
  end
238
-
248
+
239
249
  hash[param] = _to_hash(value)
240
250
  end
241
251
  hash
@@ -258,5 +268,7 @@ module OryHydraClient
258
268
  value
259
269
  end
260
270
  end
271
+
261
272
  end
273
+
262
274
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  # PluginConfigInterface The interface between Docker and the plugin
@@ -29,6 +30,11 @@ module OryHydraClient
29
30
  }
30
31
  end
31
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
@@ -126,7 +132,9 @@ module OryHydraClient
126
132
  def build_from_hash(attributes)
127
133
  return nil unless attributes.is_a?(Hash)
128
134
  self.class.openapi_types.each_pair do |key, type|
129
- if type =~ /\AArray<(.*)>/i
135
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
+ self.send("#{key}=", nil)
137
+ elsif type =~ /\AArray<(.*)>/i
130
138
  # check to ensure the input is an array given that the attribute
131
139
  # is documented as an array but the input is not
132
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -134,7 +142,7 @@ module OryHydraClient
134
142
  end
135
143
  elsif !attributes[self.class.attribute_map[key]].nil?
136
144
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
- end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
138
146
  end
139
147
 
140
148
  self
@@ -146,8 +154,8 @@ module OryHydraClient
146
154
  # @return [Object] Deserialized data
147
155
  def _deserialize(type, value)
148
156
  case type.to_sym
149
- when :DateTime
150
- DateTime.parse(value)
157
+ when :Time
158
+ Time.parse(value)
151
159
  when :Date
152
160
  Date.parse(value)
153
161
  when :String
@@ -177,7 +185,9 @@ module OryHydraClient
177
185
  end
178
186
  end
179
187
  else # model
180
- OryHydraClient.const_get(type).build_from_hash(value)
188
+ # models (e.g. Pet) or oneOf
189
+ klass = OryHydraClient.const_get(type)
190
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
191
  end
182
192
  end
183
193
 
@@ -203,7 +213,7 @@ module OryHydraClient
203
213
  is_nullable = self.class.openapi_nullable.include?(attr)
204
214
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
215
  end
206
-
216
+
207
217
  hash[param] = _to_hash(value)
208
218
  end
209
219
  hash
@@ -226,5 +236,7 @@ module OryHydraClient
226
236
  value
227
237
  end
228
238
  end
239
+
229
240
  end
241
+
230
242
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  # PluginConfigLinux plugin config linux
@@ -33,6 +34,11 @@ module OryHydraClient
33
34
  }
34
35
  end
35
36
 
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
36
42
  # Attribute type mapping.
37
43
  def self.openapi_types
38
44
  {
@@ -143,7 +149,9 @@ module OryHydraClient
143
149
  def build_from_hash(attributes)
144
150
  return nil unless attributes.is_a?(Hash)
145
151
  self.class.openapi_types.each_pair do |key, type|
146
- if type =~ /\AArray<(.*)>/i
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
147
155
  # check to ensure the input is an array given that the attribute
148
156
  # is documented as an array but the input is not
149
157
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -151,7 +159,7 @@ module OryHydraClient
151
159
  end
152
160
  elsif !attributes[self.class.attribute_map[key]].nil?
153
161
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
- end # or else data not found in attributes(hash), not an issue as the data can be optional
162
+ end
155
163
  end
156
164
 
157
165
  self
@@ -163,8 +171,8 @@ module OryHydraClient
163
171
  # @return [Object] Deserialized data
164
172
  def _deserialize(type, value)
165
173
  case type.to_sym
166
- when :DateTime
167
- DateTime.parse(value)
174
+ when :Time
175
+ Time.parse(value)
168
176
  when :Date
169
177
  Date.parse(value)
170
178
  when :String
@@ -194,7 +202,9 @@ module OryHydraClient
194
202
  end
195
203
  end
196
204
  else # model
197
- OryHydraClient.const_get(type).build_from_hash(value)
205
+ # models (e.g. Pet) or oneOf
206
+ klass = OryHydraClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
208
  end
199
209
  end
200
210
 
@@ -220,7 +230,7 @@ module OryHydraClient
220
230
  is_nullable = self.class.openapi_nullable.include?(attr)
221
231
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
232
  end
223
-
233
+
224
234
  hash[param] = _to_hash(value)
225
235
  end
226
236
  hash
@@ -243,5 +253,7 @@ module OryHydraClient
243
253
  value
244
254
  end
245
255
  end
256
+
246
257
  end
258
+
247
259
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  # PluginConfigNetwork plugin config network
@@ -25,6 +26,11 @@ module OryHydraClient
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
@@ -109,7 +115,9 @@ module OryHydraClient
109
115
  def build_from_hash(attributes)
110
116
  return nil unless attributes.is_a?(Hash)
111
117
  self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
113
121
  # check to ensure the input is an array given that the attribute
114
122
  # is documented as an array but the input is not
115
123
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -117,7 +125,7 @@ module OryHydraClient
117
125
  end
118
126
  elsif !attributes[self.class.attribute_map[key]].nil?
119
127
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
121
129
  end
122
130
 
123
131
  self
@@ -129,8 +137,8 @@ module OryHydraClient
129
137
  # @return [Object] Deserialized data
130
138
  def _deserialize(type, value)
131
139
  case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
140
+ when :Time
141
+ Time.parse(value)
134
142
  when :Date
135
143
  Date.parse(value)
136
144
  when :String
@@ -160,7 +168,9 @@ module OryHydraClient
160
168
  end
161
169
  end
162
170
  else # model
163
- OryHydraClient.const_get(type).build_from_hash(value)
171
+ # models (e.g. Pet) or oneOf
172
+ klass = OryHydraClient.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
174
  end
165
175
  end
166
176
 
@@ -186,7 +196,7 @@ module OryHydraClient
186
196
  is_nullable = self.class.openapi_nullable.include?(attr)
187
197
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
198
  end
189
-
199
+
190
200
  hash[param] = _to_hash(value)
191
201
  end
192
202
  hash
@@ -209,5 +219,7 @@ module OryHydraClient
209
219
  value
210
220
  end
211
221
  end
222
+
212
223
  end
224
+
213
225
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
5
 
6
- The version of the OpenAPI document: v1.9.0
6
+ The version of the OpenAPI document: v1.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
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
  # PluginConfigRootfs plugin config rootfs
@@ -29,6 +30,11 @@ module OryHydraClient
29
30
  }
30
31
  end
31
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
@@ -116,7 +122,9 @@ module OryHydraClient
116
122
  def build_from_hash(attributes)
117
123
  return nil unless attributes.is_a?(Hash)
118
124
  self.class.openapi_types.each_pair do |key, type|
119
- if type =~ /\AArray<(.*)>/i
125
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
126
+ self.send("#{key}=", nil)
127
+ elsif type =~ /\AArray<(.*)>/i
120
128
  # check to ensure the input is an array given that the attribute
121
129
  # is documented as an array but the input is not
122
130
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -124,7 +132,7 @@ module OryHydraClient
124
132
  end
125
133
  elsif !attributes[self.class.attribute_map[key]].nil?
126
134
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
- end # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
128
136
  end
129
137
 
130
138
  self
@@ -136,8 +144,8 @@ module OryHydraClient
136
144
  # @return [Object] Deserialized data
137
145
  def _deserialize(type, value)
138
146
  case type.to_sym
139
- when :DateTime
140
- DateTime.parse(value)
147
+ when :Time
148
+ Time.parse(value)
141
149
  when :Date
142
150
  Date.parse(value)
143
151
  when :String
@@ -167,7 +175,9 @@ module OryHydraClient
167
175
  end
168
176
  end
169
177
  else # model
170
- OryHydraClient.const_get(type).build_from_hash(value)
178
+ # models (e.g. Pet) or oneOf
179
+ klass = OryHydraClient.const_get(type)
180
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
181
  end
172
182
  end
173
183
 
@@ -193,7 +203,7 @@ module OryHydraClient
193
203
  is_nullable = self.class.openapi_nullable.include?(attr)
194
204
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
205
  end
196
-
206
+
197
207
  hash[param] = _to_hash(value)
198
208
  end
199
209
  hash
@@ -216,5 +226,7 @@ module OryHydraClient
216
226
  value
217
227
  end
218
228
  end
229
+
219
230
  end
231
+
220
232
  end