endoflife_date 1.0.0 → 1.2.0

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.
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -45,7 +45,7 @@ module EndOfLifeDateApiClient
45
45
  # header parameters
46
46
  header_params = opts[:header_params] || {}
47
47
  # HTTP header 'Accept' (if needed)
48
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
49
 
50
50
  # form parameters
51
51
  form_params = opts[:form_params] || {}
@@ -77,9 +77,9 @@ module EndOfLifeDateApiClient
77
77
  end
78
78
 
79
79
  # Single cycle details
80
- # Gets details of a single cycle
81
- # @param product [String] Product URL as per the canonical URL on the endofife.date website
82
- # @param cycle [String] Release Cycle for which the details must be fetched
80
+ # Gets details of a single cycle.
81
+ # @param product [String] Product URL as per the canonical URL on the endofife.date website.
82
+ # @param cycle [String] Release Cycle for which the details must be fetched. Any slash character in the cycle name will be replaced with dashes. For example FreeBSD's releng/14.0 becomes releng-14.0.
83
83
  # @param [Hash] opts the optional parameters
84
84
  # @return [Cycle]
85
85
  def get_api_product_cycle_json(product, cycle, opts = {})
@@ -88,9 +88,9 @@ module EndOfLifeDateApiClient
88
88
  end
89
89
 
90
90
  # Single cycle details
91
- # Gets details of a single cycle
92
- # @param product [String] Product URL as per the canonical URL on the endofife.date website
93
- # @param cycle [String] Release Cycle for which the details must be fetched
91
+ # Gets details of a single cycle.
92
+ # @param product [String] Product URL as per the canonical URL on the endofife.date website.
93
+ # @param cycle [String] Release Cycle for which the details must be fetched. Any slash character in the cycle name will be replaced with dashes. For example FreeBSD's releng/14.0 becomes releng-14.0.
94
94
  # @param [Hash] opts the optional parameters
95
95
  # @return [Array<(Cycle, Integer, Hash)>] Cycle data, response status code and response headers
96
96
  def get_api_product_cycle_json_with_http_info(product, cycle, opts = {})
@@ -106,7 +106,7 @@ module EndOfLifeDateApiClient
106
106
  fail ArgumentError, "Missing the required parameter 'cycle' when calling DefaultApi.get_api_product_cycle_json"
107
107
  end
108
108
  # resource path
109
- local_var_path = '/api/{product}/{cycle}.json'.sub('{' + 'product' + '}', CGI.escape(product.to_s)).sub('{' + 'cycle' + '}', CGI.escape(cycle.to_s))
109
+ local_var_path = '/api/{product}/{cycle}.json'.sub('{product}', CGI.escape(product.to_s)).sub('{cycle}', CGI.escape(cycle.to_s))
110
110
 
111
111
  # query parameters
112
112
  query_params = opts[:query_params] || {}
@@ -114,7 +114,7 @@ module EndOfLifeDateApiClient
114
114
  # header parameters
115
115
  header_params = opts[:header_params] || {}
116
116
  # HTTP header 'Accept' (if needed)
117
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
118
118
 
119
119
  # form parameters
120
120
  form_params = opts[:form_params] || {}
@@ -147,7 +147,7 @@ module EndOfLifeDateApiClient
147
147
 
148
148
  # Get All Details
149
149
  # Get EoL dates of all cycles of a given product.
150
- # @param product [String] Product URL as per the canonical URL on the endofife.date website
150
+ # @param product [String] Product URL as per the canonical URL on the endofife.date website.
151
151
  # @param [Hash] opts the optional parameters
152
152
  # @return [Array<Cycle>]
153
153
  def get_api_product_json(product, opts = {})
@@ -157,7 +157,7 @@ module EndOfLifeDateApiClient
157
157
 
158
158
  # Get All Details
159
159
  # Get EoL dates of all cycles of a given product.
160
- # @param product [String] Product URL as per the canonical URL on the endofife.date website
160
+ # @param product [String] Product URL as per the canonical URL on the endofife.date website.
161
161
  # @param [Hash] opts the optional parameters
162
162
  # @return [Array<(Array<Cycle>, Integer, Hash)>] Array<Cycle> data, response status code and response headers
