endoflife_date 1.0.0 → 1.1.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.17.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.
@@ -290,7 +289,7 @@ module EndOfLifeDateApiClient
290
289
  # @param [String] filename the filename to be sanitized
291
290
  # @return [String] the sanitized filename
292
291
  def sanitize_filename(filename)
293
- filename.gsub(/.*[\/\\]/, '')
292
+ filename.split(/[\/\\]/).last
294
293
  end
295
294
 
296
295
  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.17.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.17.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.17.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.17.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.17.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.17.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.17.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"
@@ -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.17.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 release cycle has long-term-support (LTS). Can be a date instead in YYYY-MM-DD format as well if the release enters LTS status on a given date.
17
+ # Whether this release cycle has long-term-support (LTS), or the date it entered LTS status.
18
18
  module CycleLts
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.17.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 release cycle has active support
17
+ # Whether this release cycle has active support.
18
18
  module CycleSupport
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,15 +1,15 @@
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.17.0
10
10
 
11
11
  =end
12
12
 
13
13
  module EndOfLifeDateApiClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.1.0'
15
15
  end
@@ -1,18 +1,19 @@
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.17.0
10
10
 
11
11
  =end
12
12
 
13
13
  # Common files
14
14
  require 'endoflife_date/api_client'
15
15
  require 'endoflife_date/api_error'
16
+ require 'endoflife_date/api_model_base'
16
17
  require 'endoflife_date/version'
17
18
  require 'endoflife_date/configuration'
18
19