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.
- checksums.yaml +4 -4
- data/Gemfile.lock +28 -26
- data/README.md +8 -6
- data/bin/bundle +5 -10
- data/bin/byebug +1 -1
- data/bin/coderay +1 -1
- data/bin/htmldiff +1 -1
- data/bin/ldiff +1 -1
- data/bin/pry +1 -1
- data/bin/racc +27 -0
- data/bin/rake +1 -1
- data/bin/rspec +1 -1
- data/bin/rubocop +1 -1
- data/bin/ruby-parse +1 -1
- data/bin/ruby-rewrite +1 -1
- data/lib/swaggy_jenkins/api/base_api.rb +3 -3
- data/lib/swaggy_jenkins/api/blue_ocean_api.rb +3 -3
- data/lib/swaggy_jenkins/api/remote_access_api.rb +3 -3
- data/lib/swaggy_jenkins/api_client.rb +25 -23
- data/lib/swaggy_jenkins/api_error.rb +4 -3
- data/lib/swaggy_jenkins/configuration.rb +29 -10
- data/lib/swaggy_jenkins/models/all_view.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_implpermissions.rb +16 -21
- data/lib/swaggy_jenkins/models/cause_action.rb +16 -21
- data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +16 -21
- data/lib/swaggy_jenkins/models/classes_by_class.rb +16 -21
- data/lib/swaggy_jenkins/models/clock_difference.rb +16 -21
- data/lib/swaggy_jenkins/models/computer_set.rb +16 -21
- data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +16 -21
- data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +16 -21
- data/lib/swaggy_jenkins/models/empty_change_log_set.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/favorite_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/favorite_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_build.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_project.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_projectactions.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +16 -21
- data/lib/swaggy_jenkins/models/generic_resource.rb +16 -21
- data/lib/swaggy_jenkins/models/github_content.rb +16 -21
- data/lib/swaggy_jenkins/models/github_file.rb +16 -21
- data/lib/swaggy_jenkins/models/github_organization.rb +16 -21
- data/lib/swaggy_jenkins/models/github_organizationlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositories.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repository.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorylinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +16 -21
- data/lib/swaggy_jenkins/models/github_respository_container.rb +16 -21
- data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_scm.rb +16 -21
- data/lib/swaggy_jenkins/models/github_scmlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computer.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +16 -21
- data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +16 -21
- data/lib/swaggy_jenkins/models/input_step_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/input_step_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/label1.rb +16 -21
- data/lib/swaggy_jenkins/models/link.rb +16 -21
- data/lib/swaggy_jenkins/models/list_view.rb +16 -21
- data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +16 -21
- data/lib/swaggy_jenkins/models/null_scm.rb +16 -21
- data/lib/swaggy_jenkins/models/organisation.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_activity.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_node.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/queue.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_blocked_item.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_item_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_left_item.rb +16 -21
- data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +16 -21
- data/lib/swaggy_jenkins/models/string_parameter_definition.rb +16 -21
- data/lib/swaggy_jenkins/models/string_parameter_value.rb +16 -21
- data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +16 -21
- data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +16 -21
- data/lib/swaggy_jenkins/models/user.rb +16 -21
- 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 +75 -78
- 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.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
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
|
-
|
121
|
-
|
122
|
-
|
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[
|
127
|
-
|
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[
|
130
|
-
|
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:
|
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
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -121,6 +121,7 @@ module SwaggyJenkinsClient
|
|
121
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
122
|
# @return Array for valid properties with the reasons
|
123
123
|
def list_invalid_properties
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
125
|
invalid_properties = Array.new
|
125
126
|
invalid_properties
|
126
127
|
end
|
@@ -128,6 +129,7 @@ module SwaggyJenkinsClient
|
|
128
129
|
# Check to see if the all the properties in the model are valid
|
129
130
|
# @return true if the model is valid
|
130
131
|
def valid?
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
131
133
|
true
|
132
134
|
end
|
133
135
|
|
@@ -162,37 +164,30 @@ module SwaggyJenkinsClient
|
|
162
164
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
165
|
# @return [Object] Returns the model itself
|
164
166
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
167
|
return nil unless attributes.is_a?(Hash)
|
173
168
|
attributes = attributes.transform_keys(&:to_sym)
|
174
|
-
|
175
|
-
|
176
|
-
|
169
|
+
transformed_hash = {}
|
170
|
+
openapi_types.each_pair do |key, type|
|
171
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
172
|
+
transformed_hash["#{key}"] = nil
|
177
173
|
elsif type =~ /\AArray<(.*)>/i
|
178
174
|
# check to ensure the input is an array given that the attribute
|
179
175
|
# is documented as an array but the input is not
|
180
|
-
if attributes[
|
181
|
-
|
176
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
177
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
182
178
|
end
|
183
|
-
elsif !attributes[
|
184
|
-
|
179
|
+
elsif !attributes[attribute_map[key]].nil?
|
180
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
185
181
|
end
|
186
182
|
end
|
187
|
-
|
188
|
-
self
|
183
|
+
new(transformed_hash)
|
189
184
|
end
|
190
185
|
|
191
186
|
# Deserializes the data based on type
|
192
187
|
# @param string type Data type
|
193
188
|
# @param string value Value to be deserialized
|
194
189
|
# @return [Object] Deserialized data
|
195
|
-
def _deserialize(type, value)
|
190
|
+
def self._deserialize(type, value)
|
196
191
|
case type.to_sym
|
197
192
|
when :Time
|
198
193
|
Time.parse(value)
|
@@ -227,7 +222,7 @@ module SwaggyJenkinsClient
|
|
227
222
|
else # model
|
228
223
|
# models (e.g. Pet) or oneOf
|
229
224
|
klass = SwaggyJenkinsClient.const_get(type)
|
230
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
226
|
end
|
232
227
|
end
|
233
228
|
|
@@ -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.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
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
|
-
|
240
|
-
|
241
|
-
|
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[
|
246
|
-
|
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[
|
249
|
-
|
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:
|
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
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -89,6 +89,7 @@ module SwaggyJenkinsClient
|
|
89
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
90
90
|
# @return Array for valid properties with the reasons
|
91
91
|
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
92
93
|
invalid_properties = Array.new
|
93
94
|
invalid_properties
|
94
95
|
end
|
@@ -96,6 +97,7 @@ module SwaggyJenkinsClient
|
|
96
97
|
# Check to see if the all the properties in the model are valid
|
97
98
|
# @return true if the model is valid
|
98
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
101
|
true
|
100
102
|
end
|
101
103
|
|
@@ -126,37 +128,30 @@ module SwaggyJenkinsClient
|
|
126
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
127
129
|
# @return [Object] Returns the model itself
|
128
130
|
def self.build_from_hash(attributes)
|
129
|
-
new.build_from_hash(attributes)
|
130
|
-
end
|
131
|
-
|
132
|
-
# Builds the object from hash
|
133
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
-
# @return [Object] Returns the model itself
|
135
|
-
def build_from_hash(attributes)
|
136
131
|
return nil unless attributes.is_a?(Hash)
|
137
132
|
attributes = attributes.transform_keys(&:to_sym)
|
138
|
-
|
139
|
-
|
140
|
-
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
141
137
|
elsif type =~ /\AArray<(.*)>/i
|
142
138
|
# check to ensure the input is an array given that the attribute
|
143
139
|
# is documented as an array but the input is not
|
144
|
-
if attributes[
|
145
|
-
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
146
142
|
end
|
147
|
-
elsif !attributes[
|
148
|
-
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
149
145
|
end
|
150
146
|
end
|
151
|
-
|
152
|
-
self
|
147
|
+
new(transformed_hash)
|
153
148
|
end
|
154
149
|
|
155
150
|
# Deserializes the data based on type
|
156
151
|
# @param string type Data type
|
157
152
|
# @param string value Value to be deserialized
|
158
153
|
# @return [Object] Deserialized data
|
159
|
-
def _deserialize(type, value)
|
154
|
+
def self._deserialize(type, value)
|
160
155
|
case type.to_sym
|
161
156
|
when :Time
|
162
157
|
Time.parse(value)
|
@@ -191,7 +186,7 @@ module SwaggyJenkinsClient
|
|
191
186
|
else # model
|
192
187
|
# models (e.g. Pet) or oneOf
|
193
188
|
klass = SwaggyJenkinsClient.const_get(type)
|
194
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
195
190
|
end
|
196
191
|
end
|
197
192
|
|
@@ -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.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
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
|
-
|
184
|
-
|
185
|
-
|
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[
|
190
|
-
|
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[
|
193
|
-
|
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:
|
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
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -169,6 +169,7 @@ module SwaggyJenkinsClient
|
|
169
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
170
170
|
# @return Array for valid properties with the reasons
|
171
171
|
def list_invalid_properties
|
172
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
172
173
|
invalid_properties = Array.new
|
173
174
|
invalid_properties
|
174
175
|
end
|
@@ -176,6 +177,7 @@ module SwaggyJenkinsClient
|
|
176
177
|
# Check to see if the all the properties in the model are valid
|
177
178
|
# @return true if the model is valid
|
178
179
|
def valid?
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
179
181
|
true
|
180
182
|
end
|
181
183
|
|
@@ -216,37 +218,30 @@ module SwaggyJenkinsClient
|
|
216
218
|
# @param [Hash] attributes Model attributes in the form of hash
|
217
219
|
# @return [Object] Returns the model itself
|
218
220
|
def self.build_from_hash(attributes)
|
219
|
-
new.build_from_hash(attributes)
|
220
|
-
end
|
221
|
-
|
222
|
-
# Builds the object from hash
|
223
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
-
# @return [Object] Returns the model itself
|
225
|
-
def build_from_hash(attributes)
|
226
221
|
return nil unless attributes.is_a?(Hash)
|
227
222
|
attributes = attributes.transform_keys(&:to_sym)
|
228
|
-
|
229
|
-
|
230
|
-
|
223
|
+
transformed_hash = {}
|
224
|
+
openapi_types.each_pair do |key, type|
|
225
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
226
|
+
transformed_hash["#{key}"] = nil
|
231
227
|
elsif type =~ /\AArray<(.*)>/i
|
232
228
|
# check to ensure the input is an array given that the attribute
|
233
229
|
# is documented as an array but the input is not
|
234
|
-
if attributes[
|
235
|
-
|
230
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
231
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
236
232
|
end
|
237
|
-
elsif !attributes[
|
238
|
-
|
233
|
+
elsif !attributes[attribute_map[key]].nil?
|
234
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
239
235
|
end
|
240
236
|
end
|
241
|
-
|
242
|
-
self
|
237
|
+
new(transformed_hash)
|
243
238
|
end
|
244
239
|
|
245
240
|
# Deserializes the data based on type
|
246
241
|
# @param string type Data type
|
247
242
|
# @param string value Value to be deserialized
|
248
243
|
# @return [Object] Deserialized data
|
249
|
-
def _deserialize(type, value)
|
244
|
+
def self._deserialize(type, value)
|
250
245
|
case type.to_sym
|
251
246
|
when :Time
|
252
247
|
Time.parse(value)
|
@@ -281,7 +276,7 @@ module SwaggyJenkinsClient
|
|
281
276
|
else # model
|
282
277
|
# models (e.g. Pet) or oneOf
|
283
278
|
klass = SwaggyJenkinsClient.const_get(type)
|
284
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
279
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
280
|
end
|
286
281
|
end
|
287
282
|
|
@@ -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.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
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
|
-
|
157
|
-
|
158
|
-
|
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[
|
163
|
-
|
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[
|
166
|
-
|
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
|
|