aylien_news_api 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/aylien_news_api.gemspec +1 -2
  4. data/docs/Category.md +3 -1
  5. data/docs/CategoryTaxonomy.md +16 -0
  6. data/docs/DefaultApi.md +105 -51
  7. data/docs/Histograms.md +5 -1
  8. data/docs/Media.md +2 -2
  9. data/docs/MediaFormat.md +16 -0
  10. data/docs/MediaType.md +16 -0
  11. data/docs/Scope.md +1 -1
  12. data/docs/ScopeLevel.md +16 -0
  13. data/docs/Sentiment.md +1 -1
  14. data/docs/SentimentPolarity.md +16 -0
  15. data/docs/Stories.md +5 -1
  16. data/docs/StoryLinks.md +3 -3
  17. data/docs/StoryTranslation.md +19 -0
  18. data/docs/StoryTranslations.md +1 -1
  19. data/docs/Trends.md +5 -1
  20. data/lib/aylien_news_api.rb +7 -3
  21. data/lib/aylien_news_api/api/default_api.rb +265 -159
  22. data/lib/aylien_news_api/api_client.rb +8 -6
  23. data/lib/aylien_news_api/api_error.rb +1 -1
  24. data/lib/aylien_news_api/configuration.rb +2 -2
  25. data/lib/aylien_news_api/models/author.rb +12 -2
  26. data/lib/aylien_news_api/models/autocomplete.rb +12 -2
  27. data/lib/aylien_news_api/models/autocompletes.rb +12 -2
  28. data/lib/aylien_news_api/models/category.rb +24 -39
  29. data/lib/aylien_news_api/models/category_links.rb +12 -2
  30. data/lib/aylien_news_api/models/category_taxonomy.rb +36 -0
  31. data/lib/aylien_news_api/models/cluster.rb +12 -2
  32. data/lib/aylien_news_api/models/clusters.rb +12 -2
  33. data/lib/aylien_news_api/models/coverages.rb +12 -2
  34. data/lib/aylien_news_api/models/entities.rb +12 -2
  35. data/lib/aylien_news_api/models/entity.rb +12 -2
  36. data/lib/aylien_news_api/models/entity_links.rb +12 -2
  37. data/lib/aylien_news_api/models/error.rb +12 -2
  38. data/lib/aylien_news_api/models/error_links.rb +12 -2
  39. data/lib/aylien_news_api/models/errors.rb +12 -2
  40. data/lib/aylien_news_api/models/histogram_interval.rb +12 -2
  41. data/lib/aylien_news_api/models/histograms.rb +36 -6
  42. data/lib/aylien_news_api/models/location.rb +12 -2
  43. data/lib/aylien_news_api/models/media.rb +14 -52
  44. data/lib/aylien_news_api/models/media_format.rb +44 -0
  45. data/lib/aylien_news_api/models/media_type.rb +36 -0
  46. data/lib/aylien_news_api/models/rank.rb +12 -2
  47. data/lib/aylien_news_api/models/rankings.rb +12 -2
  48. data/lib/aylien_news_api/models/related_stories.rb +12 -2
  49. data/lib/aylien_news_api/models/representative_story.rb +12 -2
  50. data/lib/aylien_news_api/models/scope.rb +13 -38
  51. data/lib/aylien_news_api/models/scope_level.rb +37 -0
  52. data/lib/aylien_news_api/models/sentiment.rb +13 -38
  53. data/lib/aylien_news_api/models/sentiment_polarity.rb +37 -0
  54. data/lib/aylien_news_api/models/sentiments.rb +12 -2
  55. data/lib/aylien_news_api/models/share_count.rb +12 -2
  56. data/lib/aylien_news_api/models/share_counts.rb +12 -2
  57. data/lib/aylien_news_api/models/source.rb +12 -2
  58. data/lib/aylien_news_api/models/stories.rb +36 -6
  59. data/lib/aylien_news_api/models/story.rb +12 -2
  60. data/lib/aylien_news_api/models/story_cluster.rb +12 -2
  61. data/lib/aylien_news_api/models/story_links.rb +26 -16
  62. data/lib/aylien_news_api/models/story_translation.rb +217 -0
  63. data/lib/aylien_news_api/models/story_translations.rb +13 -3
  64. data/lib/aylien_news_api/models/story_translations_en.rb +12 -2
  65. data/lib/aylien_news_api/models/summary.rb +12 -2
  66. data/lib/aylien_news_api/models/time_series.rb +12 -2
  67. data/lib/aylien_news_api/models/time_series_list.rb +12 -2
  68. data/lib/aylien_news_api/models/trend.rb +12 -2
  69. data/lib/aylien_news_api/models/trends.rb +36 -6
  70. data/lib/aylien_news_api/version.rb +2 -2
  71. data/spec/api/default_api_spec.rb +54 -28
  72. data/spec/api_client_spec.rb +3 -3
  73. data/spec/configuration_spec.rb +2 -2
  74. data/spec/models/author_spec.rb +2 -2
  75. data/spec/models/autocomplete_spec.rb +2 -2
  76. data/spec/models/autocompletes_spec.rb +2 -2
  77. data/spec/models/category_links_spec.rb +2 -2
  78. data/spec/models/category_spec.rb +8 -6
  79. data/spec/models/category_taxonomy_spec.rb +35 -0
  80. data/spec/models/cluster_spec.rb +2 -2
  81. data/spec/models/clusters_spec.rb +2 -2
  82. data/spec/models/coverages_spec.rb +2 -2
  83. data/spec/models/entities_spec.rb +2 -2
  84. data/spec/models/entity_links_spec.rb +2 -2
  85. data/spec/models/entity_spec.rb +2 -2
  86. data/spec/models/error_links_spec.rb +2 -2
  87. data/spec/models/error_spec.rb +2 -2
  88. data/spec/models/errors_spec.rb +2 -2
  89. data/spec/models/histogram_interval_spec.rb +2 -2
  90. data/spec/models/histograms_spec.rb +14 -2
  91. data/spec/models/location_spec.rb +2 -2
  92. data/spec/models/media_format_spec.rb +35 -0
  93. data/spec/models/media_spec.rb +2 -10
  94. data/spec/models/media_type_spec.rb +35 -0
  95. data/spec/models/rank_spec.rb +2 -2
  96. data/spec/models/rankings_spec.rb +2 -2
  97. data/spec/models/related_stories_spec.rb +2 -2
  98. data/spec/models/representative_story_spec.rb +2 -2
  99. data/spec/models/scope_level_spec.rb +35 -0
  100. data/spec/models/scope_spec.rb +2 -6
  101. data/spec/models/sentiment_polarity_spec.rb +35 -0
  102. data/spec/models/sentiment_spec.rb +2 -6
  103. data/spec/models/sentiments_spec.rb +2 -2
  104. data/spec/models/share_count_spec.rb +2 -2
  105. data/spec/models/share_counts_spec.rb +2 -2
  106. data/spec/models/source_spec.rb +2 -2
  107. data/spec/models/stories_spec.rb +14 -2
  108. data/spec/models/story_cluster_spec.rb +2 -2
  109. data/spec/models/story_links_spec.rb +5 -5
  110. data/spec/models/story_spec.rb +2 -2
  111. data/spec/models/story_translation_spec.rb +47 -0
  112. data/spec/models/story_translations_en_spec.rb +2 -2
  113. data/spec/models/story_translations_spec.rb +2 -2
  114. data/spec/models/summary_spec.rb +2 -2
  115. data/spec/models/time_series_list_spec.rb +2 -2
  116. data/spec/models/time_series_spec.rb +2 -2
  117. data/spec/models/trend_spec.rb +2 -2
  118. data/spec/models/trends_spec.rb +14 -2
  119. data/spec/spec_helper.rb +2 -2
  120. metadata +27 -23
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -285,11 +285,13 @@ module AylienNewsApi
285
285
  tempfile.write(chunk)
