swaggy_jenkins 2.0.1.pre.pre.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +28 -26
- data/README.md +8 -6
- data/bin/bundle +5 -10
- data/bin/byebug +1 -1
- data/bin/coderay +1 -1
- data/bin/htmldiff +1 -1
- data/bin/ldiff +1 -1
- data/bin/pry +1 -1
- data/bin/racc +27 -0
- data/bin/rake +1 -1
- data/bin/rspec +1 -1
- data/bin/rubocop +1 -1
- data/bin/ruby-parse +1 -1
- data/bin/ruby-rewrite +1 -1
- data/lib/swaggy_jenkins/api/base_api.rb +3 -3
- data/lib/swaggy_jenkins/api/blue_ocean_api.rb +3 -3
- data/lib/swaggy_jenkins/api/remote_access_api.rb +3 -3
- data/lib/swaggy_jenkins/api_client.rb +25 -23
- data/lib/swaggy_jenkins/api_error.rb +4 -3
- data/lib/swaggy_jenkins/configuration.rb +29 -10
- data/lib/swaggy_jenkins/models/all_view.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/branch_implpermissions.rb +16 -21
- data/lib/swaggy_jenkins/models/cause_action.rb +16 -21
- data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +16 -21
- data/lib/swaggy_jenkins/models/classes_by_class.rb +16 -21
- data/lib/swaggy_jenkins/models/clock_difference.rb +16 -21
- data/lib/swaggy_jenkins/models/computer_set.rb +16 -21
- data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +16 -21
- data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +16 -21
- data/lib/swaggy_jenkins/models/empty_change_log_set.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/favorite_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/favorite_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_build.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_project.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_projectactions.rb +16 -21
- data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +16 -21
- data/lib/swaggy_jenkins/models/generic_resource.rb +16 -21
- data/lib/swaggy_jenkins/models/github_content.rb +16 -21
- data/lib/swaggy_jenkins/models/github_file.rb +16 -21
- data/lib/swaggy_jenkins/models/github_organization.rb +16 -21
- data/lib/swaggy_jenkins/models/github_organizationlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositories.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repository.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorylinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +16 -21
- data/lib/swaggy_jenkins/models/github_respository_container.rb +16 -21
- data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/github_scm.rb +16 -21
- data/lib/swaggy_jenkins/models/github_scmlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computer.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +16 -21
- data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +16 -21
- data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +16 -21
- data/lib/swaggy_jenkins/models/input_step_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/input_step_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/label1.rb +16 -21
- data/lib/swaggy_jenkins/models/link.rb +16 -21
- data/lib/swaggy_jenkins/models/list_view.rb +16 -21
- data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +16 -21
- data/lib/swaggy_jenkins/models/null_scm.rb +16 -21
- data/lib/swaggy_jenkins/models/organisation.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_activity.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_node.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +16 -21
- data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +16 -21
- data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +16 -21
- data/lib/swaggy_jenkins/models/queue.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_blocked_item.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_item_impl.rb +16 -21
- data/lib/swaggy_jenkins/models/queue_left_item.rb +16 -21
- data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +16 -21
- data/lib/swaggy_jenkins/models/string_parameter_definition.rb +16 -21
- data/lib/swaggy_jenkins/models/string_parameter_value.rb +16 -21
- data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +16 -21
- data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +16 -21
- data/lib/swaggy_jenkins/models/user.rb +16 -21
- data/lib/swaggy_jenkins/version.rb +4 -4
- data/lib/swaggy_jenkins.rb +3 -3
- data/spec/api/base_api_spec.rb +4 -4
- data/spec/api/blue_ocean_api_spec.rb +40 -40
- data/spec/api/remote_access_api_spec.rb +23 -23
- data/spec/models/all_view_spec.rb +9 -7
- data/spec/models/branch_impl_spec.rb +19 -17
- data/spec/models/branch_impllinks_spec.rb +11 -9
- data/spec/models/branch_implpermissions_spec.rb +11 -9
- data/spec/models/cause_action_spec.rb +8 -6
- data/spec/models/cause_user_id_cause_spec.rb +10 -8
- data/spec/models/classes_by_class_spec.rb +8 -6
- data/spec/models/clock_difference_spec.rb +8 -6
- data/spec/models/computer_set_spec.rb +11 -9
- data/spec/models/default_crumb_issuer_spec.rb +9 -7
- data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +10 -8
- data/spec/models/empty_change_log_set_spec.rb +8 -6
- data/spec/models/extension_class_container_impl1_spec.rb +9 -7
- data/spec/models/extension_class_container_impl1links_spec.rb +8 -6
- data/spec/models/extension_class_container_impl1map_spec.rb +9 -7
- data/spec/models/extension_class_impl_spec.rb +9 -7
- data/spec/models/extension_class_impllinks_spec.rb +8 -6
- data/spec/models/favorite_impl_spec.rb +9 -7
- data/spec/models/favorite_impllinks_spec.rb +8 -6
- data/spec/models/free_style_build_spec.rb +24 -22
- data/spec/models/free_style_project_spec.rb +33 -31
- data/spec/models/free_style_projectactions_spec.rb +7 -5
- data/spec/models/free_style_projecthealth_report_spec.rb +11 -9
- data/spec/models/generic_resource_spec.rb +12 -10
- data/spec/models/github_content_spec.rb +14 -12
- data/spec/models/github_file_spec.rb +8 -6
- data/spec/models/github_organization_spec.rb +10 -8
- data/spec/models/github_organizationlinks_spec.rb +9 -7
- data/spec/models/github_repositories_spec.rb +12 -10
- data/spec/models/github_repositorieslinks_spec.rb +8 -6
- data/spec/models/github_repository_spec.rb +14 -12
- data/spec/models/github_repositorylinks_spec.rb +8 -6
- data/spec/models/github_repositorypermissions_spec.rb +10 -8
- data/spec/models/github_respository_container_spec.rb +9 -7
- data/spec/models/github_respository_containerlinks_spec.rb +8 -6
- data/spec/models/github_scm_spec.rb +11 -9
- data/spec/models/github_scmlinks_spec.rb +8 -6
- data/spec/models/hudson_master_computer_spec.rb +22 -20
- data/spec/models/hudson_master_computerexecutors_spec.rb +12 -10
- data/spec/models/hudson_master_computermonitor_data_spec.rb +13 -11
- data/spec/models/hudson_spec.rb +21 -19
- data/spec/models/hudsonassigned_labels_spec.rb +7 -5
- data/spec/models/input_step_impl_spec.rb +13 -11
- data/spec/models/input_step_impllinks_spec.rb +8 -6
- data/spec/models/label1_spec.rb +7 -5
- data/spec/models/link_spec.rb +8 -6
- data/spec/models/list_view_spec.rb +11 -9
- data/spec/models/multibranch_pipeline_spec.rb +20 -18
- data/spec/models/null_scm_spec.rb +7 -5
- data/spec/models/organisation_spec.rb +8 -6
- data/spec/models/pipeline_activity_spec.rb +21 -19
- data/spec/models/pipeline_activityartifacts_spec.rb +10 -8
- data/spec/models/pipeline_branchesitem_spec.rb +15 -13
- data/spec/models/pipeline_branchesitemlatest_run_spec.rb +20 -18
- data/spec/models/pipeline_branchesitempull_request_spec.rb +12 -10
- data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +8 -6
- data/spec/models/pipeline_folder_impl_spec.rb +13 -11
- data/spec/models/pipeline_impl_spec.rb +15 -13
- data/spec/models/pipeline_impllinks_spec.rb +11 -9
- data/spec/models/pipeline_run_impl_spec.rb +21 -19
- data/spec/models/pipeline_run_impllinks_spec.rb +12 -10
- data/spec/models/pipeline_run_node_spec.rb +14 -12
- data/spec/models/pipeline_run_nodeedges_spec.rb +8 -6
- data/spec/models/pipeline_run_spec.rb +21 -19
- data/spec/models/pipeline_runartifacts_spec.rb +10 -8
- data/spec/models/pipeline_spec.rb +14 -12
- data/spec/models/pipeline_step_impl_spec.rb +15 -13
- data/spec/models/pipeline_step_impllinks_spec.rb +9 -7
- data/spec/models/pipelinelatest_run_spec.rb +21 -19
- data/spec/models/pipelinelatest_runartifacts_spec.rb +10 -8
- data/spec/models/queue_blocked_item_spec.rb +18 -16
- data/spec/models/queue_item_impl_spec.rb +11 -9
- data/spec/models/queue_left_item_spec.rb +19 -17
- data/spec/models/queue_spec.rb +8 -6
- data/spec/models/response_time_monitor_data_spec.rb +9 -7
- data/spec/models/string_parameter_definition_spec.rb +11 -9
- data/spec/models/string_parameter_value_spec.rb +9 -7
- data/spec/models/swap_space_monitor_memory_usage2_spec.rb +11 -9
- data/spec/models/unlabeled_load_statistics_spec.rb +7 -5
- data/spec/models/user_spec.rb +11 -9
- data/spec/spec_helper.rb +3 -3
- data/swaggy_jenkins.gemspec +7 -6
- metadata +75 -78
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -115,6 +115,7 @@ module SwaggyJenkinsClient
|
|
115
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
116
116
|
# @return Array for valid properties with the reasons
|
117
117
|
def list_invalid_properties
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
119
|
invalid_properties = Array.new
|
119
120
|
invalid_properties
|
120
121
|
end
|
@@ -122,6 +123,7 @@ module SwaggyJenkinsClient
|
|
122
123
|
# Check to see if the all the properties in the model are valid
|
123
124
|
# @return true if the model is valid
|
124
125
|
def valid?
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
125
127
|
true
|
126
128
|
end
|
127
129
|
|
@@ -155,37 +157,30 @@ module SwaggyJenkinsClient
|
|
155
157
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
158
|
# @return [Object] Returns the model itself
|
157
159
|
def self.build_from_hash(attributes)
|
158
|
-
new.build_from_hash(attributes)
|
159
|
-
end
|
160
|
-
|
161
|
-
# Builds the object from hash
|
162
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
-
# @return [Object] Returns the model itself
|
164
|
-
def build_from_hash(attributes)
|
165
160
|
return nil unless attributes.is_a?(Hash)
|
166
161
|
attributes = attributes.transform_keys(&:to_sym)
|
167
|
-
|
168
|
-
|
169
|
-
|
162
|
+
transformed_hash = {}
|
163
|
+
openapi_types.each_pair do |key, type|
|
164
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
165
|
+
transformed_hash["#{key}"] = nil
|
170
166
|
elsif type =~ /\AArray<(.*)>/i
|
171
167
|
# check to ensure the input is an array given that the attribute
|
172
168
|
# is documented as an array but the input is not
|
173
|
-
if attributes[
|
174
|
-
|
169
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
170
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
175
171
|
end
|
176
|
-
elsif !attributes[
|
177
|
-
|
172
|
+
elsif !attributes[attribute_map[key]].nil?
|
173
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
178
174
|
end
|
179
175
|
end
|
180
|
-
|
181
|
-
self
|
176
|
+
new(transformed_hash)
|
182
177
|
end
|
183
178
|
|
184
179
|
# Deserializes the data based on type
|
185
180
|
# @param string type Data type
|
186
181
|
# @param string value Value to be deserialized
|
187
182
|
# @return [Object] Deserialized data
|
188
|
-
def _deserialize(type, value)
|
183
|
+
def self._deserialize(type, value)
|
189
184
|
case type.to_sym
|
190
185
|
when :Time
|
191
186
|
Time.parse(value)
|
@@ -220,7 +215,7 @@ module SwaggyJenkinsClient
|
|
220
215
|
else # model
|
221
216
|
# models (e.g. Pet) or oneOf
|
222
217
|
klass = SwaggyJenkinsClient.const_get(type)
|
223
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
219
|
end
|
225
220
|
end
|
226
221
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -73,6 +73,7 @@ module SwaggyJenkinsClient
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module SwaggyJenkinsClient
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,37 +110,30 @@ module SwaggyJenkinsClient
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
114
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
123
119
|
elsif type =~ /\AArray<(.*)>/i
|
124
120
|
# check to ensure the input is an array given that the attribute
|
125
121
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
124
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
127
|
end
|
132
128
|
end
|
133
|
-
|
134
|
-
self
|
129
|
+
new(transformed_hash)
|
135
130
|
end
|
136
131
|
|
137
132
|
# Deserializes the data based on type
|
138
133
|
# @param string type Data type
|
139
134
|
# @param string value Value to be deserialized
|
140
135
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
142
137
|
case type.to_sym
|
143
138
|
when :Time
|
144
139
|
Time.parse(value)
|
@@ -173,7 +168,7 @@ module SwaggyJenkinsClient
|
|
173
168
|
else # model
|
174
169
|
# models (e.g. Pet) or oneOf
|
175
170
|
klass = SwaggyJenkinsClient.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
172
|
end
|
178
173
|
end
|
179
174
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,7 @@ module SwaggyJenkinsClient
|
|
65
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
66
|
# @return Array for valid properties with the reasons
|
67
67
|
def list_invalid_properties
|
68
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
69
|
invalid_properties = Array.new
|
69
70
|
invalid_properties
|
70
71
|
end
|
@@ -72,6 +73,7 @@ module SwaggyJenkinsClient
|
|
72
73
|
# Check to see if the all the properties in the model are valid
|
73
74
|
# @return true if the model is valid
|
74
75
|
def valid?
|
76
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
77
|
true
|
76
78
|
end
|
77
79
|
|
@@ -99,37 +101,30 @@ module SwaggyJenkinsClient
|
|
99
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
102
|
# @return [Object] Returns the model itself
|
101
103
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
104
|
return nil unless attributes.is_a?(Hash)
|
110
105
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
transformed_hash = {}
|
107
|
+
openapi_types.each_pair do |key, type|
|
108
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
109
|
+
transformed_hash["#{key}"] = nil
|
114
110
|
elsif type =~ /\AArray<(.*)>/i
|
115
111
|
# check to ensure the input is an array given that the attribute
|
116
112
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
115
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
118
|
end
|
123
119
|
end
|
124
|
-
|
125
|
-
self
|
120
|
+
new(transformed_hash)
|
126
121
|
end
|
127
122
|
|
128
123
|
# Deserializes the data based on type
|
129
124
|
# @param string type Data type
|
130
125
|
# @param string value Value to be deserialized
|
131
126
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
133
128
|
case type.to_sym
|
134
129
|
when :Time
|
135
130
|
Time.parse(value)
|
@@ -164,7 +159,7 @@ module SwaggyJenkinsClient
|
|
164
159
|
else # model
|
165
160
|
# models (e.g. Pet) or oneOf
|
166
161
|
klass = SwaggyJenkinsClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
162
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
163
|
end
|
169
164
|
end
|
170
165
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -73,6 +73,7 @@ module SwaggyJenkinsClient
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module SwaggyJenkinsClient
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,37 +110,30 @@ module SwaggyJenkinsClient
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
114
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
123
119
|
elsif type =~ /\AArray<(.*)>/i
|
124
120
|
# check to ensure the input is an array given that the attribute
|
125
121
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
124
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
127
|
end
|
132
128
|
end
|
133
|
-
|
134
|
-
self
|
129
|
+
new(transformed_hash)
|
135
130
|
end
|
136
131
|
|
137
132
|
# Deserializes the data based on type
|
138
133
|
# @param string type Data type
|
139
134
|
# @param string value Value to be deserialized
|
140
135
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
142
137
|
case type.to_sym
|
143
138
|
when :Time
|
144
139
|
Time.parse(value)
|
@@ -173,7 +168,7 @@ module SwaggyJenkinsClient
|
|
173
168
|
else # model
|
174
169
|
# models (e.g. Pet) or oneOf
|
175
170
|
klass = SwaggyJenkinsClient.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
172
|
end
|
178
173
|
end
|
179
174
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -99,6 +99,7 @@ module SwaggyJenkinsClient
|
|
99
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
100
|
# @return Array for valid properties with the reasons
|
101
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
102
103
|
invalid_properties = Array.new
|
103
104
|
invalid_properties
|
104
105
|
end
|
@@ -106,6 +107,7 @@ module SwaggyJenkinsClient
|
|
106
107
|
# Check to see if the all the properties in the model are valid
|
107
108
|
# @return true if the model is valid
|
108
109
|
def valid?
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
111
|
true
|
110
112
|
end
|
111
113
|
|
@@ -137,37 +139,30 @@ module SwaggyJenkinsClient
|
|
137
139
|
# @param [Hash] attributes Model attributes in the form of hash
|
138
140
|
# @return [Object] Returns the model itself
|
139
141
|
def self.build_from_hash(attributes)
|
140
|
-
new.build_from_hash(attributes)
|
141
|
-
end
|
142
|
-
|
143
|
-
# Builds the object from hash
|
144
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
-
# @return [Object] Returns the model itself
|
146
|
-
def build_from_hash(attributes)
|
147
142
|
return nil unless attributes.is_a?(Hash)
|
148
143
|
attributes = attributes.transform_keys(&:to_sym)
|
149
|
-
|
150
|
-
|
151
|
-
|
144
|
+
transformed_hash = {}
|
145
|
+
openapi_types.each_pair do |key, type|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
147
|
+
transformed_hash["#{key}"] = nil
|
152
148
|
elsif type =~ /\AArray<(.*)>/i
|
153
149
|
# check to ensure the input is an array given that the attribute
|
154
150
|
# is documented as an array but the input is not
|
155
|
-
if attributes[
|
156
|
-
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
157
153
|
end
|
158
|
-
elsif !attributes[
|
159
|
-
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
160
156
|
end
|
161
157
|
end
|
162
|
-
|
163
|
-
self
|
158
|
+
new(transformed_hash)
|
164
159
|
end
|
165
160
|
|
166
161
|
# Deserializes the data based on type
|
167
162
|
# @param string type Data type
|
168
163
|
# @param string value Value to be deserialized
|
169
164
|
# @return [Object] Deserialized data
|
170
|
-
def _deserialize(type, value)
|
165
|
+
def self._deserialize(type, value)
|
171
166
|
case type.to_sym
|
172
167
|
when :Time
|
173
168
|
Time.parse(value)
|
@@ -202,7 +197,7 @@ module SwaggyJenkinsClient
|
|
202
197
|
else # model
|
203
198
|
# models (e.g. Pet) or oneOf
|
204
199
|
klass = SwaggyJenkinsClient.const_get(type)
|
205
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
200
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
206
201
|
end
|
207
202
|
end
|
208
203
|
|
@@ -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
|
|
@@ -171,6 +171,7 @@ module SwaggyJenkinsClient
|
|
171
171
|
# Show invalid properties with the reasons. Usually used together with valid?
|
172
172
|
# @return Array for valid properties with the reasons
|
173
173
|
def list_invalid_properties
|
174
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
174
175
|
invalid_properties = Array.new
|
175
176
|
invalid_properties
|
176
177
|
end
|
@@ -178,6 +179,7 @@ module SwaggyJenkinsClient
|
|
178
179
|
# Check to see if the all the properties in the model are valid
|
179
180
|
# @return true if the model is valid
|
180
181
|
def valid?
|
182
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
181
183
|
true
|
182
184
|
end
|
183
185
|
|
@@ -218,37 +220,30 @@ module SwaggyJenkinsClient
|
|
218
220
|
# @param [Hash] attributes Model attributes in the form of hash
|
219
221
|
# @return [Object] Returns the model itself
|
220
222
|
def self.build_from_hash(attributes)
|
221
|
-
new.build_from_hash(attributes)
|
222
|
-
end
|
223
|
-
|
224
|
-
# Builds the object from hash
|
225
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
-
# @return [Object] Returns the model itself
|
227
|
-
def build_from_hash(attributes)
|
228
223
|
return nil unless attributes.is_a?(Hash)
|
229
224
|
attributes = attributes.transform_keys(&:to_sym)
|
230
|
-
|
231
|
-
|
232
|
-
|
225
|
+
transformed_hash = {}
|
226
|
+
openapi_types.each_pair do |key, type|
|
227
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
228
|
+
transformed_hash["#{key}"] = nil
|
233
229
|
elsif type =~ /\AArray<(.*)>/i
|
234
230
|
# check to ensure the input is an array given that the attribute
|
235
231
|
# is documented as an array but the input is not
|
236
|
-
if attributes[
|
237
|
-
|
232
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
233
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
238
234
|
end
|
239
|
-
elsif !attributes[
|
240
|
-
|
235
|
+
elsif !attributes[attribute_map[key]].nil?
|
236
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
241
237
|
end
|
242
238
|
end
|
243
|
-
|
244
|
-
self
|
239
|
+
new(transformed_hash)
|
245
240
|
end
|
246
241
|
|
247
242
|
# Deserializes the data based on type
|
248
243
|
# @param string type Data type
|
249
244
|
# @param string value Value to be deserialized
|
250
245
|
# @return [Object] Deserialized data
|
251
|
-
def _deserialize(type, value)
|
246
|
+
def self._deserialize(type, value)
|
252
247
|
case type.to_sym
|
253
248
|
when :Time
|
254
249
|
Time.parse(value)
|
@@ -283,7 +278,7 @@ module SwaggyJenkinsClient
|
|
283
278
|
else # model
|
284
279
|
# models (e.g. Pet) or oneOf
|
285
280
|
klass = SwaggyJenkinsClient.const_get(type)
|
286
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
281
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
287
282
|
end
|
288
283
|
end
|
289
284
|
|
@@ -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
|
|
@@ -65,6 +65,7 @@ module SwaggyJenkinsClient
|
|
65
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
66
|
# @return Array for valid properties with the reasons
|
67
67
|
def list_invalid_properties
|
68
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
69
|
invalid_properties = Array.new
|
69
70
|
invalid_properties
|
70
71
|
end
|
@@ -72,6 +73,7 @@ module SwaggyJenkinsClient
|
|
72
73
|
# Check to see if the all the properties in the model are valid
|
73
74
|
# @return true if the model is valid
|
74
75
|
def valid?
|
76
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
77
|
true
|
76
78
|
end
|
77
79
|
|
@@ -99,37 +101,30 @@ module SwaggyJenkinsClient
|
|
99
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
102
|
# @return [Object] Returns the model itself
|
101
103
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
104
|
return nil unless attributes.is_a?(Hash)
|
110
105
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
transformed_hash = {}
|
107
|
+
openapi_types.each_pair do |key, type|
|
108
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
109
|
+
transformed_hash["#{key}"] = nil
|
114
110
|
elsif type =~ /\AArray<(.*)>/i
|
115
111
|
# check to ensure the input is an array given that the attribute
|
116
112
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
115
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
118
|
end
|
123
119
|
end
|
124
|
-
|
125
|
-
self
|
120
|
+
new(transformed_hash)
|
126
121
|
end
|
127
122
|
|
128
123
|
# Deserializes the data based on type
|
129
124
|
# @param string type Data type
|
130
125
|
# @param string value Value to be deserialized
|
131
126
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
133
128
|
case type.to_sym
|
134
129
|
when :Time
|
135
130
|
Time.parse(value)
|
@@ -164,7 +159,7 @@ module SwaggyJenkinsClient
|
|
164
159
|
else # model
|
165
160
|
# models (e.g. Pet) or oneOf
|
166
161
|
klass = SwaggyJenkinsClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
162
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
163
|
end
|
169
164
|
end
|
170
165
|
|