swaggy_jenkins 0.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +51 -50
  4. data/README.md +25 -33
  5. data/Rakefile +2 -0
  6. data/bin/bundle +114 -0
  7. data/bin/byebug +27 -0
  8. data/bin/coderay +27 -0
  9. data/bin/htmldiff +27 -0
  10. data/bin/ldiff +27 -0
  11. data/bin/pry +27 -0
  12. data/bin/rake +27 -0
  13. data/bin/rspec +27 -0
  14. data/bin/rubocop +27 -0
  15. data/bin/ruby-parse +27 -0
  16. data/bin/ruby-rewrite +27 -0
  17. data/docs/AllView.md +17 -5
  18. data/docs/BaseApi.md +75 -0
  19. data/docs/BlueOceanApi.md +1347 -631
  20. data/docs/BranchImpl.md +37 -15
  21. data/docs/BranchImpllinks.md +21 -7
  22. data/docs/BranchImplpermissions.md +21 -7
  23. data/docs/CauseAction.md +15 -4
  24. data/docs/CauseUserIdCause.md +19 -6
  25. data/docs/ClassesByClass.md +15 -4
  26. data/docs/ClockDifference.md +15 -4
  27. data/docs/ComputerSet.md +21 -7
  28. data/docs/DefaultCrumbIssuer.md +17 -5
  29. data/docs/DiskSpaceMonitorDescriptorDiskSpace.md +19 -6
  30. data/docs/EmptyChangeLogSet.md +15 -4
  31. data/docs/ExtensionClassContainerImpl1.md +17 -5
  32. data/docs/ExtensionClassContainerImpl1links.md +15 -4
  33. data/docs/ExtensionClassContainerImpl1map.md +17 -5
  34. data/docs/ExtensionClassImpl.md +17 -5
  35. data/docs/ExtensionClassImpllinks.md +15 -4
  36. data/docs/FavoriteImpl.md +17 -5
  37. data/docs/FavoriteImpllinks.md +15 -4
  38. data/docs/FreeStyleBuild.md +47 -20
  39. data/docs/FreeStyleProject.md +65 -29
  40. data/docs/FreeStyleProjectactions.md +13 -3
  41. data/docs/FreeStyleProjecthealthReport.md +21 -7
  42. data/docs/GenericResource.md +23 -8
  43. data/docs/GithubContent.md +27 -10
  44. data/docs/GithubFile.md +15 -4
  45. data/docs/GithubOrganization.md +19 -6
  46. data/docs/GithubOrganizationlinks.md +17 -5
  47. data/docs/GithubRepositories.md +23 -8
  48. data/docs/GithubRepositorieslinks.md +15 -4
  49. data/docs/GithubRepository.md +27 -10
  50. data/docs/GithubRepositorylinks.md +15 -4
  51. data/docs/GithubRepositorypermissions.md +19 -6
  52. data/docs/GithubRespositoryContainer.md +17 -5
  53. data/docs/GithubRespositoryContainerlinks.md +15 -4
  54. data/docs/GithubScm.md +21 -7
  55. data/docs/GithubScmlinks.md +15 -4
  56. data/docs/Hudson.md +41 -17
  57. data/docs/HudsonMasterComputer.md +43 -18
  58. data/docs/HudsonMasterComputerexecutors.md +23 -8
  59. data/docs/HudsonMasterComputermonitorData.md +25 -9
  60. data/docs/HudsonassignedLabels.md +13 -3
  61. data/docs/InputStepImpl.md +25 -9
  62. data/docs/InputStepImpllinks.md +15 -4
  63. data/docs/Label1.md +13 -3
  64. data/docs/Link.md +15 -4
  65. data/docs/ListView.md +21 -7
  66. data/docs/MultibranchPipeline.md +39 -16
  67. data/docs/NullSCM.md +13 -3
  68. data/docs/Organisation.md +15 -4
  69. data/docs/Pipeline.md +27 -10
  70. data/docs/PipelineActivity.md +41 -17
  71. data/docs/PipelineActivityartifacts.md +19 -6
  72. data/docs/PipelineBranchesitem.md +29 -11
  73. data/docs/PipelineBranchesitemlatestRun.md +39 -16
  74. data/docs/PipelineBranchesitempullRequest.md +23 -8
  75. data/docs/PipelineBranchesitempullRequestlinks.md +15 -4
  76. data/docs/PipelineFolderImpl.md +25 -9
  77. data/docs/PipelineImpl.md +29 -11
  78. data/docs/PipelineImpllinks.md +21 -7
  79. data/docs/PipelineRun.md +41 -17
  80. data/docs/PipelineRunImpl.md +41 -17
  81. data/docs/PipelineRunImpllinks.md +23 -8
  82. data/docs/PipelineRunNode.md +27 -10
  83. data/docs/PipelineRunNodeedges.md +15 -4
  84. data/docs/PipelineRunartifacts.md +19 -6
  85. data/docs/PipelineStepImpl.md +29 -11
  86. data/docs/PipelineStepImpllinks.md +17 -5
  87. data/docs/PipelinelatestRun.md +41 -17
  88. data/docs/PipelinelatestRunartifacts.md +19 -6
  89. data/docs/Queue.md +15 -4
  90. data/docs/QueueBlockedItem.md +35 -14
  91. data/docs/QueueItemImpl.md +21 -7
  92. data/docs/QueueLeftItem.md +37 -15
  93. data/docs/RemoteAccessApi.md +666 -350
  94. data/docs/ResponseTimeMonitorData.md +17 -5
  95. data/docs/StringParameterDefinition.md +21 -7
  96. data/docs/StringParameterValue.md +17 -5
  97. data/docs/SwapSpaceMonitorMemoryUsage2.md +21 -7
  98. data/docs/UnlabeledLoadStatistics.md +13 -3
  99. data/docs/User.md +21 -7
  100. data/git_push.sh +12 -10
  101. data/lib/swaggy_jenkins/api/base_api.rb +77 -0
  102. data/lib/swaggy_jenkins/api/blue_ocean_api.rb +1048 -643
  103. data/lib/swaggy_jenkins/api/remote_access_api.rb +506 -361
  104. data/lib/swaggy_jenkins/api_client.rb +98 -95
  105. data/lib/swaggy_jenkins/api_error.rb +22 -3
  106. data/lib/swaggy_jenkins/configuration.rb +93 -16
  107. data/lib/swaggy_jenkins/models/all_view.rb +60 -29
  108. data/lib/swaggy_jenkins/models/branch_impl.rb +77 -46
  109. data/lib/swaggy_jenkins/models/branch_impllinks.rb +63 -32
  110. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +66 -35
  111. data/lib/swaggy_jenkins/models/cause_action.rb +59 -28
  112. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +64 -33
  113. data/lib/swaggy_jenkins/models/classes_by_class.rb +59 -28
  114. data/lib/swaggy_jenkins/models/clock_difference.rb +59 -28
  115. data/lib/swaggy_jenkins/models/computer_set.rb +65 -34
  116. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +61 -30
  117. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +61 -30
  118. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +59 -28
  119. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +60 -29
  120. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +60 -29
  121. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +62 -31
  122. data/lib/swaggy_jenkins/models/extension_class_impl.rb +60 -29
  123. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +60 -29
  124. data/lib/swaggy_jenkins/models/favorite_impl.rb +60 -29
  125. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +60 -29
  126. data/lib/swaggy_jenkins/models/free_style_build.rb +84 -53
  127. data/lib/swaggy_jenkins/models/free_style_project.rb +106 -75
  128. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +58 -27
  129. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +64 -33
  130. data/lib/swaggy_jenkins/models/generic_resource.rb +66 -35
  131. data/lib/swaggy_jenkins/models/github_content.rb +66 -35
  132. data/lib/swaggy_jenkins/models/github_file.rb +59 -28
  133. data/lib/swaggy_jenkins/models/github_organization.rb +63 -32
  134. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +61 -30
  135. data/lib/swaggy_jenkins/models/github_repositories.rb +66 -35
  136. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +60 -29
  137. data/lib/swaggy_jenkins/models/github_repository.rb +68 -37
  138. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +60 -29
  139. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +64 -33
  140. data/lib/swaggy_jenkins/models/github_respository_container.rb +60 -29
  141. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +60 -29
  142. data/lib/swaggy_jenkins/models/github_scm.rb +63 -32
  143. data/lib/swaggy_jenkins/models/github_scmlinks.rb +60 -29
  144. data/lib/swaggy_jenkins/models/hudson.rb +85 -54
  145. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +90 -59
  146. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +67 -36
  147. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +70 -39
  148. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +58 -27
  149. data/lib/swaggy_jenkins/models/input_step_impl.rb +64 -33
  150. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +60 -29
  151. data/lib/swaggy_jenkins/models/label1.rb +58 -27
  152. data/lib/swaggy_jenkins/models/link.rb +59 -28
  153. data/lib/swaggy_jenkins/models/list_view.rb +62 -31
  154. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +82 -51
  155. data/lib/swaggy_jenkins/models/null_scm.rb +58 -27
  156. data/lib/swaggy_jenkins/models/organisation.rb +59 -28
  157. data/lib/swaggy_jenkins/models/pipeline.rb +70 -39
  158. data/lib/swaggy_jenkins/models/pipeline_activity.rb +79 -48
  159. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +61 -30
  160. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +72 -41
  161. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +78 -47
  162. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +63 -32
  163. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +60 -29
  164. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +68 -37
  165. data/lib/swaggy_jenkins/models/pipeline_impl.rb +71 -40
  166. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +63 -32
  167. data/lib/swaggy_jenkins/models/pipeline_run.rb +79 -48
  168. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +79 -48
  169. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +64 -33
  170. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +68 -37
  171. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +59 -28
  172. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +61 -30
  173. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +69 -38
  174. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +61 -30
  175. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +79 -48
  176. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +61 -30
  177. data/lib/swaggy_jenkins/models/queue.rb +59 -28
  178. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +74 -43
  179. data/lib/swaggy_jenkins/models/queue_item_impl.rb +64 -33
  180. data/lib/swaggy_jenkins/models/queue_left_item.rb +75 -44
  181. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +60 -29
  182. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +63 -32
  183. data/lib/swaggy_jenkins/models/string_parameter_value.rb +60 -29
  184. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +66 -35
  185. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +58 -27
  186. data/lib/swaggy_jenkins/models/user.rb +63 -32
  187. data/lib/swaggy_jenkins/version.rb +4 -4
  188. data/lib/swaggy_jenkins.rb +4 -16
  189. data/spec/api/base_api_spec.rb +45 -0
  190. data/spec/api/blue_ocean_api_spec.rb +76 -88
  191. data/spec/api/remote_access_api_spec.rb +28 -59
  192. data/spec/api_client_spec.rb +40 -40
  193. data/spec/configuration_spec.rb +11 -11
  194. data/spec/models/all_view_spec.rb +10 -18
  195. data/spec/models/branch_impl_spec.rb +20 -28
  196. data/spec/models/branch_impllinks_spec.rb +12 -20
  197. data/spec/models/branch_implpermissions_spec.rb +12 -20
  198. data/spec/models/cause_action_spec.rb +9 -17
  199. data/spec/models/cause_user_id_cause_spec.rb +11 -19
  200. data/spec/models/classes_by_class_spec.rb +9 -17
  201. data/spec/models/clock_difference_spec.rb +9 -17
  202. data/spec/models/computer_set_spec.rb +12 -20
  203. data/spec/models/default_crumb_issuer_spec.rb +10 -18
  204. data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +11 -19
  205. data/spec/models/empty_change_log_set_spec.rb +9 -17
  206. data/spec/models/extension_class_container_impl1_spec.rb +10 -18
  207. data/spec/models/extension_class_container_impl1links_spec.rb +9 -17
  208. data/spec/models/extension_class_container_impl1map_spec.rb +10 -18
  209. data/spec/models/extension_class_impl_spec.rb +10 -18
  210. data/spec/models/extension_class_impllinks_spec.rb +9 -17
  211. data/spec/models/favorite_impl_spec.rb +10 -18
  212. data/spec/models/favorite_impllinks_spec.rb +9 -17
  213. data/spec/models/free_style_build_spec.rb +25 -33
  214. data/spec/models/free_style_project_spec.rb +34 -42
  215. data/spec/models/free_style_projectactions_spec.rb +8 -16
  216. data/spec/models/free_style_projecthealth_report_spec.rb +12 -20
  217. data/spec/models/generic_resource_spec.rb +13 -21
  218. data/spec/models/github_content_spec.rb +15 -23
  219. data/spec/models/github_file_spec.rb +9 -17
  220. data/spec/models/github_organization_spec.rb +11 -19
  221. data/spec/models/github_organizationlinks_spec.rb +10 -18
  222. data/spec/models/github_repositories_spec.rb +13 -21
  223. data/spec/models/github_repositorieslinks_spec.rb +9 -17
  224. data/spec/models/github_repository_spec.rb +15 -23
  225. data/spec/models/github_repositorylinks_spec.rb +9 -17
  226. data/spec/models/github_repositorypermissions_spec.rb +11 -19
  227. data/spec/models/github_respository_container_spec.rb +10 -18
  228. data/spec/models/github_respository_containerlinks_spec.rb +9 -17
  229. data/spec/models/github_scm_spec.rb +12 -20
  230. data/spec/models/github_scmlinks_spec.rb +9 -17
  231. data/spec/models/hudson_master_computer_spec.rb +23 -31
  232. data/spec/models/hudson_master_computerexecutors_spec.rb +13 -21
  233. data/spec/models/hudson_master_computermonitor_data_spec.rb +14 -22
  234. data/spec/models/hudson_spec.rb +22 -30
  235. data/spec/models/hudsonassigned_labels_spec.rb +8 -16
  236. data/spec/models/input_step_impl_spec.rb +14 -22
  237. data/spec/models/input_step_impllinks_spec.rb +9 -17
  238. data/spec/models/label1_spec.rb +8 -16
  239. data/spec/models/link_spec.rb +9 -17
  240. data/spec/models/list_view_spec.rb +12 -20
  241. data/spec/models/multibranch_pipeline_spec.rb +21 -29
  242. data/spec/models/null_scm_spec.rb +8 -16
  243. data/spec/models/organisation_spec.rb +9 -17
  244. data/spec/models/pipeline_activity_spec.rb +22 -30
  245. data/spec/models/pipeline_activityartifacts_spec.rb +11 -19
  246. data/spec/models/pipeline_branchesitem_spec.rb +16 -24
  247. data/spec/models/pipeline_branchesitemlatest_run_spec.rb +21 -29
  248. data/spec/models/pipeline_branchesitempull_request_spec.rb +13 -21
  249. data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +9 -17
  250. data/spec/models/pipeline_folder_impl_spec.rb +14 -22
  251. data/spec/models/pipeline_impl_spec.rb +16 -24
  252. data/spec/models/pipeline_impllinks_spec.rb +12 -20
  253. data/spec/models/pipeline_run_impl_spec.rb +22 -30
  254. data/spec/models/pipeline_run_impllinks_spec.rb +13 -21
  255. data/spec/models/pipeline_run_node_spec.rb +15 -23
  256. data/spec/models/pipeline_run_nodeedges_spec.rb +9 -17
  257. data/spec/models/pipeline_run_spec.rb +22 -30
  258. data/spec/models/pipeline_runartifacts_spec.rb +11 -19
  259. data/spec/models/pipeline_spec.rb +15 -23
  260. data/spec/models/pipeline_step_impl_spec.rb +16 -24
  261. data/spec/models/pipeline_step_impllinks_spec.rb +10 -18
  262. data/spec/models/pipelinelatest_run_spec.rb +22 -30
  263. data/spec/models/pipelinelatest_runartifacts_spec.rb +11 -19
  264. data/spec/models/queue_blocked_item_spec.rb +19 -27
  265. data/spec/models/queue_item_impl_spec.rb +12 -20
  266. data/spec/models/queue_left_item_spec.rb +20 -28
  267. data/spec/models/queue_spec.rb +9 -17
  268. data/spec/models/response_time_monitor_data_spec.rb +10 -18
  269. data/spec/models/string_parameter_definition_spec.rb +12 -20
  270. data/spec/models/string_parameter_value_spec.rb +10 -18
  271. data/spec/models/swap_space_monitor_memory_usage2_spec.rb +12 -20
  272. data/spec/models/unlabeled_load_statistics_spec.rb +8 -16
  273. data/spec/models/user_spec.rb +12 -20
  274. data/spec/spec_helper.rb +3 -3
  275. data/swaggy_jenkins.gemspec +6 -13
  276. metadata +96 -274
  277. data/docs/Body.md +0 -8
  278. data/docs/Organisations.md +0 -7
  279. data/docs/PipelineActivities.md +0 -7
  280. data/docs/PipelineBranches.md +0 -7
  281. data/docs/PipelineQueue.md +0 -7
  282. data/docs/PipelineRunNodeSteps.md +0 -7
  283. data/docs/PipelineRunNodes.md +0 -7
  284. data/docs/PipelineRunSteps.md +0 -7
  285. data/docs/PipelineRuns.md +0 -7
  286. data/docs/Pipelines.md +0 -7
  287. data/docs/ScmOrganisations.md +0 -7
  288. data/docs/UserFavorites.md +0 -7
  289. data/docs/Users.md +0 -7
  290. data/lib/swaggy_jenkins/models/body.rb +0 -193
  291. data/lib/swaggy_jenkins/models/organisations.rb +0 -179
  292. data/lib/swaggy_jenkins/models/pipeline_activities.rb +0 -179
  293. data/lib/swaggy_jenkins/models/pipeline_branches.rb +0 -179
  294. data/lib/swaggy_jenkins/models/pipeline_queue.rb +0 -179
  295. data/lib/swaggy_jenkins/models/pipeline_run_node_steps.rb +0 -179
  296. data/lib/swaggy_jenkins/models/pipeline_run_nodes.rb +0 -179
  297. data/lib/swaggy_jenkins/models/pipeline_run_steps.rb +0 -179
  298. data/lib/swaggy_jenkins/models/pipeline_runs.rb +0 -179
  299. data/lib/swaggy_jenkins/models/pipelines.rb +0 -179
  300. data/lib/swaggy_jenkins/models/scm_organisations.rb +0 -179
  301. data/lib/swaggy_jenkins/models/user_favorites.rb +0 -179
  302. data/lib/swaggy_jenkins/models/users.rb +0 -179
  303. data/spec/models/body_spec.rb +0 -42
  304. data/spec/models/organisations_spec.rb +0 -36
  305. data/spec/models/pipeline_activities_spec.rb +0 -36
  306. data/spec/models/pipeline_branches_spec.rb +0 -36
  307. data/spec/models/pipeline_queue_spec.rb +0 -36
  308. data/spec/models/pipeline_run_node_steps_spec.rb +0 -36
  309. data/spec/models/pipeline_run_nodes_spec.rb +0 -36
  310. data/spec/models/pipeline_run_steps_spec.rb +0 -36
  311. data/spec/models/pipeline_runs_spec.rb +0 -36
  312. data/spec/models/pipelines_spec.rb +0 -36
  313. data/spec/models/scm_organisations_spec.rb +0 -36
  314. data/spec/models/user_favorites_spec.rb +0 -36
  315. data/spec/models/users_spec.rb +0 -36
