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
|
|
@@ -63,9 +63,14 @@ module SwaggyJenkinsClient
|
|
63
63
|
}
|
64
64
|
end
|
65
65
|
|
66
|
+
# Returns attribute mapping this model knows about
|
67
|
+
def self.acceptable_attribute_map
|
68
|
+
attribute_map
|
69
|
+
end
|
70
|
+
|
66
71
|
# Returns all the JSON keys this model knows about
|
67
72
|
def self.acceptable_attributes
|
68
|
-
|
73
|
+
acceptable_attribute_map.values
|
69
74
|
end
|
70
75
|
|
71
76
|
# Attribute type mapping.
|
@@ -102,9 +107,10 @@ module SwaggyJenkinsClient
|
|
102
107
|
end
|
103
108
|
|
104
109
|
# check to see if the attribute exists and convert string to symbol for hash key
|
110
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
105
111
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
-
if (!
|
107
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitemlatestRun`. Please check the name to make sure it's valid. List of attributes: " +
|
112
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitemlatestRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
108
114
|
end
|
109
115
|
h[k.to_sym] = v
|
110
116
|
}
|
@@ -169,6 +175,7 @@ module SwaggyJenkinsClient
|
|
169
175
|
# Show invalid properties with the reasons. Usually used together with valid?
|
170
176
|
# @return Array for valid properties with the reasons
|
171
177
|
def list_invalid_properties
|
178
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
172
179
|
invalid_properties = Array.new
|
173
180
|
invalid_properties
|
174
181
|
end
|
@@ -176,6 +183,7 @@ module SwaggyJenkinsClient
|
|
176
183
|
# Check to see if the all the properties in the model are valid
|
177
184
|
# @return true if the model is valid
|
178
185
|
def valid?
|
186
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
179
187
|
true
|
180
188
|
end
|
181
189
|
|
@@ -216,37 +224,30 @@ module SwaggyJenkinsClient
|
|
216
224
|
# @param [Hash] attributes Model attributes in the form of hash
|
217
225
|
# @return [Object] Returns the model itself
|
218
226
|
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
227
|
return nil unless attributes.is_a?(Hash)
|
227
228
|
attributes = attributes.transform_keys(&:to_sym)
|
228
|
-
|
229
|
-
|
230
|
-
|
229
|
+
transformed_hash = {}
|
230
|
+
openapi_types.each_pair do |key, type|
|
231
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
232
|
+
transformed_hash["#{key}"] = nil
|
231
233
|
elsif type =~ /\AArray<(.*)>/i
|
232
234
|
# check to ensure the input is an array given that the attribute
|
233
235
|
# is documented as an array but the input is not
|
234
|
-
if attributes[
|
235
|
-
|
236
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
237
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
236
238
|
end
|
237
|
-
elsif !attributes[
|
238
|
-
|
239
|
+
elsif !attributes[attribute_map[key]].nil?
|
240
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
239
241
|
end
|
240
242
|
end
|
241
|
-
|
242
|
-
self
|
243
|
+
new(transformed_hash)
|
243
244
|
end
|
244
245
|
|
245
246
|
# Deserializes the data based on type
|
246
247
|
# @param string type Data type
|
247
248
|
# @param string value Value to be deserialized
|
248
249
|
# @return [Object] Deserialized data
|
249
|
-
def _deserialize(type, value)
|
250
|
+
def self._deserialize(type, value)
|
250
251
|
case type.to_sym
|
251
252
|
when :Time
|
252
253
|
Time.parse(value)
|
@@ -281,7 +282,7 @@ module SwaggyJenkinsClient
|
|
281
282
|
else # model
|
282
283
|
# models (e.g. Pet) or oneOf
|
283
284
|
klass = SwaggyJenkinsClient.const_get(type)
|
284
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
286
|
end
|
286
287
|
end
|
287
288
|
|
@@ -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::PipelineBranchesitempullRequest`. 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::PipelineBranchesitempullRequest`. 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
|
|
@@ -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
|
|
@@ -27,9 +27,14 @@ module SwaggyJenkinsClient
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
|
+
# Returns attribute mapping this model knows about
|
31
|
+
def self.acceptable_attribute_map
|
32
|
+
attribute_map
|
33
|
+
end
|
34
|
+
|
30
35
|
# Returns all the JSON keys this model knows about
|
31
36
|
def self.acceptable_attributes
|
32
|
-
|
37
|
+
acceptable_attribute_map.values
|
33
38
|
end
|
34
39
|
|
35
40
|
# Attribute type mapping.
|
@@ -54,9 +59,10 @@ module SwaggyJenkinsClient
|
|
54
59
|
end
|
55
60
|
|
56
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
57
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
-
if (!
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitempullRequestlinks`. Please check the name to make sure it's valid. List of attributes: " +
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitempullRequestlinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
60
66
|
end
|
61
67
|
h[k.to_sym] = v
|
62
68
|
}
|
@@ -73,6 +79,7 @@ module SwaggyJenkinsClient
|
|
73
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
80
|
# @return Array for valid properties with the reasons
|
75
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
83
|
invalid_properties = Array.new
|
77
84
|
invalid_properties
|
78
85
|
end
|
@@ -80,6 +87,7 @@ module SwaggyJenkinsClient
|
|
80
87
|
# Check to see if the all the properties in the model are valid
|
81
88
|
# @return true if the model is valid
|
82
89
|
def valid?
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
91
|
true
|
84
92
|
end
|
85
93
|
|
@@ -108,37 +116,30 @@ module SwaggyJenkinsClient
|
|
108
116
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
117
|
# @return [Object] Returns the model itself
|
110
118
|
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
119
|
return nil unless attributes.is_a?(Hash)
|
119
120
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
transformed_hash = {}
|
122
|
+
openapi_types.each_pair do |key, type|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = nil
|
123
125
|
elsif type =~ /\AArray<(.*)>/i
|
124
126
|
# check to ensure the input is an array given that the attribute
|
125
127
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
130
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
133
|
end
|
132
134
|
end
|
133
|
-
|
134
|
-
self
|
135
|
+
new(transformed_hash)
|
135
136
|
end
|
136
137
|
|
137
138
|
# Deserializes the data based on type
|
138
139
|
# @param string type Data type
|
139
140
|
# @param string value Value to be deserialized
|
140
141
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
142
|
+
def self._deserialize(type, value)
|
142
143
|
case type.to_sym
|
143
144
|
when :Time
|
144
145
|
Time.parse(value)
|
@@ -173,7 +174,7 @@ module SwaggyJenkinsClient
|
|
173
174
|
else # model
|
174
175
|
# models (e.g. Pet) or oneOf
|
175
176
|
klass = SwaggyJenkinsClient.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
178
|
end
|
178
179
|
end
|
179
180
|
|
@@ -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
|
|
@@ -42,9 +42,14 @@ module SwaggyJenkinsClient
|
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
45
|
+
# Returns attribute mapping this model knows about
|
46
|
+
def self.acceptable_attribute_map
|
47
|
+
attribute_map
|
48
|
+
end
|
49
|
+
|
45
50
|
# Returns all the JSON keys this model knows about
|
46
51
|
def self.acceptable_attributes
|
47
|
-
|
52
|
+
acceptable_attribute_map.values
|
48
53
|
end
|
49
54
|
|
50
55
|
# Attribute type mapping.
|
@@ -74,9 +79,10 @@ module SwaggyJenkinsClient
|
|
74
79
|
end
|
75
80
|
|
76
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
77
83
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
78
|
-
if (!
|
79
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineFolderImpl`. Please check the name to make sure it's valid. List of attributes: " +
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineFolderImpl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
80
86
|
end
|
81
87
|
h[k.to_sym] = v
|
82
88
|
}
|
@@ -113,6 +119,7 @@ module SwaggyJenkinsClient
|
|
113
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
114
120
|
# @return Array for valid properties with the reasons
|
115
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
116
123
|
invalid_properties = Array.new
|
117
124
|
invalid_properties
|
118
125
|
end
|
@@ -120,6 +127,7 @@ module SwaggyJenkinsClient
|
|
120
127
|
# Check to see if the all the properties in the model are valid
|
121
128
|
# @return true if the model is valid
|
122
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
123
131
|
true
|
124
132
|
end
|
125
133
|
|
@@ -153,37 +161,30 @@ module SwaggyJenkinsClient
|
|
153
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
154
162
|
# @return [Object] Returns the model itself
|
155
163
|
def self.build_from_hash(attributes)
|
156
|
-
new.build_from_hash(attributes)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Builds the object from hash
|
160
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
-
# @return [Object] Returns the model itself
|
162
|
-
def build_from_hash(attributes)
|
163
164
|
return nil unless attributes.is_a?(Hash)
|
164
165
|
attributes = attributes.transform_keys(&:to_sym)
|
165
|
-
|
166
|
-
|
167
|
-
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
168
170
|
elsif type =~ /\AArray<(.*)>/i
|
169
171
|
# check to ensure the input is an array given that the attribute
|
170
172
|
# is documented as an array but the input is not
|
171
|
-
if attributes[
|
172
|
-
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
173
175
|
end
|
174
|
-
elsif !attributes[
|
175
|
-
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
176
178
|
end
|
177
179
|
end
|
178
|
-
|
179
|
-
self
|
180
|
+
new(transformed_hash)
|
180
181
|
end
|
181
182
|
|
182
183
|
# Deserializes the data based on type
|
183
184
|
# @param string type Data type
|
184
185
|
# @param string value Value to be deserialized
|
185
186
|
# @return [Object] Deserialized data
|
186
|
-
def _deserialize(type, value)
|
187
|
+
def self._deserialize(type, value)
|
187
188
|
case type.to_sym
|
188
189
|
when :Time
|
189
190
|
Time.parse(value)
|
@@ -218,7 +219,7 @@ module SwaggyJenkinsClient
|
|
218
219
|
else # model
|
219
220
|
# models (e.g. Pet) or oneOf
|
220
221
|
klass = SwaggyJenkinsClient.const_get(type)
|
221
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
222
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
222
223
|
end
|
223
224
|
end
|
224
225
|
|
@@ -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
|
|
@@ -48,9 +48,14 @@ module SwaggyJenkinsClient
|
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
51
|
+
# Returns attribute mapping this model knows about
|
52
|
+
def self.acceptable_attribute_map
|
53
|
+
attribute_map
|
54
|
+
end
|
55
|
+
|
51
56
|
# Returns all the JSON keys this model knows about
|
52
57
|
def self.acceptable_attributes
|
53
|
-
|
58
|
+
acceptable_attribute_map.values
|
54
59
|
end
|
55
60
|
|
56
61
|
# Attribute type mapping.
|
@@ -82,9 +87,10 @@ module SwaggyJenkinsClient
|
|
82
87
|
end
|
83
88
|
|
84
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
85
91
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
-
if (!
|
87
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineImpl`. Please check the name to make sure it's valid. List of attributes: " +
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineImpl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
88
94
|
end
|
89
95
|
h[k.to_sym] = v
|
90
96
|
}
|
@@ -129,6 +135,7 @@ module SwaggyJenkinsClient
|
|
129
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
130
136
|
# @return Array for valid properties with the reasons
|
131
137
|
def list_invalid_properties
|
138
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
132
139
|
invalid_properties = Array.new
|
133
140
|
invalid_properties
|
134
141
|
end
|
@@ -136,6 +143,7 @@ module SwaggyJenkinsClient
|
|
136
143
|
# Check to see if the all the properties in the model are valid
|
137
144
|
# @return true if the model is valid
|
138
145
|
def valid?
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
139
147
|
true
|
140
148
|
end
|
141
149
|
|
@@ -171,37 +179,30 @@ module SwaggyJenkinsClient
|
|
171
179
|
# @param [Hash] attributes Model attributes in the form of hash
|
172
180
|
# @return [Object] Returns the model itself
|
173
181
|
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
182
|
return nil unless attributes.is_a?(Hash)
|
182
183
|
attributes = attributes.transform_keys(&:to_sym)
|
183
|
-
|
184
|
-
|
185
|
-
|
184
|
+
transformed_hash = {}
|
185
|
+
openapi_types.each_pair do |key, type|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
187
|
+
transformed_hash["#{key}"] = nil
|
186
188
|
elsif type =~ /\AArray<(.*)>/i
|
187
189
|
# check to ensure the input is an array given that the attribute
|
188
190
|
# is documented as an array but the input is not
|
189
|
-
if attributes[
|
190
|
-
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
191
193
|
end
|
192
|
-
elsif !attributes[
|
193
|
-
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
194
196
|
end
|
195
197
|
end
|
196
|
-
|
197
|
-
self
|
198
|
+
new(transformed_hash)
|
198
199
|
end
|
199
200
|
|
200
201
|
# Deserializes the data based on type
|
201
202
|
# @param string type Data type
|
202
203
|
# @param string value Value to be deserialized
|
203
204
|
# @return [Object] Deserialized data
|
204
|
-
def _deserialize(type, value)
|
205
|
+
def self._deserialize(type, value)
|
205
206
|
case type.to_sym
|
206
207
|
when :Time
|
207
208
|
Time.parse(value)
|
@@ -236,7 +237,7 @@ module SwaggyJenkinsClient
|
|
236
237
|
else # model
|
237
238
|
# models (e.g. Pet) or oneOf
|
238
239
|
klass = SwaggyJenkinsClient.const_get(type)
|
239
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
240
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
240
241
|
end
|
241
242
|
end
|
242
243
|
|