ory-keto-client 0.0.0.alpha41 → 0.0.0.alpha47
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.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/AddOryAccessControlPolicyRoleMembersBody.md +8 -7
- data/docs/AuthorizationResult.md +8 -7
- data/docs/EnginesApi.md +319 -129
- data/docs/HealthApi.md +50 -15
- data/docs/HealthNotReadyStatus.md +8 -7
- data/docs/HealthStatus.md +8 -7
- data/docs/InlineResponse500.md +18 -17
- data/docs/OryAccessControlPolicy.md +20 -19
- data/docs/OryAccessControlPolicyAllowedInput.md +14 -13
- data/docs/OryAccessControlPolicyRole.md +10 -9
- data/docs/Version.md +8 -7
- data/docs/VersionApi.md +26 -9
- data/lib/ory-keto-client.rb +2 -2
- data/lib/ory-keto-client/api/engines_api.rb +46 -35
- data/lib/ory-keto-client/api/health_api.rb +10 -8
- data/lib/ory-keto-client/api/version_api.rb +6 -5
- data/lib/ory-keto-client/api_client.rb +50 -48
- data/lib/ory-keto-client/api_error.rb +2 -2
- data/lib/ory-keto-client/configuration.rb +34 -7
- data/lib/ory-keto-client/models/add_ory_access_control_policy_role_members_body.rb +20 -8
- data/lib/ory-keto-client/models/authorization_result.rb +20 -8
- data/lib/ory-keto-client/models/health_not_ready_status.rb +20 -8
- data/lib/ory-keto-client/models/health_status.rb +20 -8
- data/lib/ory-keto-client/models/inline_response500.rb +20 -8
- data/lib/ory-keto-client/models/ory_access_control_policy.rb +20 -8
- data/lib/ory-keto-client/models/ory_access_control_policy_allowed_input.rb +20 -8
- data/lib/ory-keto-client/models/ory_access_control_policy_role.rb +20 -8
- data/lib/ory-keto-client/models/version.rb +20 -8
- data/lib/ory-keto-client/version.rb +3 -3
- data/ory-keto-client.gemspec +4 -5
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -3
- metadata +55 -75
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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 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
|
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
|
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 :
|
129
|
-
|
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
|
-
|
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
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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 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
|
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
|
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 :
|
127
|
-
|
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
|
-
|
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
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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 InlineResponse500
|
@@ -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
|
{
|
@@ -149,7 +155,9 @@ module OryHydraClient
|
|
149
155
|
def build_from_hash(attributes)
|
150
156
|
return nil unless attributes.is_a?(Hash)
|
151
157
|
self.class.openapi_types.each_pair do |key, type|
|
152
|
-
if
|
158
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
159
|
+
self.send("#{key}=", nil)
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
153
161
|
# check to ensure the input is an array given that the attribute
|
154
162
|
# is documented as an array but the input is not
|
155
163
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -157,7 +165,7 @@ module OryHydraClient
|
|
157
165
|
end
|
158
166
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
159
167
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
160
|
-
end
|
168
|
+
end
|
161
169
|
end
|
162
170
|
|
163
171
|
self
|
@@ -169,8 +177,8 @@ module OryHydraClient
|
|
169
177
|
# @return [Object] Deserialized data
|
170
178
|
def _deserialize(type, value)
|
171
179
|
case type.to_sym
|
172
|
-
when :
|
173
|
-
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
174
182
|
when :Date
|
175
183
|
Date.parse(value)
|
176
184
|
when :String
|
@@ -200,7 +208,9 @@ module OryHydraClient
|
|
200
208
|
end
|
201
209
|
end
|
202
210
|
else # model
|
203
|
-
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = OryHydraClient.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
214
|
end
|
205
215
|
end
|
206
216
|
|
@@ -226,7 +236,7 @@ module OryHydraClient
|
|
226
236
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
227
237
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
228
238
|
end
|
229
|
-
|
239
|
+
|
230
240
|
hash[param] = _to_hash(value)
|
231
241
|
end
|
232
242
|
hash
|
@@ -249,5 +259,7 @@ module OryHydraClient
|
|
249
259
|
value
|
250
260
|
end
|
251
261
|
end
|
262
|
+
|
252
263
|
end
|
264
|
+
|
253
265
|
end
|
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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 OryAccessControlPolicy
|
@@ -48,6 +49,11 @@ module OryHydraClient
|
|
48
49
|
}
|
49
50
|
end
|
50
51
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
51
57
|
# Attribute type mapping.
|
52
58
|
def self.openapi_types
|
53
59
|
{
|
@@ -169,7 +175,9 @@ module OryHydraClient
|
|
169
175
|
def build_from_hash(attributes)
|
170
176
|
return nil unless attributes.is_a?(Hash)
|
171
177
|
self.class.openapi_types.each_pair do |key, type|
|
172
|
-
if
|
178
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
179
|
+
self.send("#{key}=", nil)
|
180
|
+
elsif type =~ /\AArray<(.*)>/i
|
173
181
|
# check to ensure the input is an array given that the attribute
|
174
182
|
# is documented as an array but the input is not
|
175
183
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -177,7 +185,7 @@ module OryHydraClient
|
|
177
185
|
end
|
178
186
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
187
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
-
end
|
188
|
+
end
|
181
189
|
end
|
182
190
|
|
183
191
|
self
|
@@ -189,8 +197,8 @@ module OryHydraClient
|
|
189
197
|
# @return [Object] Deserialized data
|
190
198
|
def _deserialize(type, value)
|
191
199
|
case type.to_sym
|
192
|
-
when :
|
193
|
-
|
200
|
+
when :Time
|
201
|
+
Time.parse(value)
|
194
202
|
when :Date
|
195
203
|
Date.parse(value)
|
196
204
|
when :String
|
@@ -220,7 +228,9 @@ module OryHydraClient
|
|
220
228
|
end
|
221
229
|
end
|
222
230
|
else # model
|
223
|
-
|
231
|
+
# models (e.g. Pet) or oneOf
|
232
|
+
klass = OryHydraClient.const_get(type)
|
233
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
234
|
end
|
225
235
|
end
|
226
236
|
|
@@ -246,7 +256,7 @@ module OryHydraClient
|
|
246
256
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
247
257
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
248
258
|
end
|
249
|
-
|
259
|
+
|
250
260
|
hash[param] = _to_hash(value)
|
251
261
|
end
|
252
262
|
hash
|
@@ -269,5 +279,7 @@ module OryHydraClient
|
|
269
279
|
value
|
270
280
|
end
|
271
281
|
end
|
282
|
+
|
272
283
|
end
|
284
|
+
|
273
285
|
end
|
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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 OryAccessControlPolicyAllowedInput
|
@@ -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
|
{
|
@@ -133,7 +139,9 @@ module OryHydraClient
|
|
133
139
|
def build_from_hash(attributes)
|
134
140
|
return nil unless attributes.is_a?(Hash)
|
135
141
|
self.class.openapi_types.each_pair do |key, type|
|
136
|
-
if
|
142
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
143
|
+
self.send("#{key}=", nil)
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
137
145
|
# check to ensure the input is an array given that the attribute
|
138
146
|
# is documented as an array but the input is not
|
139
147
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -141,7 +149,7 @@ module OryHydraClient
|
|
141
149
|
end
|
142
150
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
143
151
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
144
|
-
end
|
152
|
+
end
|
145
153
|
end
|
146
154
|
|
147
155
|
self
|
@@ -153,8 +161,8 @@ module OryHydraClient
|
|
153
161
|
# @return [Object] Deserialized data
|
154
162
|
def _deserialize(type, value)
|
155
163
|
case type.to_sym
|
156
|
-
when :
|
157
|
-
|
164
|
+
when :Time
|
165
|
+
Time.parse(value)
|
158
166
|
when :Date
|
159
167
|
Date.parse(value)
|
160
168
|
when :String
|
@@ -184,7 +192,9 @@ module OryHydraClient
|
|
184
192
|
end
|
185
193
|
end
|
186
194
|
else # model
|
187
|
-
|
195
|
+
# models (e.g. Pet) or oneOf
|
196
|
+
klass = OryHydraClient.const_get(type)
|
197
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
198
|
end
|
189
199
|
end
|
190
200
|
|
@@ -210,7 +220,7 @@ module OryHydraClient
|
|
210
220
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
221
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
222
|
end
|
213
|
-
|
223
|
+
|
214
224
|
hash[param] = _to_hash(value)
|
215
225
|
end
|
216
226
|
hash
|
@@ -233,5 +243,7 @@ module OryHydraClient
|
|
233
243
|
value
|
234
244
|
end
|
235
245
|
end
|
246
|
+
|
236
247
|
end
|
248
|
+
|
237
249
|
end
|
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.0-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.47
|
7
7
|
Contact: hi@ory.sh
|
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
|
# oryAccessControlPolicyRole represents a group of users that share the same role. A role could be an administrator, a moderator, a regular user or some other sort of role.
|
@@ -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
|
{
|
@@ -116,7 +122,9 @@ module OryHydraClient
|
|
116
122
|
def build_from_hash(attributes)
|
117
123
|
return nil unless attributes.is_a?(Hash)
|
118
124
|
self.class.openapi_types.each_pair do |key, type|
|
119
|
-
if
|
125
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
126
|
+
self.send("#{key}=", nil)
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
120
128
|
# check to ensure the input is an array given that the attribute
|
121
129
|
# is documented as an array but the input is not
|
122
130
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -124,7 +132,7 @@ module OryHydraClient
|
|
124
132
|
end
|
125
133
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
126
134
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
127
|
-
end
|
135
|
+
end
|
128
136
|
end
|
129
137
|
|
130
138
|
self
|
@@ -136,8 +144,8 @@ module OryHydraClient
|
|
136
144
|
# @return [Object] Deserialized data
|
137
145
|
def _deserialize(type, value)
|
138
146
|
case type.to_sym
|
139
|
-
when :
|
140
|
-
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
141
149
|
when :Date
|
142
150
|
Date.parse(value)
|
143
151
|
when :String
|
@@ -167,7 +175,9 @@ module OryHydraClient
|
|
167
175
|
end
|
168
176
|
end
|
169
177
|
else # model
|
170
|
-
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = OryHydraClient.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
181
|
end
|
172
182
|
end
|
173
183
|
|
@@ -193,7 +203,7 @@ module OryHydraClient
|
|
193
203
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
194
204
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
195
205
|
end
|
196
|
-
|
206
|
+
|
197
207
|
hash[param] = _to_hash(value)
|
198
208
|
end
|
199
209
|
hash
|
@@ -216,5 +226,7 @@ module OryHydraClient
|
|
216
226
|
value
|
217
227
|
end
|
218
228
|
end
|
229
|
+
|
219
230
|
end
|
231
|
+
|
220
232
|
end
|