163
163
  def get_api_product_json_with_http_info(product, opts = {})
@@ -169,7 +169,7 @@ module EndOfLifeDateApiClient
169
169
  fail ArgumentError, "Missing the required parameter 'product' when calling DefaultApi.get_api_product_json"
170
170
  end
171
171
  # resource path
172
- local_var_path = '/api/{product}.json'.sub('{' + 'product' + '}', CGI.escape(product.to_s))
172
+ local_var_path = '/api/{product}.json'.sub('{product}', CGI.escape(product.to_s))
173
173
 
174
174
  # query parameters
175
175
  query_params = opts[:query_params] || {}
@@ -177,7 +177,7 @@ module EndOfLifeDateApiClient
177
177
  # header parameters
178
178
  header_params = opts[:header_params] || {}
179
179
  # HTTP header 'Accept' (if needed)
180
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
181
181
 
182
182
  # form parameters
183
183
  form_params = opts[:form_params] || {}
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -49,7 +49,8 @@ module EndOfLifeDateApiClient
49
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
+ tempfile = nil
53
+ (download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File'
53
54
  response = request.run
54
55
 
55
56
  if @config.debugging
@@ -187,19 +188,17 @@ module EndOfLifeDateApiClient
187
188
  chunk.force_encoding(encoding)
188
189
  tempfile.write(chunk)
189
190
  end
190
- # run the request to ensure the tempfile is created successfully before returning it
191
- request.run
192
- if tempfile
191
+ request.on_complete do
192
+ if !tempfile
193
+ fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
194
+ end
193
195
  tempfile.close
194
196
  @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
195
197
  "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
196
198
  "will be deleted automatically with GC. It's also recommended to delete the temp file "\
197
199
  "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}")
200
+ yield tempfile if block_given?
200
201
  end
201
-
202
- tempfile
203
202
  end
204
203
 
205
204
  # Check if the given MIME is a JSON MIME.
@@ -211,7 +210,7 @@ module EndOfLifeDateApiClient
211
210
  # @param [String] mime MIME
212
211
  # @return [Boolean] True if the MIME is application/json
213
212
  def json_mime?(mime)
