ory-hydra-client 1.9.0.alpha2 → 1.10.2

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.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -5
  3. data/docs/AcceptConsentRequest.md +18 -17
  4. data/docs/AcceptLoginRequest.md +18 -17
  5. data/docs/AdminApi.md +883 -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 +16 -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/PatchDocument.md +24 -0
  24. data/docs/PluginConfig.md +38 -37
  25. data/docs/PluginConfigArgs.md +14 -13
  26. data/docs/PluginConfigInterface.md +10 -9
  27. data/docs/PluginConfigLinux.md +12 -11
  28. data/docs/PluginConfigNetwork.md +8 -7
  29. data/docs/PluginConfigRootfs.md +10 -9
  30. data/docs/PluginConfigUser.md +10 -9
  31. data/docs/PluginDevice.md +14 -13
  32. data/docs/PluginEnv.md +14 -13
  33. data/docs/PluginInterfaceType.md +12 -11
  34. data/docs/PluginMount.md +20 -19
  35. data/docs/PluginSettings.md +14 -13
  36. data/docs/PreviousConsentSession.md +20 -19
  37. data/docs/PublicApi.md +201 -60
  38. data/docs/RejectRequest.md +16 -15
  39. data/docs/RequestWasHandledResponse.md +18 -0
  40. data/docs/UserinfoResponse.md +44 -43
  41. data/docs/Version.md +8 -7
  42. data/docs/Volume.md +34 -0
  43. data/docs/VolumeUsageData.md +10 -9
  44. data/docs/WellKnown.md +58 -55
  45. data/lib/ory-hydra-client.rb +5 -2
  46. data/lib/ory-hydra-client/api/admin_api.rb +197 -96
  47. data/lib/ory-hydra-client/api/public_api.rb +34 -26
  48. data/lib/ory-hydra-client/api_client.rb +51 -49
  49. data/lib/ory-hydra-client/api_error.rb +2 -2
  50. data/lib/ory-hydra-client/configuration.rb +40 -11
  51. data/lib/ory-hydra-client/models/accept_consent_request.rb +21 -9
  52. data/lib/ory-hydra-client/models/accept_login_request.rb +20 -8
  53. data/lib/ory-hydra-client/models/completed_request.rb +20 -8
  54. data/lib/ory-hydra-client/models/consent_request.rb +20 -8
  55. data/lib/ory-hydra-client/models/consent_request_session.rb +20 -8
  56. data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +20 -8
  57. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +21 -9
  58. data/lib/ory-hydra-client/models/generic_error.rb +20 -8
  59. data/lib/ory-hydra-client/models/health_not_ready_status.rb +20 -8
  60. data/lib/ory-hydra-client/models/health_status.rb +20 -8
  61. data/lib/ory-hydra-client/models/json_web_key.rb +20 -8
  62. data/lib/ory-hydra-client/models/json_web_key_set.rb +20 -8
  63. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +20 -8
  64. data/lib/ory-hydra-client/models/login_request.rb +20 -8
  65. data/lib/ory-hydra-client/models/logout_request.rb +31 -9
  66. data/lib/ory-hydra-client/models/o_auth2_client.rb +22 -10
  67. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +32 -10
  68. data/lib/ory-hydra-client/models/oauth2_token_response.rb +20 -8
  69. data/lib/ory-hydra-client/models/open_id_connect_context.rb +20 -8
  70. data/lib/ory-hydra-client/models/patch_document.rb +260 -0
  71. data/lib/ory-hydra-client/models/plugin_config.rb +20 -8
  72. data/lib/ory-hydra-client/models/plugin_config_args.rb +20 -8
  73. data/lib/ory-hydra-client/models/plugin_config_interface.rb +20 -8
  74. data/lib/ory-hydra-client/models/plugin_config_linux.rb +20 -8
  75. data/lib/ory-hydra-client/models/plugin_config_network.rb +20 -8
  76. data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +20 -8
  77. data/lib/ory-hydra-client/models/plugin_config_user.rb +20 -8
  78. data/lib/ory-hydra-client/models/plugin_device.rb +20 -8
  79. data/lib/ory-hydra-client/models/plugin_env.rb +20 -8
  80. data/lib/ory-hydra-client/models/plugin_interface_type.rb +20 -8
  81. data/lib/ory-hydra-client/models/plugin_mount.rb +20 -8
  82. data/lib/ory-hydra-client/models/plugin_settings.rb +20 -8
  83. data/lib/ory-hydra-client/models/previous_consent_session.rb +21 -9
  84. data/lib/ory-hydra-client/models/reject_request.rb +20 -8
  85. data/lib/ory-hydra-client/models/request_was_handled_response.rb +224 -0
  86. data/lib/ory-hydra-client/models/userinfo_response.rb +20 -8
  87. data/lib/ory-hydra-client/models/version.rb +20 -8
  88. data/lib/ory-hydra-client/models/volume.rb +333 -0
  89. data/lib/ory-hydra-client/models/volume_usage_data.rb +20 -8
  90. data/lib/ory-hydra-client/models/well_known.rb +33 -9
  91. data/lib/ory-hydra-client/version.rb +3 -3
  92. data/ory-hydra-client.gemspec +4 -5
  93. data/spec/api_client_spec.rb +3 -3
  94. data/spec/configuration_spec.rb +2 -2
  95. data/spec/models/patch_document_spec.rb +52 -0
  96. data/spec/models/request_was_handled_response_spec.rb +34 -0
  97. data/spec/models/volume_spec.rb +82 -0
  98. data/spec/spec_helper.rb +2 -2
  99. metadata +45 -53