286
286
  end
287
287
  request.on_complete do |response|
288
- tempfile.close if tempfile
289
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
290
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
291
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
292
- "explicitly with `tempfile.delete`"
288
+ if tempfile
289
+ tempfile.close
290
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
291
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
292
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
293
+ "explicitly with `tempfile.delete`"
294
+ end
293
295
  end
294
296
  end
295
297
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -210,7 +210,7 @@ module AylienNewsApi
210
210
  [
211
211
  {
212
212
  url: "https://api.aylien.com/news",
213
- description: "No descriptoin provided",
213
+ description: "No description provided",
214
214
  }
215
215
  ]
216
216
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -41,6 +41,12 @@ module AylienNewsApi
41
41
  }
42
42
  end
43
43
 
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
44
50
  # Initializes the object
45
51
  # @param [Hash] attributes Model attributes in the form of hash
46
52
  def initialize(attributes = {})
@@ -190,7 +196,11 @@ module AylienNewsApi
190
196
  hash = {}
191
197
  self.class.attribute_map.each_pair do |attr, param|
192
198
  value = self.send(attr)
193
- next if value.nil?
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
194
204
  hash[param] = _to_hash(value)
195
205
  end
196
206
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -36,6 +36,12 @@ module AylienNewsApi
36
36
  }
