cheminee 0.1.12 → 0.1.14

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -7
  3. data/README.md +10 -6
  4. data/cheminee.gemspec +2 -1
  5. data/docs/BulkRequestDoc.md +2 -2
  6. data/docs/DefaultApi.md +91 -20
  7. data/docs/IndexSchema.md +20 -0
  8. data/docs/QueryResponseError.md +18 -0
  9. data/docs/QuerySearchHit.md +22 -0
  10. data/docs/Smiles.md +18 -0
  11. data/docs/StandardizedSmiles.md +20 -0
  12. data/lib/cheminee/api/default_api.rb +99 -25
  13. data/lib/cheminee/api_client.rb +21 -20
  14. data/lib/cheminee/api_error.rb +1 -1
  15. data/lib/cheminee/configuration.rb +1 -1
  16. data/lib/cheminee/models/bulk_request.rb +2 -2
  17. data/lib/cheminee/models/bulk_request_doc.rb +13 -13
  18. data/lib/cheminee/models/create_index_error.rb +2 -2
  19. data/lib/cheminee/models/get_indexes_response_error.rb +2 -2
  20. data/lib/cheminee/models/index_meta.rb +2 -2
  21. data/lib/cheminee/models/index_schema.rb +233 -0
  22. data/lib/cheminee/models/list_index_response_err.rb +2 -2
  23. data/lib/cheminee/models/post_index_bulk_response_error.rb +2 -2
  24. data/lib/cheminee/models/post_index_bulk_response_ok.rb +2 -2
  25. data/lib/cheminee/models/post_index_bulk_response_ok_status.rb +2 -2
  26. data/lib/cheminee/models/query_response_error.rb +221 -0
  27. data/lib/cheminee/models/query_search_hit.rb +249 -0
  28. data/lib/cheminee/models/schema.rb +2 -2
  29. data/lib/cheminee/models/smiles.rb +221 -0
  30. data/lib/cheminee/models/standardized_smiles.rb +223 -0
  31. data/lib/cheminee/models/structure_response_error.rb +2 -2
  32. data/lib/cheminee/models/structure_search_hit.rb +2 -2
  33. data/lib/cheminee/version.rb +2 -2
  34. data/lib/cheminee.rb +6 -3
  35. data/pkg/cheminee-0.1.14.gem +0 -0
  36. data/spec/models/index_schema_spec.rb +42 -0
  37. data/spec/models/query_response_error_spec.rb +36 -0
  38. data/spec/models/query_search_hit_spec.rb +48 -0
  39. data/spec/models/smiles_spec.rb +36 -0
  40. data/spec/models/standardized_smiles_spec.rb +42 -0
  41. data/spec/spec_helper.rb +1 -1
  42. metadata +23 -3
  43. data/pkg/cheminee-0.1.12.gem +0 -0
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -149,7 +149,7 @@ module Cheminee
149
149
  # Get extended information about an index
150
150
  # @param index [String]
151
151
  # @param [Hash] opts the optional parameters
152
- # @return [Array<IndexMeta>]
152
+ # @return [IndexSchema]
153
153
  def v1_indexes_index_get(index, opts = {})
154
154
  data, _status_code, _headers = v1_indexes_index_get_with_http_info(index, opts)
155
155
  data
@@ -158,7 +158,7 @@ module Cheminee
158
158
  # Get extended information about an index
159
159
  # @param index [String]
160
160
  # @param [Hash] opts the optional parameters
161
- # @return [Array<(Array<IndexMeta>, Integer, Hash)>] Array<IndexMeta> data, response status code and response headers
161
+ # @return [Array<(IndexSchema, Integer, Hash)>] IndexSchema data, response status code and response headers
162
162
  def v1_indexes_index_get_with_http_info(index, opts = {})
163
163
  if @api_client.config.debugging
164
164
  @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_get ...'
@@ -185,7 +185,7 @@ module Cheminee
185
185
  post_body = opts[:debug_body]
186
186
 
187
187
  # return_type
188
- return_type = opts[:debug_return_type] || 'Array<IndexMeta>'
188
+ return_type = opts[:debug_return_type] || 'IndexSchema'
189
189
 
190
190
  # auth_names
191
191
  auth_names = opts[:debug_auth_names] || []
@@ -278,26 +278,99 @@ module Cheminee
278
278
  return data, status_code, headers
279
279
  end
280
280
 