@@ -3,17 +3,17 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class QueueLeftItem
18
18
  attr_accessor :_class
19
19
 
@@ -41,7 +41,6 @@ module SwaggyJenkinsClient
41
41
 
42
42
  attr_accessor :executable
43
43
 
44
-
45
44
  # Attribute mapping from ruby-style variable name to JSON key.
46
45
  def self.attribute_map
47
46
  {
@@ -61,100 +60,117 @@ module SwaggyJenkinsClient
61
60
  }
62
61
  end
63
62
 
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ attribute_map.values
66
+ end
67
+
64
68
  # Attribute type mapping.
65
- def self.swagger_types
69
+ def self.openapi_types
66
70
  {
67
71
  :'_class' => :'String',
68
72
  :'actions' => :'Array<CauseAction>',
69
- :'blocked' => :'BOOLEAN',
70
- :'buildable' => :'BOOLEAN',
73
+ :'blocked' => :'Boolean',
74
+ :'buildable' => :'Boolean',
71
75
  :'id' => :'Integer',
72
76
  :'in_queue_since' => :'Integer',
73
77
  :'params' => :'String',
74
- :'stuck' => :'BOOLEAN',
78
+ :'stuck' => :'Boolean',
75
79
  :'task' => :'FreeStyleProject',
76
80
  :'url' => :'String',
77
81
  :'why' => :'String',
78
- :'cancelled' => :'BOOLEAN',
82
+ :'cancelled' => :'Boolean',
79
83
  :'executable' => :'FreeStyleBuild'
80
84
  }
