swaggy_jenkins 2.0.1.pre.pre.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +28 -26
  3. data/README.md +8 -6
  4. data/bin/bundle +5 -10
  5. data/bin/byebug +1 -1
  6. data/bin/coderay +1 -1
  7. data/bin/htmldiff +1 -1
  8. data/bin/ldiff +1 -1
  9. data/bin/pry +1 -1
  10. data/bin/racc +27 -0
  11. data/bin/rake +1 -1
  12. data/bin/rspec +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/ruby-parse +1 -1
  15. data/bin/ruby-rewrite +1 -1
  16. data/lib/swaggy_jenkins/api/base_api.rb +3 -3
  17. data/lib/swaggy_jenkins/api/blue_ocean_api.rb +3 -3
  18. data/lib/swaggy_jenkins/api/remote_access_api.rb +3 -3
  19. data/lib/swaggy_jenkins/api_client.rb +25 -23
  20. data/lib/swaggy_jenkins/api_error.rb +4 -3
  21. data/lib/swaggy_jenkins/configuration.rb +29 -10
  22. data/lib/swaggy_jenkins/models/all_view.rb +16 -21
  23. data/lib/swaggy_jenkins/models/branch_impl.rb +16 -21
  24. data/lib/swaggy_jenkins/models/branch_impllinks.rb +16 -21
  25. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +16 -21
  26. data/lib/swaggy_jenkins/models/cause_action.rb +16 -21
  27. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +16 -21
  28. data/lib/swaggy_jenkins/models/classes_by_class.rb +16 -21
  29. data/lib/swaggy_jenkins/models/clock_difference.rb +16 -21
  30. data/lib/swaggy_jenkins/models/computer_set.rb +16 -21
  31. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +16 -21
  32. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +16 -21
  33. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +16 -21
  34. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +16 -21
  35. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +16 -21
  36. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +16 -21
  37. data/lib/swaggy_jenkins/models/extension_class_impl.rb +16 -21
  38. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +16 -21
  39. data/lib/swaggy_jenkins/models/favorite_impl.rb +16 -21
  40. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +16 -21
  41. data/lib/swaggy_jenkins/models/free_style_build.rb +16 -21
  42. data/lib/swaggy_jenkins/models/free_style_project.rb +16 -21
  43. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +16 -21
  44. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +16 -21
  45. data/lib/swaggy_jenkins/models/generic_resource.rb +16 -21
  46. data/lib/swaggy_jenkins/models/github_content.rb +16 -21
  47. data/lib/swaggy_jenkins/models/github_file.rb +16 -21
  48. data/lib/swaggy_jenkins/models/github_organization.rb +16 -21
  49. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +16 -21
  50. data/lib/swaggy_jenkins/models/github_repositories.rb +16 -21
  51. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +16 -21
  52. data/lib/swaggy_jenkins/models/github_repository.rb +16 -21
  53. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +16 -21
  54. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +16 -21
  55. data/lib/swaggy_jenkins/models/github_respository_container.rb +16 -21
  56. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +16 -21
  57. data/lib/swaggy_jenkins/models/github_scm.rb +16 -21
  58. data/lib/swaggy_jenkins/models/github_scmlinks.rb +16 -21
  59. data/lib/swaggy_jenkins/models/hudson.rb +16 -21
  60. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +16 -21
  61. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +16 -21
  62. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +16 -21
  63. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +16 -21
  64. data/lib/swaggy_jenkins/models/input_step_impl.rb +16 -21
  65. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +16 -21
  66. data/lib/swaggy_jenkins/models/label1.rb +16 -21
  67. data/lib/swaggy_jenkins/models/link.rb +16 -21
  68. data/lib/swaggy_jenkins/models/list_view.rb +16 -21
  69. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +16 -21
  70. data/lib/swaggy_jenkins/models/null_scm.rb +16 -21
  71. data/lib/swaggy_jenkins/models/organisation.rb +16 -21
  72. data/lib/swaggy_jenkins/models/pipeline.rb +16 -21
  73. data/lib/swaggy_jenkins/models/pipeline_activity.rb +16 -21
  74. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +16 -21
  75. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +16 -21
  76. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +16 -21
  77. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +16 -21
  78. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +16 -21
  79. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +16 -21
  80. data/lib/swaggy_jenkins/models/pipeline_impl.rb +16 -21
  81. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +16 -21
  82. data/lib/swaggy_jenkins/models/pipeline_run.rb +16 -21
  83. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +16 -21
  84. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +16 -21
  85. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +16 -21
  86. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +16 -21
  87. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +16 -21
  88. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +16 -21
  89. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +16 -21
  90. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +16 -21
  91. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +16 -21
  92. data/lib/swaggy_jenkins/models/queue.rb +16 -21
  93. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +16 -21
  94. data/lib/swaggy_jenkins/models/queue_item_impl.rb +16 -21
  95. data/lib/swaggy_jenkins/models/queue_left_item.rb +16 -21
  96. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +16 -21
  97. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +16 -21
  98. data/lib/swaggy_jenkins/models/string_parameter_value.rb +16 -21
  99. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +16 -21
  100. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +16 -21
  101. data/lib/swaggy_jenkins/models/user.rb +16 -21
  102. data/lib/swaggy_jenkins/version.rb +4 -4
  103. data/lib/swaggy_jenkins.rb +3 -3
  104. data/spec/api/base_api_spec.rb +4 -4
  105. data/spec/api/blue_ocean_api_spec.rb +40 -40
  106. data/spec/api/remote_access_api_spec.rb +23 -23
  107. data/spec/models/all_view_spec.rb +9 -7
  108. data/spec/models/branch_impl_spec.rb +19 -17
  109. data/spec/models/branch_impllinks_spec.rb +11 -9
  110. data/spec/models/branch_implpermissions_spec.rb +11 -9
  111. data/spec/models/cause_action_spec.rb +8 -6
  112. data/spec/models/cause_user_id_cause_spec.rb +10 -8
  113. data/spec/models/classes_by_class_spec.rb +8 -6
  114. data/spec/models/clock_difference_spec.rb +8 -6
  115. data/spec/models/computer_set_spec.rb +11 -9
  116. data/spec/models/default_crumb_issuer_spec.rb +9 -7
  117. data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +10 -8
  118. data/spec/models/empty_change_log_set_spec.rb +8 -6
  119. data/spec/models/extension_class_container_impl1_spec.rb +9 -7
  120. data/spec/models/extension_class_container_impl1links_spec.rb +8 -6
  121. data/spec/models/extension_class_container_impl1map_spec.rb +9 -7
  122. data/spec/models/extension_class_impl_spec.rb +9 -7
  123. data/spec/models/extension_class_impllinks_spec.rb +8 -6
  124. data/spec/models/favorite_impl_spec.rb +9 -7
  125. data/spec/models/favorite_impllinks_spec.rb +8 -6
  126. data/spec/models/free_style_build_spec.rb +24 -22
  127. data/spec/models/free_style_project_spec.rb +33 -31
  128. data/spec/models/free_style_projectactions_spec.rb +7 -5
  129. data/spec/models/free_style_projecthealth_report_spec.rb +11 -9
  130. data/spec/models/generic_resource_spec.rb +12 -10
  131. data/spec/models/github_content_spec.rb +14 -12
  132. data/spec/models/github_file_spec.rb +8 -6
  133. data/spec/models/github_organization_spec.rb +10 -8
  134. data/spec/models/github_organizationlinks_spec.rb +9 -7
  135. data/spec/models/github_repositories_spec.rb +12 -10
  136. data/spec/models/github_repositorieslinks_spec.rb +8 -6
  137. data/spec/models/github_repository_spec.rb +14 -12
  138. data/spec/models/github_repositorylinks_spec.rb +8 -6
  139. data/spec/models/github_repositorypermissions_spec.rb +10 -8
  140. data/spec/models/github_respository_container_spec.rb +9 -7
  141. data/spec/models/github_respository_containerlinks_spec.rb +8 -6
  142. data/spec/models/github_scm_spec.rb +11 -9
  143. data/spec/models/github_scmlinks_spec.rb +8 -6
  144. data/spec/models/hudson_master_computer_spec.rb +22 -20
  145. data/spec/models/hudson_master_computerexecutors_spec.rb +12 -10
  146. data/spec/models/hudson_master_computermonitor_data_spec.rb +13 -11
  147. data/spec/models/hudson_spec.rb +21 -19
  148. data/spec/models/hudsonassigned_labels_spec.rb +7 -5
  149. data/spec/models/input_step_impl_spec.rb +13 -11
  150. data/spec/models/input_step_impllinks_spec.rb +8 -6
  151. data/spec/models/label1_spec.rb +7 -5
  152. data/spec/models/link_spec.rb +8 -6
  153. data/spec/models/list_view_spec.rb +11 -9
  154. data/spec/models/multibranch_pipeline_spec.rb +20 -18
  155. data/spec/models/null_scm_spec.rb +7 -5
  156. data/spec/models/organisation_spec.rb +8 -6
  157. data/spec/models/pipeline_activity_spec.rb +21 -19
  158. data/spec/models/pipeline_activityartifacts_spec.rb +10 -8
  159. data/spec/models/pipeline_branchesitem_spec.rb +15 -13
  160. data/spec/models/pipeline_branchesitemlatest_run_spec.rb +20 -18
  161. data/spec/models/pipeline_branchesitempull_request_spec.rb +12 -10
  162. data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +8 -6
  163. data/spec/models/pipeline_folder_impl_spec.rb +13 -11
  164. data/spec/models/pipeline_impl_spec.rb +15 -13
  165. data/spec/models/pipeline_impllinks_spec.rb +11 -9
  166. data/spec/models/pipeline_run_impl_spec.rb +21 -19
  167. data/spec/models/pipeline_run_impllinks_spec.rb +12 -10
  168. data/spec/models/pipeline_run_node_spec.rb +14 -12
  169. data/spec/models/pipeline_run_nodeedges_spec.rb +8 -6
  170. data/spec/models/pipeline_run_spec.rb +21 -19
  171. data/spec/models/pipeline_runartifacts_spec.rb +10 -8
  172. data/spec/models/pipeline_spec.rb +14 -12
  173. data/spec/models/pipeline_step_impl_spec.rb +15 -13
  174. data/spec/models/pipeline_step_impllinks_spec.rb +9 -7
  175. data/spec/models/pipelinelatest_run_spec.rb +21 -19
  176. data/spec/models/pipelinelatest_runartifacts_spec.rb +10 -8
  177. data/spec/models/queue_blocked_item_spec.rb +18 -16
  178. data/spec/models/queue_item_impl_spec.rb +11 -9
  179. data/spec/models/queue_left_item_spec.rb +19 -17
  180. data/spec/models/queue_spec.rb +8 -6
  181. data/spec/models/response_time_monitor_data_spec.rb +9 -7
  182. data/spec/models/string_parameter_definition_spec.rb +11 -9
  183. data/spec/models/string_parameter_value_spec.rb +9 -7
  184. data/spec/models/swap_space_monitor_memory_usage2_spec.rb +11 -9
  185. data/spec/models/unlabeled_load_statistics_spec.rb +7 -5
  186. data/spec/models/user_spec.rb +11 -9
  187. data/spec/spec_helper.rb +3 -3
  188. data/swaggy_jenkins.gemspec +7 -6
  189. metadata +75 -78
  190. data/spec/api_client_spec.rb +0 -226
  191. data/spec/configuration_spec.rb +0 -42
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -73,6 +73,7 @@ module SwaggyJenkinsClient
73
73
  # Show invalid properties with the reasons. Usually used together with valid?
