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
|
|
@@ -36,9 +36,14 @@ module SwaggyJenkinsClient
|
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
|
+
# Returns attribute mapping this model knows about
|
40
|
+
def self.acceptable_attribute_map
|
41
|
+
attribute_map
|
42
|
+
end
|
43
|
+
|
39
44
|
# Returns all the JSON keys this model knows about
|
40
45
|
def self.acceptable_attributes
|
41
|
-
|
46
|
+
acceptable_attribute_map.values
|
42
47
|
end
|
43
48
|
|
44
49
|
# Attribute type mapping.
|
@@ -66,9 +71,10 @@ module SwaggyJenkinsClient
|
|
66
71
|
end
|
67
72
|
|
68
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
69
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
-
if (!
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineImpllinks`. Please check the name to make sure it's valid. List of attributes: " +
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineImpllinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
72
78
|
end
|
73
79
|
h[k.to_sym] = v
|
74
80
|
}
|
@@ -97,6 +103,7 @@ module SwaggyJenkinsClient
|
|
97
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
104
|
# @return Array for valid properties with the reasons
|
99
105
|
def list_invalid_properties
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
100
107
|
invalid_properties = Array.new
|
101
108
|
invalid_properties
|
102
109
|
end
|
@@ -104,6 +111,7 @@ module SwaggyJenkinsClient
|
|
104
111
|
# Check to see if the all the properties in the model are valid
|
105
112
|
# @return true if the model is valid
|
106
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
107
115
|
true
|
108
116
|
end
|
109
117
|
|
@@ -135,37 +143,30 @@ module SwaggyJenkinsClient
|
|
135
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
136
144
|
# @return [Object] Returns the model itself
|
137
145
|
def self.build_from_hash(attributes)
|
138
|
-
new.build_from_hash(attributes)
|
139
|
-
end
|
140
|
-
|
141
|
-
# Builds the object from hash
|
142
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
-
# @return [Object] Returns the model itself
|
144
|
-
def build_from_hash(attributes)
|
145
146
|
return nil unless attributes.is_a?(Hash)
|
146
147
|
attributes = attributes.transform_keys(&:to_sym)
|
147
|
-
|
148
|
-
|
149
|
-
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
150
152
|
elsif type =~ /\AArray<(.*)>/i
|
151
153
|
# check to ensure the input is an array given that the attribute
|
152
154
|
# is documented as an array but the input is not
|
153
|
-
if attributes[
|
154
|
-
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
155
157
|
end
|
156
|
-
elsif !attributes[
|
157
|
-
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
158
160
|
end
|
159
161
|
end
|
160
|
-
|
161
|
-
self
|
162
|
+
new(transformed_hash)
|
162
163
|
end
|
163
164
|
|
164
165
|
# Deserializes the data based on type
|
165
166
|
# @param string type Data type
|
166
167
|
# @param string value Value to be deserialized
|
167
168
|
# @return [Object] Deserialized data
|
168
|
-
def _deserialize(type, value)
|
169
|
+
def self._deserialize(type, value)
|
169
170
|
case type.to_sym
|
170
171
|
when :Time
|
171
172
|
Time.parse(value)
|
@@ -200,7 +201,7 @@ module SwaggyJenkinsClient
|
|
200
201
|
else # model
|
201
202
|
# models (e.g. Pet) or oneOf
|
202
203
|
klass = SwaggyJenkinsClient.const_get(type)
|
203
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
205
|
end
|
205
206
|
end
|
206
207
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.1.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -66,9 +66,14 @@ module SwaggyJenkinsClient
|
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
69
|
+
# Returns attribute mapping this model knows about
|
70
|
+
def self.acceptable_attribute_map
|
71
|
+
attribute_map
|
72
|
+
end
|
73
|
+
|
69
74
|
# Returns all the JSON keys this model knows about
|
70
75
|
def self.acceptable_attributes
|
71
|
-
|
76
|
+
acceptable_attribute_map.values
|
72
77
|
end
|
73
78
|
|
74
79
|
# Attribute type mapping.
|
@@ -106,9 +111,10 @@ module SwaggyJenkinsClient
|
|
106
111
|
end
|
107
112
|
|
108
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
114
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
109
115
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
-
if (!
|
111
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRun`. Please check the name to make sure it's valid. List of attributes: " +
|
116
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
117
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
112
118
|
end
|
113
119
|
h[k.to_sym] = v
|
114
120
|
}
|
@@ -179,6 +185,7 @@ module SwaggyJenkinsClient
|
|
179
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
180
186
|
# @return Array for valid properties with the reasons
|
181
187
|
def list_invalid_properties
|
188
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
182
189
|
invalid_properties = Array.new
|
183
190
|
invalid_properties
|
184
191
|
end
|
@@ -186,6 +193,7 @@ module SwaggyJenkinsClient
|
|
186
193
|
# Check to see if the all the properties in the model are valid
|
187
194
|
# @return true if the model is valid
|
188
195
|
def valid?
|
196
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
189
197
|
true
|
190
198
|
end
|
191
199
|
|
@@ -227,37 +235,30 @@ module SwaggyJenkinsClient
|
|
227
235
|
# @param [Hash] attributes Model attributes in the form of hash
|
228
236
|
# @return [Object] Returns the model itself
|
229
237
|
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
238
|
return nil unless attributes.is_a?(Hash)
|
238
239
|
attributes = attributes.transform_keys(&:to_sym)
|
239
|
-
|
240
|
-
|
241
|
-
|
240
|
+
transformed_hash = {}
|
241
|
+
openapi_types.each_pair do |key, type|
|
242
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
243
|
+
transformed_hash["#{key}"] = nil
|
242
244
|
elsif type =~ /\AArray<(.*)>/i
|
243
245
|
# check to ensure the input is an array given that the attribute
|
244
246
|
# is documented as an array but the input is not
|
245
|
-
if attributes[
|
246
|
-
|
247
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
248
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
247
249
|
end
|
248
|
-
elsif !attributes[
|
249
|
-
|
250
|
+
elsif !attributes[attribute_map[key]].nil?
|
251
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
250
252
|
end
|
251
253
|
end
|
252
|
-
|
253
|
-
self
|
254
|
+
new(transformed_hash)
|
254
255
|
end
|
255
256
|
|
256
257
|
# Deserializes the data based on type
|
257
258
|
# @param string type Data type
|
258
259
|
# @param string value Value to be deserialized
|
259
260
|
# @return [Object] Deserialized data
|
260
|
-
def _deserialize(type, value)
|
261
|
+
def self._deserialize(type, value)
|
261
262
|
case type.to_sym
|
262
263
|
when :Time
|
263
264
|
Time.parse(value)
|
@@ -292,7 +293,7 @@ module SwaggyJenkinsClient
|
|
292
293
|
else # model
|
293
294
|
# models (e.g. Pet) or oneOf
|
294
295
|
klass = SwaggyJenkinsClient.const_get(type)
|
295
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
296
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
296
297
|
end
|
297
298
|
end
|
298
299
|
|
@@ -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
|
|
@@ -66,9 +66,14 @@ module SwaggyJenkinsClient
|
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
69
|
+
# Returns attribute mapping this model knows about
|
70
|
+
def self.acceptable_attribute_map
|
71
|
+
attribute_map
|
72
|
+
end
|
73
|
+
|
69
74
|
# Returns all the JSON keys this model knows about
|
70
75
|
def self.acceptable_attributes
|
71
|
-
|
76
|
+
acceptable_attribute_map.values
|
72
77
|
end
|
73
78
|
|
74
79
|
# Attribute type mapping.
|
@@ -106,9 +111,10 @@ module SwaggyJenkinsClient
|
|
106
111
|
end
|
107
112
|
|
108
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
114
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
109
115
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
-
if (!
|
111
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRunImpl`. Please check the name to make sure it's valid. List of attributes: " +
|
116
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
117
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRunImpl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
112
118
|
end
|
113
119
|
h[k.to_sym] = v
|
114
120
|
}
|
@@ -177,6 +183,7 @@ module SwaggyJenkinsClient
|
|
177
183
|
# Show invalid properties with the reasons. Usually used together with valid?
|
178
184
|
# @return Array for valid properties with the reasons
|
179
185
|
def list_invalid_properties
|
186
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
180
187
|
invalid_properties = Array.new
|
181
188
|
invalid_properties
|
182
189
|
end
|
@@ -184,6 +191,7 @@ module SwaggyJenkinsClient
|
|
184
191
|
# Check to see if the all the properties in the model are valid
|
185
192
|
# @return true if the model is valid
|
186
193
|
def valid?
|
194
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
187
195
|
true
|
188
196
|
end
|
189
197
|
|
@@ -225,37 +233,30 @@ module SwaggyJenkinsClient
|
|
225
233
|
# @param [Hash] attributes Model attributes in the form of hash
|
226
234
|
# @return [Object] Returns the model itself
|
227
235
|
def self.build_from_hash(attributes)
|
228
|
-
new.build_from_hash(attributes)
|
229
|
-
end
|
230
|
-
|
231
|
-
# Builds the object from hash
|
232
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
233
|
-
# @return [Object] Returns the model itself
|
234
|
-
def build_from_hash(attributes)
|
235
236
|
return nil unless attributes.is_a?(Hash)
|
236
237
|
attributes = attributes.transform_keys(&:to_sym)
|
237
|
-
|
238
|
-
|
239
|
-
|
238
|
+
transformed_hash = {}
|
239
|
+
openapi_types.each_pair do |key, type|
|
240
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = nil
|
240
242
|
elsif type =~ /\AArray<(.*)>/i
|
241
243
|
# check to ensure the input is an array given that the attribute
|
242
244
|
# is documented as an array but the input is not
|
243
|
-
if attributes[
|
244
|
-
|
245
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
246
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
245
247
|
end
|
246
|
-
elsif !attributes[
|
247
|
-
|
248
|
+
elsif !attributes[attribute_map[key]].nil?
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
248
250
|
end
|
249
251
|
end
|
250
|
-
|
251
|
-
self
|
252
|
+
new(transformed_hash)
|
252
253
|
end
|
253
254
|
|
254
255
|
# Deserializes the data based on type
|
255
256
|
# @param string type Data type
|
256
257
|
# @param string value Value to be deserialized
|
257
258
|
# @return [Object] Deserialized data
|
258
|
-
def _deserialize(type, value)
|
259
|
+
def self._deserialize(type, value)
|
259
260
|
case type.to_sym
|
260
261
|
when :Time
|
261
262
|
Time.parse(value)
|
@@ -290,7 +291,7 @@ module SwaggyJenkinsClient
|
|
290
291
|
else # model
|
291
292
|
# models (e.g. Pet) or oneOf
|
292
293
|
klass = SwaggyJenkinsClient.const_get(type)
|
293
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
295
|
end
|
295
296
|
end
|
296
297
|
|
@@ -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::PipelineRunImpllinks`. 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::PipelineRunImpllinks`. 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
|
|
@@ -45,9 +45,14 @@ module SwaggyJenkinsClient
|
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
|
+
# Returns attribute mapping this model knows about
|
49
|
+
def self.acceptable_attribute_map
|
50
|
+
attribute_map
|
51
|
+
end
|
52
|
+
|
48
53
|
# Returns all the JSON keys this model knows about
|
49
54
|
def self.acceptable_attributes
|
50
|
-
|
55
|
+
acceptable_attribute_map.values
|
51
56
|
end
|
52
57
|
|
53
58
|
# Attribute type mapping.
|
@@ -78,9 +83,10 @@ module SwaggyJenkinsClient
|
|
78
83
|
end
|
79
84
|
|
80
85
|
# check to see if the attribute exists and convert string to symbol for hash key
|
86
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
81
87
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
|
-
if (!
|
83
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRunNode`. Please check the name to make sure it's valid. List of attributes: " +
|
88
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineRunNode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
84
90
|
end
|
85
91
|
h[k.to_sym] = v
|
86
92
|
}
|
@@ -123,6 +129,7 @@ module SwaggyJenkinsClient
|
|
123
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
124
130
|
# @return Array for valid properties with the reasons
|
125
131
|
def list_invalid_properties
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
126
133
|
invalid_properties = Array.new
|
127
134
|
invalid_properties
|
128
135
|
end
|
@@ -130,6 +137,7 @@ module SwaggyJenkinsClient
|
|
130
137
|
# Check to see if the all the properties in the model are valid
|
131
138
|
# @return true if the model is valid
|
132
139
|
def valid?
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
141
|
true
|
134
142
|
end
|
135
143
|
|
@@ -164,37 +172,30 @@ module SwaggyJenkinsClient
|
|
164
172
|
# @param [Hash] attributes Model attributes in the form of hash
|
165
173
|
# @return [Object] Returns the model itself
|
166
174
|
def self.build_from_hash(attributes)
|
167
|
-
new.build_from_hash(attributes)
|
168
|
-
end
|
169
|
-
|
170
|
-
# Builds the object from hash
|
171
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
172
|
-
# @return [Object] Returns the model itself
|
173
|
-
def build_from_hash(attributes)
|
174
175
|
return nil unless attributes.is_a?(Hash)
|
175
176
|
attributes = attributes.transform_keys(&:to_sym)
|
176
|
-
|
177
|
-
|
178
|
-
|
177
|
+
transformed_hash = {}
|
178
|
+
openapi_types.each_pair do |key, type|
|
179
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
180
|
+
transformed_hash["#{key}"] = nil
|
179
181
|
elsif type =~ /\AArray<(.*)>/i
|
180
182
|
# check to ensure the input is an array given that the attribute
|
181
183
|
# is documented as an array but the input is not
|
182
|
-
if attributes[
|
183
|
-
|
184
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
185
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
184
186
|
end
|
185
|
-
elsif !attributes[
|
186
|
-
|
187
|
+
elsif !attributes[attribute_map[key]].nil?
|
188
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
187
189
|
end
|
188
190
|
end
|
189
|
-
|
190
|
-
self
|
191
|
+
new(transformed_hash)
|
191
192
|
end
|
192
193
|
|
193
194
|
# Deserializes the data based on type
|
194
195
|
# @param string type Data type
|
195
196
|
# @param string value Value to be deserialized
|
196
197
|
# @return [Object] Deserialized data
|
197
|
-
def _deserialize(type, value)
|
198
|
+
def self._deserialize(type, value)
|
198
199
|
case type.to_sym
|
199
200
|
when :Time
|
200
201
|
Time.parse(value)
|
@@ -229,7 +230,7 @@ module SwaggyJenkinsClient
|
|
229
230
|
else # model
|
230
231
|
# models (e.g. Pet) or oneOf
|
231
232
|
klass = SwaggyJenkinsClient.const_get(type)
|
232
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
233
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
233
234
|
end
|
234
235
|
end
|
235
236
|
|