81
85
  end
82
86
 
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
83
93
  # Initializes the object
84
94
  # @param [Hash] attributes Model attributes in the form of hash
85
95
  def initialize(attributes = {})
86
- return unless attributes.is_a?(Hash)
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::QueueLeftItem` initialize method"
98
+ end
87
99
 
88
- # convert string to symbol for hash key
89
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!self.class.attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::QueueLeftItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
90
107
 
91
- if attributes.has_key?(:'_class')
108
+ if attributes.key?(:'_class')
92
109
  self._class = attributes[:'_class']
93
110
  end
94
111
 
95
- if attributes.has_key?(:'actions')
112
+ if attributes.key?(:'actions')
96
113
  if (value = attributes[:'actions']).is_a?(Array)
97
114
  self.actions = value
98
115
  end
99
116
  end
100
117
 
101
- if attributes.has_key?(:'blocked')
118
+ if attributes.key?(:'blocked')
102
119
  self.blocked = attributes[:'blocked']
103
120
  end
104
121
 
105
- if attributes.has_key?(:'buildable')
122
+ if attributes.key?(:'buildable')
106
123
  self.buildable = attributes[:'buildable']
107
124
  end
108
125
 
109
- if attributes.has_key?(:'id')
126
+ if attributes.key?(:'id')
110
127
  self.id = attributes[:'id']
111
128
  end
112
129
 
113
- if attributes.has_key?(:'inQueueSince')
114
- self.in_queue_since = attributes[:'inQueueSince']
130
+ if attributes.key?(:'in_queue_since')
131
+ self.in_queue_since = attributes[:'in_queue_since']
115
132
  end
116
133
 
117
- if attributes.has_key?(:'params')
134
+ if attributes.key?(:'params')
118
135
  self.params = attributes[:'params']
119
136
  end
120
137
 
121
- if attributes.has_key?(:'stuck')
138
+ if attributes.key?(:'stuck')
122
139
  self.stuck = attributes[:'stuck']
123
140
  end
124
141
 
125
- if attributes.has_key?(:'task')
142
+ if attributes.key?(:'task')
126
143
  self.task = attributes[:'task']
127
144
  end
128
145
 
129
- if attributes.has_key?(:'url')
146
+ if attributes.key?(:'url')
130
147
  self.url = attributes[:'url']
131
148
  end
132
149
 
133
- if attributes.has_key?(:'why')
150
+ if attributes.key?(:'why')
134
151
  self.why = attributes[:'why']
135
152
  end
136
153
 
137
- if attributes.has_key?(:'cancelled')
154
+ if attributes.key?(:'cancelled')
138
155
  self.cancelled = attributes[:'cancelled']
139
156
  end
140
157
 
141
- if attributes.has_key?(:'executable')
158
+ if attributes.key?(:'executable')
142
159
  self.executable = attributes[:'executable']
143
160
  end
144
-
145
161
  end
146
162
 
147
163
  # Show invalid properties with the reasons. Usually used together with valid?
148
- # @return Array for valid properies with the reasons
164
+ # @return Array for valid properties with the reasons
149
165
  def list_invalid_properties
150
166
  invalid_properties = Array.new
151
- return invalid_properties
167
+ invalid_properties
152
168
  end
153
169
 
154
170
  # Check to see if the all the properties in the model are valid
155
171
  # @return true if the model is valid
156
172
  def valid?
157
- return true
173
+ true
158
174
  end
159
175
 
160
176
  # Checks equality by comparing each attribute.
@@ -184,26 +200,36 @@ module SwaggyJenkinsClient
184
200
  end
185
201
 
186
202
  # Calculates hash code according to all attributes.
187
- # @return [Fixnum] Hash code
203
+ # @return [Integer] Hash code
188
204
  def hash
189
205
  [_class, actions, blocked, buildable, id, in_queue_since, params, stuck, task, url, why, cancelled, executable].hash
190
206
  end
191
207
 
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ new.build_from_hash(attributes)
213
+ end
214
+
192
215
  # Builds the object from hash
193
216
  # @param [Hash] attributes Model attributes in the form of hash
194
217
  # @return [Object] Returns the model itself
195
218
  def build_from_hash(attributes)
196
219
  return nil unless attributes.is_a?(Hash)
197
- self.class.swagger_types.each_pair do |key, type|
198
- if type =~ /\AArray<(.*)>/i
199
- # check to ensure the input is an array given that the the attribute
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ self.class.openapi_types.each_pair do |key, type|
222
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
223
+ self.send("#{key}=", nil)
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
200
226
  # is documented as an array but the input is not
201
227
  if attributes[self.class.attribute_map[key]].is_a?(Array)
202
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
228
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
229
  end
204
230
  elsif !attributes[self.class.attribute_map[key]].nil?
205
231
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
206
- end # or else data not found in attributes(hash), not an issue as the data can be optional
232
+ end
207
233
  end
208
234
 
209
235
  self
@@ -215,8 +241,8 @@ module SwaggyJenkinsClient
215
241
  # @return [Object] Deserialized data
216
242
  def _deserialize(type, value)
217
243
  case type.to_sym
218
- when :DateTime
219
- DateTime.parse(value)
244
+ when :Time
245
+ Time.parse(value)
220
246
  when :Date
221
247
  Date.parse(value)
222
248
  when :String
@@ -225,7 +251,7 @@ module SwaggyJenkinsClient
225
251
  value.to_i
226
252
  when :Float
227
253
  value.to_f
228
- when :BOOLEAN
254
+ when :Boolean
229
255
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
230
256
  true
231
257
  else
@@ -246,8 +272,9 @@ module SwaggyJenkinsClient
246
272
  end
247
273
  end
248
274
  else # model
249
- temp_model = SwaggyJenkinsClient.const_get(type).new
250
- temp_model.build_from_hash(value)
275
+ # models (e.g. Pet) or oneOf
276
+ klass = SwaggyJenkinsClient.const_get(type)
277
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
251
278
  end
252
279
  end
253
280
 
@@ -269,7 +296,11 @@ module SwaggyJenkinsClient
269
296
  hash = {}
270
297
  self.class.attribute_map.each_pair do |attr, param|
271
298
  value = self.send(attr)
272
- next if value.nil?
299
+ if value.nil?
300
+ is_nullable = self.class.openapi_nullable.include?(attr)
301
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
302
+ end
303
+
273
304
  hash[param] = _to_hash(value)
274
305
  end
275
306
  hash
@@ -281,7 +312,7 @@ module SwaggyJenkinsClient
281
312
  # @return [Hash] Returns the value in the form of hash
282
313
  def _to_hash(value)
283
314
  if value.is_a?(Array)
284
- value.compact.map{ |v| _to_hash(v) }
315
+ value.compact.map { |v| _to_hash(v) }
285
316
  elsif value.is_a?(Hash)
286
317
  {}.tap do |hash|
287
318
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -3,17 +3,17 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class ResponseTimeMonitorData
18
18
  attr_accessor :_class
19
19
 
@@ -21,7 +21,6 @@ module SwaggyJenkinsClient
21
21
 
22
22
  attr_accessor :average
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -31,8 +30,13 @@ module SwaggyJenkinsClient
31
30
  }
32
31
  end
33
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
34
38
  # Attribute type mapping.
35
- def self.swagger_types
39
+ def self.openapi_types
36
40
  {
37
41
  :'_class' => :'String',
38
42
  :'timestamp' => :'Integer',
@@ -40,39 +44,51 @@ module SwaggyJenkinsClient
40
44
  }
41
45
  end
42
46
 
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
43
53
  # Initializes the object
44
54
  # @param [Hash] attributes Model attributes in the form of hash
45
55
  def initialize(attributes = {})
46
- return unless attributes.is_a?(Hash)
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::ResponseTimeMonitorData` initialize method"
58
+ end
47
59
 
