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
|
|
@@ -81,6 +81,7 @@ module SwaggyJenkinsClient
|
|
81
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
85
|
invalid_properties = Array.new
|
85
86
|
invalid_properties
|
86
87
|
end
|
@@ -88,6 +89,7 @@ module SwaggyJenkinsClient
|
|
88
89
|
# Check to see if the all the properties in the model are valid
|
89
90
|
# @return true if the model is valid
|
90
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
93
|
true
|
92
94
|
end
|
93
95
|
|
@@ -117,37 +119,30 @@ module SwaggyJenkinsClient
|
|
117
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
120
|
# @return [Object] Returns the model itself
|
119
121
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
122
|
return nil unless attributes.is_a?(Hash)
|
128
123
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
132
128
|
elsif type =~ /\AArray<(.*)>/i
|
133
129
|
# check to ensure the input is an array given that the attribute
|
134
130
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
133
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
136
|
end
|
141
137
|
end
|
142
|
-
|
143
|
-
self
|
138
|
+
new(transformed_hash)
|
144
139
|
end
|
145
140
|
|
146
141
|
# Deserializes the data based on type
|
147
142
|
# @param string type Data type
|
148
143
|
# @param string value Value to be deserialized
|
149
144
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
151
146
|
case type.to_sym
|
152
147
|
when :Time
|
153
148
|
Time.parse(value)
|
@@ -182,7 +177,7 @@ module SwaggyJenkinsClient
|
|
182
177
|
else # model
|
183
178
|
# models (e.g. Pet) or oneOf
|
184
179
|
klass = SwaggyJenkinsClient.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
181
|
end
|
187
182
|
end
|
188
183
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -83,6 +83,7 @@ module SwaggyJenkinsClient
|
|
83
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
84
|
# @return Array for valid properties with the reasons
|
85
85
|
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
87
|
invalid_properties = Array.new
|
87
88
|
invalid_properties
|
88
89
|
end
|
@@ -90,6 +91,7 @@ module SwaggyJenkinsClient
|
|
90
91
|
# Check to see if the all the properties in the model are valid
|
91
92
|
# @return true if the model is valid
|
92
93
|
def valid?
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
95
|
true
|
94
96
|
end
|
95
97
|
|
@@ -119,37 +121,30 @@ module SwaggyJenkinsClient
|
|
119
121
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
122
|
# @return [Object] Returns the model itself
|
121
123
|
def self.build_from_hash(attributes)
|
122
|
-
new.build_from_hash(attributes)
|
123
|
-
end
|
124
|
-
|
125
|
-
# Builds the object from hash
|
126
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
-
# @return [Object] Returns the model itself
|
128
|
-
def build_from_hash(attributes)
|
129
124
|
return nil unless attributes.is_a?(Hash)
|
130
125
|
attributes = attributes.transform_keys(&:to_sym)
|
131
|
-
|
132
|
-
|
133
|
-
|
126
|
+
transformed_hash = {}
|
127
|
+
openapi_types.each_pair do |key, type|
|
128
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = nil
|
134
130
|
elsif type =~ /\AArray<(.*)>/i
|
135
131
|
# check to ensure the input is an array given that the attribute
|
136
132
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
133
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
134
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
135
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
136
|
+
elsif !attributes[attribute_map[key]].nil?
|
137
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
138
|
end
|
143
139
|
end
|
144
|
-
|
145
|
-
self
|
140
|
+
new(transformed_hash)
|
146
141
|
end
|
147
142
|
|
148
143
|
# Deserializes the data based on type
|
149
144
|
# @param string type Data type
|
150
145
|
# @param string value Value to be deserialized
|
151
146
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
147
|
+
def self._deserialize(type, value)
|
153
148
|
case type.to_sym
|
154
149
|
when :Time
|
155
150
|
Time.parse(value)
|
@@ -184,7 +179,7 @@ module SwaggyJenkinsClient
|
|
184
179
|
else # model
|
185
180
|
# models (e.g. Pet) or oneOf
|
186
181
|
klass = SwaggyJenkinsClient.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
183
|
end
|
189
184
|
end
|
190
185
|
|
@@ -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
|
|
@@ -81,6 +81,7 @@ module SwaggyJenkinsClient
|
|
81
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
85
|
invalid_properties = Array.new
|
85
86
|
invalid_properties
|
86
87
|
end
|
@@ -88,6 +89,7 @@ module SwaggyJenkinsClient
|
|
88
89
|
# Check to see if the all the properties in the model are valid
|
89
90
|
# @return true if the model is valid
|
90
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
93
|
true
|
92
94
|
end
|
93
95
|
|
@@ -117,37 +119,30 @@ module SwaggyJenkinsClient
|
|
117
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
120
|
# @return [Object] Returns the model itself
|
119
121
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
122
|
return nil unless attributes.is_a?(Hash)
|
128
123
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
132
128
|
elsif type =~ /\AArray<(.*)>/i
|
133
129
|
# check to ensure the input is an array given that the attribute
|
134
130
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
133
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
136
|
end
|
141
137
|
end
|
142
|
-
|
143
|
-
self
|
138
|
+
new(transformed_hash)
|
144
139
|
end
|
145
140
|
|
146
141
|
# Deserializes the data based on type
|
147
142
|
# @param string type Data type
|
148
143
|
# @param string value Value to be deserialized
|
149
144
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
151
146
|
case type.to_sym
|
152
147
|
when :Time
|
153
148
|
Time.parse(value)
|
@@ -182,7 +177,7 @@ module SwaggyJenkinsClient
|
|
182
177
|
else # model
|
183
178
|
# models (e.g. Pet) or oneOf
|
184
179
|
klass = SwaggyJenkinsClient.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
181
|
end
|
187
182
|
end
|
188
183
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
7
|
-
Contact: blah@cliffano.com
|
6
|
+
The version of the OpenAPI document: 3.0.1
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -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
|
|
@@ -203,6 +203,7 @@ module SwaggyJenkinsClient
|
|
203
203
|
# Show invalid properties with the reasons. Usually used together with valid?
|
204
204
|
# @return Array for valid properties with the reasons
|
205
205
|
def list_invalid_properties
|
206
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
206
207
|
invalid_properties = Array.new
|
207
208
|
invalid_properties
|
208
209
|
end
|
@@ -210,6 +211,7 @@ module SwaggyJenkinsClient
|
|
210
211
|
# Check to see if the all the properties in the model are valid
|
211
212
|
# @return true if the model is valid
|
212
213
|
def valid?
|
214
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
213
215
|
true
|
214
216
|
end
|
215
217
|
|
@@ -254,37 +256,30 @@ module SwaggyJenkinsClient
|
|
254
256
|
# @param [Hash] attributes Model attributes in the form of hash
|
255
257
|
# @return [Object] Returns the model itself
|
256
258
|
def self.build_from_hash(attributes)
|
257
|
-
new.build_from_hash(attributes)
|
258
|
-
end
|
259
|
-
|
260
|
-
# Builds the object from hash
|
261
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
262
|
-
# @return [Object] Returns the model itself
|
263
|
-
def build_from_hash(attributes)
|
264
259
|
return nil unless attributes.is_a?(Hash)
|
265
260
|
attributes = attributes.transform_keys(&:to_sym)
|
266
|
-
|
267
|
-
|
268
|
-
|
261
|
+
transformed_hash = {}
|
262
|
+
openapi_types.each_pair do |key, type|
|
263
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
264
|
+
transformed_hash["#{key}"] = nil
|
269
265
|
elsif type =~ /\AArray<(.*)>/i
|
270
266
|
# check to ensure the input is an array given that the attribute
|
271
267
|
# is documented as an array but the input is not
|
272
|
-
if attributes[
|
273
|
-
|
268
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
269
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
274
270
|
end
|
275
|
-
elsif !attributes[
|
276
|
-
|
271
|
+
elsif !attributes[attribute_map[key]].nil?
|
272
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
277
273
|
end
|
278
274
|
end
|
279
|
-
|
280
|
-
self
|
275
|
+
new(transformed_hash)
|
281
276
|
end
|
282
277
|
|
283
278
|
# Deserializes the data based on type
|
284
279
|
# @param string type Data type
|
285
280
|
# @param string value Value to be deserialized
|
286
281
|
# @return [Object] Deserialized data
|
287
|
-
def _deserialize(type, value)
|
282
|
+
def self._deserialize(type, value)
|
288
283
|
case type.to_sym
|
289
284
|
when :Time
|
290
285
|
Time.parse(value)
|
@@ -319,7 +314,7 @@ module SwaggyJenkinsClient
|
|
319
314
|
else # model
|
320
315
|
# models (e.g. Pet) or oneOf
|
321
316
|
klass = SwaggyJenkinsClient.const_get(type)
|
322
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
317
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
318
|
end
|
324
319
|
end
|
325
320
|
|
@@ -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
|
|
@@ -279,6 +279,7 @@ module SwaggyJenkinsClient
|
|
279
279
|
# Show invalid properties with the reasons. Usually used together with valid?
|
280
280
|
# @return Array for valid properties with the reasons
|
281
281
|
def list_invalid_properties
|
282
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
282
283
|
invalid_properties = Array.new
|
283
284
|
invalid_properties
|
284
285
|
end
|
@@ -286,6 +287,7 @@ module SwaggyJenkinsClient
|
|
286
287
|
# Check to see if the all the properties in the model are valid
|
287
288
|
# @return true if the model is valid
|
288
289
|
def valid?
|
290
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
289
291
|
true
|
290
292
|
end
|
291
293
|
|
@@ -339,37 +341,30 @@ module SwaggyJenkinsClient
|
|
339
341
|
# @param [Hash] attributes Model attributes in the form of hash
|
340
342
|
# @return [Object] Returns the model itself
|
341
343
|
def self.build_from_hash(attributes)
|
342
|
-
new.build_from_hash(attributes)
|
343
|
-
end
|
344
|
-
|
345
|
-
# Builds the object from hash
|
346
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
347
|
-
# @return [Object] Returns the model itself
|
348
|
-
def build_from_hash(attributes)
|
349
344
|
return nil unless attributes.is_a?(Hash)
|
350
345
|
attributes = attributes.transform_keys(&:to_sym)
|
351
|
-
|
352
|
-
|
353
|
-
|
346
|
+
transformed_hash = {}
|
347
|
+
openapi_types.each_pair do |key, type|
|
348
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
349
|
+
transformed_hash["#{key}"] = nil
|
354
350
|
elsif type =~ /\AArray<(.*)>/i
|
355
351
|
# check to ensure the input is an array given that the attribute
|
356
352
|
# is documented as an array but the input is not
|
357
|
-
if attributes[
|
358
|
-
|
353
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
354
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
359
355
|
end
|
360
|
-
elsif !attributes[
|
361
|
-
|
356
|
+
elsif !attributes[attribute_map[key]].nil?
|
357
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
362
358
|
end
|
363
359
|
end
|
364
|
-
|
365
|
-
self
|
360
|
+
new(transformed_hash)
|
366
361
|
end
|
367
362
|
|
368
363
|
# Deserializes the data based on type
|
369
364
|
# @param string type Data type
|
370
365
|
# @param string value Value to be deserialized
|
371
366
|
# @return [Object] Deserialized data
|
372
|
-
def _deserialize(type, value)
|
367
|
+
def self._deserialize(type, value)
|
373
368
|
case type.to_sym
|
374
369
|
when :Time
|
375
370
|
Time.parse(value)
|
@@ -404,7 +399,7 @@ module SwaggyJenkinsClient
|
|
404
399
|
else # model
|
405
400
|
# models (e.g. Pet) or oneOf
|
406
401
|
klass = SwaggyJenkinsClient.const_get(type)
|
407
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
402
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
408
403
|
end
|
409
404
|
end
|
410
405
|
|