281
+ # Perform basic query search against index
282
+ # @param index [String]
283
+ # @param query [String]
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [Integer] :limit
286
+ # @return [Array<QuerySearchHit>]
287
+ def v1_indexes_index_search_basic_get(index, query, opts = {})
288
+ data, _status_code, _headers = v1_indexes_index_search_basic_get_with_http_info(index, query, opts)
289
+ data
290
+ end
291
+
292
+ # Perform basic query search against index
293
+ # @param index [String]
294
+ # @param query [String]
295
+ # @param [Hash] opts the optional parameters
296
+ # @option opts [Integer] :limit
297
+ # @return [Array<(Array<QuerySearchHit>, Integer, Hash)>] Array<QuerySearchHit> data, response status code and response headers
298
+ def v1_indexes_index_search_basic_get_with_http_info(index, query, opts = {})
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_basic_get ...'
301
+ end
302
+ # verify the required parameter 'index' is set
303
+ if @api_client.config.client_side_validation && index.nil?
304
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_basic_get"
305
+ end
306
+ # verify the required parameter 'query' is set
307
+ if @api_client.config.client_side_validation && query.nil?
308
+ fail ArgumentError, "Missing the required parameter 'query' when calling DefaultApi.v1_indexes_index_search_basic_get"
309
+ end
310
+ # resource path
311
+ local_var_path = '/v1/indexes/{index}/search/basic'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
312
+
313
+ # query parameters
314
+ query_params = opts[:query_params] || {}
315
+ query_params[:'query'] = query
316
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
322
+
323
+ # form parameters
324
+ form_params = opts[:form_params] || {}
325
+
326
+ # http body (model)
327
+ post_body = opts[:debug_body]
328
+
329
+ # return_type
330
+ return_type = opts[:debug_return_type] || 'Array<QuerySearchHit>'
331
+
332
+ # auth_names
333
+ auth_names = opts[:debug_auth_names] || []
334
+
335
+ new_options = opts.merge(
336
+ :operation => :"DefaultApi.v1_indexes_index_search_basic_get",
337
+ :header_params => header_params,
338
+ :query_params => query_params,
339
+ :form_params => form_params,
340
+ :body => post_body,
341
+ :auth_names => auth_names,
342
+ :return_type => return_type
343
+ )
344
+
345
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_basic_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
+ end
349
+ return data, status_code, headers
350
+ end
351
+
281
352
  # Perform substructure search against index
282
353
  # @param index [String]
283
- # @param smile [String]
354
+ # @param smiles [String]
284
355
  # @param [Hash] opts the optional parameters
285
356
  # @option opts [Integer] :result_limit
286
357
  # @option opts [Integer] :tautomer_limit
358
+ # @option opts [String] :extra_query
287
359
  # @return [Array<StructureSearchHit>]
288
- def v1_indexes_index_search_substructure_get(index, smile, opts = {})
289
- data, _status_code, _headers = v1_indexes_index_search_substructure_get_with_http_info(index, smile, opts)
360
+ def v1_indexes_index_search_substructure_get(index, smiles, opts = {})
361
+ data, _status_code, _headers = v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts)
290
362
  data
291
363
  end
292
364
 
293
365
  # Perform substructure search against index
294
366
  # @param index [String]
295
- # @param smile [String]
367
+ # @param smiles [String]
296
368
  # @param [Hash] opts the optional parameters
297
369
  # @option opts [Integer] :result_limit
298
370
  # @option opts [Integer] :tautomer_limit
371
+ # @option opts [String] :extra_query
299
372
  # @return [Array<(Array<StructureSearchHit>, Integer, Hash)>] Array<StructureSearchHit> data, response status code and response headers
300
- def v1_indexes_index_search_substructure_get_with_http_info(index, smile, opts = {})
373
+ def v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts = {})
301
374
  if @api_client.config.debugging
302
375
  @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_substructure_get ...'
303
376
  end
@@ -305,18 +378,19 @@ module Cheminee
305
378
  if @api_client.config.client_side_validation && index.nil?
306
379
  fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_substructure_get"
307
380
  end
308
- # verify the required parameter 'smile' is set
309
- if @api_client.config.client_side_validation && smile.nil?
310
- fail ArgumentError, "Missing the required parameter 'smile' when calling DefaultApi.v1_indexes_index_search_substructure_get"
381
+ # verify the required parameter 'smiles' is set
382
+ if @api_client.config.client_side_validation && smiles.nil?
383
+ fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_substructure_get"
311
384
  end
312
385
  # resource path
313
386
  local_var_path = '/v1/indexes/{index}/search/substructure'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
314
387
 
315
388
  # query parameters
316
389
  query_params = opts[:query_params] || {}
317
- query_params[:'smile'] = smile
390
+ query_params[:'smiles'] = smiles
318
391
  query_params[:'result_limit'] = opts[:'result_limit'] if !opts[:'result_limit'].nil?
319
392
  query_params[:'tautomer_limit'] = opts[:'tautomer_limit'] if !opts[:'tautomer_limit'].nil?