74
74
  # @return Array for valid properties with the reasons
75
75
  def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
77
  invalid_properties = Array.new
77
78
  invalid_properties
78
79
  end
@@ -80,6 +81,7 @@ module SwaggyJenkinsClient
80
81
  # Check to see if the all the properties in the model are valid
81
82
  # @return true if the model is valid
82
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
85
  true
84
86
  end
85
87
 
@@ -108,37 +110,30 @@ module SwaggyJenkinsClient
108
110
  # @param [Hash] attributes Model attributes in the form of hash
109
111
  # @return [Object] Returns the model itself
110
112
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
113
  return nil unless attributes.is_a?(Hash)
119
114
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
123
119
  elsif type =~ /\AArray<(.*)>/i
124
120
  # check to ensure the input is an array given that the attribute
125
121
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
124
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
127
  end
132
128
  end
133
-
134
- self
129
+ new(transformed_hash)
135
130
  end
136
131
 
137
132
  # Deserializes the data based on type
138
133
  # @param string type Data type
139
134
  # @param string value Value to be deserialized
140
135
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
142
137
  case type.to_sym
143
138
  when :Time
144
139
  Time.parse(value)
@@ -173,7 +168,7 @@ module SwaggyJenkinsClient
173
168
  else # model
174
169
  # models (e.g. Pet) or oneOf
