ory-kratos-client 0.5.4.alpha1 → 0.5.5.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/docs/AdminApi.md +382 -143
  4. data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +12 -11
  5. data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +10 -9
  6. data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +10 -9
  7. data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +10 -9
  8. data/docs/CreateIdentity.md +10 -9
  9. data/docs/CreateRecoveryLink.md +10 -9
  10. data/docs/ErrorContainer.md +10 -9
  11. data/docs/FormField.md +20 -19
  12. data/docs/GenericError.md +8 -7
  13. data/docs/GenericErrorPayload.md +20 -19
  14. data/docs/HealthApi.md +50 -15
  15. data/docs/HealthNotReadyStatus.md +8 -7
  16. data/docs/HealthStatus.md +8 -7
  17. data/docs/Identity.md +18 -17
  18. data/docs/LoginFlow.md +24 -23
  19. data/docs/LoginFlowMethod.md +10 -9
  20. data/docs/LoginFlowMethodConfig.md +16 -15
  21. data/docs/LoginViaApiResponse.md +10 -9
  22. data/docs/Message.md +14 -13
  23. data/docs/PublicApi.md +707 -237
  24. data/docs/RecoveryAddress.md +12 -11
  25. data/docs/RecoveryFlow.md +24 -23
  26. data/docs/RecoveryFlowMethod.md +10 -9
  27. data/docs/RecoveryFlowMethodConfig.md +14 -13
  28. data/docs/RecoveryLink.md +10 -9
  29. data/docs/RegistrationFlow.md +22 -21
  30. data/docs/RegistrationFlowMethod.md +10 -9
  31. data/docs/RegistrationFlowMethodConfig.md +16 -15
  32. data/docs/RegistrationViaApiResponse.md +12 -11
  33. data/docs/RevokeSession.md +8 -7
  34. data/docs/Session.md +18 -17
  35. data/docs/SettingsFlow.md +26 -25
  36. data/docs/SettingsFlowMethod.md +10 -9
  37. data/docs/SettingsFlowMethodConfig.md +14 -13
  38. data/docs/SettingsViaApiResponse.md +10 -9
  39. data/docs/UpdateIdentity.md +10 -9
  40. data/docs/VerifiableAddress.md +18 -17
  41. data/docs/VerificationFlow.md +24 -23
  42. data/docs/VerificationFlowMethod.md +10 -9
  43. data/docs/VerificationFlowMethodConfig.md +14 -13
  44. data/docs/Version.md +8 -7
  45. data/docs/VersionApi.md +26 -9
  46. data/lib/ory-kratos-client.rb +2 -2
  47. data/lib/ory-kratos-client/api/admin_api.rb +58 -44
  48. data/lib/ory-kratos-client/api/health_api.rb +10 -8
  49. data/lib/ory-kratos-client/api/public_api.rb +113 -86
  50. data/lib/ory-kratos-client/api/version_api.rb +6 -5
  51. data/lib/ory-kratos-client/api_client.rb +50 -48
  52. data/lib/ory-kratos-client/api_error.rb +2 -2
  53. data/lib/ory-kratos-client/configuration.rb +34 -7
  54. data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +20 -8
  55. data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +20 -8
  56. data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +20 -8
  57. data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +20 -8
  58. data/lib/ory-kratos-client/models/create_identity.rb +20 -8
  59. data/lib/ory-kratos-client/models/create_recovery_link.rb +20 -8
  60. data/lib/ory-kratos-client/models/error_container.rb +20 -8
  61. data/lib/ory-kratos-client/models/form_field.rb +20 -8
  62. data/lib/ory-kratos-client/models/generic_error.rb +20 -8
  63. data/lib/ory-kratos-client/models/generic_error_payload.rb +20 -8
  64. data/lib/ory-kratos-client/models/health_not_ready_status.rb +20 -8
  65. data/lib/ory-kratos-client/models/health_status.rb +20 -8
  66. data/lib/ory-kratos-client/models/identity.rb +20 -8
  67. data/lib/ory-kratos-client/models/login_flow.rb +22 -10
  68. data/lib/ory-kratos-client/models/login_flow_method.rb +20 -8
  69. data/lib/ory-kratos-client/models/login_flow_method_config.rb +20 -8
  70. data/lib/ory-kratos-client/models/login_via_api_response.rb +20 -8
  71. data/lib/ory-kratos-client/models/message.rb +20 -8
  72. data/lib/ory-kratos-client/models/recovery_address.rb +20 -8
  73. data/lib/ory-kratos-client/models/recovery_flow.rb +22 -10
  74. data/lib/ory-kratos-client/models/recovery_flow_method.rb +20 -8
  75. data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +20 -8
  76. data/lib/ory-kratos-client/models/recovery_link.rb +21 -9
  77. data/lib/ory-kratos-client/models/registration_flow.rb +22 -10
  78. data/lib/ory-kratos-client/models/registration_flow_method.rb +20 -8
  79. data/lib/ory-kratos-client/models/registration_flow_method_config.rb +20 -8
  80. data/lib/ory-kratos-client/models/registration_via_api_response.rb +20 -8
  81. data/lib/ory-kratos-client/models/revoke_session.rb +20 -8
  82. data/lib/ory-kratos-client/models/session.rb +23 -11
  83. data/lib/ory-kratos-client/models/settings_flow.rb +22 -10
  84. data/lib/ory-kratos-client/models/settings_flow_method.rb +20 -8
  85. data/lib/ory-kratos-client/models/settings_flow_method_config.rb +20 -8
  86. data/lib/ory-kratos-client/models/settings_via_api_response.rb +20 -8
  87. data/lib/ory-kratos-client/models/update_identity.rb +20 -8
  88. data/lib/ory-kratos-client/models/verifiable_address.rb +21 -9
  89. data/lib/ory-kratos-client/models/verification_flow.rb +22 -10
  90. data/lib/ory-kratos-client/models/verification_flow_method.rb +20 -8
  91. data/lib/ory-kratos-client/models/verification_flow_method_config.rb +20 -8
  92. data/lib/ory-kratos-client/models/version.rb +20 -8
  93. data/lib/ory-kratos-client/version.rb +3 -3
  94. data/ory-kratos-client.gemspec +4 -5
  95. data/spec/api_client_spec.rb +3 -3
  96. data/spec/configuration_spec.rb +2 -2
  97. data/spec/spec_helper.rb +2 -2
  98. metadata +48 -68
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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 SettingsFlowMethodConfig
@@ -35,6 +36,11 @@ module OryHydraClient
35
36
  }