37
37
  end
38
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
39
45
  # Initializes the object
40
46
  # @param [Hash] attributes Model attributes in the form of hash
41
47
  def initialize(attributes = {})
@@ -180,7 +186,11 @@ module AylienNewsApi
180
186
  hash = {}
181
187
  self.class.attribute_map.each_pair do |attr, param|
182
188
  value = self.send(attr)
183
- next if value.nil?
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
184
194
  hash[param] = _to_hash(value)
185
195
  end
186
196
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -31,6 +31,12 @@ module AylienNewsApi
31
31
  }
32
32
  end
33
33
 
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new([
37
+ ])
38
+ end
39
+
34
40
  # Initializes the object
35
41
  # @param [Hash] attributes Model attributes in the form of hash
36
42
  def initialize(attributes = {})
@@ -172,7 +178,11 @@ module AylienNewsApi
172
178
  hash = {}
173
179
  self.class.attribute_map.each_pair do |attr, param|
174
180
  value = self.send(attr)
175
- next if value.nil?
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
176
186
  hash[param] = _to_hash(value)
177
187
  end
178
188
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -20,6 +20,9 @@ module AylienNewsApi
20
20
  # The ID of the category
21
21
  attr_accessor :id
22
22
 
23
+ # The label of the category
24
+ attr_accessor :label
25
+
23
26
  # The level of the category
24
27
  attr_accessor :level
25
28
 
@@ -28,36 +31,14 @@ module AylienNewsApi
28
31
  # The score of the category
29
32
  attr_accessor :score
30
33
 
31
- # The taxonomy of the category
32
34
  attr_accessor :taxonomy
33
35
 
34
- class EnumAttributeValidator
35
- attr_reader :datatype
36
- attr_reader :allowable_values
37
-
38
- def initialize(datatype, allowable_values)
39
- @allowable_values = allowable_values.map do |value|
40
- case datatype.to_s
41
- when /Integer/i
42
- value.to_i
43
- when /Float/i
44
- value.to_f
45
- else
46
- value
47
- end
48
- end
49
- end
50
-
51
- def valid?(value)
52
- !value || allowable_values.include?(value)
53
- end
54
- end
55
-
56
36
  # Attribute mapping from ruby-style variable name to JSON key.
57
37
  def self.attribute_map
58
38
  {
59
39
  :'confident' => :'confident',
60
40
  :'id' => :'id',
41
+ :'label' => :'label',
61
42
  :'level' => :'level',
62
43
  :'links' => :'links',
63
44
  :'score' => :'score',
@@ -70,13 +51,20 @@ module AylienNewsApi
70
51
  {
71
52
  :'confident' => :'Boolean',
72
53
  :'id' => :'String',
54
+ :'label' => :'String',
73
55
  :'level' => :'Integer',
74
56
  :'links' => :'CategoryLinks',
75
57
  :'score' => :'Float',
76
- :'taxonomy' => :'String'
58
+ :'taxonomy' => :'CategoryTaxonomy'
77
59
  }
78
60
  end
79
61
 
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
80
68
  # Initializes the object
81
69
  # @param [Hash] attributes Model attributes in the form of hash
82
70
  def initialize(attributes = {})
@@ -100,6 +88,10 @@ module AylienNewsApi
100
88
  self.id = attributes[:'id']
101
89
  end
102
90
 
91
+ if attributes.key?(:'label')
92
+ self.label = attributes[:'label']
93
+ end
94
+
103
95
  if attributes.key?(:'level')
104
96
  self.level = attributes[:'level']
105
97
  end
@@ -127,21 +119,9 @@ module AylienNewsApi
127
119
  # Check to see if the all the properties in the model are valid
128
120
  # @return true if the model is valid
129
121
  def valid?
130
- taxonomy_validator = EnumAttributeValidator.new('String', ["iab-qag", "iptc-subjectcode"])
131
- return false unless taxonomy_validator.valid?(@taxonomy)
132
122
  true
133
123
  end
134
124
 
135
- # Custom attribute writer method checking allowed values (enum).
136
- # @param [Object] taxonomy Object to be assigned
137
- def taxonomy=(taxonomy)
138
- validator = EnumAttributeValidator.new('String', ["iab-qag", "iptc-subjectcode"])
139
- unless validator.valid?(taxonomy)
140
- fail ArgumentError, "invalid value for \"taxonomy\", must be one of #{validator.allowable_values}."
141
- end
142
- @taxonomy = taxonomy
143
- end
144
-
145
125
  # Checks equality by comparing each attribute.
146
126
  # @param [Object] Object to be compared
147
127
  def ==(o)
@@ -149,6 +129,7 @@ module AylienNewsApi
149
129
  self.class == o.class &&
150
130
  confident == o.confident &&
151
131
  id == o.id &&
132
+ label == o.label &&
152
133
  level == o.level &&
153
134
  links == o.links &&
154
135
  score == o.score &&
@@ -164,7 +145,7 @@ module AylienNewsApi
164
145
  # Calculates hash code according to all attributes.
165
146
  # @return [Integer] Hash code
166
147
  def hash
167
- [confident, id, level, links, score, taxonomy].hash
148
+ [confident, id, label, level, links, score, taxonomy].hash
168
149
  end
169
150
 
170
151
  # Builds the object from hash
@@ -253,7 +234,11 @@ module AylienNewsApi
253
234
  hash = {}
254
235
  self.class.attribute_map.each_pair do |attr, param|
255
236
  value = self.send(attr)
256
- next if value.nil?
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
257
242
  hash[param] = _to_hash(value)
258
243
  end
259
244
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -36,6 +36,12 @@ module AylienNewsApi
36
36
  }