175
170
  klass = SwaggyJenkinsClient.const_get(type)
176
- 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)
177
172
  end
178
173
  end
179
174
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -113,6 +113,7 @@ module SwaggyJenkinsClient
113
113
  # Show invalid properties with the reasons. Usually used together with valid?
114
114
  # @return Array for valid properties with the reasons
115
115
  def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
117
  invalid_properties = Array.new
117
118
  invalid_properties
118
119
  end
@@ -120,6 +121,7 @@ module SwaggyJenkinsClient
120
121
  # Check to see if the all the properties in the model are valid
121
122
  # @return true if the model is valid
122
123
  def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
125
  true
124
126
  end
125
127
 
@@ -153,37 +155,30 @@ module SwaggyJenkinsClient
153
155
  # @param [Hash] attributes Model attributes in the form of hash
154
156
  # @return [Object] Returns the model itself
155
157
  def self.build_from_hash(attributes)
156
- new.build_from_hash(attributes)
157
- end
158
-
159
- # Builds the object from hash
160
- # @param [Hash] attributes Model attributes in the form of hash
161
- # @return [Object] Returns the model itself
162
- def build_from_hash(attributes)
163
158
  return nil unless attributes.is_a?(Hash)
164
159
  attributes = attributes.transform_keys(&:to_sym)