393
+ query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil?
320
394
 
321
395
  # header parameters
322
396
  header_params = opts[:header_params] || {}
@@ -408,25 +482,25 @@ module Cheminee
408
482
  end
409
483
 
410
484
  # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines
411
- # @param smile [Array<Smile>]
485
+ # @param smiles [Array<Smiles>]
412
486
  # @param [Hash] opts the optional parameters
413
- # @return [Array<StandardizedSmile>]
414
- def v1_standardize_post(smile, opts = {})
415
- data, _status_code, _headers = v1_standardize_post_with_http_info(smile, opts)
487
+ # @return [Array<StandardizedSmiles>]
488
+ def v1_standardize_post(smiles, opts = {})
489
+ data, _status_code, _headers = v1_standardize_post_with_http_info(smiles, opts)
416
490
  data
417
491
  end
418
492
 
419
493
  # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines
420
- # @param smile [Array<Smile>]
494
+ # @param smiles [Array<Smiles>]
421
495
  # @param [Hash] opts the optional parameters
422
- # @return [Array<(Array<StandardizedSmile>, Integer, Hash)>] Array<StandardizedSmile> data, response status code and response headers
423
- def v1_standardize_post_with_http_info(smile, opts = {})
496
+ # @return [Array<(Array<StandardizedSmiles>, Integer, Hash)>] Array<StandardizedSmiles> data, response status code and response headers
497
+ def v1_standardize_post_with_http_info(smiles, opts = {})
424
498
  if @api_client.config.debugging
425
499
  @api_client.config.logger.debug 'Calling API: DefaultApi.v1_standardize_post ...'
426
500
  end
427
- # verify the required parameter 'smile' is set
428
- if @api_client.config.client_side_validation && smile.nil?
429
- fail ArgumentError, "Missing the required parameter 'smile' when calling DefaultApi.v1_standardize_post"
501
+ # verify the required parameter 'smiles' is set
502
+ if @api_client.config.client_side_validation && smiles.nil?
503
+ fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_standardize_post"
430
504
  end
431
505
  # resource path
432
506
  local_var_path = '/v1/standardize'
@@ -448,10 +522,10 @@ module Cheminee
448
522
  form_params = opts[:form_params] || {}
449
523
 
450
524
  # http body (model)
451
- post_body = opts[:debug_body] || @api_client.object_to_http_body(smile)
525
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(smiles)
452
526
 
453
527
  # return_type
454
- return_type = opts[:debug_return_type] || 'Array<StandardizedSmile>'
528
+ return_type = opts[:debug_return_type] || 'Array<StandardizedSmiles>'
455
529
 
456
530
  # auth_names
457
531
  auth_names = opts[:debug_auth_names] || []
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -46,9 +46,10 @@ module Cheminee
46
46
  # Call an API with given options.
47
47
  #
48
48
  # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
49
- # the data deserialized from response body (could be nil), response status code and response headers.
49
+ # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers.
50
50
  def call_api(http_method, path, opts = {})
51
51
  request = build_request(http_method, path, opts)
52
+ tempfile = download_file(request) if opts[:return_type] == 'File'
52
53
  response = request.run
53
54
 
54
55
  if @config.debugging
@@ -70,7 +71,9 @@ module Cheminee
70
71
  end
71
72
  end
72
73
 
73
- if opts[:return_type]
74
+ if opts[:return_type] == 'File'
75
+ data = tempfile
76
+ elsif opts[:return_type]
74
77
  data = deserialize(response, opts[:return_type])
75
78
  else
76
79
  data = nil
@@ -125,9 +128,7 @@ module Cheminee
125
128
  end
126
129
  end
127
130
 
128
- request = Typhoeus::Request.new(url, req_opts)
129
- download_file(request) if opts[:return_type] == 'File'
130
- request
131
+ Typhoeus::Request.new(url, req_opts)
131
132
  end
132
133
 
133
134
  # Builds the HTTP request body
@@ -165,6 +166,8 @@ module Cheminee
165
166
  # process can use.
166
167
  #
167
168
  # @see Configuration#temp_folder_path
169
+ #
170
+ # @return [Tempfile] the tempfile generated
168
171
  def download_file(request)
169
172
  tempfile = nil
170
173
  encoding = nil
@@ -179,21 +182,24 @@ module Cheminee
179
182
  prefix = prefix + '-' unless prefix.end_with?('-')
180
183
  encoding = response.body.encoding
181
184
  tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
182
- @tempfile = tempfile
183
185
  end
184
186
  request.on_body do |chunk|
185
187
  chunk.force_encoding(encoding)
186
188
  tempfile.write(chunk)
187
189
  end
