swaggy_jenkins 2.0.1.pre.pre.0 → 3.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +35 -31
- data/README.md +8 -6
- data/bin/bundle +6 -11
- data/bin/byebug +2 -2
- data/bin/coderay +2 -2
- data/bin/htmldiff +2 -2
- data/bin/ldiff +2 -2
- data/bin/pry +2 -2
- data/bin/racc +27 -0
- data/bin/rake +2 -2
- data/bin/rspec +2 -2
- data/bin/rubocop +2 -2
- data/bin/ruby-parse +2 -2
- data/bin/ruby-rewrite +2 -2
- data/lib/swaggy_jenkins/api/base_api.rb +4 -4
- data/lib/swaggy_jenkins/api/blue_ocean_api.rb +39 -39
- data/lib/swaggy_jenkins/api/remote_access_api.rb +16 -16
- data/lib/swaggy_jenkins/api_client.rb +25 -24
- data/lib/swaggy_jenkins/api_error.rb +4 -3
- data/lib/swaggy_jenkins/configuration.rb +40 -11
- data/lib/swaggy_jenkins/models/all_view.rb +25 -24
- data/lib/swaggy_jenkins/models/branch_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/branch_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/branch_implpermissions.rb +25 -24
- data/lib/swaggy_jenkins/models/cause_action.rb +25 -24
- data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +25 -24
- data/lib/swaggy_jenkins/models/classes_by_class.rb +25 -24
- data/lib/swaggy_jenkins/models/clock_difference.rb +25 -24
- data/lib/swaggy_jenkins/models/computer_set.rb +25 -24
- data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +25 -24
- data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +25 -24
- data/lib/swaggy_jenkins/models/empty_change_log_set.rb +25 -24
- data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +25 -24
- data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +25 -24
- data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +25 -24
- data/lib/swaggy_jenkins/models/extension_class_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/favorite_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/favorite_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/free_style_build.rb +25 -24
- data/lib/swaggy_jenkins/models/free_style_project.rb +25 -24
- data/lib/swaggy_jenkins/models/free_style_projectactions.rb +25 -24
- data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +25 -24
- data/lib/swaggy_jenkins/models/generic_resource.rb +25 -24
- data/lib/swaggy_jenkins/models/github_content.rb +25 -24
- data/lib/swaggy_jenkins/models/github_file.rb +25 -24
- data/lib/swaggy_jenkins/models/github_organization.rb +25 -24
- data/lib/swaggy_jenkins/models/github_organizationlinks.rb +25 -24
- data/lib/swaggy_jenkins/models/github_repositories.rb +25 -24
- data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +25 -24
- data/lib/swaggy_jenkins/models/github_repository.rb +25 -24
- data/lib/swaggy_jenkins/models/github_repositorylinks.rb +25 -24
- data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +25 -24
- data/lib/swaggy_jenkins/models/github_respository_container.rb +25 -24
- data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +25 -24
- data/lib/swaggy_jenkins/models/github_scm.rb +25 -24
- data/lib/swaggy_jenkins/models/github_scmlinks.rb +25 -24
- data/lib/swaggy_jenkins/models/hudson.rb +25 -24
- data/lib/swaggy_jenkins/models/hudson_master_computer.rb +25 -24
- data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +25 -24
- data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +25 -24
- data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +25 -24
- data/lib/swaggy_jenkins/models/input_step_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/input_step_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/label1.rb +25 -24
- data/lib/swaggy_jenkins/models/link.rb +25 -24
- data/lib/swaggy_jenkins/models/list_view.rb +25 -24
- data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +25 -24
- data/lib/swaggy_jenkins/models/null_scm.rb +25 -24
- data/lib/swaggy_jenkins/models/organisation.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_activity.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_run.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_run_node.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +25 -24
- data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +25 -24
- data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +25 -24
- data/lib/swaggy_jenkins/models/queue.rb +25 -24
- data/lib/swaggy_jenkins/models/queue_blocked_item.rb +25 -24
- data/lib/swaggy_jenkins/models/queue_item_impl.rb +25 -24
- data/lib/swaggy_jenkins/models/queue_left_item.rb +25 -24
- data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +25 -24
- data/lib/swaggy_jenkins/models/string_parameter_definition.rb +25 -24
- data/lib/swaggy_jenkins/models/string_parameter_value.rb +25 -24
- data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +25 -24
- data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +25 -24
- data/lib/swaggy_jenkins/models/user.rb +25 -24
- data/lib/swaggy_jenkins/version.rb +4 -4
- data/lib/swaggy_jenkins.rb +3 -3
- data/spec/api/base_api_spec.rb +4 -4
- data/spec/api/blue_ocean_api_spec.rb +40 -40
- data/spec/api/remote_access_api_spec.rb +23 -23
- data/spec/models/all_view_spec.rb +9 -7
- data/spec/models/branch_impl_spec.rb +19 -17
- data/spec/models/branch_impllinks_spec.rb +11 -9
- data/spec/models/branch_implpermissions_spec.rb +11 -9
- data/spec/models/cause_action_spec.rb +8 -6
- data/spec/models/cause_user_id_cause_spec.rb +10 -8
- data/spec/models/classes_by_class_spec.rb +8 -6
- data/spec/models/clock_difference_spec.rb +8 -6
- data/spec/models/computer_set_spec.rb +11 -9
- data/spec/models/default_crumb_issuer_spec.rb +9 -7
- data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +10 -8
- data/spec/models/empty_change_log_set_spec.rb +8 -6
- data/spec/models/extension_class_container_impl1_spec.rb +9 -7
- data/spec/models/extension_class_container_impl1links_spec.rb +8 -6
- data/spec/models/extension_class_container_impl1map_spec.rb +9 -7
- data/spec/models/extension_class_impl_spec.rb +9 -7
- data/spec/models/extension_class_impllinks_spec.rb +8 -6
- data/spec/models/favorite_impl_spec.rb +9 -7
- data/spec/models/favorite_impllinks_spec.rb +8 -6
- data/spec/models/free_style_build_spec.rb +24 -22
- data/spec/models/free_style_project_spec.rb +33 -31
- data/spec/models/free_style_projectactions_spec.rb +7 -5
- data/spec/models/free_style_projecthealth_report_spec.rb +11 -9
- data/spec/models/generic_resource_spec.rb +12 -10
- data/spec/models/github_content_spec.rb +14 -12
- data/spec/models/github_file_spec.rb +8 -6
- data/spec/models/github_organization_spec.rb +10 -8
- data/spec/models/github_organizationlinks_spec.rb +9 -7
- data/spec/models/github_repositories_spec.rb +12 -10
- data/spec/models/github_repositorieslinks_spec.rb +8 -6
- data/spec/models/github_repository_spec.rb +14 -12
- data/spec/models/github_repositorylinks_spec.rb +8 -6
- data/spec/models/github_repositorypermissions_spec.rb +10 -8
- data/spec/models/github_respository_container_spec.rb +9 -7
- data/spec/models/github_respository_containerlinks_spec.rb +8 -6
- data/spec/models/github_scm_spec.rb +11 -9
- data/spec/models/github_scmlinks_spec.rb +8 -6
- data/spec/models/hudson_master_computer_spec.rb +22 -20
- data/spec/models/hudson_master_computerexecutors_spec.rb +12 -10
- data/spec/models/hudson_master_computermonitor_data_spec.rb +13 -11
- data/spec/models/hudson_spec.rb +21 -19
- data/spec/models/hudsonassigned_labels_spec.rb +7 -5
- data/spec/models/input_step_impl_spec.rb +13 -11
- data/spec/models/input_step_impllinks_spec.rb +8 -6
- data/spec/models/label1_spec.rb +7 -5
- data/spec/models/link_spec.rb +8 -6
- data/spec/models/list_view_spec.rb +11 -9
- data/spec/models/multibranch_pipeline_spec.rb +20 -18
- data/spec/models/null_scm_spec.rb +7 -5
- data/spec/models/organisation_spec.rb +8 -6
- data/spec/models/pipeline_activity_spec.rb +21 -19
- data/spec/models/pipeline_activityartifacts_spec.rb +10 -8
- data/spec/models/pipeline_branchesitem_spec.rb +15 -13
- data/spec/models/pipeline_branchesitemlatest_run_spec.rb +20 -18
- data/spec/models/pipeline_branchesitempull_request_spec.rb +12 -10
- data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +8 -6
- data/spec/models/pipeline_folder_impl_spec.rb +13 -11
- data/spec/models/pipeline_impl_spec.rb +15 -13
- data/spec/models/pipeline_impllinks_spec.rb +11 -9
- data/spec/models/pipeline_run_impl_spec.rb +21 -19
- data/spec/models/pipeline_run_impllinks_spec.rb +12 -10
- data/spec/models/pipeline_run_node_spec.rb +14 -12
- data/spec/models/pipeline_run_nodeedges_spec.rb +8 -6
- data/spec/models/pipeline_run_spec.rb +21 -19
- data/spec/models/pipeline_runartifacts_spec.rb +10 -8
- data/spec/models/pipeline_spec.rb +14 -12
- data/spec/models/pipeline_step_impl_spec.rb +15 -13
- data/spec/models/pipeline_step_impllinks_spec.rb +9 -7
- data/spec/models/pipelinelatest_run_spec.rb +21 -19
- data/spec/models/pipelinelatest_runartifacts_spec.rb +10 -8
- data/spec/models/queue_blocked_item_spec.rb +18 -16
- data/spec/models/queue_item_impl_spec.rb +11 -9
- data/spec/models/queue_left_item_spec.rb +19 -17
- data/spec/models/queue_spec.rb +8 -6
- data/spec/models/response_time_monitor_data_spec.rb +9 -7
- data/spec/models/string_parameter_definition_spec.rb +11 -9
- data/spec/models/string_parameter_value_spec.rb +9 -7
- data/spec/models/swap_space_monitor_memory_usage2_spec.rb +11 -9
- data/spec/models/unlabeled_load_statistics_spec.rb +7 -5
- data/spec/models/user_spec.rb +11 -9
- data/spec/spec_helper.rb +3 -3
- data/swaggy_jenkins.gemspec +7 -6
- metadata +77 -80
- data/spec/api_client_spec.rb +0 -226
- 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:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -75,9 +75,14 @@ module SwaggyJenkinsClient
|
|
75
75
|
}
|
76
76
|
end
|
77
77
|
|
78
|
+
# Returns attribute mapping this model knows about
|
79
|
+
def self.acceptable_attribute_map
|
80
|
+
attribute_map
|
81
|
+
end
|
82
|
+
|
78
83
|
# Returns all the JSON keys this model knows about
|
79
84
|
def self.acceptable_attributes
|
80
|
-
|
85
|
+
acceptable_attribute_map.values
|
81
86
|
end
|
82
87
|
|
83
88
|
# Attribute type mapping.
|
@@ -118,9 +123,10 @@ module SwaggyJenkinsClient
|
|
118
123
|
end
|
119
124
|
|
120
125
|
# check to see if the attribute exists and convert string to symbol for hash key
|
126
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
121
127
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
122
|
-
if (!
|
123
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleBuild`. Please check the name to make sure it's valid. List of attributes: " +
|
128
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleBuild`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
124
130
|
end
|
125
131
|
h[k.to_sym] = v
|
126
132
|
}
|
@@ -203,6 +209,7 @@ module SwaggyJenkinsClient
|
|
203
209
|
# Show invalid properties with the reasons. Usually used together with valid?
|
204
210
|
# @return Array for valid properties with the reasons
|
205
211
|
def list_invalid_properties
|
212
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
206
213
|
invalid_properties = Array.new
|
207
214
|
invalid_properties
|
208
215
|
end
|
@@ -210,6 +217,7 @@ module SwaggyJenkinsClient
|
|
210
217
|
# Check to see if the all the properties in the model are valid
|
211
218
|
# @return true if the model is valid
|
212
219
|
def valid?
|
220
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
213
221
|
true
|
214
222
|
end
|
215
223
|
|
@@ -254,37 +262,30 @@ module SwaggyJenkinsClient
|
|
254
262
|
# @param [Hash] attributes Model attributes in the form of hash
|
255
263
|
# @return [Object] Returns the model itself
|
256
264
|
def self.build_from_hash(attributes)
|
257
|
-
new.build_from_hash(attributes)
|
258
|
-
end
|
259
|
-
|
260
|
-
# Builds the object from hash
|
261
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
262
|
-
# @return [Object] Returns the model itself
|
263
|
-
def build_from_hash(attributes)
|
264
265
|
return nil unless attributes.is_a?(Hash)
|
265
266
|
attributes = attributes.transform_keys(&:to_sym)
|
266
|
-
|
267
|
-
|
268
|
-
|
267
|
+
transformed_hash = {}
|
268
|
+
openapi_types.each_pair do |key, type|
|
269
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = nil
|
269
271
|
elsif type =~ /\AArray<(.*)>/i
|
270
272
|
# check to ensure the input is an array given that the attribute
|
271
273
|
# is documented as an array but the input is not
|
272
|
-
if attributes[
|
273
|
-
|
274
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
275
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
274
276
|
end
|
275
|
-
elsif !attributes[
|
276
|
-
|
277
|
+
elsif !attributes[attribute_map[key]].nil?
|
278
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
277
279
|
end
|
278
280
|
end
|
279
|
-
|
280
|
-
self
|
281
|
+
new(transformed_hash)
|
281
282
|
end
|
282
283
|
|
283
284
|
# Deserializes the data based on type
|
284
285
|
# @param string type Data type
|
285
286
|
# @param string value Value to be deserialized
|
286
287
|
# @return [Object] Deserialized data
|
287
|
-
def _deserialize(type, value)
|
288
|
+
def self._deserialize(type, value)
|
288
289
|
case type.to_sym
|
289
290
|
when :Time
|
290
291
|
Time.parse(value)
|
@@ -319,7 +320,7 @@ module SwaggyJenkinsClient
|
|
319
320
|
else # model
|
320
321
|
# models (e.g. Pet) or oneOf
|
321
322
|
klass = SwaggyJenkinsClient.const_get(type)
|
322
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
324
|
end
|
324
325
|
end
|
325
326
|
|
@@ -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:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -102,9 +102,14 @@ module SwaggyJenkinsClient
|
|
102
102
|
}
|
103
103
|
end
|
104
104
|
|
105
|
+
# Returns attribute mapping this model knows about
|
106
|
+
def self.acceptable_attribute_map
|
107
|
+
attribute_map
|
108
|
+
end
|
109
|
+
|
105
110
|
# Returns all the JSON keys this model knows about
|
106
111
|
def self.acceptable_attributes
|
107
|
-
|
112
|
+
acceptable_attribute_map.values
|
108
113
|
end
|
109
114
|
|
110
115
|
# Attribute type mapping.
|
@@ -154,9 +159,10 @@ module SwaggyJenkinsClient
|
|
154
159
|
end
|
155
160
|
|
156
161
|
# check to see if the attribute exists and convert string to symbol for hash key
|
162
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
157
163
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
158
|
-
if (!
|
159
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProject`. Please check the name to make sure it's valid. List of attributes: " +
|
164
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
165
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProject`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
160
166
|
end
|
161
167
|
h[k.to_sym] = v
|
162
168
|
}
|
@@ -279,6 +285,7 @@ module SwaggyJenkinsClient
|
|
279
285
|
# Show invalid properties with the reasons. Usually used together with valid?
|
280
286
|
# @return Array for valid properties with the reasons
|
281
287
|
def list_invalid_properties
|
288
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
282
289
|
invalid_properties = Array.new
|
283
290
|
invalid_properties
|
284
291
|
end
|
@@ -286,6 +293,7 @@ module SwaggyJenkinsClient
|
|
286
293
|
# Check to see if the all the properties in the model are valid
|
287
294
|
# @return true if the model is valid
|
288
295
|
def valid?
|
296
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
289
297
|
true
|
290
298
|
end
|
291
299
|
|
@@ -339,37 +347,30 @@ module SwaggyJenkinsClient
|
|
339
347
|
# @param [Hash] attributes Model attributes in the form of hash
|
340
348
|
# @return [Object] Returns the model itself
|
341
349
|
def self.build_from_hash(attributes)
|
342
|
-
new.build_from_hash(attributes)
|
343
|
-
end
|
344
|
-
|
345
|
-
# Builds the object from hash
|
346
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
347
|
-
# @return [Object] Returns the model itself
|
348
|
-
def build_from_hash(attributes)
|
349
350
|
return nil unless attributes.is_a?(Hash)
|
350
351
|
attributes = attributes.transform_keys(&:to_sym)
|
351
|
-
|
352
|
-
|
353
|
-
|
352
|
+
transformed_hash = {}
|
353
|
+
openapi_types.each_pair do |key, type|
|
354
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
355
|
+
transformed_hash["#{key}"] = nil
|
354
356
|
elsif type =~ /\AArray<(.*)>/i
|
355
357
|
# check to ensure the input is an array given that the attribute
|
356
358
|
# is documented as an array but the input is not
|
357
|
-
if attributes[
|
358
|
-
|
359
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
360
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
359
361
|
end
|
360
|
-
elsif !attributes[
|
361
|
-
|
362
|
+
elsif !attributes[attribute_map[key]].nil?
|
363
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
362
364
|
end
|
363
365
|
end
|
364
|
-
|
365
|
-
self
|
366
|
+
new(transformed_hash)
|
366
367
|
end
|
367
368
|
|
368
369
|
# Deserializes the data based on type
|
369
370
|
# @param string type Data type
|
370
371
|
# @param string value Value to be deserialized
|
371
372
|
# @return [Object] Deserialized data
|
372
|
-
def _deserialize(type, value)
|
373
|
+
def self._deserialize(type, value)
|
373
374
|
case type.to_sym
|
374
375
|
when :Time
|
375
376
|
Time.parse(value)
|
@@ -404,7 +405,7 @@ module SwaggyJenkinsClient
|
|
404
405
|
else # model
|
405
406
|
# models (e.g. Pet) or oneOf
|
406
407
|
klass = SwaggyJenkinsClient.const_get(type)
|
407
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
408
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
408
409
|
end
|
409
410
|
end
|
410
411
|
|
@@ -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:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,9 +24,14 @@ module SwaggyJenkinsClient
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
27
32
|
# Returns all the JSON keys this model knows about
|
28
33
|
def self.acceptable_attributes
|
29
|
-
|
34
|
+
acceptable_attribute_map.values
|
30
35
|
end
|
31
36
|
|
32
37
|
# Attribute type mapping.
|
@@ -50,9 +55,10 @@ module SwaggyJenkinsClient
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProjectactions`. Please check the name to make sure it's valid. List of attributes: " +
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProjectactions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
56
62
|
end
|
57
63
|
h[k.to_sym] = v
|
58
64
|
}
|
@@ -65,6 +71,7 @@ module SwaggyJenkinsClient
|
|
65
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
72
|
# @return Array for valid properties with the reasons
|
67
73
|
def list_invalid_properties
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
75
|
invalid_properties = Array.new
|
69
76
|
invalid_properties
|
70
77
|
end
|
@@ -72,6 +79,7 @@ module SwaggyJenkinsClient
|
|
72
79
|
# Check to see if the all the properties in the model are valid
|
73
80
|
# @return true if the model is valid
|
74
81
|
def valid?
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
83
|
true
|
76
84
|
end
|
77
85
|
|
@@ -99,37 +107,30 @@ module SwaggyJenkinsClient
|
|
99
107
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
108
|
# @return [Object] Returns the model itself
|
101
109
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
110
|
return nil unless attributes.is_a?(Hash)
|
110
111
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
112
|
+
transformed_hash = {}
|
113
|
+
openapi_types.each_pair do |key, type|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
115
|
+
transformed_hash["#{key}"] = nil
|
114
116
|
elsif type =~ /\AArray<(.*)>/i
|
115
117
|
# check to ensure the input is an array given that the attribute
|
116
118
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
121
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
124
|
end
|
123
125
|
end
|
124
|
-
|
125
|
-
self
|
126
|
+
new(transformed_hash)
|
126
127
|
end
|
127
128
|
|
128
129
|
# Deserializes the data based on type
|
129
130
|
# @param string type Data type
|
130
131
|
# @param string value Value to be deserialized
|
131
132
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
133
|
+
def self._deserialize(type, value)
|
133
134
|
case type.to_sym
|
134
135
|
when :Time
|
135
136
|
Time.parse(value)
|
@@ -164,7 +165,7 @@ module SwaggyJenkinsClient
|
|
164
165
|
else # model
|
165
166
|
# models (e.g. Pet) or oneOf
|
166
167
|
klass = SwaggyJenkinsClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
169
|
end
|
169
170
|
end
|
170
171
|
|
@@ -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:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,9 +36,14 @@ module SwaggyJenkinsClient
|
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
|
+
# Returns attribute mapping this model knows about
|
40
|
+
def self.acceptable_attribute_map
|
41
|
+
attribute_map
|
42
|
+
end
|
43
|
+
|
39
44
|
# Returns all the JSON keys this model knows about
|
40
45
|
def self.acceptable_attributes
|
41
|
-
|
46
|
+
acceptable_attribute_map.values
|
42
47
|
end
|
43
48
|
|
44
49
|
# Attribute type mapping.
|
@@ -66,9 +71,10 @@ module SwaggyJenkinsClient
|
|
66
71
|
end
|
67
72
|
|
68
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
69
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
-
if (!
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProjecthealthReport`. Please check the name to make sure it's valid. List of attributes: " +
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProjecthealthReport`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
72
78
|
end
|
73
79
|
h[k.to_sym] = v
|
74
80
|
}
|
@@ -97,6 +103,7 @@ module SwaggyJenkinsClient
|
|
97
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
104
|
# @return Array for valid properties with the reasons
|
99
105
|
def list_invalid_properties
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
100
107
|
invalid_properties = Array.new
|
101
108
|
invalid_properties
|
102
109
|
end
|
@@ -104,6 +111,7 @@ module SwaggyJenkinsClient
|
|
104
111
|
# Check to see if the all the properties in the model are valid
|
105
112
|
# @return true if the model is valid
|
106
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
107
115
|
true
|
108
116
|
end
|
109
117
|
|
@@ -135,37 +143,30 @@ module SwaggyJenkinsClient
|
|
135
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
136
144
|
# @return [Object] Returns the model itself
|
137
145
|
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
146
|
return nil unless attributes.is_a?(Hash)
|
146
147
|
attributes = attributes.transform_keys(&:to_sym)
|
147
|
-
|
148
|
-
|
149
|
-
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
150
152
|
elsif type =~ /\AArray<(.*)>/i
|
151
153
|
# check to ensure the input is an array given that the attribute
|
152
154
|
# is documented as an array but the input is not
|
153
|
-
if attributes[
|
154
|
-
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
155
157
|
end
|
156
|
-
elsif !attributes[
|
157
|
-
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
158
160
|
end
|
159
161
|
end
|
160
|
-
|
161
|
-
self
|
162
|
+
new(transformed_hash)
|
162
163
|
end
|
163
164
|
|
164
165
|
# Deserializes the data based on type
|
165
166
|
# @param string type Data type
|
166
167
|
# @param string value Value to be deserialized
|
167
168
|
# @return [Object] Deserialized data
|
168
|
-
def _deserialize(type, value)
|
169
|
+
def self._deserialize(type, value)
|
169
170
|
case type.to_sym
|
170
171
|
when :Time
|
171
172
|
Time.parse(value)
|
@@ -200,7 +201,7 @@ module SwaggyJenkinsClient
|
|
200
201
|
else # model
|
201
202
|
# models (e.g. Pet) or oneOf
|
202
203
|
klass = SwaggyJenkinsClient.const_get(type)
|
203
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
205
|
end
|
205
206
|
end
|
206
207
|
|
@@ -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:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,9 +39,14 @@ module SwaggyJenkinsClient
|
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
42
|
+
# Returns attribute mapping this model knows about
|
43
|
+
def self.acceptable_attribute_map
|
44
|
+
attribute_map
|
45
|
+
end
|
46
|
+
|
42
47
|
# Returns all the JSON keys this model knows about
|
43
48
|
def self.acceptable_attributes
|
44
|
-
|
49
|
+
acceptable_attribute_map.values
|
45
50
|
end
|
46
51
|
|
47
52
|
# Attribute type mapping.
|
@@ -70,9 +75,10 @@ module SwaggyJenkinsClient
|
|
70
75
|
end
|
71
76
|
|
72
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
73
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
-
if (!
|
75
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::GenericResource`. Please check the name to make sure it's valid. List of attributes: " +
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::GenericResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
76
82
|
end
|
77
83
|
h[k.to_sym] = v
|
78
84
|
}
|
@@ -105,6 +111,7 @@ module SwaggyJenkinsClient
|
|
105
111
|
# Show invalid properties with the reasons. Usually used together with valid?
|
106
112
|
# @return Array for valid properties with the reasons
|
107
113
|
def list_invalid_properties
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
108
115
|
invalid_properties = Array.new
|
109
116
|
invalid_properties
|
110
117
|
end
|
@@ -112,6 +119,7 @@ module SwaggyJenkinsClient
|
|
112
119
|
# Check to see if the all the properties in the model are valid
|
113
120
|
# @return true if the model is valid
|
114
121
|
def valid?
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
115
123
|
true
|
116
124
|
end
|
117
125
|
|
@@ -144,37 +152,30 @@ module SwaggyJenkinsClient
|
|
144
152
|
# @param [Hash] attributes Model attributes in the form of hash
|
145
153
|
# @return [Object] Returns the model itself
|
146
154
|
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
155
|
return nil unless attributes.is_a?(Hash)
|
155
156
|
attributes = attributes.transform_keys(&:to_sym)
|
156
|
-
|
157
|
-
|
158
|
-
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
159
161
|
elsif type =~ /\AArray<(.*)>/i
|
160
162
|
# check to ensure the input is an array given that the attribute
|
161
163
|
# is documented as an array but the input is not
|
162
|
-
if attributes[
|
163
|
-
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
164
166
|
end
|
165
|
-
elsif !attributes[
|
166
|
-
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
167
169
|
end
|
168
170
|
end
|
169
|
-
|
170
|
-
self
|
171
|
+
new(transformed_hash)
|
171
172
|
end
|
172
173
|
|
173
174
|
# Deserializes the data based on type
|
174
175
|
# @param string type Data type
|
175
176
|
# @param string value Value to be deserialized
|
176
177
|
# @return [Object] Deserialized data
|
177
|
-
def _deserialize(type, value)
|
178
|
+
def self._deserialize(type, value)
|
178
179
|
case type.to_sym
|
179
180
|
when :Time
|
180
181
|
Time.parse(value)
|
@@ -209,7 +210,7 @@ module SwaggyJenkinsClient
|
|
209
210
|
else # model
|
210
211
|
# models (e.g. Pet) or oneOf
|
211
212
|
klass = SwaggyJenkinsClient.const_get(type)
|
212
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
214
|
end
|
214
215
|
end
|
215
216
|
|