36
37
  end
37
38
 
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
38
44
  # Attribute type mapping.
39
45
  def self.openapi_types
40
46
  {
@@ -151,7 +157,9 @@ module OryHydraClient
151
157
  def build_from_hash(attributes)
152
158
  return nil unless attributes.is_a?(Hash)
153
159
  self.class.openapi_types.each_pair do |key, type|
154
- if type =~ /\AArray<(.*)>/i
160
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
161
+ self.send("#{key}=", nil)
162
+ elsif type =~ /\AArray<(.*)>/i
155
163
  # check to ensure the input is an array given that the attribute
156
164
  # is documented as an array but the input is not
157
165
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -159,7 +167,7 @@ module OryHydraClient
159
167
  end
160
168
  elsif !attributes[self.class.attribute_map[key]].nil?
161
169
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
- end # or else data not found in attributes(hash), not an issue as the data can be optional
170
+ end
163
171
  end
164
172
 
165
173
  self
@@ -171,8 +179,8 @@ module OryHydraClient
171
179
  # @return [Object] Deserialized data
172
180
  def _deserialize(type, value)
173
181
  case type.to_sym
174
- when :DateTime
175
- DateTime.parse(value)
182
+ when :Time
183
+ Time.parse(value)
176
184
  when :Date
177
185
  Date.parse(value)
178
186
  when :String
@@ -202,7 +210,9 @@ module OryHydraClient
202
210
  end
203
211
  end
204
212
  else # model
205
- OryHydraClient.const_get(type).build_from_hash(value)
213
+ # models (e.g. Pet) or oneOf
214
+ klass = OryHydraClient.const_get(type)
215
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
216
  end
207
217
  end
208
218
 
@@ -228,7 +238,7 @@ module OryHydraClient
228
238
  is_nullable = self.class.openapi_nullable.include?(attr)
229
239
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
240
  end
231
-
241
+
232
242
  hash[param] = _to_hash(value)
233
243
  end
234
244
  hash
@@ -251,5 +261,7 @@ module OryHydraClient
251
261
  value
252
262
  end
253
263
  end
264
+
254
265
  end
266
+
255
267
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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 for Settings Flows via API
@@ -27,6 +28,11 @@ module OryHydraClient
27
28
  }