214
- (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
213
+ (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil?
215
214
  end
216
215
 
217
216
  # Deserialize the response to the given return type.
@@ -278,9 +277,13 @@ module EndOfLifeDateApiClient
278
277
  data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
279
278
  end
280
279
  else
281
- # models (e.g. Pet) or oneOf
280
+ # models (e.g. Pet) or oneOf/anyOf
282
281
  klass = EndOfLifeDateApiClient.const_get(return_type)
283
- klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
282
+ if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of)
283
+ klass.build(data)
284
+ else
285
+ klass.build_from_hash(data)
286
+ end
284
287
  end
285
288
  end
286
289
 
@@ -290,7 +293,7 @@ module EndOfLifeDateApiClient
290
293
  # @param [String] filename the filename to be sanitized
291
294
  # @return [String] the sanitized filename
292
295
  def sanitize_filename(filename)
293
- filename.gsub(/.*[\/\\]/, '')
296
+ filename.split(/[\/\\]/).last
294
297
  end
295
298
 
296
299
  def build_request_url(path, opts = {})
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,88 @@
1
+ =begin
2
+ #endoflife.date
3
+
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
+
6
+ The version of the OpenAPI document: 0.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ module EndOfLifeDateApiClient
14
+ class ApiModelBase
15
+ # Deserializes the data based on type
16
+ # @param string type Data type
17
+ # @param string value Value to be deserialized
18
+ # @return [Object] Deserialized data
19
+ def self._deserialize(type, value)
20
+ case type.to_sym
21
+ when :Time
22
+ Time.parse(value)
23
+ when :Date
24
+ Date.parse(value)
25
+ when :String
26
+ value.to_s
27
+ when :Integer
28
+ value.to_i
29
+ when :Float
30
+ value.to_f
31
+ when :Boolean
32
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
33
+ true
34
+ else
35
+ false
36
+ end
37
+ when :Object
38
+ # generic object (usually a Hash), return directly
39
+ value
40
+ when /\AArray<(?<inner_type>.+)>\z/
41
+ inner_type = Regexp.last_match[:inner_type]
42
+ value.map { |v| _deserialize(inner_type, v) }
43
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
44
+ k_type = Regexp.last_match[:k_type]
45
+ v_type = Regexp.last_match[:v_type]
46
+ {}.tap do |hash|
47
+ value.each do |k, v|
48
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
49
+ end
50
+ end
51
+ else # model
52
+ # models (e.g. Pet) or oneOf
53
+ klass = EndOfLifeDateApiClient.const_get(type)
54
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
55
+ end
56
+ end
57
+
58
+ # Returns the string representation of the object
59
+ # @return [String] String presentation of the object
60
+ def to_s
61
+ to_hash.to_s
62
+ end
63
+
64
+ # to_body is an alias to to_hash (backward compatibility)
65
+ # @return [Hash] Returns the object in the form of hash
66
+ def to_body
67
+ to_hash
68
+ end
69
+
70
+ # Outputs non-array value in the form of hash
71
+ # For object, use to_hash. Otherwise, just return the value
72
+ # @param [Object] value Any valid value
73
+ # @return [Hash] Returns the value in the form of hash
74
+ def _to_hash(value)
75
+ if value.is_a?(Array)
76
+ value.compact.map { |v| _to_hash(v) }
77
+ elsif value.is_a?(Hash)
78
+ {}.tap do |hash|
79
+ value.each { |k, v| hash[k] = _to_hash(v) }
80
+ end
81
+ elsif value.respond_to? :to_hash
82
+ value.to_hash
83
+ else
84
+ value
85
+ end
86
+ end
87
+ end
88
+ end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -79,6 +79,14 @@ module EndOfLifeDateApiClient
79
79
  # @return [true, false]
80
80
  attr_accessor :debugging
81
81
 
82
+ # Set this to ignore operation servers for the API client. This is useful when you need to
83
+ # send requests to a different server than the one specified in the OpenAPI document.
84
+ # Will default to the base url defined in the spec but can be overridden by setting
85
+ # `scheme`, `host`, `base_path` directly.
86
+ # Default to false.
87
+ # @return [true, false]
88
+ attr_accessor :ignore_operation_servers
89
+
82
90
  # Defines the logger used for debugging.
83
91
  # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
84
92
  #
@@ -166,6 +174,7 @@ module EndOfLifeDateApiClient
166
174
  @timeout = 0
167
175
  @params_encoding = nil
168
176
  @debugging = false
177
+ @ignore_operation_servers = false
169
178
  @inject_format = false
170
179
  @force_ending_format = false
171
180
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
@@ -200,6 +209,7 @@ module EndOfLifeDateApiClient
200
209
 
201
210
  # Returns base URL for specified operation based on server settings
202
211
  def base_url(operation = nil)
212
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
203
213
  if operation_server_settings.key?(operation) then
204
214
  index = server_operation_index.fetch(operation, server_index)
205
215
  server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -15,18 +15,18 @@ require 'time'
15
15
 
16
16
  module EndOfLifeDateApiClient
17
17
  # Details of a single release cycle of a given product. There might be some slight variations to this depending on the product.
18
- class Cycle
18
+ class Cycle < ApiModelBase
19
19
  attr_accessor :cycle
20
20
 
21
- # Release Date for the first release in this cycle
21
+ # Release date for the first release in this cycle.
22
22
  attr_accessor :release_date
23
23
 
24
24
  attr_accessor :eol
25
25
 
26
- # Latest release in this cycle
26
+ # Latest release in this cycle.
27
27
  attr_accessor :latest
28
28
 
29
- # Link to changelog for the latest release, if available
29
+ # Link to changelog for the latest release in this cycle, or null if unavailable.
30
30
  attr_accessor :link
31
31
 
32
32
  attr_accessor :lts
@@ -49,9 +49,14 @@ module EndOfLifeDateApiClient
49
49
  }
50
50
  end
51
51
 
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
52
57
  # Returns all the JSON keys this model knows about
53
58
  def self.acceptable_attributes
54
- attribute_map.values
59
+ acceptable_attribute_map.values
55
60
  end
56
61
 
57
62
  # Attribute type mapping.
@@ -83,9 +88,10 @@ module EndOfLifeDateApiClient
83
88
  end
84
89
 
85
90
  # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