@@ -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.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  # The Access Token Response
@@ -39,6 +40,11 @@ module OryHydraClient
39
40
  }
40
41
  end
41
42
 
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
42
48
  # Attribute type mapping.
43
49
  def self.openapi_types
44
50
  {
@@ -148,7 +154,9 @@ module OryHydraClient
148
154
  def build_from_hash(attributes)
149
155
  return nil unless attributes.is_a?(Hash)
150
156
  self.class.openapi_types.each_pair do |key, type|
151
- if type =~ /\AArray<(.*)>/i
157
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
+ self.send("#{key}=", nil)
159
+ elsif type =~ /\AArray<(.*)>/i
152
160
  # check to ensure the input is an array given that the attribute
153
161
  # is documented as an array but the input is not
154
162
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -156,7 +164,7 @@ module OryHydraClient
156
164
  end
157
165
  elsif !attributes[self.class.attribute_map[key]].nil?
158
166
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
- end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
160
168
  end
161
169
 
162
170
  self
@@ -168,8 +176,8 @@ module OryHydraClient
168
176
  # @return [Object] Deserialized data
169
177
  def _deserialize(type, value)
170
178
  case type.to_sym
171
- when :DateTime
172
- DateTime.parse(value)
179
+ when :Time
180
+ Time.parse(value)
173
181
  when :Date
174
182
  Date.parse(value)
175
183
  when :String
@@ -199,7 +207,9 @@ module OryHydraClient
199
207
  end
200
208
  end
201
209
  else # model
202
- OryHydraClient.const_get(type).build_from_hash(value)
210
+ # models (e.g. Pet) or oneOf
211
+ klass = OryHydraClient.const_get(type)
212
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
213
  end
204
214
  end
205
215
 
@@ -225,7 +235,7 @@ module OryHydraClient
225
235
  is_nullable = self.class.openapi_nullable.include?(attr)
226
236
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
237
  end
228
-
238
+
229
239
  hash[param] = _to_hash(value)
230
240
  end
231
241
  hash
@@ -248,5 +258,7 @@ module OryHydraClient
248
258
  value
249
259
  end
250
260
  end
261
+
251
262
  end
263
+
252
264
  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.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class OpenIDConnectContext
@@ -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
  {
@@ -147,7 +153,9 @@ module OryHydraClient
147
153
  def build_from_hash(attributes)
148
154
  return nil unless attributes.is_a?(Hash)
149
155
  self.class.openapi_types.each_pair do |key, type|
150
- if type =~ /\AArray<(.*)>/i
156
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
+ self.send("#{key}=", nil)
158
+ elsif type =~ /\AArray<(.*)>/i
151
159
  # check to ensure the input is an array given that the attribute
152
160
  # is documented as an array but the input is not
153
161
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -155,7 +163,7 @@ module OryHydraClient
155
163
  end
156
164
  elsif !attributes[self.class.attribute_map[key]].nil?
157
165
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
- end # or else data not found in attributes(hash), not an issue as the data can be optional
166
+ end
159
167
  end
160
168
 
161
169
  self
@@ -167,8 +175,8 @@ module OryHydraClient
167
175
  # @return [Object] Deserialized data
168
176
  def _deserialize(type, value)
169
177
  case type.to_sym
170
- when :DateTime
171
- DateTime.parse(value)
178
+ when :Time
179
+ Time.parse(value)
172
180
  when :Date
173
181
  Date.parse(value)
174
182
  when :String
@@ -198,7 +206,9 @@ module OryHydraClient
198
206
  end
199
207
  end
200
208
  else # model
201
- OryHydraClient.const_get(type).build_from_hash(value)
209
+ # models (e.g. Pet) or oneOf
210
+ klass = OryHydraClient.const_get(type)
211
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
212
  end
203
213
  end
204
214
 
@@ -224,7 +234,7 @@ module OryHydraClient
224
234
  is_nullable = self.class.openapi_nullable.include?(attr)
225
235
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
236
  end
227
-
237
+
228
238
  hash[param] = _to_hash(value)
229
239
  end
230
240
  hash
@@ -247,5 +257,7 @@ module OryHydraClient
247
257
  value
248
258
  end
249
259
  end
260
+
250
261
  end
262
+
251
263
  end
@@ -0,0 +1,260 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: v1.10.2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OryHydraClient
17
+ # A JSONPatch document as defined by RFC 6902
18
+ class PatchDocument
19
+ # A JSON-pointer
20
+ attr_accessor :from
21
+
22
+ # The operation to be performed
23
+ attr_accessor :op
24
+
25
+ # A JSON-pointer
26
+ attr_accessor :path
27
+
28
+ # The value to be used within the operations
29
+ attr_accessor :value
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'from' => :'from',
35
+ :'op' => :'op',
36
+ :'path' => :'path',
37
+ :'value' => :'value'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'from' => :'String',
50
+ :'op' => :'String',
51
+ :'path' => :'String',
52
+ :'value' => :'Object'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PatchDocument` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PatchDocument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'from')
78
+ self.from = attributes[:'from']
79
+ end
80
+
81
+ if attributes.key?(:'op')
82
+ self.op = attributes[:'op']
83
+ end
84
+
85
+ if attributes.key?(:'path')
86
+ self.path = attributes[:'path']
87
+ end
88
+
89
+ if attributes.key?(:'value')
90
+ self.value = attributes[:'value']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ invalid_properties = Array.new
98
+ if @op.nil?
99
+ invalid_properties.push('invalid value for "op", op cannot be nil.')
100
+ end
101
+
102
+ if @path.nil?
103
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ return false if @op.nil?
113
+ return false if @path.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ from == o.from &&
123
+ op == o.op &&
124
+ path == o.path &&
125
+ value == o.value
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [from, op, path, value].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = OryHydraClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ 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.2
6
+ The version of the OpenAPI document: v1.10.2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.1.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module OryHydraClient
16
17
  class PluginConfig
@@ -78,6 +79,11 @@ module OryHydraClient
78
79
  }
79
80
  end
80
81
 
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ attribute_map.values
85
+ end
86
+
81
87
  # Attribute type mapping.
82
88
  def self.openapi_types
83
89
  {
@@ -318,7 +324,9 @@ module OryHydraClient
318
324
  def build_from_hash(attributes)
319
325
  return nil unless attributes.is_a?(Hash)
320
326
  self.class.openapi_types.each_pair do |key, type|
321
- if type =~ /\AArray<(.*)>/i
327
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
328
+ self.send("#{key}=", nil)
329
+ elsif type =~ /\AArray<(.*)>/i
322
330
  # check to ensure the input is an array given that the attribute
323
331
  # is documented as an array but the input is not
324
332
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -326,7 +334,7 @@ module OryHydraClient
326
334
  end
327
335
  elsif !attributes[self.class.attribute_map[key]].nil?
328
336
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
329
- end # or else data not found in attributes(hash), not an issue as the data can be optional
337
+ end
330
338
  end
331
339
 
332
340
  self
@@ -338,8 +346,8 @@ module OryHydraClient
338
346
  # @return [Object] Deserialized data
339
347
  def _deserialize(type, value)
340
348
  case type.to_sym
341
- when :DateTime
342
- DateTime.parse(value)
349
+ when :Time
350
+ Time.parse(value)
343
351
  when :Date
344
352
  Date.parse(value)
345
353
  when :String
@@ -369,7 +377,9 @@ module OryHydraClient
369
377
  end
370
378
  end
371
379
  else # model
372
- OryHydraClient.const_get(type).build_from_hash(value)
380
+ # models (e.g. Pet) or oneOf
381
+ klass = OryHydraClient.const_get(type)
382
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
373
383
  end
374
384
  end
375
385
 
@@ -395,7 +405,7 @@ module OryHydraClient
395
405
  is_nullable = self.class.openapi_nullable.include?(attr)
396
406
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
397
407
  end
398
-
408
+
399
409
  hash[param] = _to_hash(value)
400
410
  end
401
411
  hash
@@ -418,5 +428,7 @@ module OryHydraClient
418
428
  value
419
429
  end
420
430
  end
431
+
421
432
  end
433
+
422
434
  end