28
29
  end
29
30
 
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
30
36
  # Attribute type mapping.
31
37
  def self.openapi_types
32
38
  {
@@ -122,7 +128,9 @@ module OryHydraClient
122
128
  def build_from_hash(attributes)
123
129
  return nil unless attributes.is_a?(Hash)
124
130
  self.class.openapi_types.each_pair do |key, type|
125
- if type =~ /\AArray<(.*)>/i
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
126
134
  # check to ensure the input is an array given that the attribute
127
135
  # is documented as an array but the input is not
128
136
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -130,7 +138,7 @@ module OryHydraClient
130
138
  end
131
139
  elsif !attributes[self.class.attribute_map[key]].nil?
132
140
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
- end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
134
142
  end
135
143
 
136
144
  self
@@ -142,8 +150,8 @@ module OryHydraClient
142
150
  # @return [Object] Deserialized data
143
151
  def _deserialize(type, value)
144
152
  case type.to_sym
145
- when :DateTime
146
- DateTime.parse(value)
153
+ when :Time
154
+ Time.parse(value)
147
155
  when :Date
148
156
  Date.parse(value)
149
157
  when :String
@@ -173,7 +181,9 @@ module OryHydraClient
173
181
  end
174
182
  end
175
183
  else # model
176
- OryHydraClient.const_get(type).build_from_hash(value)
184
+ # models (e.g. Pet) or oneOf
185
+ klass = OryHydraClient.const_get(type)
186
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
187
  end
178
188
  end
179
189
 
@@ -199,7 +209,7 @@ module OryHydraClient
199
209
  is_nullable = self.class.openapi_nullable.include?(attr)
200
210
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
211
  end
202
-
212
+
203
213
  hash[param] = _to_hash(value)
204
214
  end
205
215
  hash
@@ -222,5 +232,7 @@ module OryHydraClient
222
232
  value
223
233
  end
224
234
  end
235
+
225
236
  end
237
+
226
238
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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 UpdateIdentity
@@ -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
  {
@@ -118,7 +124,9 @@ module OryHydraClient
118
124
  def build_from_hash(attributes)
119
125
  return nil unless attributes.is_a?(Hash)
120
126
  self.class.openapi_types.each_pair do |key, type|
121
- if type =~ /\AArray<(.*)>/i
127
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
128
+ self.send("#{key}=", nil)
129
+ elsif type =~ /\AArray<(.*)>/i
122
130
  # check to ensure the input is an array given that the attribute
123
131
  # is documented as an array but the input is not
124
132
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -126,7 +134,7 @@ module OryHydraClient
126
134
  end
127
135
  elsif !attributes[self.class.attribute_map[key]].nil?
128
136
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
- end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
130
138
  end
131
139
 
132
140
  self
@@ -138,8 +146,8 @@ module OryHydraClient
138
146
  # @return [Object] Deserialized data
139
147
  def _deserialize(type, value)
140
148
  case type.to_sym
141
- when :DateTime
142
- DateTime.parse(value)
149
+ when :Time
150
+ Time.parse(value)
143
151
  when :Date
144
152
  Date.parse(value)
145
153
  when :String
@@ -169,7 +177,9 @@ module OryHydraClient
169
177
  end
170
178
  end
171
179
  else # model
172
- OryHydraClient.const_get(type).build_from_hash(value)
180
+ # models (e.g. Pet) or oneOf
181
+ klass = OryHydraClient.const_get(type)
182
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
183
  end
174
184
  end
175
185
 
@@ -195,7 +205,7 @@ module OryHydraClient
195
205
  is_nullable = self.class.openapi_nullable.include?(attr)
196
206
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
207
  end
198
-
208
+
199
209
  hash[param] = _to_hash(value)
200
210
  end
201
211
  hash
@@ -218,5 +228,7 @@ module OryHydraClient
218
228
  value
219
229
  end
220
230
  end
231
+
221
232
  end
233
+
222
234
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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 VerifiableAddress
@@ -38,6 +39,11 @@ module OryHydraClient
38
39
  }
39
40
  end
40
41
 
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
41
47
  # Attribute type mapping.
42
48
  def self.openapi_types
43
49
  {
@@ -45,7 +51,7 @@ module OryHydraClient
45
51
  :'status' => :'String',
46
52
  :'value' => :'String',
47
53
  :'verified' => :'Boolean',
48
- :'verified_at' => :'DateTime',
54
+ :'verified_at' => :'Time',
49
55
  :'via' => :'String'
50
56
  }
51
57
  end
@@ -172,7 +178,9 @@ module OryHydraClient
172
178
  def build_from_hash(attributes)
173
179
  return nil unless attributes.is_a?(Hash)
174
180
  self.class.openapi_types.each_pair do |key, type|
175
- if type =~ /\AArray<(.*)>/i
181
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
182
+ self.send("#{key}=", nil)
183
+ elsif type =~ /\AArray<(.*)>/i
176
184
  # check to ensure the input is an array given that the attribute
177
185
  # is documented as an array but the input is not
178
186
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -180,7 +188,7 @@ module OryHydraClient
180
188
  end
181
189
  elsif !attributes[self.class.attribute_map[key]].nil?
182
190
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
- end # or else data not found in attributes(hash), not an issue as the data can be optional
191
+ end
184
192
  end
185
193
 
186
194
  self
@@ -192,8 +200,8 @@ module OryHydraClient
192
200
  # @return [Object] Deserialized data
193
201
  def _deserialize(type, value)
194
202
  case type.to_sym
195
- when :DateTime
196
- DateTime.parse(value)
203
+ when :Time
204
+ Time.parse(value)
197
205
  when :Date
198
206
  Date.parse(value)
199
207
  when :String
@@ -223,7 +231,9 @@ module OryHydraClient
223
231
  end
224
232
  end
225
233
  else # model
226
- OryHydraClient.const_get(type).build_from_hash(value)
234
+ # models (e.g. Pet) or oneOf
235
+ klass = OryHydraClient.const_get(type)
236
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
227
237
  end
228
238
  end
229
239
 
@@ -249,7 +259,7 @@ module OryHydraClient
249
259
  is_nullable = self.class.openapi_nullable.include?(attr)
250
260
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
261
  end
252
-
262
+
253
263
  hash[param] = _to_hash(value)
254
264
  end
255
265
  hash
@@ -272,5 +282,7 @@ module OryHydraClient
272
282
  value
273
283
  end
274
284
  end
285
+
275
286
  end
287
+
276
288
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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
  # Used to verify an out-of-band communication channel such as an email address or a phone number. For more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation
@@ -54,13 +55,18 @@ module OryHydraClient
54
55
  }