165
- self.class.openapi_types.each_pair do |key, type|
166
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
- self.send("#{key}=", nil)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
168
164
  elsif type =~ /\AArray<(.*)>/i
169
165
  # check to ensure the input is an array given that the attribute
170
166
  # is documented as an array but the input is not
171
- if attributes[self.class.attribute_map[key]].is_a?(Array)
172
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
169
  end
174
- elsif !attributes[self.class.attribute_map[key]].nil?
175
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
172
  end
177
173
  end
178
-
179
- self
174
+ new(transformed_hash)
180
175
  end
181
176
 
182
177
  # Deserializes the data based on type
183
178
  # @param string type Data type
184
179
  # @param string value Value to be deserialized
185
180
  # @return [Object] Deserialized data
186
- def _deserialize(type, value)
181
+ def self._deserialize(type, value)
187
182
  case type.to_sym
188
183
  when :Time
189
184
  Time.parse(value)
@@ -218,7 +213,7 @@ module SwaggyJenkinsClient
218
213
  else # model
219
214
  # models (e.g. Pet) or oneOf
220
215
  klass = SwaggyJenkinsClient.const_get(type)
221
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
216
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
222
217
  end
223
218
  end
224
219
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -129,6 +129,7 @@ module SwaggyJenkinsClient
129
129
  # Show invalid properties with the reasons. Usually used together with valid?
130
130
  # @return Array for valid properties with the reasons
131
131
  def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