87
- if (!self.class.attribute_map.key?(k.to_sym))
88
- fail ArgumentError, "`#{k}` is not a valid attribute in `EndOfLifeDateApiClient::Cycle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EndOfLifeDateApiClient::Cycle`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
95
  end
90
96
  h[k.to_sym] = v
91
97
  }
@@ -133,15 +139,15 @@ module EndOfLifeDateApiClient
133
139
  end
134
140
 
135
141
  if !@release_date.nil? && @release_date.to_s.length < 10
136
- invalid_properties.push('invalid value for "release_date", the character length must be great than or equal to 10.')
142
+ invalid_properties.push('invalid value for "release_date", the character length must be greater than or equal to 10.')
137
143
  end
138
144
 
139
145
  if !@latest.nil? && @latest.to_s.length < 1
140
- invalid_properties.push('invalid value for "latest", the character length must be great than or equal to 1.')
146
+ invalid_properties.push('invalid value for "latest", the character length must be greater than or equal to 1.')
141
147
  end
142
148
 
143
149
  if !@link.nil? && @link.to_s.length < 1
144
- invalid_properties.push('invalid value for "link", the character length must be great than or equal to 1.')
150
+ invalid_properties.push('invalid value for "link", the character length must be greater than or equal to 1.')
145
151
  end
146
152
 
147
153
  invalid_properties
@@ -170,7 +176,7 @@ module EndOfLifeDateApiClient
170
176
  end
171
177
 
172
178
  if release_date.to_s.length < 10
173
- fail ArgumentError, 'invalid value for "release_date", the character length must be great than or equal to 10.'
179
+ fail ArgumentError, 'invalid value for "release_date", the character length must be greater than or equal to 10.'
174
180
  end
175
181
 
176
182
  @release_date = release_date
@@ -184,7 +190,7 @@ module EndOfLifeDateApiClient
184
190
  end
185
191
 
186
192
  if latest.to_s.length < 1
187
- fail ArgumentError, 'invalid value for "latest", the character length must be great than or equal to 1.'
193
+ fail ArgumentError, 'invalid value for "latest", the character length must be greater than or equal to 1.'
188
194
  end
189
195
 
190
196
  @latest = latest
@@ -194,7 +200,7 @@ module EndOfLifeDateApiClient
194
200
  # @param [Object] link Value to be assigned
195
201
  def link=(link)
196
202
  if !link.nil? && link.to_s.length < 1
197
- fail ArgumentError, 'invalid value for "link", the character length must be great than or equal to 1.'
203
+ fail ArgumentError, 'invalid value for "link", the character length must be greater than or equal to 1.'
198
204
  end
199
205
 
200
206
  @link = link
@@ -250,61 +256,6 @@ module EndOfLifeDateApiClient
250
256
  new(transformed_hash)
251
257
  end
252
258
 
253
- # Deserializes the data based on type
254
- # @param string type Data type
255
- # @param string value Value to be deserialized
256
- # @return [Object] Deserialized data
257
- def self._deserialize(type, value)
258
- case type.to_sym
259
- when :Time
260
- Time.parse(value)
261
- when :Date
262
- Date.parse(value)
263
- when :String
264
- value.to_s
265
- when :Integer
266
- value.to_i
267
- when :Float
268
- value.to_f
269
- when :Boolean
270
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
271
- true
272
- else
273
- false
274
- end
275
- when :Object
276
- # generic object (usually a Hash), return directly
277
- value
278
- when /\AArray<(?<inner_type>.+)>\z/
279
- inner_type = Regexp.last_match[:inner_type]
280
- value.map { |v| _deserialize(inner_type, v) }
281
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
282
- k_type = Regexp.last_match[:k_type]
283
- v_type = Regexp.last_match[:v_type]
284
- {}.tap do |hash|
285
- value.each do |k, v|
286
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
287
- end
288
- end
289
- else # model
290
- # models (e.g. Pet) or oneOf
291
- klass = EndOfLifeDateApiClient.const_get(type)
292
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
293
- end
294
- end
295
-
296
- # Returns the string representation of the object
297
- # @return [String] String presentation of the object
298
- def to_s
299
- to_hash.to_s
300
- end
301
-
302
- # to_body is an alias to to_hash (backward compatibility)
303
- # @return [Hash] Returns the object in the form of hash
304
- def to_body
305
- to_hash
306
- end
307
-
308
259
  # Returns the object in the form of hash