48
- # convert string to symbol for hash key
49
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ResponseTimeMonitorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
50
67
 
51
- if attributes.has_key?(:'_class')
68
+ if attributes.key?(:'_class')
52
69
  self._class = attributes[:'_class']
53
70
  end
54
71
 
55
- if attributes.has_key?(:'timestamp')
72
+ if attributes.key?(:'timestamp')
56
73
  self.timestamp = attributes[:'timestamp']
57
74
  end
58
75
 
59
- if attributes.has_key?(:'average')
76
+ if attributes.key?(:'average')
60
77
  self.average = attributes[:'average']
61
78
  end
62
-
63
79
  end
64
80
 
65
81
  # Show invalid properties with the reasons. Usually used together with valid?
66
- # @return Array for valid properies with the reasons
82
+ # @return Array for valid properties with the reasons
67
83
  def list_invalid_properties
68
84
  invalid_properties = Array.new
69
- return invalid_properties
85
+ invalid_properties
70
86
  end
71
87
 
72
88
  # Check to see if the all the properties in the model are valid
73
89
  # @return true if the model is valid
74
90
  def valid?
75
- return true
91
+ true
76
92
  end
77
93
 
78
94
  # Checks equality by comparing each attribute.
@@ -92,26 +108,36 @@ module SwaggyJenkinsClient
92
108
  end
