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 AcceptLoginRequest
@@ -43,6 +44,11 @@ module OryHydraClient
43
44
  }
44
45
  end
45
46
 
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
46
52
  # Attribute type mapping.
47
53
  def self.openapi_types
48
54
  {
@@ -157,7 +163,9 @@ module OryHydraClient
157
163
  def build_from_hash(attributes)
158
164
  return nil unless attributes.is_a?(Hash)
159
165
  self.class.openapi_types.each_pair do |key, type|
160
- if type =~ /\AArray<(.*)>/i
166
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
+ self.send("#{key}=", nil)
168
+ elsif type =~ /\AArray<(.*)>/i
161
169
  # check to ensure the input is an array given that the attribute
162
170
  # is documented as an array but the input is not
163
171
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -165,7 +173,7 @@ module OryHydraClient
165
173
  end
166
174
  elsif !attributes[self.class.attribute_map[key]].nil?
167
175
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
- end # or else data not found in attributes(hash), not an issue as the data can be optional
176
+ end
169
177
  end
170
178
 
171
179
  self
@@ -177,8 +185,8 @@ module OryHydraClient
177
185
  # @return [Object] Deserialized data
178
186
  def _deserialize(type, value)
179
187
  case type.to_sym
180
- when :DateTime
181
- DateTime.parse(value)
188
+ when :Time
189
+ Time.parse(value)
182
190
  when :Date
183
191
  Date.parse(value)
184
192
  when :String
@@ -208,7 +216,9 @@ module OryHydraClient
208
216
  end
209
217
  end
210
218
  else # model
211
- OryHydraClient.const_get(type).build_from_hash(value)
219
+ # models (e.g. Pet) or oneOf
220
+ klass = OryHydraClient.const_get(type)
221
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
222
  end
213
223
  end
214
224
 
@@ -234,7 +244,7 @@ module OryHydraClient
234
244
  is_nullable = self.class.openapi_nullable.include?(attr)
235
245
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
246
  end
237
-
247
+
238
248
  hash[param] = _to_hash(value)
239
249
  end
240
250
  hash
@@ -257,5 +267,7 @@ module OryHydraClient
257
267
  value
258
268
  end
259
269
  end
270
+
260
271
  end
272
+
261
273
  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 CompletedRequest
@@ -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
  {
@@ -108,7 +114,9 @@ module OryHydraClient
108
114
  def build_from_hash(attributes)
109
115
  return nil unless attributes.is_a?(Hash)
110
116
  self.class.openapi_types.each_pair do |key, type|
111
- if type =~ /\AArray<(.*)>/i
117
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
118
+ self.send("#{key}=", nil)
119
+ elsif type =~ /\AArray<(.*)>/i
112
120
  # check to ensure the input is an array given that the attribute
113
121
  # is documented as an array but the input is not
114
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -116,7 +124,7 @@ module OryHydraClient
116
124
  end
117
125
  elsif !attributes[self.class.attribute_map[key]].nil?
118
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
- end # or else data not found in attributes(hash), not an issue as the data can be optional
127
+ end
120
128
  end
121
129
 
122
130
  self
@@ -128,8 +136,8 @@ module OryHydraClient
128
136
  # @return [Object] Deserialized data
129
137
  def _deserialize(type, value)
130
138
  case type.to_sym
131
- when :DateTime
132
- DateTime.parse(value)
139
+ when :Time
140
+ Time.parse(value)
133
141
  when :Date
134
142
  Date.parse(value)
135
143
  when :String
@@ -159,7 +167,9 @@ module OryHydraClient
159
167
  end
160
168
  end
161
169
  else # model
162
- OryHydraClient.const_get(type).build_from_hash(value)
170
+ # models (e.g. Pet) or oneOf
171
+ klass = OryHydraClient.const_get(type)
172
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
173
  end
164
174
  end
165
175
 
@@ -185,7 +195,7 @@ module OryHydraClient
185
195
  is_nullable = self.class.openapi_nullable.include?(attr)
186
196
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
197
  end
188
-
198
+
189
199
  hash[param] = _to_hash(value)
190
200
  end
191
201
  hash
@@ -208,5 +218,7 @@ module OryHydraClient
208
218
  value
209
219
  end
210
220
  end
221
+
211
222
  end
223
+
212
224
  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 ConsentRequest
@@ -63,6 +64,11 @@ module OryHydraClient
63
64
  }
64
65
  end
65
66
 
67
+ # Returns all the JSON keys this model knows about
68
+ def self.acceptable_attributes
69
+ attribute_map.values
70
+ end
71
+
66
72
  # Attribute type mapping.
67
73
  def self.openapi_types
68
74
  {
@@ -217,7 +223,9 @@ module OryHydraClient
217
223
  def build_from_hash(attributes)
218
224
  return nil unless attributes.is_a?(Hash)
219
225
  self.class.openapi_types.each_pair do |key, type|
220
- if type =~ /\AArray<(.*)>/i
226
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
227
+ self.send("#{key}=", nil)
228
+ elsif type =~ /\AArray<(.*)>/i
221
229
  # check to ensure the input is an array given that the attribute
222
230
  # is documented as an array but the input is not
223
231
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -225,7 +233,7 @@ module OryHydraClient
225
233
  end
226
234
  elsif !attributes[self.class.attribute_map[key]].nil?
227
235
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
228
- end # or else data not found in attributes(hash), not an issue as the data can be optional
236
+ end
229
237
  end
230
238
 
231
239
  self
@@ -237,8 +245,8 @@ module OryHydraClient
237
245
  # @return [Object] Deserialized data
238
246
  def _deserialize(type, value)
239
247
  case type.to_sym
240
- when :DateTime
241
- DateTime.parse(value)
248
+ when :Time
249
+ Time.parse(value)
242
250
  when :Date
243
251
  Date.parse(value)
244
252
  when :String
@@ -268,7 +276,9 @@ module OryHydraClient
268
276
  end
269
277
  end
270
278
  else # model
271
- OryHydraClient.const_get(type).build_from_hash(value)
279
+ # models (e.g. Pet) or oneOf
280
+ klass = OryHydraClient.const_get(type)
281
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
272
282
  end
273
283
  end
274
284
 
@@ -294,7 +304,7 @@ module OryHydraClient
294
304
  is_nullable = self.class.openapi_nullable.include?(attr)
295
305
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
306
  end
297
-
307
+
298
308
  hash[param] = _to_hash(value)
299
309
  end
300
310
  hash
@@ -317,5 +327,7 @@ module OryHydraClient
317
327
  value
318
328
  end
319
329
  end
330
+
320
331
  end
332
+
321
333
  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 ConsentRequestSession
@@ -28,6 +29,11 @@ module OryHydraClient
28
29
  }
29
30
  end
30
31
 
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
31
37
  # Attribute type mapping.
32
38
  def self.openapi_types
33
39
  {
@@ -113,7 +119,9 @@ module OryHydraClient
113
119
  def build_from_hash(attributes)
114
120
  return nil unless attributes.is_a?(Hash)
115
121
  self.class.openapi_types.each_pair do |key, type|
116
- if type =~ /\AArray<(.*)>/i
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
+ self.send("#{key}=", nil)
124
+ elsif type =~ /\AArray<(.*)>/i
117
125
  # check to ensure the input is an array given that the attribute
118
126
  # is documented as an array but the input is not
119
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -121,7 +129,7 @@ module OryHydraClient
121
129
  end
122
130
  elsif !attributes[self.class.attribute_map[key]].nil?
123
131
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
- end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
125
133
  end
126
134
 
127
135
  self
@@ -133,8 +141,8 @@ module OryHydraClient
133
141
  # @return [Object] Deserialized data
134
142
  def _deserialize(type, value)
135
143
  case type.to_sym
136
- when :DateTime
137
- DateTime.parse(value)
144
+ when :Time
145
+ Time.parse(value)
138
146
  when :Date
139
147
  Date.parse(value)
140
148
  when :String
@@ -164,7 +172,9 @@ module OryHydraClient
164
172
  end
165
173
  end
166
174
  else # model
167
- OryHydraClient.const_get(type).build_from_hash(value)
175
+ # models (e.g. Pet) or oneOf
176
+ klass = OryHydraClient.const_get(type)
177
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
178
  end
169
179
  end
170
180
 
@@ -190,7 +200,7 @@ module OryHydraClient
190
200
  is_nullable = self.class.openapi_nullable.include?(attr)
191
201
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
202
  end
193
-
203
+
194
204
  hash[param] = _to_hash(value)
195
205
  end
196
206
  hash
@@ -213,5 +223,7 @@ module OryHydraClient
213
223
  value
214
224
  end
215
225
  end
226
+
216
227
  end
228
+
217
229
  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
  # ContainerWaitOKBodyError container waiting error, if any
@@ -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
  {
@@ -104,7 +110,9 @@ module OryHydraClient
104
110
  def build_from_hash(attributes)
105
111
  return nil unless attributes.is_a?(Hash)
106
112
  self.class.openapi_types.each_pair do |key, type|
107
- if type =~ /\AArray<(.*)>/i
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
108
116
  # check to ensure the input is an array given that the attribute
109
117
  # is documented as an array but the input is not
110
118
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -112,7 +120,7 @@ module OryHydraClient
112
120
  end
113
121
  elsif !attributes[self.class.attribute_map[key]].nil?
114
122
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
- end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
116
124
  end
117
125
 
118
126
  self
@@ -124,8 +132,8 @@ module OryHydraClient
124
132
  # @return [Object] Deserialized data
125
133
  def _deserialize(type, value)
126
134
  case type.to_sym
127
- when :DateTime
128
- DateTime.parse(value)
135
+ when :Time
136
+ Time.parse(value)
129
137
  when :Date
130
138
  Date.parse(value)
131
139
  when :String
@@ -155,7 +163,9 @@ module OryHydraClient
155
163
  end
156
164
  end
157
165
  else # model
158
- OryHydraClient.const_get(type).build_from_hash(value)
166
+ # models (e.g. Pet) or oneOf
167
+ klass = OryHydraClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
159
169
  end
160
170
  end
161
171
 
@@ -181,7 +191,7 @@ module OryHydraClient
181
191
  is_nullable = self.class.openapi_nullable.include?(attr)
182
192
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
193
  end
184
-
194
+
185
195
  hash[param] = _to_hash(value)
186
196
  end
187
197
  hash
@@ -204,5 +214,7 @@ module OryHydraClient
204
214
  value
205
215
  end
206
216
  end
217
+
207
218
  end
219
+
208
220
  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 FlushInactiveOAuth2TokensRequest
@@ -24,10 +25,15 @@ 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
  {
30
- :'not_after' => :'DateTime'
36
+ :'not_after' => :'Time'
31
37
  }
32
38
  end
33
39
 
@@ -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