133
  invalid_properties = Array.new
133
134
  invalid_properties
134
135
  end
@@ -136,6 +137,7 @@ module SwaggyJenkinsClient
136
137
  # Check to see if the all the properties in the model are valid
137
138
  # @return true if the model is valid
138
139
  def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
141
  true
140
142
  end
141
143
 
@@ -171,37 +173,30 @@ module SwaggyJenkinsClient
171
173
  # @param [Hash] attributes Model attributes in the form of hash
172
174
  # @return [Object] Returns the model itself
173
175
  def self.build_from_hash(attributes)
174
- new.build_from_hash(attributes)
175
- end
176
-
177
- # Builds the object from hash
178
- # @param [Hash] attributes Model attributes in the form of hash
179
- # @return [Object] Returns the model itself
180
- def build_from_hash(attributes)
181
176
  return nil unless attributes.is_a?(Hash)
182
177
  attributes = attributes.transform_keys(&:to_sym)
183
- self.class.openapi_types.each_pair do |key, type|
184
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
185
- self.send("#{key}=", nil)
178
+ transformed_hash = {}
179
+ openapi_types.each_pair do |key, type|
180
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = nil
186
182
  elsif type =~ /\AArray<(.*)>/i
187
183
  # check to ensure the input is an array given that the attribute
188
184
  # is documented as an array but the input is not
189
- if attributes[self.class.attribute_map[key]].is_a?(Array)
190
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ if attributes[attribute_map[key]].is_a?(Array)
186
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
187
  end
192
- elsif !attributes[self.class.attribute_map[key]].nil?
193
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ elsif !attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
190
  end
195
191
  end
196
-
197
- self
192
+ new(transformed_hash)
198
193
  end
199
194
 
200
195
  # Deserializes the data based on type
201
196
  # @param string type Data type
202
197
  # @param string value Value to be deserialized
203
198
  # @return [Object] Deserialized data
204
- def _deserialize(type, value)
199
+ def self._deserialize(type, value)
205
200
  case type.to_sym
206
201
  when :Time
207
202
  Time.parse(value)
@@ -236,7 +231,7 @@ module SwaggyJenkinsClient
236
231
  else # model
237
232
  # models (e.g. Pet) or oneOf
238
233
  klass = SwaggyJenkinsClient.const_get(type)
239
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
240
235
  end
241
236
  end
242
237
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -97,6 +97,7 @@ module SwaggyJenkinsClient
97
97
  # Show invalid properties with the reasons. Usually used together with valid?
98
98
  # @return Array for valid properties with the reasons
99
99
  def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
101
  invalid_properties = Array.new
101
102
  invalid_properties
102
103
  end
@@ -104,6 +105,7 @@ module SwaggyJenkinsClient
104
105
  # Check to see if the all the properties in the model are valid
105
106
  # @return true if the model is valid
106
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
109
  true
108
110
  end
109
111
 
@@ -135,37 +137,30 @@ module SwaggyJenkinsClient
135
137
  # @param [Hash] attributes Model attributes in the form of hash
136
138
  # @return [Object] Returns the model itself
137
139
  def self.build_from_hash(attributes)
138
- new.build_from_hash(attributes)
139
- end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
140
  return nil unless attributes.is_a?(Hash)
146
141
  attributes = attributes.transform_keys(&:to_sym)
147
- self.class.openapi_types.each_pair do |key, type|
148
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
- self.send("#{key}=", nil)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
150
146
  elsif type =~ /\AArray<(.*)>/i
151
147
  # check to ensure the input is an array given that the attribute
152
148
  # is documented as an array but the input is not
153
- if attributes[self.class.attribute_map[key]].is_a?(Array)
154
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
151
  end
156
- elsif !attributes[self.class.attribute_map[key]].nil?
157
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
154
  end
159
155
  end
160
-
161
- self
156
+ new(transformed_hash)
162
157
  end
163
158
 
164
159
  # Deserializes the data based on type
165
160
  # @param string type Data type
