swaggy_jenkins 2.0.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 +78 -81
- 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
|
|
@@ -75,6 +75,7 @@ module SwaggyJenkinsClient
|
|
75
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
76
|
# @return Array for valid properties with the reasons
|
77
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
79
|
invalid_properties = Array.new
|
79
80
|
invalid_properties
|
80
81
|
end
|
@@ -82,6 +83,7 @@ module SwaggyJenkinsClient
|
|
82
83
|
# Check to see if the all the properties in the model are valid
|
83
84
|
# @return true if the model is valid
|
84
85
|
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
87
|
true
|
86
88
|
end
|
87
89
|
|
@@ -110,37 +112,30 @@ module SwaggyJenkinsClient
|
|
110
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
113
|
# @return [Object] Returns the model itself
|
112
114
|
def self.build_from_hash(attributes)
|
113
|
-
new.build_from_hash(attributes)
|
114
|
-
end
|
115
|
-
|
116
|
-
# Builds the object from hash
|
117
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
-
# @return [Object] Returns the model itself
|
119
|
-
def build_from_hash(attributes)
|
120
115
|
return nil unless attributes.is_a?(Hash)
|
121
116
|
attributes = attributes.transform_keys(&:to_sym)
|
122
|
-
|
123
|
-
|
124
|
-
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
125
121
|
elsif type =~ /\AArray<(.*)>/i
|
126
122
|
# check to ensure the input is an array given that the attribute
|
127
123
|
# is documented as an array but the input is not
|
128
|
-
if attributes[
|
129
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
130
126
|
end
|
131
|
-
elsif !attributes[
|
132
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
133
129
|
end
|
134
130
|
end
|
135
|
-
|
136
|
-
self
|
131
|
+
new(transformed_hash)
|
137
132
|
end
|
138
133
|
|
139
134
|
# Deserializes the data based on type
|
140
135
|
# @param string type Data type
|
141
136
|
# @param string value Value to be deserialized
|
142
137
|
# @return [Object] Deserialized data
|
143
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
144
139
|
case type.to_sym
|
145
140
|
when :Time
|
146
141
|
Time.parse(value)
|
@@ -175,7 +170,7 @@ module SwaggyJenkinsClient
|
|
175
170
|
else # model
|
176
171
|
# models (e.g. Pet) or oneOf
|
177
172
|
klass = SwaggyJenkinsClient.const_get(type)
|
178
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
174
|
end
|
180
175
|
end
|
181
176
|
|
@@ -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
|
|
@@ -155,6 +155,7 @@ module SwaggyJenkinsClient
|
|
155
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
156
156
|
# @return Array for valid properties with the reasons
|
157
157
|
def list_invalid_properties
|
158
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
158
159
|
invalid_properties = Array.new
|
159
160
|
invalid_properties
|
160
161
|
end
|
@@ -162,6 +163,7 @@ module SwaggyJenkinsClient
|
|
162
163
|
# Check to see if the all the properties in the model are valid
|
163
164
|
# @return true if the model is valid
|
164
165
|
def valid?
|
166
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
165
167
|
true
|
166
168
|
end
|
167
169
|
|
@@ -200,37 +202,30 @@ module SwaggyJenkinsClient
|
|
200
202
|
# @param [Hash] attributes Model attributes in the form of hash
|
201
203
|
# @return [Object] Returns the model itself
|
202
204
|
def self.build_from_hash(attributes)
|
203
|
-
new.build_from_hash(attributes)
|
204
|
-
end
|
205
|
-
|
206
|
-
# Builds the object from hash
|
207
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
208
|
-
# @return [Object] Returns the model itself
|
209
|
-
def build_from_hash(attributes)
|
210
205
|
return nil unless attributes.is_a?(Hash)
|
211
206
|
attributes = attributes.transform_keys(&:to_sym)
|
212
|
-
|
213
|
-
|
214
|
-
|
207
|
+
transformed_hash = {}
|
208
|
+
openapi_types.each_pair do |key, type|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
210
|
+
transformed_hash["#{key}"] = nil
|
215
211
|
elsif type =~ /\AArray<(.*)>/i
|
216
212
|
# check to ensure the input is an array given that the attribute
|
217
213
|
# is documented as an array but the input is not
|
218
|
-
if attributes[
|
219
|
-
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
220
216
|
end
|
221
|
-
elsif !attributes[
|
222
|
-
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
223
219
|
end
|
224
220
|
end
|
225
|
-
|
226
|
-
self
|
221
|
+
new(transformed_hash)
|
227
222
|
end
|
228
223
|
|
229
224
|
# Deserializes the data based on type
|
230
225
|
# @param string type Data type
|
231
226
|
# @param string value Value to be deserialized
|
232
227
|
# @return [Object] Deserialized data
|
233
|
-
def _deserialize(type, value)
|
228
|
+
def self._deserialize(type, value)
|
234
229
|
case type.to_sym
|
235
230
|
when :Time
|
236
231
|
Time.parse(value)
|
@@ -265,7 +260,7 @@ module SwaggyJenkinsClient
|
|
265
260
|
else # model
|
266
261
|
# models (e.g. Pet) or oneOf
|
267
262
|
klass = SwaggyJenkinsClient.const_get(type)
|
268
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
263
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
269
264
|
end
|
270
265
|
end
|
271
266
|
|
@@ -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
|
|
@@ -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
|
-
|
148
|
-
|
149
|
-
|
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[
|
154
|
-
|
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[
|
157
|
-
|
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:
|
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
|
|
@@ -163,6 +163,7 @@ module SwaggyJenkinsClient
|
|
163
163
|
# Show invalid properties with the reasons. Usually used together with valid?
|
164
164
|
# @return Array for valid properties with the reasons
|
165
165
|
def list_invalid_properties
|
166
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
166
167
|
invalid_properties = Array.new
|
167
168
|
invalid_properties
|
168
169
|
end
|
@@ -170,6 +171,7 @@ module SwaggyJenkinsClient
|
|
170
171
|
# Check to see if the all the properties in the model are valid
|
171
172
|
# @return true if the model is valid
|
172
173
|
def valid?
|
174
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
173
175
|
true
|
174
176
|
end
|
175
177
|
|
@@ -209,37 +211,30 @@ module SwaggyJenkinsClient
|
|
209
211
|
# @param [Hash] attributes Model attributes in the form of hash
|
210
212
|
# @return [Object] Returns the model itself
|
211
213
|
def self.build_from_hash(attributes)
|
212
|
-
new.build_from_hash(attributes)
|
213
|
-
end
|
214
|
-
|
215
|
-
# Builds the object from hash
|
216
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
-
# @return [Object] Returns the model itself
|
218
|
-
def build_from_hash(attributes)
|
219
214
|
return nil unless attributes.is_a?(Hash)
|
220
215
|
attributes = attributes.transform_keys(&:to_sym)
|
221
|
-
|
222
|
-
|
223
|
-
|
216
|
+
transformed_hash = {}
|
217
|
+
openapi_types.each_pair do |key, type|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
219
|
+
transformed_hash["#{key}"] = nil
|
224
220
|
elsif type =~ /\AArray<(.*)>/i
|
225
221
|
# check to ensure the input is an array given that the attribute
|
226
222
|
# is documented as an array but the input is not
|
227
|
-
if attributes[
|
228
|
-
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
229
225
|
end
|
230
|
-
elsif !attributes[
|
231
|
-
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
232
228
|
end
|
233
229
|
end
|
234
|
-
|
235
|
-
self
|
230
|
+
new(transformed_hash)
|
236
231
|
end
|
237
232
|
|
238
233
|
# Deserializes the data based on type
|
239
234
|
# @param string type Data type
|
240
235
|
# @param string value Value to be deserialized
|
241
236
|
# @return [Object] Deserialized data
|
242
|
-
def _deserialize(type, value)
|
237
|
+
def self._deserialize(type, value)
|
243
238
|
case type.to_sym
|
244
239
|
when :Time
|
245
240
|
Time.parse(value)
|
@@ -274,7 +269,7 @@ module SwaggyJenkinsClient
|
|
274
269
|
else # model
|
275
270
|
# models (e.g. Pet) or oneOf
|
276
271
|
klass = SwaggyJenkinsClient.const_get(type)
|
277
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
278
273
|
end
|
279
274
|
end
|
280
275
|
|
@@ -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
|
|
@@ -81,6 +81,7 @@ module SwaggyJenkinsClient
|
|
81
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
85
|
invalid_properties = Array.new
|
85
86
|
invalid_properties
|
86
87
|
end
|
@@ -88,6 +89,7 @@ module SwaggyJenkinsClient
|
|
88
89
|
# Check to see if the all the properties in the model are valid
|
89
90
|
# @return true if the model is valid
|
90
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
93
|
true
|
92
94
|
end
|
93
95
|
|
@@ -117,37 +119,30 @@ module SwaggyJenkinsClient
|
|
117
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
120
|
# @return [Object] Returns the model itself
|
119
121
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
122
|
return nil unless attributes.is_a?(Hash)
|
128
123
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
132
128
|
elsif type =~ /\AArray<(.*)>/i
|
133
129
|
# check to ensure the input is an array given that the attribute
|
134
130
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
133
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
136
|
end
|
141
137
|
end
|
142
|
-
|
143
|
-
self
|
138
|
+
new(transformed_hash)
|
144
139
|
end
|
145
140
|
|
146
141
|
# Deserializes the data based on type
|
147
142
|
# @param string type Data type
|
148
143
|
# @param string value Value to be deserialized
|
149
144
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
151
146
|
case type.to_sym
|
152
147
|
when :Time
|
153
148
|
Time.parse(value)
|
@@ -182,7 +177,7 @@ module SwaggyJenkinsClient
|
|
182
177
|
else # model
|
183
178
|
# models (e.g. Pet) or oneOf
|
184
179
|
klass = SwaggyJenkinsClient.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
181
|
end
|
187
182
|
end
|
188
183
|
|
@@ -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
|
|
@@ -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
|
-
|
148
|
-
|
149
|
-
|
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[
|
154
|
-
|
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[
|
157
|
-
|
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:
|
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
|
|
@@ -81,6 +81,7 @@ module SwaggyJenkinsClient
|
|
81
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
85
|
invalid_properties = Array.new
|
85
86
|
invalid_properties
|
86
87
|
end
|
@@ -88,6 +89,7 @@ module SwaggyJenkinsClient
|
|
88
89
|
# Check to see if the all the properties in the model are valid
|
89
90
|
# @return true if the model is valid
|
90
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
93
|
true
|
92
94
|
end
|
93
95
|
|
@@ -117,37 +119,30 @@ module SwaggyJenkinsClient
|
|
117
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
120
|
# @return [Object] Returns the model itself
|
119
121
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
122
|
return nil unless attributes.is_a?(Hash)
|
128
123
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
132
128
|
elsif type =~ /\AArray<(.*)>/i
|
133
129
|
# check to ensure the input is an array given that the attribute
|
134
130
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
133
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
136
|
end
|
141
137
|
end
|
142
|
-
|
143
|
-
self
|
138
|
+
new(transformed_hash)
|
144
139
|
end
|
145
140
|
|
146
141
|
# Deserializes the data based on type
|
147
142
|
# @param string type Data type
|
148
143
|
# @param string value Value to be deserialized
|
149
144
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
151
146
|
case type.to_sym
|
152
147
|
when :Time
|
153
148
|
Time.parse(value)
|
@@ -182,7 +177,7 @@ module SwaggyJenkinsClient
|
|
182
177
|
else # model
|
183
178
|
# models (e.g. Pet) or oneOf
|
184
179
|
klass = SwaggyJenkinsClient.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
181
|
end
|
187
182
|
end
|
188
183
|
|