93
109
 
94
110
  # Calculates hash code according to all attributes.
95
- # @return [Fixnum] Hash code
111
+ # @return [Integer] Hash code
96
112
  def hash
97
113
  [_class, timestamp, average].hash
98
114
  end
99
115
 
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
100
123
  # Builds the object from hash
101
124
  # @param [Hash] attributes Model attributes in the form of hash
102
125
  # @return [Object] Returns the model itself
103
126
  def build_from_hash(attributes)
104
127
  return nil unless attributes.is_a?(Hash)
105
- self.class.swagger_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
107
- # check to ensure the input is an array given that the the attribute
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
108
134
  # is documented as an array but the input is not
109
135
  if attributes[self.class.attribute_map[key]].is_a?(Array)
110
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
137
  end
112
138
  elsif !attributes[self.class.attribute_map[key]].nil?
113
139
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- end # or else data not found in attributes(hash), not an issue as the data can be optional
140
+ end
115
141
  end
116
142
 
117
143
  self
@@ -123,8 +149,8 @@ module SwaggyJenkinsClient
123
149
  # @return [Object] Deserialized data
124
150
  def _deserialize(type, value)
125
151
  case type.to_sym
126
- when :DateTime
127
- DateTime.parse(value)
152
+ when :Time
153
+ Time.parse(value)
128
154
  when :Date