55
56
  end
56
57
 
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ attribute_map.values
61
+ end
62
+
57
63
  # Attribute type mapping.
58
64
  def self.openapi_types
59
65
  {
60
66
  :'active' => :'String',
61
- :'expires_at' => :'DateTime',
67
+ :'expires_at' => :'Time',
62
68
  :'id' => :'String',
63
- :'issued_at' => :'DateTime',
69
+ :'issued_at' => :'Time',
64
70
  :'messages' => :'Array<Message>',
65
71
  :'methods' => :'Hash<String, VerificationFlowMethod>',
66
72
  :'request_url' => :'String',
@@ -195,7 +201,9 @@ module OryHydraClient
195
201
  def build_from_hash(attributes)
196
202
  return nil unless attributes.is_a?(Hash)
197
203
  self.class.openapi_types.each_pair do |key, type|
198
- if type =~ /\AArray<(.*)>/i
204
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
205
+ self.send("#{key}=", nil)
206
+ elsif type =~ /\AArray<(.*)>/i
199
207
  # check to ensure the input is an array given that the attribute
200
208
  # is documented as an array but the input is not
201
209
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -203,7 +211,7 @@ module OryHydraClient
203
211
  end
204
212
  elsif !attributes[self.class.attribute_map[key]].nil?
205
213
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
206
- end # or else data not found in attributes(hash), not an issue as the data can be optional
214
+ end
207
215
  end
208
216
 
209
217
  self
@@ -215,8 +223,8 @@ module OryHydraClient
215
223
  # @return [Object] Deserialized data
216
224
  def _deserialize(type, value)
217
225
  case type.to_sym
218
- when :DateTime
219
- DateTime.parse(value)
226
+ when :Time
227
+ Time.parse(value)
220
228
  when :Date
221
229
  Date.parse(value)
222
230
  when :String
@@ -246,7 +254,9 @@ module OryHydraClient
246
254
  end
247
255
  end
248
256
  else # model
249
- OryHydraClient.const_get(type).build_from_hash(value)
257
+ # models (e.g. Pet) or oneOf
258
+ klass = OryHydraClient.const_get(type)
259
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
250
260
  end
251
261
  end
252
262
 
@@ -272,7 +282,7 @@ module OryHydraClient
272
282
  is_nullable = self.class.openapi_nullable.include?(attr)
273
283
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
274
284
  end
275
-
285
+
276
286
  hash[param] = _to_hash(value)
277
287
  end
278
288
  hash
@@ -295,5 +305,7 @@ module OryHydraClient
295
305
  value
296
306
  end
297
307
  end
308
+
298
309
  end
310
+
299
311
  end
@@ -3,14 +3,15 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: v0.5.4-alpha.1
6
+ The version of the OpenAPI document: v0.5.5-alpha.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 VerificationFlowMethod
@@ -27,6 +28,11 @@ module OryHydraClient
27
28
  }