188
- request.on_complete do |response|
189
- if tempfile
190
- tempfile.close
191
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
192
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
193
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
194
- "explicitly with `tempfile.delete`"
195
- end
190
+ # run the request to ensure the tempfile is created successfully before returning it
191
+ request.run
192
+ if tempfile
193
+ tempfile.close
194
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
195
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
196
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
197
+ "explicitly with `tempfile.delete`"
198
+ else
199
+ fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
196
200
  end
201
+
202
+ tempfile
197
203
  end
198
204
 
199
205
  # Check if the given MIME is a JSON MIME.
@@ -214,11 +220,6 @@ module Cheminee
214
220
  # @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
215
221
  def deserialize(response, return_type)
216
222
  body = response.body
217
-
218
- # handle file downloading - return the File instance processed in request callbacks
219
- # note that response body is empty when the file is written in chunks in request on_body callback
220
- return @tempfile if return_type == 'File'
221
-
222
223
  return nil if body.nil? || body.empty?
223
224
 
224
225
  # return response body directly for String return type
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -168,7 +168,7 @@ module Cheminee
168
168
  else # model
169
169
  # models (e.g. Pet) or oneOf
170
170
  klass = Cheminee.const_get(type)
171
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
172
  end
173
173
  end
174
174
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Cheminee
17
17
  class BulkRequestDoc
18
- attr_accessor :smile
18
+ attr_accessor :smiles
19
19
 
20
20
  # This value can store an arbitrary JSON object like '{}'
21
21
  attr_accessor :extra_data
@@ -23,7 +23,7 @@ module Cheminee
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'smile' => :'smile',
26
+ :'smiles' => :'smiles',
27
27
  :'extra_data' => :'extra_data'
28
28
  }
29
29
  end
@@ -36,7 +36,7 @@ module Cheminee
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'smile' => :'String',
39
+ :'smiles' => :'String',
40
40
  :'extra_data' => :'Object'
41
41
  }
42
42
  end
@@ -63,10 +63,10 @@ module Cheminee
63
63
  h[k.to_sym] = v
64
64
  }
65
65
 
66
- if attributes.key?(:'smile')
67
- self.smile = attributes[:'smile']
66
+ if attributes.key?(:'smiles')
67
+ self.smiles = attributes[:'smiles']
68
68
  else
69
- self.smile = nil
69
+ self.smiles = nil
70
70
  end
71
71
 
72
72
  if attributes.key?(:'extra_data')
@@ -79,8 +79,8 @@ module Cheminee
79
79
  def list_invalid_properties
80
80
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
81
  invalid_properties = Array.new
82
- if @smile.nil?
83
- invalid_properties.push('invalid value for "smile", smile cannot be nil.')
82
+ if @smiles.nil?
83
+ invalid_properties.push('invalid value for "smiles", smiles cannot be nil.')
84
84
  end
85
85
 
86
86
  invalid_properties
@@ -90,7 +90,7 @@ module Cheminee
90
90
  # @return true if the model is valid
91
91
  def valid?
92
92
  warn '[DEPRECATED] the `valid?` method is obsolete'
93
- return false if @smile.nil?
93
+ return false if @smiles.nil?
94
94
  true
95
95
  end
96
96
 
@@ -99,7 +99,7 @@ module Cheminee
99
99
  def ==(o)
100
100
  return true if self.equal?(o)
101
101
  self.class == o.class &&
102
- smile == o.smile &&
102
+ smiles == o.smiles &&
103
103
  extra_data == o.extra_data
104
104
  end
105
105
 
@@ -112,7 +112,7 @@ module Cheminee
112
112
  # Calculates hash code according to all attributes.
113
113
  # @return [Integer] Hash code
114
114
  def hash
115
- [smile, extra_data].hash
115
+ [smiles, extra_data].hash
116
116
  end
117
117
 
118
118
  # Builds the object from hash
@@ -177,7 +177,7 @@ module Cheminee
177
177
  else # model
178
178
  # models (e.g. Pet) or oneOf
179
179
  klass = Cheminee.const_get(type)
180
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
181
  end
182
182
  end
183
183
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -166,7 +166,7 @@ module Cheminee
166
166
  else # model
167
167
  # models (e.g. Pet) or oneOf
168
168
  klass = Cheminee.const_get(type)
169
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
170
  end
171
171
  end
172
172
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -166,7 +166,7 @@ module Cheminee
166
166
  else # model
167
167
  # models (e.g. Pet) or oneOf
168
168
  klass = Cheminee.const_get(type)
169
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
170
  end
171
171
  end
172
172
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -182,7 +182,7 @@ module Cheminee
182
182
  else # model
183
183
  # models (e.g. Pet) or oneOf
184
184
  klass = Cheminee.const_get(type)
185
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
186
  end
187
187
  end
188
188