166
161
  # @param string value Value to be deserialized
167
162
  # @return [Object] Deserialized data
168
- def _deserialize(type, value)
163
+ def self._deserialize(type, value)
169
164
  case type.to_sym
170
165
  when :Time
171
166
  Time.parse(value)
@@ -200,7 +195,7 @@ module SwaggyJenkinsClient
200
195
  else # model
201
196
  # models (e.g. Pet) or oneOf
202
197
  klass = SwaggyJenkinsClient.const_get(type)
203
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
199
  end
205
200
  end
206
201
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -179,6 +179,7 @@ module SwaggyJenkinsClient
179
179
  # Show invalid properties with the reasons. Usually used together with valid?
180
180
  # @return Array for valid properties with the reasons
181
181
  def list_invalid_properties
182
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
182
183
  invalid_properties = Array.new
183
184
  invalid_properties
184
185
  end
@@ -186,6 +187,7 @@ module SwaggyJenkinsClient
186
187
  # Check to see if the all the properties in the model are valid
187
188
  # @return true if the model is valid
188
189
  def valid?
190
+ warn '[DEPRECATED] the `valid?` method is obsolete'
189
191
  true
190
192
  end
191
193
 
@@ -227,37 +229,30 @@ module SwaggyJenkinsClient
227
229
  # @param [Hash] attributes Model attributes in the form of hash
228
230
  # @return [Object] Returns the model itself
229
231
  def self.build_from_hash(attributes)
230
- new.build_from_hash(attributes)
231
- end
232
-
233
- # Builds the object from hash
234
- # @param [Hash] attributes Model attributes in the form of hash
235
- # @return [Object] Returns the model itself
236
- def build_from_hash(attributes)
237
232
  return nil unless attributes.is_a?(Hash)
238
233
  attributes = attributes.transform_keys(&:to_sym)
239
- self.class.openapi_types.each_pair do |key, type|
240
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
241
- self.send("#{key}=", nil)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
242
238
  elsif type =~ /\AArray<(.*)>/i
243
239
  # check to ensure the input is an array given that the attribute
244
240
  # is documented as an array but the input is not
245
- if attributes[self.class.attribute_map[key]].is_a?(Array)
246
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
243
  end
248
- elsif !attributes[self.class.attribute_map[key]].nil?
249
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
246
  end
251
247
  end
252
-
253
- self
248
+ new(transformed_hash)
254
249
  end
255
250
 
256
251
  # Deserializes the data based on type
257
252
  # @param string type Data type
258
253
  # @param string value Value to be deserialized
259
254
  # @return [Object] Deserialized data
260
- def _deserialize(type, value)
255
+ def self._deserialize(type, value)
261
256
  case type.to_sym
262
257
  when :Time
263
258
  Time.parse(value)
@@ -292,7 +287,7 @@ module SwaggyJenkinsClient
292
287
  else # model
293
288
  # models (e.g. Pet) or oneOf
294
289
  klass = SwaggyJenkinsClient.const_get(type)
295
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
290
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
296
291
  end
297
292
  end
298
293
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -177,6 +177,7 @@ module SwaggyJenkinsClient
177
177
  # Show invalid properties with the reasons. Usually used together with valid?
178
178
  # @return Array for valid properties with the reasons
179
179
  def list_invalid_properties
180
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
180
181
  invalid_properties = Array.new
181
182
  invalid_properties
182
183
  end
@@ -184,6 +185,7 @@ module SwaggyJenkinsClient
184
185
  # Check to see if the all the properties in the model are valid
185
186
  # @return true if the model is valid
186
187
  def valid?
188
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
189
  true
188
190
  end
189
191
 
@@ -225,37 +227,30 @@ module SwaggyJenkinsClient
225
227
  # @param [Hash] attributes Model attributes in the form of hash
226
228
  # @return [Object] Returns the model itself
227
229
  def self.build_from_hash(attributes)