129
155
  Date.parse(value)
130
156
  when :String
@@ -133,7 +159,7 @@ module SwaggyJenkinsClient
133
159
  value.to_i
134
160
  when :Float
135
161
  value.to_f
136
- when :BOOLEAN
162
+ when :Boolean
137
163
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
164
  true
139
165
  else
@@ -154,8 +180,9 @@ module SwaggyJenkinsClient
154
180
  end
155
181
  end
156
182
  else # model
157
- temp_model = SwaggyJenkinsClient.const_get(type).new
158
- temp_model.build_from_hash(value)
183
+ # models (e.g. Pet) or oneOf
184
+ klass = SwaggyJenkinsClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
159
186
  end
160
187
  end
161
188
 
@@ -177,7 +204,11 @@ module SwaggyJenkinsClient
177
204
  hash = {}
178
205
  self.class.attribute_map.each_pair do |attr, param|
179
206
  value = self.send(attr)
180
- next if value.nil?
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
181
212
  hash[param] = _to_hash(value)
182
213
  end
183
214
  hash
@@ -189,7 +220,7 @@ module SwaggyJenkinsClient
189
220
  # @return [Hash] Returns the value in the form of hash
190
221
  def _to_hash(value)
191
222
  if value.is_a?(Array)
192
- value.compact.map{ |v| _to_hash(v) }
223
+ value.compact.map { |v| _to_hash(v) }
193
224
  elsif value.is_a?(Hash)
