ory-kratos-client 0.5.0.alpha1 → 0.5.5.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/docs/AdminApi.md +382 -143
- data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +12 -11
- data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +10 -9
- data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +10 -9
- data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +10 -9
- data/docs/CreateIdentity.md +10 -9
- data/docs/CreateRecoveryLink.md +10 -9
- data/docs/ErrorContainer.md +10 -9
- data/docs/FormField.md +20 -19
- data/docs/GenericError.md +8 -7
- data/docs/GenericErrorPayload.md +20 -19
- data/docs/HealthApi.md +50 -15
- data/docs/HealthNotReadyStatus.md +8 -7
- data/docs/HealthStatus.md +8 -7
- data/docs/Identity.md +18 -17
- data/docs/LoginFlow.md +24 -23
- data/docs/LoginFlowMethod.md +10 -9
- data/docs/LoginFlowMethodConfig.md +16 -15
- data/docs/LoginViaApiResponse.md +10 -9
- data/docs/Message.md +14 -13
- data/docs/PublicApi.md +707 -237
- data/docs/RecoveryAddress.md +12 -11
- data/docs/RecoveryFlow.md +24 -23
- data/docs/RecoveryFlowMethod.md +10 -9
- data/docs/RecoveryFlowMethodConfig.md +14 -13
- data/docs/RecoveryLink.md +10 -9
- data/docs/RegistrationFlow.md +22 -21
- data/docs/RegistrationFlowMethod.md +10 -9
- data/docs/RegistrationFlowMethodConfig.md +16 -15
- data/docs/RegistrationViaApiResponse.md +12 -11
- data/docs/RevokeSession.md +8 -7
- data/docs/Session.md +18 -17
- data/docs/SettingsFlow.md +26 -25
- data/docs/SettingsFlowMethod.md +10 -9
- data/docs/SettingsFlowMethodConfig.md +14 -13
- data/docs/SettingsViaApiResponse.md +10 -9
- data/docs/UpdateIdentity.md +10 -9
- data/docs/VerifiableAddress.md +18 -17
- data/docs/VerificationFlow.md +24 -23
- data/docs/VerificationFlowMethod.md +10 -9
- data/docs/VerificationFlowMethodConfig.md +14 -13
- data/docs/Version.md +8 -7
- data/docs/VersionApi.md +26 -9
- data/lib/ory-kratos-client.rb +2 -2
- data/lib/ory-kratos-client/api/admin_api.rb +58 -44
- data/lib/ory-kratos-client/api/health_api.rb +10 -8
- data/lib/ory-kratos-client/api/public_api.rb +113 -86
- data/lib/ory-kratos-client/api/version_api.rb +6 -5
- data/lib/ory-kratos-client/api_client.rb +50 -48
- data/lib/ory-kratos-client/api_error.rb +2 -2
- data/lib/ory-kratos-client/configuration.rb +34 -7
- data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +20 -8
- data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +20 -8
- data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +20 -8
- data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +20 -8
- data/lib/ory-kratos-client/models/create_identity.rb +20 -8
- data/lib/ory-kratos-client/models/create_recovery_link.rb +20 -8
- data/lib/ory-kratos-client/models/error_container.rb +20 -8
- data/lib/ory-kratos-client/models/form_field.rb +20 -8
- data/lib/ory-kratos-client/models/generic_error.rb +20 -8
- data/lib/ory-kratos-client/models/generic_error_payload.rb +20 -8
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +20 -8
- data/lib/ory-kratos-client/models/health_status.rb +20 -8
- data/lib/ory-kratos-client/models/identity.rb +20 -8
- data/lib/ory-kratos-client/models/login_flow.rb +22 -10
- data/lib/ory-kratos-client/models/login_flow_method.rb +20 -8
- data/lib/ory-kratos-client/models/login_flow_method_config.rb +20 -8
- data/lib/ory-kratos-client/models/login_via_api_response.rb +20 -8
- data/lib/ory-kratos-client/models/message.rb +20 -8
- data/lib/ory-kratos-client/models/recovery_address.rb +20 -8
- data/lib/ory-kratos-client/models/recovery_flow.rb +22 -10
- data/lib/ory-kratos-client/models/recovery_flow_method.rb +20 -8
- data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +20 -8
- data/lib/ory-kratos-client/models/recovery_link.rb +21 -9
- data/lib/ory-kratos-client/models/registration_flow.rb +22 -10
- data/lib/ory-kratos-client/models/registration_flow_method.rb +20 -8
- data/lib/ory-kratos-client/models/registration_flow_method_config.rb +20 -8
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +20 -8
- data/lib/ory-kratos-client/models/revoke_session.rb +20 -8
- data/lib/ory-kratos-client/models/session.rb +23 -11
- data/lib/ory-kratos-client/models/settings_flow.rb +22 -10
- data/lib/ory-kratos-client/models/settings_flow_method.rb +20 -8
- data/lib/ory-kratos-client/models/settings_flow_method_config.rb +20 -8
- data/lib/ory-kratos-client/models/settings_via_api_response.rb +20 -8
- data/lib/ory-kratos-client/models/update_identity.rb +20 -8
- data/lib/ory-kratos-client/models/verifiable_address.rb +21 -9
- data/lib/ory-kratos-client/models/verification_flow.rb +22 -10
- data/lib/ory-kratos-client/models/verification_flow_method.rb +20 -8
- data/lib/ory-kratos-client/models/verification_flow_method_config.rb +20 -8
- data/lib/ory-kratos-client/models/version.rb +20 -8
- data/lib/ory-kratos-client/version.rb +3 -3
- data/ory-kratos-client.gemspec +4 -5
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +49 -69
@@ -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.
|
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:
|
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 Registration Flows via API
|
@@ -31,6 +32,11 @@ module OryHydraClient
|
|
31
32
|
}
|
32
33
|
end
|
33
34
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
36
|
+
def self.acceptable_attributes
|
37
|
+
attribute_map.values
|
38
|
+
end
|
39
|
+
|
34
40
|
# Attribute type mapping.
|
35
41
|
def self.openapi_types
|
36
42
|
{
|
@@ -132,7 +138,9 @@ module OryHydraClient
|
|
132
138
|
def build_from_hash(attributes)
|
133
139
|
return nil unless attributes.is_a?(Hash)
|
134
140
|
self.class.openapi_types.each_pair do |key, type|
|
135
|
-
if
|
141
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
142
|
+
self.send("#{key}=", nil)
|
143
|
+
elsif type =~ /\AArray<(.*)>/i
|
136
144
|
# check to ensure the input is an array given that the attribute
|
137
145
|
# is documented as an array but the input is not
|
138
146
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -140,7 +148,7 @@ module OryHydraClient
|
|
140
148
|
end
|
141
149
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
142
150
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
143
|
-
end
|
151
|
+
end
|
144
152
|
end
|
145
153
|
|
146
154
|
self
|
@@ -152,8 +160,8 @@ module OryHydraClient
|
|
152
160
|
# @return [Object] Deserialized data
|
153
161
|
def _deserialize(type, value)
|
154
162
|
case type.to_sym
|
155
|
-
when :
|
156
|
-
|
163
|
+
when :Time
|
164
|
+
Time.parse(value)
|
157
165
|
when :Date
|
158
166
|
Date.parse(value)
|
159
167
|
when :String
|
@@ -183,7 +191,9 @@ module OryHydraClient
|
|
183
191
|
end
|
184
192
|
end
|
185
193
|
else # model
|
186
|
-
|
194
|
+
# models (e.g. Pet) or oneOf
|
195
|
+
klass = OryHydraClient.const_get(type)
|
196
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
197
|
end
|
188
198
|
end
|
189
199
|
|
@@ -209,7 +219,7 @@ module OryHydraClient
|
|
209
219
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
210
220
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
211
221
|
end
|
212
|
-
|
222
|
+
|
213
223
|
hash[param] = _to_hash(value)
|
214
224
|
end
|
215
225
|
hash
|
@@ -232,5 +242,7 @@ module OryHydraClient
|
|
232
242
|
value
|
233
243
|
end
|
234
244
|
end
|
245
|
+
|
235
246
|
end
|
247
|
+
|
236
248
|
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.
|
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:
|
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 RevokeSession
|
@@ -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
|
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
|
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 :
|
132
|
-
|
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
|
-
|
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 Kratos HTTP API documentation!
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.5.
|
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:
|
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 Session
|
@@ -38,15 +39,20 @@ 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
|
{
|
44
50
|
:'active' => :'Boolean',
|
45
|
-
:'authenticated_at' => :'
|
46
|
-
:'expires_at' => :'
|
51
|
+
:'authenticated_at' => :'Time',
|
52
|
+
:'expires_at' => :'Time',
|
47
53
|
:'id' => :'String',
|
48
54
|
:'identity' => :'Identity',
|
49
|
-
:'issued_at' => :'
|
55
|
+
:'issued_at' => :'Time'
|
50
56
|
}
|
51
57
|
end
|
52
58
|
|
@@ -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
|
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
|
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 :
|
196
|
-
|
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
|
-
|
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.
|
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:
|
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
|
# This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner. We recommend reading the [User Settings Documentation](../self-service/flows/user-settings)
|
@@ -57,14 +58,19 @@ module OryHydraClient
|
|
57
58
|
}
|
58
59
|
end
|
59
60
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
62
|
+
def self.acceptable_attributes
|
63
|
+
attribute_map.values
|
64
|
+
end
|
65
|
+
|
60
66
|
# Attribute type mapping.
|
61
67
|
def self.openapi_types
|
62
68
|
{
|
63
69
|
:'active' => :'String',
|
64
|
-
:'expires_at' => :'
|
70
|
+
:'expires_at' => :'Time',
|
65
71
|
:'id' => :'String',
|
66
72
|
:'identity' => :'Identity',
|
67
|
-
:'issued_at' => :'
|
73
|
+
:'issued_at' => :'Time',
|
68
74
|
:'messages' => :'Array<Message>',
|
69
75
|
:'methods' => :'Hash<String, SettingsFlowMethod>',
|
70
76
|
:'request_url' => :'String',
|
@@ -229,7 +235,9 @@ module OryHydraClient
|
|
229
235
|
def build_from_hash(attributes)
|
230
236
|
return nil unless attributes.is_a?(Hash)
|
231
237
|
self.class.openapi_types.each_pair do |key, type|
|
232
|
-
if
|
238
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
239
|
+
self.send("#{key}=", nil)
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
233
241
|
# check to ensure the input is an array given that the attribute
|
234
242
|
# is documented as an array but the input is not
|
235
243
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -237,7 +245,7 @@ module OryHydraClient
|
|
237
245
|
end
|
238
246
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
239
247
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
240
|
-
end
|
248
|
+
end
|
241
249
|
end
|
242
250
|
|
243
251
|
self
|
@@ -249,8 +257,8 @@ module OryHydraClient
|
|
249
257
|
# @return [Object] Deserialized data
|
250
258
|
def _deserialize(type, value)
|
251
259
|
case type.to_sym
|
252
|
-
when :
|
253
|
-
|
260
|
+
when :Time
|
261
|
+
Time.parse(value)
|
254
262
|
when :Date
|
255
263
|
Date.parse(value)
|
256
264
|
when :String
|
@@ -280,7 +288,9 @@ module OryHydraClient
|
|
280
288
|
end
|
281
289
|
end
|
282
290
|
else # model
|
283
|
-
|
291
|
+
# models (e.g. Pet) or oneOf
|
292
|
+
klass = OryHydraClient.const_get(type)
|
293
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
284
294
|
end
|
285
295
|
end
|
286
296
|
|
@@ -306,7 +316,7 @@ module OryHydraClient
|
|
306
316
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
307
317
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
308
318
|
end
|
309
|
-
|
319
|
+
|
310
320
|
hash[param] = _to_hash(value)
|
311
321
|
end
|
312
322
|
hash
|
@@ -329,5 +339,7 @@ module OryHydraClient
|
|
329
339
|
value
|
330
340
|
end
|
331
341
|
end
|
342
|
+
|
332
343
|
end
|
344
|
+
|
333
345
|
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.
|
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:
|
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 SettingsFlowMethod
|
@@ -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
|
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
|
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 :
|
146
|
-
|
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
|
-
|
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
|