228
- new.build_from_hash(attributes)
229
- end
230
-
231
- # Builds the object from hash
232
- # @param [Hash] attributes Model attributes in the form of hash
233
- # @return [Object] Returns the model itself
234
- def build_from_hash(attributes)
235
230
  return nil unless attributes.is_a?(Hash)
236
231
  attributes = attributes.transform_keys(&:to_sym)
237
- self.class.openapi_types.each_pair do |key, type|
238
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
239
- self.send("#{key}=", nil)
232
+ transformed_hash = {}
233
+ openapi_types.each_pair do |key, type|
234
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = nil
240
236
  elsif type =~ /\AArray<(.*)>/i
241
237
  # check to ensure the input is an array given that the attribute
242
238
  # is documented as an array but the input is not
243
- if attributes[self.class.attribute_map[key]].is_a?(Array)
244
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
239
+ if attributes[attribute_map[key]].is_a?(Array)
240
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
245
241
  end
246
- elsif !attributes[self.class.attribute_map[key]].nil?
247
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
242
+ elsif !attributes[attribute_map[key]].nil?
243
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
248
244
  end
249
245
  end
250
-
251
- self
246
+ new(transformed_hash)
252
247
  end
253
248
 
254
249
  # Deserializes the data based on type
255
250
  # @param string type Data type
256
251
  # @param string value Value to be deserialized
257
252
  # @return [Object] Deserialized data
258
- def _deserialize(type, value)
253
+ def self._deserialize(type, value)
259
254
  case type.to_sym
260
255
  when :Time
261
256
  Time.parse(value)
@@ -290,7 +285,7 @@ module SwaggyJenkinsClient
290
285
  else # model
291
286
  # models (e.g. Pet) or oneOf
292
287
  klass = SwaggyJenkinsClient.const_get(type)
293
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
288
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
294
289
  end
295
290
  end
296
291
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.0.1
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -105,6 +105,7 @@ module SwaggyJenkinsClient
105
105
  # Show invalid properties with the reasons. Usually used together with valid?
106
106
  # @return Array for valid properties with the reasons
107
107
  def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
109
  invalid_properties = Array.new
109
110
  invalid_properties
110
111
  end
@@ -112,6 +113,7 @@ module SwaggyJenkinsClient
112
113
  # Check to see if the all the properties in the model are valid
113
114
  # @return true if the model is valid
114
115
  def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
117
  true
116
118
  end
117
119
 
@@ -144,37 +146,30 @@ module SwaggyJenkinsClient
144
146
  # @param [Hash] attributes Model attributes in the form of hash
145
147
  # @return [Object] Returns the model itself
146
148
  def self.build_from_hash(attributes)
147
- new.build_from_hash(attributes)
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def build_from_hash(attributes)
154
149
  return nil unless attributes.is_a?(Hash)
155
150
  attributes = attributes.transform_keys(&:to_sym)
156
- self.class.openapi_types.each_pair do |key, type|
157
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
- self.send("#{key}=", nil)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
159
155
  elsif type =~ /\AArray<(.*)>/i
160
156
  # check to ensure the input is an array given that the attribute
161
157
  # is documented as an array but the input is not
162
- if attributes[self.class.attribute_map[key]].is_a?(Array)
163
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
160
  end
165
- elsif !attributes[self.class.attribute_map[key]].nil?
166
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
163
  end
168
164
  end
169
-
170
- self
165
+ new(transformed_hash)
171
166
  end
172
167
 
173
168
  # Deserializes the data based on type
174
169
  # @param string type Data type
175
170
  # @param string value Value to be deserialized
176
171
  # @return [Object] Deserialized data
177
- def _deserialize(type, value)
172
+ def self._deserialize(type, value)
178
173
  case type.to_sym
179
174
  when :Time
180
175
  Time.parse(value)
@@ -209,7 +204,7 @@ module SwaggyJenkinsClient
209
204
  else # model
210
205
  # models (e.g. Pet) or oneOf
211
206
  klass = SwaggyJenkinsClient.const_get(type)
212
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
208
  end
214
209
  end
215
210