194
225
  {}.tap do |hash|
195
226
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -3,17 +3,17 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class StringParameterDefinition
18
18
  attr_accessor :_class
19
19
 
@@ -25,7 +25,6 @@ module SwaggyJenkinsClient
25
25
 
26
26
  attr_accessor :type
27
27
 
28
-
29
28
  # Attribute mapping from ruby-style variable name to JSON key.
30
29
  def self.attribute_map
31
30
  {
@@ -37,8 +36,13 @@ module SwaggyJenkinsClient
37
36
  }
38
37
  end
39
38
 
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
40
44
  # Attribute type mapping.
41
- def self.swagger_types
45
+ def self.openapi_types
42
46
  {
43
47
  :'_class' => :'String',
44
48
  :'default_parameter_value' => :'StringParameterValue',
@@ -48,47 +52,59 @@ module SwaggyJenkinsClient
48
52
  }
49
53
  end
50
54
 
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
51
61
  # Initializes the object
52
62
  # @param [Hash] attributes Model attributes in the form of hash
53
63
  def initialize(attributes = {})
54
- return unless attributes.is_a?(Hash)
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::StringParameterDefinition` initialize method"
66
+ end
55
67
 
56
- # convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::StringParameterDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
58
75
 
59
- if attributes.has_key?(:'_class')
76
+ if attributes.key?(:'_class')
60
77
  self._class = attributes[:'_class']
61
78
  end
62
79
 
63
- if attributes.has_key?(:'defaultParameterValue')
64
- self.default_parameter_value = attributes[:'defaultParameterValue']
80
+ if attributes.key?(:'default_parameter_value')
81
+ self.default_parameter_value = attributes[:'default_parameter_value']
65
82
  end
66
83
 
67
- if attributes.has_key?(:'description')
84
+ if attributes.key?(:'description')
68
85
  self.description = attributes[:'description']
69
86
  end
70
87
 
71
- if attributes.has_key?(:'name')
88
+ if attributes.key?(:'name')
72
89
  self.name = attributes[:'name']
73
90
  end
74
91
 
75
- if attributes.has_key?(:'type')
92
+ if attributes.key?(:'type')
76
93
  self.type = attributes[:'type']
77
94
  end
78
-
79
95
  end
80
96
 
81
97
  # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properies with the reasons
98
+ # @return Array for valid properties with the reasons
83
99
  def list_invalid_properties
84
100
  invalid_properties = Array.new
85
- return invalid_properties
101
+ invalid_properties
86
102
  end
87
103
 
88
104
  # Check to see if the all the properties in the model are valid
89
105
  # @return true if the model is valid
90
106
  def valid?
91
- return true
107
+ true
92
108
  end
93
109
 
94
110
  # Checks equality by comparing each attribute.
@@ -110,26 +126,36 @@ module SwaggyJenkinsClient
110
126
  end
111
127
 
112
128
  # Calculates hash code according to all attributes.
113
- # @return [Fixnum] Hash code
129
+ # @return [Integer] Hash code
114
130
  def hash
115
131
  [_class, default_parameter_value, description, name, type].hash
116
132
  end
117
133
 
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ new.build_from_hash(attributes)
139
+ end
140
+
118
141
  # Builds the object from hash
119
142
  # @param [Hash] attributes Model attributes in the form of hash
120
143
  # @return [Object] Returns the model itself
121
144
  def build_from_hash(attributes)
122
145
  return nil unless attributes.is_a?(Hash)
123
- self.class.swagger_types.each_pair do |key, type|
124
- if type =~ /\AArray<(.*)>/i
125
- # check to ensure the input is an array given that the the attribute
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ self.class.openapi_types.each_pair do |key, type|
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
126
152
  # is documented as an array but the input is not
127
153
  if attributes[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
155
  end
130
156
  elsif !attributes[self.class.attribute_map[key]].nil?
131
157
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
- end # or else data not found in attributes(hash), not an issue as the data can be optional
158
+ end
133
159
  end
134
160
 
135
161
  self
@@ -141,8 +167,8 @@ module SwaggyJenkinsClient
141
167
  # @return [Object] Deserialized data
142
168
  def _deserialize(type, value)
143
169
  case type.to_sym
144
- when :DateTime
145
- DateTime.parse(value)
170
+ when :Time
171
+ Time.parse(value)
146
172
  when :Date
147
173
  Date.parse(value)
148
174
  when :String
@@ -151,7 +177,7 @@ module SwaggyJenkinsClient
151
177
  value.to_i
152
178
  when :Float
153
179
  value.to_f
154
- when :BOOLEAN
180
+ when :Boolean
155
181
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
182
  true
157
183
  else
@@ -172,8 +198,9 @@ module SwaggyJenkinsClient
172
198
  end
173
199
  end
174
200
  else # model
175
- temp_model = SwaggyJenkinsClient.const_get(type).new
176
- temp_model.build_from_hash(value)
201
+ # models (e.g. Pet) or oneOf
202
+ klass = SwaggyJenkinsClient.const_get(type)
203
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
204
  end
178
205
  end
179
206
 
@@ -195,7 +222,11 @@ module SwaggyJenkinsClient
195
222
  hash = {}
196
223
  self.class.attribute_map.each_pair do |attr, param|
197
224
  value = self.send(attr)
198
- next if value.nil?
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
199
230
  hash[param] = _to_hash(value)
200
231
  end
201
232
  hash
@@ -207,7 +238,7 @@ module SwaggyJenkinsClient
207
238
  # @return [Hash] Returns the value in the form of hash
208
239
  def _to_hash(value)
209
240
  if value.is_a?(Array)
210
- value.compact.map{ |v| _to_hash(v) }
241
+ value.compact.map { |v| _to_hash(v) }
211
242
  elsif value.is_a?(Hash)
212
243
  {}.tap do |hash|
213
244
  value.each { |k, v| hash[k] = _to_hash(v) }