ory-hydra-client 1.9.0.alpha1 → 1.9.2

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 +816 -304
  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 -31
  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 -55
  42. data/lib/ory-hydra-client.rb +2 -2
  43. data/lib/ory-hydra-client/api/admin_api.rb +126 -96
  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 +32 -10
  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 +33 -9
  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 +30 -50
@@ -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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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
@@ -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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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
  # The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
@@ -44,13 +45,18 @@ module OryHydraClient
44
45
  }
45
46
  end
46
47
 
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
47
53
  # Attribute type mapping.
48
54
  def self.openapi_types
49
55
  {
50
56
  :'consent_request' => :'ConsentRequest',
51
57
  :'grant_access_token_audience' => :'Array<String>',
52
58
  :'grant_scope' => :'Array<String>',
53
- :'handled_at' => :'DateTime',
59
+ :'handled_at' => :'Time',
54
60
  :'remember' => :'Boolean',
55
61
  :'remember_for' => :'Integer',
56
62
  :'session' => :'ConsentRequestSession'
@@ -163,7 +169,9 @@ module OryHydraClient
163
169
  def build_from_hash(attributes)
164
170
  return nil unless attributes.is_a?(Hash)
165
171
  self.class.openapi_types.each_pair do |key, type|
166
- if type =~ /\AArray<(.*)>/i
172
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
+ self.send("#{key}=", nil)
174
+ elsif type =~ /\AArray<(.*)>/i
167
175
  # check to ensure the input is an array given that the attribute
168
176
  # is documented as an array but the input is not
169
177
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -171,7 +179,7 @@ module OryHydraClient
171
179
  end
172
180
  elsif !attributes[self.class.attribute_map[key]].nil?
173
181
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
- end # or else data not found in attributes(hash), not an issue as the data can be optional
182
+ end
175
183
  end
176
184
 
177
185
  self
@@ -183,8 +191,8 @@ module OryHydraClient
183
191
  # @return [Object] Deserialized data
184
192
  def _deserialize(type, value)
185
193
  case type.to_sym
186
- when :DateTime
187
- DateTime.parse(value)
194
+ when :Time
195
+ Time.parse(value)
188
196
  when :Date
189
197
  Date.parse(value)
190
198
  when :String
@@ -214,7 +222,9 @@ module OryHydraClient
214
222
  end
215
223
  end
216
224
  else # model
217
- OryHydraClient.const_get(type).build_from_hash(value)
225
+ # models (e.g. Pet) or oneOf
226
+ klass = OryHydraClient.const_get(type)
227
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
218
228
  end
219
229
  end
220
230
 
@@ -240,7 +250,7 @@ module OryHydraClient
240
250
  is_nullable = self.class.openapi_nullable.include?(attr)
241
251
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
252
  end
243
-
253
+
244
254
  hash[param] = _to_hash(value)
245
255
  end
246
256
  hash
@@ -263,5 +273,7 @@ module OryHydraClient
263
273
  value
264
274
  end
265
275
  end
276
+
266
277
  end
278
+
267
279
  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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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 RejectRequest
@@ -40,6 +41,11 @@ module OryHydraClient
40
41
  }
41
42
  end
42
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
43
49
  # Attribute type mapping.
44
50
  def self.openapi_types
45
51
  {
@@ -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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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
  # The userinfo response
@@ -97,6 +98,11 @@ module OryHydraClient
97
98
  }
98
99
  end
99
100
 
101
+ # Returns all the JSON keys this model knows about
102
+ def self.acceptable_attributes
103
+ attribute_map.values
104
+ end
105
+
100
106
  # Attribute type mapping.
101
107
  def self.openapi_types
102
108
  {
@@ -284,7 +290,9 @@ module OryHydraClient
284
290
  def build_from_hash(attributes)
285
291
  return nil unless attributes.is_a?(Hash)
286
292
  self.class.openapi_types.each_pair do |key, type|
287
- if type =~ /\AArray<(.*)>/i
293
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
294
+ self.send("#{key}=", nil)
295
+ elsif type =~ /\AArray<(.*)>/i
288
296
  # check to ensure the input is an array given that the attribute
289
297
  # is documented as an array but the input is not
290
298
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -292,7 +300,7 @@ module OryHydraClient
292
300
  end
293
301
  elsif !attributes[self.class.attribute_map[key]].nil?
294
302
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
295
- end # or else data not found in attributes(hash), not an issue as the data can be optional
303
+ end
296
304
  end
297
305
 
298
306
  self
@@ -304,8 +312,8 @@ module OryHydraClient
304
312
  # @return [Object] Deserialized data
305
313
  def _deserialize(type, value)
306
314
  case type.to_sym
307
- when :DateTime
308
- DateTime.parse(value)
315
+ when :Time
316
+ Time.parse(value)
309
317
  when :Date
310
318
  Date.parse(value)
311
319
  when :String
@@ -335,7 +343,9 @@ module OryHydraClient
335
343
  end
336
344
  end
337
345
  else # model
338
- OryHydraClient.const_get(type).build_from_hash(value)
346
+ # models (e.g. Pet) or oneOf
347
+ klass = OryHydraClient.const_get(type)
348
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
339
349
  end
340
350
  end
341
351
 
@@ -361,7 +371,7 @@ module OryHydraClient
361
371
  is_nullable = self.class.openapi_nullable.include?(attr)
362
372
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
363
373
  end
364
-
374
+
365
375
  hash[param] = _to_hash(value)
366
376
  end
367
377
  hash
@@ -384,5 +394,7 @@ module OryHydraClient
384
394
  value
385
395
  end
386
396
  end
397
+
387
398
  end
399
+
388
400
  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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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 Version
@@ -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-alpha.1
6
+ The version of the OpenAPI document: v1.9.2
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
  # VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints.
@@ -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
  {
@@ -124,7 +130,9 @@ module OryHydraClient
124
130
  def build_from_hash(attributes)
125
131
  return nil unless attributes.is_a?(Hash)
126
132
  self.class.openapi_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
128
136
  # check to ensure the input is an array given that the attribute
129
137
  # is documented as an array but the input is not
130
138
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -132,7 +140,7 @@ module OryHydraClient
132
140
  end
133
141
  elsif !attributes[self.class.attribute_map[key]].nil?
134
142
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
136
144
  end
137
145
 
138
146
  self
@@ -144,8 +152,8 @@ module OryHydraClient
144
152
  # @return [Object] Deserialized data
145
153
  def _deserialize(type, value)
146
154
  case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
155
+ when :Time
156
+ Time.parse(value)
149
157
  when :Date
150
158
  Date.parse(value)
151
159
  when :String
@@ -175,7 +183,9 @@ module OryHydraClient
175
183
  end
176
184
  end
177
185
  else # model
178
- OryHydraClient.const_get(type).build_from_hash(value)
186
+ # models (e.g. Pet) or oneOf
187
+ klass = OryHydraClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
189
  end
180
190
  end
181
191
 
@@ -201,7 +211,7 @@ module OryHydraClient
201
211
  is_nullable = self.class.openapi_nullable.include?(attr)
202
212
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
213
  end
204
-
214
+
205
215
  hash[param] = _to_hash(value)
206
216
  end
207
217
  hash
@@ -224,5 +234,7 @@ module OryHydraClient
224
234
  value
225
235
  end
226
236
  end
237
+
227
238
  end
239
+
228
240
  end