28
29
  end
29
30
 
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
30
36
  # Attribute type mapping.
31
37
  def self.openapi_types
32
38
  {
@@ -122,7 +128,9 @@ module OryHydraClient
122
128
  def build_from_hash(attributes)
123
129
  return nil unless attributes.is_a?(Hash)
124
130
  self.class.openapi_types.each_pair do |key, type|
125
- if type =~ /\AArray<(.*)>/i
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
126
134
  # check to ensure the input is an array given that the attribute
127
135
  # is documented as an array but the input is not
128
136
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -130,7 +138,7 @@ module OryHydraClient
130
138
  end
131
139
  elsif !attributes[self.class.attribute_map[key]].nil?
132
140
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
- end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
134
142
  end
135
143
 
136
144
  self
@@ -142,8 +150,8 @@ module OryHydraClient
142
150
  # @return [Object] Deserialized data
143
151
  def _deserialize(type, value)
144
152
  case type.to_sym
145
- when :DateTime
146
- DateTime.parse(value)
153
+ when :Time
154
+ Time.parse(value)
147
155
  when :Date
148
156
  Date.parse(value)
149
157
  when :String
@@ -173,7 +181,9 @@ module OryHydraClient
173
181
  end
174
182
  end
175
183
  else # model
176
- OryHydraClient.const_get(type).build_from_hash(value)
184
+ # models (e.g. Pet) or oneOf
185
+ klass = OryHydraClient.const_get(type)
186
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
187
  end
178
188
  end
179
189
 
@@ -199,7 +209,7 @@ module OryHydraClient
199
209
  is_nullable = self.class.openapi_nullable.include?(attr)
200
210
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
211
  end
202
-
212
+
203
213
  hash[param] = _to_hash(value)
204
214
  end
205
215
  hash
@@ -222,5 +232,7 @@ module OryHydraClient
222
232
  value
223
233
  end
224
234
  end
235
+
225
236
  end
237
+
226
238
  end