37
37
  end
38
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
39
45
  # Initializes the object
40
46
  # @param [Hash] attributes Model attributes in the form of hash
41
47
  def initialize(attributes = {})
@@ -180,7 +186,11 @@ module AylienNewsApi
180
186
  hash = {}
181
187
  self.class.attribute_map.each_pair do |attr, param|
182
188
  value = self.send(attr)
183
- next if value.nil?
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
184
194
  hash[param] = _to_hash(value)
185
195
  end
186
196
  hash
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #AYLIEN News API
3
+
4
+ #The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
5
+
6
+ The version of the OpenAPI document: 3.0
7
+ Contact: support@aylien.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module AylienNewsApi
16
+ class CategoryTaxonomy
17
+ IAB_QAG = "iab-qag".freeze
18
+ IPTC_SUBJECTCODE = "iptc-subjectcode".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = CategoryTaxonomy.constants.select { |c| CategoryTaxonomy::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #CategoryTaxonomy" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -59,6 +59,12 @@ module AylienNewsApi
59
59
  }
60
60
  end
61
61
 
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
62
68
  # Initializes the object
63
69
  # @param [Hash] attributes Model attributes in the form of hash
64
70
  def initialize(attributes = {})
@@ -228,7 +234,11 @@ module AylienNewsApi
228
234
  hash = {}
229
235
  self.class.attribute_map.each_pair do |attr, param|
230
236
  value = self.send(attr)
231
- next if value.nil?
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
232
242
  hash[param] = _to_hash(value)
233
243
  end
234
244
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -41,6 +41,12 @@ module AylienNewsApi
41
41
  }
42
42
  end
43
43
 
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
44
50
  # Initializes the object
45
51
  # @param [Hash] attributes Model attributes in the form of hash
46
52
  def initialize(attributes = {})
@@ -192,7 +198,11 @@ module AylienNewsApi
192
198
  hash = {}
193
199
  self.class.attribute_map.each_pair do |attr, param|
194
200
  value = self.send(attr)
195
- next if value.nil?
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
196
206
  hash[param] = _to_hash(value)
197
207
  end
198
208
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
  Contact: support@aylien.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -51,6 +51,12 @@ module AylienNewsApi
51
51
  }
52
52
  end
53
53
 
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
54
60
  # Initializes the object
55
61
  # @param [Hash] attributes Model attributes in the form of hash
56
62
  def initialize(attributes = {})
@@ -212,7 +218,11 @@ module AylienNewsApi
212
218
  hash = {}
213
219
  self.class.attribute_map.each_pair do |attr, param|
214
220
  value = self.send(attr)
215
- next if value.nil?
221
+ if value.nil?
222
+ is_nullable = self.class.openapi_nullable.include?(attr)
223
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
+ end
225
+
216
226
  hash[param] = _to_hash(value)
217
227
  end
218
228
  hash