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
  # PluginConfigUser plugin config user
@@ -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
  {
@@ -114,7 +120,9 @@ module OryHydraClient
114
120
  def build_from_hash(attributes)
115
121
  return nil unless attributes.is_a?(Hash)
116
122
  self.class.openapi_types.each_pair do |key, type|
117
- if type =~ /\AArray<(.*)>/i
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
118
126
  # check to ensure the input is an array given that the attribute
119
127
  # is documented as an array but the input is not
120
128
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -122,7 +130,7 @@ module OryHydraClient
122
130
  end
123
131
  elsif !attributes[self.class.attribute_map[key]].nil?
124
132
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
- end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
126
134
  end
127
135
 
128
136
  self
@@ -134,8 +142,8 @@ module OryHydraClient
134
142
  # @return [Object] Deserialized data
135
143
  def _deserialize(type, value)
136
144
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
145
+ when :Time
146
+ Time.parse(value)
139
147
  when :Date
140
148
  Date.parse(value)
141
149
  when :String
@@ -165,7 +173,9 @@ module OryHydraClient
165
173
  end
166
174
  end
167
175
  else # model
168
- OryHydraClient.const_get(type).build_from_hash(value)
176
+ # models (e.g. Pet) or oneOf
177
+ klass = OryHydraClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
179
  end
170
180
  end
171
181
 
@@ -191,7 +201,7 @@ module OryHydraClient
191
201
  is_nullable = self.class.openapi_nullable.include?(attr)
192
202
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
203
  end
194
-
204
+
195
205
  hash[param] = _to_hash(value)
196
206
  end
197
207
  hash
@@ -214,5 +224,7 @@ module OryHydraClient
214
224
  value
215
225
  end
216
226
  end
227
+
217
228
  end
229
+
218
230
  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
  # PluginDevice plugin device
@@ -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
  {
@@ -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
  #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
  # PluginEnv plugin env
@@ -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
  {
@@ -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
  #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
  # PluginInterfaceType plugin interface type
@@ -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
  {
@@ -139,7 +145,9 @@ module OryHydraClient
139
145
  def build_from_hash(attributes)
140
146
  return nil unless attributes.is_a?(Hash)
141
147
  self.class.openapi_types.each_pair do |key, type|
142
- if type =~ /\AArray<(.*)>/i
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
143
151
  # check to ensure the input is an array given that the attribute
144
152
  # is documented as an array but the input is not
145
153
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -147,7 +155,7 @@ module OryHydraClient
147
155
  end
148
156
  elsif !attributes[self.class.attribute_map[key]].nil?
149
157
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
- end # or else data not found in attributes(hash), not an issue as the data can be optional
158
+ end
151
159
  end
152
160
 
153
161
  self
@@ -159,8 +167,8 @@ module OryHydraClient
159
167
  # @return [Object] Deserialized data
160
168
  def _deserialize(type, value)
161
169
  case type.to_sym
162
- when :DateTime
163
- DateTime.parse(value)
170
+ when :Time
171
+ Time.parse(value)
164
172
  when :Date
165
173
  Date.parse(value)
166
174
  when :String
@@ -190,7 +198,9 @@ module OryHydraClient
190
198
  end
191
199
  end
192
200
  else # model
193
- OryHydraClient.const_get(type).build_from_hash(value)
201
+ # models (e.g. Pet) or oneOf
202
+ klass = OryHydraClient.const_get(type)
203
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
204
  end
195
205
  end
196
206
 
@@ -216,7 +226,7 @@ module OryHydraClient
216
226
  is_nullable = self.class.openapi_nullable.include?(attr)
217
227
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
228
  end
219
-
229
+
220
230
  hash[param] = _to_hash(value)
221
231
  end
222
232
  hash
@@ -239,5 +249,7 @@ module OryHydraClient
239
249
  value
240
250
  end
241
251
  end
252
+
242
253
  end
254
+
243
255
  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
  # PluginMount plugin mount
@@ -49,6 +50,11 @@ module OryHydraClient
49
50
  }
50
51
  end
51
52
 
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
52
58
  # Attribute type mapping.
53
59
  def self.openapi_types
54
60
  {
@@ -203,7 +209,9 @@ module OryHydraClient
203
209
  def build_from_hash(attributes)
204
210
  return nil unless attributes.is_a?(Hash)
205
211
  self.class.openapi_types.each_pair do |key, type|
206
- if type =~ /\AArray<(.*)>/i
212
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
213
+ self.send("#{key}=", nil)
214
+ elsif type =~ /\AArray<(.*)>/i
207
215
  # check to ensure the input is an array given that the attribute
208
216
  # is documented as an array but the input is not
209
217
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -211,7 +219,7 @@ module OryHydraClient
211
219
  end
212
220
  elsif !attributes[self.class.attribute_map[key]].nil?
213
221
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
214
- end # or else data not found in attributes(hash), not an issue as the data can be optional
222
+ end
215
223
  end
216
224
 
217
225
  self
@@ -223,8 +231,8 @@ module OryHydraClient
223
231
  # @return [Object] Deserialized data
224
232
  def _deserialize(type, value)
225
233
  case type.to_sym
226
- when :DateTime
227
- DateTime.parse(value)
234
+ when :Time
235
+ Time.parse(value)
228
236
  when :Date
229
237
  Date.parse(value)
230
238
  when :String
@@ -254,7 +262,9 @@ module OryHydraClient
254
262
  end
255
263
  end
256
264
  else # model
257
- OryHydraClient.const_get(type).build_from_hash(value)
265
+ # models (e.g. Pet) or oneOf
266
+ klass = OryHydraClient.const_get(type)
267
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
268
  end
259
269
  end
260
270
 
@@ -280,7 +290,7 @@ module OryHydraClient
280
290
  is_nullable = self.class.openapi_nullable.include?(attr)
281
291
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
292
  end
283
-
293
+
284
294
  hash[param] = _to_hash(value)
285
295
  end
286
296
  hash
@@ -303,5 +313,7 @@ module OryHydraClient
303
313
  value
304
314
  end
305
315
  end
316
+
306
317
  end
318
+
307
319
  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
  class PluginSettings
@@ -36,6 +37,11 @@ module OryHydraClient
36
37
  }
37
38
  end
38
39
 
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
39
45
  # Attribute type mapping.
40
46
  def self.openapi_types
41
47
  {
@@ -161,7 +167,9 @@ module OryHydraClient
161
167
  def build_from_hash(attributes)
162
168
  return nil unless attributes.is_a?(Hash)
163
169
  self.class.openapi_types.each_pair do |key, type|
164
- if type =~ /\AArray<(.*)>/i
170
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
+ self.send("#{key}=", nil)
172
+ elsif type =~ /\AArray<(.*)>/i
165
173
  # check to ensure the input is an array given that the attribute
166
174
  # is documented as an array but the input is not
167
175
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -169,7 +177,7 @@ module OryHydraClient
169
177
  end
170
178
  elsif !attributes[self.class.attribute_map[key]].nil?
171
179
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
- end # or else data not found in attributes(hash), not an issue as the data can be optional
180
+ end
173
181
  end
174
182
 
175
183
  self
@@ -181,8 +189,8 @@ module OryHydraClient
181
189
  # @return [Object] Deserialized data
182
190
  def _deserialize(type, value)
183
191
  case type.to_sym
184
- when :DateTime
185
- DateTime.parse(value)
192
+ when :Time
193
+ Time.parse(value)
186
194
  when :Date
187
195
  Date.parse(value)
188
196
  when :String
@@ -212,7 +220,9 @@ module OryHydraClient
212
220
  end
213
221
  end
214
222
  else # model
215
- OryHydraClient.const_get(type).build_from_hash(value)
223
+ # models (e.g. Pet) or oneOf
224
+ klass = OryHydraClient.const_get(type)
225
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
216
226
  end
217
227
  end
218
228
 
@@ -238,7 +248,7 @@ module OryHydraClient
238
248
  is_nullable = self.class.openapi_nullable.include?(attr)
239
249
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
250
  end
241
-
251
+
242
252
  hash[param] = _to_hash(value)
243
253
  end
244
254
  hash
@@ -261,5 +271,7 @@ module OryHydraClient
261
271
  value
262
272
  end
263
273
  end
274
+
264
275
  end
276
+
265
277
  end