309
260
  # @return [Hash] Returns the object in the form of hash
310
261
  def to_hash
@@ -321,24 +272,6 @@ module EndOfLifeDateApiClient
321
272
  hash
322
273
  end
323
274
 
324
- # Outputs non-array value in the form of hash
325
- # For object, use to_hash. Otherwise, just return the value
326
- # @param [Object] value Any valid value
327
- # @return [Hash] Returns the value in the form of hash
328
- def _to_hash(value)
329
- if value.is_a?(Array)
330
- value.compact.map { |v| _to_hash(v) }
331
- elsif value.is_a?(Hash)
332
- {}.tap do |hash|
333
- value.each { |k, v| hash[k] = _to_hash(v) }
334
- end
335
- elsif value.respond_to? :to_hash
336
- value.to_hash
337
- else
338
- value
339
- end
340
- end
341
-
342
275
  end
343
276
 
344
277
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module EndOfLifeDateApiClient
17
- # Release Cycle
17
+ # The release cycle which this release is part of.
18
18
  module CycleCycle
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -38,8 +38,7 @@ module EndOfLifeDateApiClient
38
38
  openapi_any_of.each do |klass|
39
39
  begin
40
40
  next if klass == :AnyType # "nullable: true"
41
- typed_data = find_and_cast_into_type(klass, data)
42
- return typed_data if typed_data
41
+ return find_and_cast_into_type(klass, data)
43
42
  rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
43
  end
45
44
  end
@@ -65,7 +64,7 @@ module EndOfLifeDateApiClient
65
64
  when 'Time'
66
65
  return Time.parse(data)
67
66
  when 'Date'
68
- return Date.parse(data)
67
+ return Date.iso8601(data)
69
68
  when 'String'
70
69
  return data if data.instance_of?(String)
71
70
  when 'Object' # "type: object"
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module EndOfLifeDateApiClient
17
- # Whether this cycle is now discontinued.
17
+ # Whether this device version is no longer in production.
18
18
  module CycleDiscontinued
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -38,8 +38,7 @@ module EndOfLifeDateApiClient
38
38
  openapi_any_of.each do |klass|
39
39
  begin
40
40
  next if klass == :AnyType # "nullable: true"
41
- typed_data = find_and_cast_into_type(klass, data)
42
- return typed_data if typed_data
41
+ return find_and_cast_into_type(klass, data)
43
42
  rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
43
  end
45
44
  end
@@ -65,7 +64,7 @@ module EndOfLifeDateApiClient
65
64
  when 'Time'
66
65
  return Time.parse(data)
67
66
  when 'Date'
68
- return Date.parse(data)
67
+ return Date.iso8601(data)
69
68
  when 'String'
70
69
  return data if data.instance_of?(String)
71
70
  when 'Object' # "type: object"
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #endoflife.date
3
3
 
4
- #Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
4
+ #The endoflife.date v0 API is currently deprecated, please [use the endoflife.date v1 API](https://endoflife.date/docs/api/v1/).
5
5
 
6
6
  The version of the OpenAPI document: 0.0.1
7
7
  Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.4.0
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module EndOfLifeDateApiClient
17
- # End of Life Date for this release cycle
17
+ # End-of-Life date for this release cycle.
18
18
  module CycleEol
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -38,8 +38,7 @@ module EndOfLifeDateApiClient
38
38
  openapi_any_of.each do |klass|
39
39
  begin
40
40
  next if klass == :AnyType # "nullable: true"
41
- typed_data = find_and_cast_into_type(klass, data)
42
- return typed_data if typed_data
41
+ return find_and_cast_into_type(klass, data)
43
42
  rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
43
  end
45
44
  end
@@ -65,7 +64,7 @@ module EndOfLifeDateApiClient
65
64
  when 'Time'
66
65
  return Time.parse(data)
67
66
  when 'Date'
68
- return Date.parse(data)
67
+ return Date.iso8601(data)
69
68
  when 'String'
70
69
  return data if data.instance_of?(String)
71
70
  when 'Object' # "type: object"