ory-hydra-client 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
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
  # Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
@@ -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
  {
@@ -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
  class HealthNotReadyStatus
@@ -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
  {
@@ -105,7 +111,9 @@ module OryHydraClient
105
111
  def build_from_hash(attributes)
106
112
  return nil unless attributes.is_a?(Hash)
107
113
  self.class.openapi_types.each_pair do |key, type|
108
- if type =~ /\AArray<(.*)>/i
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ elsif type =~ /\AArray<(.*)>/i
109
117
  # check to ensure the input is an array given that the attribute
110
118
  # is documented as an array but the input is not
111
119
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -113,7 +121,7 @@ module OryHydraClient
113
121
  end
114
122
  elsif !attributes[self.class.attribute_map[key]].nil?
115
123
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
- end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
117
125
  end
118
126
 
119
127
  self
@@ -125,8 +133,8 @@ module OryHydraClient
125
133
  # @return [Object] Deserialized data
126
134
  def _deserialize(type, value)
127
135
  case type.to_sym
128
- when :DateTime
129
- DateTime.parse(value)
136
+ when :Time
137
+ Time.parse(value)
130
138
  when :Date
131
139
  Date.parse(value)
132
140
  when :String
@@ -156,7 +164,9 @@ module OryHydraClient
156
164
  end
157
165
  end
158
166
  else # model
159
- OryHydraClient.const_get(type).build_from_hash(value)
167
+ # models (e.g. Pet) or oneOf
168
+ klass = OryHydraClient.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
160
170
  end
161
171
  end
162
172
 
@@ -182,7 +192,7 @@ module OryHydraClient
182
192
  is_nullable = self.class.openapi_nullable.include?(attr)
183
193
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
194
  end
185
-
195
+
186
196
  hash[param] = _to_hash(value)
187
197
  end
188
198
  hash
@@ -205,5 +215,7 @@ module OryHydraClient
205
215
  value
206
216
  end
207
217
  end
218
+
208
219
  end
220
+
209
221
  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 HealthStatus
@@ -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
  #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
  # It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey.
@@ -77,6 +78,11 @@ module OryHydraClient
77
78
  }
78
79
  end
79
80
 
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ attribute_map.values
84
+ end
85
+
80
86
  # Attribute type mapping.
81
87
  def self.openapi_types
82
88
  {
@@ -274,7 +280,9 @@ module OryHydraClient
274
280
  def build_from_hash(attributes)
275
281
  return nil unless attributes.is_a?(Hash)
276
282
  self.class.openapi_types.each_pair do |key, type|
277
- if type =~ /\AArray<(.*)>/i
283
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
284
+ self.send("#{key}=", nil)
285
+ elsif type =~ /\AArray<(.*)>/i
278
286
  # check to ensure the input is an array given that the attribute
279
287
  # is documented as an array but the input is not
280
288
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -282,7 +290,7 @@ module OryHydraClient
282
290
  end
283
291
  elsif !attributes[self.class.attribute_map[key]].nil?
284
292
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
285
- end # or else data not found in attributes(hash), not an issue as the data can be optional
293
+ end
286
294
  end
287
295
 
288
296
  self
@@ -294,8 +302,8 @@ module OryHydraClient
294
302
  # @return [Object] Deserialized data
295
303
  def _deserialize(type, value)
296
304
  case type.to_sym
297
- when :DateTime
298
- DateTime.parse(value)
305
+ when :Time
306
+ Time.parse(value)
299
307
  when :Date
300
308
  Date.parse(value)
301
309
  when :String
@@ -325,7 +333,9 @@ module OryHydraClient
325
333
  end
326
334
  end
327
335
  else # model
328
- OryHydraClient.const_get(type).build_from_hash(value)
336
+ # models (e.g. Pet) or oneOf
337
+ klass = OryHydraClient.const_get(type)
338
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
329
339
  end
330
340
  end
331
341
 
@@ -351,7 +361,7 @@ module OryHydraClient
351
361
  is_nullable = self.class.openapi_nullable.include?(attr)
352
362
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
353
363
  end
354
-
364
+
355
365
  hash[param] = _to_hash(value)
356
366
  end
357
367
  hash
@@ -374,5 +384,7 @@ module OryHydraClient
374
384
  value
375
385
  end
376
386
  end
387
+
377
388
  end
389
+
378
390
  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
  # It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec.
@@ -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
  {
@@ -106,7 +112,9 @@ module OryHydraClient
106
112
  def build_from_hash(attributes)
107
113
  return nil unless attributes.is_a?(Hash)
108
114
  self.class.openapi_types.each_pair do |key, type|
109
- if type =~ /\AArray<(.*)>/i
115
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
116
+ self.send("#{key}=", nil)
117
+ elsif type =~ /\AArray<(.*)>/i
110
118
  # check to ensure the input is an array given that the attribute
111
119
  # is documented as an array but the input is not
112
120
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -114,7 +122,7 @@ module OryHydraClient
114
122
  end
115
123
  elsif !attributes[self.class.attribute_map[key]].nil?
116
124
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
- end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
118
126
  end
119
127
 
120
128
  self
@@ -126,8 +134,8 @@ module OryHydraClient
126
134
  # @return [Object] Deserialized data
127
135
  def _deserialize(type, value)
128
136
  case type.to_sym
129
- when :DateTime
130
- DateTime.parse(value)
137
+ when :Time
138
+ Time.parse(value)
131
139
  when :Date
132
140
  Date.parse(value)
133
141
  when :String
@@ -157,7 +165,9 @@ module OryHydraClient
157
165
  end
158
166
  end
159
167
  else # model
160
- OryHydraClient.const_get(type).build_from_hash(value)
168
+ # models (e.g. Pet) or oneOf
169
+ klass = OryHydraClient.const_get(type)
170
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
161
171
  end
162
172
  end
163
173
 
@@ -183,7 +193,7 @@ module OryHydraClient
183
193
  is_nullable = self.class.openapi_nullable.include?(attr)
184
194
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
195
  end
186
-
196
+
187
197
  hash[param] = _to_hash(value)
188
198
  end
189
199
  hash
@@ -206,5 +216,7 @@ module OryHydraClient
206
216
  value
207
217
  end
208
218
  end
219
+
209
220
  end
221
+
210
222
  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 JsonWebKeySetGeneratorRequest
@@ -32,6 +33,11 @@ module OryHydraClient
32
33
  }
33
34
  end
34
35
 
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
35
41
  # Attribute type mapping.
36
42
  def self.openapi_types
37
43
  {
@@ -138,7 +144,9 @@ module OryHydraClient
138
144
  def build_from_hash(attributes)
139
145
  return nil unless attributes.is_a?(Hash)
140
146
  self.class.openapi_types.each_pair do |key, type|
141
- if type =~ /\AArray<(.*)>/i
147
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
+ self.send("#{key}=", nil)
149
+ elsif type =~ /\AArray<(.*)>/i
142
150
  # check to ensure the input is an array given that the attribute
143
151
  # is documented as an array but the input is not
144
152
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -146,7 +154,7 @@ module OryHydraClient
146
154
  end
147
155
  elsif !attributes[self.class.attribute_map[key]].nil?
148
156
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
- end # or else data not found in attributes(hash), not an issue as the data can be optional
157
+ end
150
158
  end
151
159
 
152
160
  self
@@ -158,8 +166,8 @@ module OryHydraClient
158
166
  # @return [Object] Deserialized data
159
167
  def _deserialize(type, value)
160
168
  case type.to_sym
161
- when :DateTime
162
- DateTime.parse(value)
169
+ when :Time
170
+ Time.parse(value)
163
171
  when :Date
164
172
  Date.parse(value)
165
173
  when :String
@@ -189,7 +197,9 @@ module OryHydraClient
189
197
  end
190
198
  end
191
199
  else # model
192
- OryHydraClient.const_get(type).build_from_hash(value)
200
+ # models (e.g. Pet) or oneOf
201
+ klass = OryHydraClient.const_get(type)
202
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
203
  end
194
204
  end
195
205
 
@@ -215,7 +225,7 @@ module OryHydraClient
215
225
  is_nullable = self.class.openapi_nullable.include?(attr)
216
226
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
227
  end
218
-
228
+
219
229
  hash[param] = _to_hash(value)
220
230
  end
221
231
  hash
@@ -238,5 +248,7 @@ module OryHydraClient
238
248
  value
239
249
  end
240
250
  end
251
+
241
252
  end
253
+
242
254
  end