shortcut_client_ruby 0.0.4 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +74 -0
  3. data/README.md +31 -1986
  4. data/Rakefile +2 -0
  5. data/bin/update.rb +8 -4
  6. data/config.json +2 -1
  7. data/docs/BasicWorkspaceInfo.md +16 -4
  8. data/docs/Branch.md +34 -13
  9. data/docs/Category.md +30 -11
  10. data/docs/Commit.md +38 -15
  11. data/docs/CreateCategory.md +20 -6
  12. data/docs/CreateCategoryParams.md +18 -5
  13. data/docs/CreateCommentComment.md +22 -7
  14. data/docs/CreateEntityTemplate.md +18 -5
  15. data/docs/CreateEpic.md +46 -19
  16. data/docs/CreateEpicComment.md +22 -7
  17. data/docs/CreateGroup.md +28 -10
  18. data/docs/CreateIteration.md +26 -9
  19. data/docs/CreateLabelParams.md +20 -6
  20. data/docs/CreateLinkedFile.md +30 -11
  21. data/docs/CreateMilestone.md +24 -8
  22. data/docs/CreateOrDeleteStoryReaction.md +14 -3
  23. data/docs/CreateProject.md +34 -13
  24. data/docs/CreateStories.md +14 -3
  25. data/docs/CreateStoryComment.md +22 -7
  26. data/docs/CreateStoryCommentParams.md +22 -7
  27. data/docs/CreateStoryContents.md +54 -23
  28. data/docs/CreateStoryLink.md +18 -5
  29. data/docs/CreateStoryLinkParams.md +18 -5
  30. data/docs/CreateStoryParams.md +66 -29
  31. data/docs/CreateTask.md +24 -8
  32. data/docs/CreateTaskParams.md +24 -8
  33. data/docs/DefaultApi.md +3569 -1641
  34. data/docs/DeleteStories.md +14 -3
  35. data/docs/EntityTemplate.md +28 -10
  36. data/docs/EntityTemplateTask.md +20 -6
  37. data/docs/Epic.md +88 -40
  38. data/docs/EpicSearchResults.md +20 -6
  39. data/docs/EpicSlim.md +86 -39
  40. data/docs/EpicState.md +30 -11
  41. data/docs/EpicStats.md +38 -15
  42. data/docs/EpicWorkflow.md +24 -8
  43. data/docs/GetEpicStories.md +14 -3
  44. data/docs/GetExternalLinkStoriesParams.md +14 -3
  45. data/docs/GetIterationStories.md +14 -3
  46. data/docs/GetLabelStories.md +14 -3
  47. data/docs/GetMember.md +14 -3
  48. data/docs/GetProjectStories.md +14 -3
  49. data/docs/Group.md +44 -18
  50. data/docs/History.md +30 -11
  51. data/docs/HistoryActionBranchCreate.md +22 -7
  52. data/docs/HistoryActionBranchMerge.md +22 -7
  53. data/docs/HistoryActionBranchPush.md +22 -7
  54. data/docs/HistoryActionLabelCreate.md +22 -7
  55. data/docs/HistoryActionLabelDelete.md +20 -6
  56. data/docs/HistoryActionLabelUpdate.md +18 -5
  57. data/docs/HistoryActionProjectUpdate.md +22 -7
  58. data/docs/HistoryActionPullRequest.md +24 -8
  59. data/docs/HistoryActionStoryCommentCreate.md +24 -8
  60. data/docs/HistoryActionStoryCreate.md +60 -26
  61. data/docs/HistoryActionStoryDelete.md +22 -7
  62. data/docs/HistoryActionStoryLinkCreate.md +24 -8
  63. data/docs/HistoryActionStoryLinkDelete.md +24 -8
  64. data/docs/HistoryActionStoryLinkUpdate.md +26 -9
  65. data/docs/HistoryActionStoryUpdate.md +26 -9
  66. data/docs/HistoryActionTaskCreate.md +30 -11
  67. data/docs/HistoryActionTaskDelete.md +20 -6
  68. data/docs/HistoryActionTaskUpdate.md +26 -9
  69. data/docs/HistoryChangesStory.md +60 -26
  70. data/docs/HistoryChangesStoryLink.md +18 -5
  71. data/docs/HistoryChangesTask.md +20 -6
  72. data/docs/HistoryReferenceBranch.md +20 -6
  73. data/docs/HistoryReferenceCommit.md +20 -6
  74. data/docs/HistoryReferenceEpic.md +20 -6
  75. data/docs/HistoryReferenceGeneral.md +18 -5
  76. data/docs/HistoryReferenceGroup.md +18 -5
  77. data/docs/HistoryReferenceIteration.md +20 -6
  78. data/docs/HistoryReferenceLabel.md +20 -6
  79. data/docs/HistoryReferenceProject.md +20 -6
  80. data/docs/HistoryReferenceStory.md +22 -7
  81. data/docs/HistoryReferenceStoryTask.md +18 -5
  82. data/docs/HistoryReferenceWorkflowState.md +20 -6
  83. data/docs/Icon.md +22 -7
  84. data/docs/Identity.md +18 -5
  85. data/docs/Iteration.md +48 -20
  86. data/docs/IterationSlim.md +46 -19
  87. data/docs/IterationStats.md +34 -13
  88. data/docs/Label.md +34 -13
  89. data/docs/LabelSlim.md +32 -12
  90. data/docs/LabelStats.md +42 -17
  91. data/docs/LinkedFile.md +44 -18
  92. data/docs/ListEpics.md +14 -3
  93. data/docs/ListGroupStories.md +16 -4
  94. data/docs/ListLabels.md +14 -3
  95. data/docs/ListMembers.md +14 -3
  96. data/docs/MaxSearchResultsExceededError.md +18 -5
  97. data/docs/Member.md +34 -13
  98. data/docs/MemberInfo.md +20 -6
  99. data/docs/Milestone.md +46 -19
  100. data/docs/MilestoneStats.md +18 -5
  101. data/docs/Profile.md +30 -11
  102. data/docs/Project.md +50 -21
  103. data/docs/ProjectStats.md +18 -5
  104. data/docs/PullRequest.md +56 -24
  105. data/docs/PullRequestLabel.md +22 -7
  106. data/docs/Repository.md +30 -11
  107. data/docs/Search.md +20 -6
  108. data/docs/SearchResults.md +16 -4
  109. data/docs/SearchStories.md +68 -30
  110. data/docs/Story.md +112 -52
  111. data/docs/StoryComment.md +40 -16
  112. data/docs/StoryContents.md +50 -21
  113. data/docs/StoryContentsTask.md +22 -7
  114. data/docs/StoryHistoryChangeAddsRemovesInt.md +16 -4
  115. data/docs/StoryHistoryChangeAddsRemovesUuid.md +16 -4
  116. data/docs/StoryHistoryChangeOldNewBool.md +16 -4
  117. data/docs/StoryHistoryChangeOldNewInt.md +16 -4
  118. data/docs/StoryHistoryChangeOldNewStr.md +16 -4
  119. data/docs/StoryHistoryChangeOldNewUuid.md +16 -4
  120. data/docs/StoryLink.md +28 -10
  121. data/docs/StoryReaction.md +16 -4
  122. data/docs/StorySearchResults.md +20 -6
  123. data/docs/StorySlim.md +108 -50
  124. data/docs/StoryStats.md +14 -3
  125. data/docs/Task.md +40 -16
  126. data/docs/ThreadedComment.md +38 -15
  127. data/docs/TypedStoryLink.md +30 -11
  128. data/docs/UnusableEntitlementError.md +18 -5
  129. data/docs/UpdateCategory.md +18 -5
  130. data/docs/UpdateComment.md +14 -3
  131. data/docs/UpdateEntityTemplate.md +16 -4
  132. data/docs/UpdateEpic.md +46 -19
  133. data/docs/UpdateFile.md +24 -8
  134. data/docs/UpdateGroup.md +30 -11
  135. data/docs/UpdateIteration.md +26 -9
  136. data/docs/UpdateLabel.md +20 -6
  137. data/docs/UpdateLinkedFile.md +28 -10
  138. data/docs/UpdateMilestone.md +28 -10
  139. data/docs/UpdateProject.md +30 -11
  140. data/docs/UpdateStories.md +54 -23
  141. data/docs/UpdateStory.md +64 -28
  142. data/docs/UpdateStoryComment.md +14 -3
  143. data/docs/UpdateStoryContents.md +54 -23
  144. data/docs/UpdateStoryLink.md +18 -5
  145. data/docs/UpdateTask.md +22 -7
  146. data/docs/UploadedFile.md +46 -19
  147. data/docs/Workflow.md +34 -13
  148. data/docs/WorkflowState.md +36 -14
  149. data/git_push.sh +11 -9
  150. data/lib/shortcut_client_ruby/api/default_api.rb +2119 -1248
  151. data/lib/shortcut_client_ruby/api_client.rb +143 -106
  152. data/lib/shortcut_client_ruby/api_error.rb +4 -4
  153. data/lib/shortcut_client_ruby/configuration.rb +163 -32
  154. data/lib/shortcut_client_ruby/models/basic_workspace_info.rb +26 -13
  155. data/lib/shortcut_client_ruby/models/branch.rb +35 -42
  156. data/lib/shortcut_client_ruby/models/category.rb +57 -28
  157. data/lib/shortcut_client_ruby/models/commit.rb +37 -44
  158. data/lib/shortcut_client_ruby/models/create_category.rb +90 -17
  159. data/lib/shortcut_client_ruby/models/create_category_params.rb +87 -14
  160. data/lib/shortcut_client_ruby/models/create_comment_comment.rb +57 -16
  161. data/lib/shortcut_client_ruby/models/create_entity_template.rb +46 -14
  162. data/lib/shortcut_client_ruby/models/create_epic.rb +86 -30
  163. data/lib/shortcut_client_ruby/models/create_epic_comment.rb +57 -16
  164. data/lib/shortcut_client_ruby/models/create_group.rb +104 -21
  165. data/lib/shortcut_client_ruby/models/create_iteration.rb +103 -18
  166. data/lib/shortcut_client_ruby/models/create_label_params.rb +97 -15
  167. data/lib/shortcut_client_ruby/models/create_linked_file.rb +110 -22
  168. data/lib/shortcut_client_ruby/models/create_milestone.rb +75 -19
  169. data/lib/shortcut_client_ruby/models/create_or_delete_story_reaction.rb +25 -12
  170. data/lib/shortcut_client_ruby/models/create_project.rb +104 -22
  171. data/lib/shortcut_client_ruby/models/create_stories.rb +25 -12
  172. data/lib/shortcut_client_ruby/models/create_story_comment.rb +48 -16
  173. data/lib/shortcut_client_ruby/models/create_story_comment_params.rb +48 -16
  174. data/lib/shortcut_client_ruby/models/create_story_contents.rb +57 -32
  175. data/lib/shortcut_client_ruby/models/create_story_link.rb +29 -16
  176. data/lib/shortcut_client_ruby/models/create_story_link_params.rb +29 -16
  177. data/lib/shortcut_client_ruby/models/create_story_params.rb +120 -40
  178. data/lib/shortcut_client_ruby/models/create_task.rb +30 -17
  179. data/lib/shortcut_client_ruby/models/create_task_params.rb +30 -17
  180. data/lib/shortcut_client_ruby/models/delete_stories.rb +35 -12
  181. data/lib/shortcut_client_ruby/models/entity_template.rb +32 -19
  182. data/lib/shortcut_client_ruby/models/entity_template_task.rb +28 -15
  183. data/lib/shortcut_client_ruby/models/epic.rb +62 -124
  184. data/lib/shortcut_client_ruby/models/epic_search_results.rb +28 -20
  185. data/lib/shortcut_client_ruby/models/epic_slim.rb +61 -123
  186. data/lib/shortcut_client_ruby/models/epic_state.rb +59 -20
  187. data/lib/shortcut_client_ruby/models/epic_stats.rb +37 -29
  188. data/lib/shortcut_client_ruby/models/epic_workflow.rb +30 -17
  189. data/lib/shortcut_client_ruby/models/get_epic_stories.rb +25 -12
  190. data/lib/shortcut_client_ruby/models/get_external_link_stories_params.rb +55 -12
  191. data/lib/shortcut_client_ruby/models/get_iteration_stories.rb +25 -12
  192. data/lib/shortcut_client_ruby/models/get_label_stories.rb +25 -12
  193. data/lib/shortcut_client_ruby/models/get_member.rb +25 -12
  194. data/lib/shortcut_client_ruby/models/get_project_stories.rb +25 -12
  195. data/lib/shortcut_client_ruby/models/group.rb +96 -37
  196. data/lib/shortcut_client_ruby/models/history.rb +35 -22
  197. data/lib/shortcut_client_ruby/models/history_action_branch_create.rb +31 -18
  198. data/lib/shortcut_client_ruby/models/history_action_branch_merge.rb +31 -18
  199. data/lib/shortcut_client_ruby/models/history_action_branch_push.rb +31 -18
  200. data/lib/shortcut_client_ruby/models/history_action_label_create.rb +61 -18
  201. data/lib/shortcut_client_ruby/models/history_action_label_delete.rb +30 -17
  202. data/lib/shortcut_client_ruby/models/history_action_label_update.rb +29 -16
  203. data/lib/shortcut_client_ruby/models/history_action_project_update.rb +61 -18
  204. data/lib/shortcut_client_ruby/models/history_action_pull_request.rb +62 -19
  205. data/lib/shortcut_client_ruby/models/history_action_story_comment_create.rb +62 -19
  206. data/lib/shortcut_client_ruby/models/history_action_story_create.rb +82 -39
  207. data/lib/shortcut_client_ruby/models/history_action_story_delete.rb +33 -20
  208. data/lib/shortcut_client_ruby/models/history_action_story_link_create.rb +34 -21
  209. data/lib/shortcut_client_ruby/models/history_action_story_link_delete.rb +34 -31
  210. data/lib/shortcut_client_ruby/models/history_action_story_link_update.rb +35 -22
  211. data/lib/shortcut_client_ruby/models/history_action_story_update.rb +65 -22
  212. data/lib/shortcut_client_ruby/models/history_action_task_create.rb +35 -22
  213. data/lib/shortcut_client_ruby/models/history_action_task_delete.rb +30 -17
  214. data/lib/shortcut_client_ruby/models/history_action_task_update.rb +33 -20
  215. data/lib/shortcut_client_ruby/models/history_changes_story.rb +48 -35
  216. data/lib/shortcut_client_ruby/models/history_changes_story_link.rb +27 -14
  217. data/lib/shortcut_client_ruby/models/history_changes_task.rb +28 -15
  218. data/lib/shortcut_client_ruby/models/history_reference_branch.rb +58 -15
  219. data/lib/shortcut_client_ruby/models/history_reference_commit.rb +58 -15
  220. data/lib/shortcut_client_ruby/models/history_reference_epic.rb +58 -15
  221. data/lib/shortcut_client_ruby/models/history_reference_general.rb +27 -14
  222. data/lib/shortcut_client_ruby/models/history_reference_group.rb +27 -14
  223. data/lib/shortcut_client_ruby/models/history_reference_iteration.rb +58 -15
  224. data/lib/shortcut_client_ruby/models/history_reference_label.rb +58 -15
  225. data/lib/shortcut_client_ruby/models/history_reference_project.rb +58 -15
  226. data/lib/shortcut_client_ruby/models/history_reference_story.rb +61 -18
  227. data/lib/shortcut_client_ruby/models/history_reference_story_task.rb +27 -14
  228. data/lib/shortcut_client_ruby/models/history_reference_workflow_state.rb +30 -17
  229. data/lib/shortcut_client_ruby/models/icon.rb +29 -16
  230. data/lib/shortcut_client_ruby/models/identity.rb +27 -24
  231. data/lib/shortcut_client_ruby/models/iteration.rb +42 -29
  232. data/lib/shortcut_client_ruby/models/iteration_slim.rb +41 -28
  233. data/lib/shortcut_client_ruby/models/iteration_stats.rb +35 -22
  234. data/lib/shortcut_client_ruby/models/label.rb +59 -45
  235. data/lib/shortcut_client_ruby/models/label_slim.rb +58 -44
  236. data/lib/shortcut_client_ruby/models/label_stats.rb +39 -26
  237. data/lib/shortcut_client_ruby/models/linked_file.rb +40 -47
  238. data/lib/shortcut_client_ruby/models/list_epics.rb +25 -12
  239. data/lib/shortcut_client_ruby/models/list_group_stories.rb +26 -13
  240. data/lib/shortcut_client_ruby/models/list_labels.rb +25 -12
  241. data/lib/shortcut_client_ruby/models/list_members.rb +25 -12
  242. data/lib/shortcut_client_ruby/models/max_search_results_exceeded_error.rb +31 -18
  243. data/lib/shortcut_client_ruby/models/member.rb +37 -34
  244. data/lib/shortcut_client_ruby/models/member_info.rb +28 -15
  245. data/lib/shortcut_client_ruby/models/milestone.rb +41 -48
  246. data/lib/shortcut_client_ruby/models/milestone_stats.rb +27 -14
  247. data/lib/shortcut_client_ruby/models/profile.rb +33 -35
  248. data/lib/shortcut_client_ruby/models/project.rb +67 -58
  249. data/lib/shortcut_client_ruby/models/project_stats.rb +27 -14
  250. data/lib/shortcut_client_ruby/models/pull_request.rb +46 -43
  251. data/lib/shortcut_client_ruby/models/pull_request_label.rb +59 -16
  252. data/lib/shortcut_client_ruby/models/repository.rb +33 -55
  253. data/lib/shortcut_client_ruby/models/search.rb +49 -17
  254. data/lib/shortcut_client_ruby/models/search_results.rb +26 -13
  255. data/lib/shortcut_client_ruby/models/search_stories.rb +105 -41
  256. data/lib/shortcut_client_ruby/models/story.rb +74 -131
  257. data/lib/shortcut_client_ruby/models/story_comment.rb +38 -40
  258. data/lib/shortcut_client_ruby/models/story_contents.rb +43 -30
  259. data/lib/shortcut_client_ruby/models/story_contents_task.rb +29 -16
  260. data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_int.rb +26 -13
  261. data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_uuid.rb +26 -13
  262. data/lib/shortcut_client_ruby/models/story_history_change_old_new_bool.rb +26 -13
  263. data/lib/shortcut_client_ruby/models/story_history_change_old_new_int.rb +26 -13
  264. data/lib/shortcut_client_ruby/models/story_history_change_old_new_str.rb +26 -13
  265. data/lib/shortcut_client_ruby/models/story_history_change_old_new_uuid.rb +26 -13
  266. data/lib/shortcut_client_ruby/models/story_link.rb +32 -19
  267. data/lib/shortcut_client_ruby/models/story_reaction.rb +26 -13
  268. data/lib/shortcut_client_ruby/models/story_search_results.rb +28 -20
  269. data/lib/shortcut_client_ruby/models/story_slim.rb +72 -129
  270. data/lib/shortcut_client_ruby/models/story_stats.rb +25 -12
  271. data/lib/shortcut_client_ruby/models/task.rb +38 -40
  272. data/lib/shortcut_client_ruby/models/threaded_comment.rb +37 -29
  273. data/lib/shortcut_client_ruby/models/typed_story_link.rb +33 -20
  274. data/lib/shortcut_client_ruby/models/unusable_entitlement_error.rb +85 -16
  275. data/lib/shortcut_client_ruby/models/update_category.rb +68 -14
  276. data/lib/shortcut_client_ruby/models/update_comment.rb +25 -12
  277. data/lib/shortcut_client_ruby/models/update_entity_template.rb +41 -13
  278. data/lib/shortcut_client_ruby/models/update_epic.rb +82 -30
  279. data/lib/shortcut_client_ruby/models/update_file.rb +54 -17
  280. data/lib/shortcut_client_ruby/models/update_group.rb +97 -22
  281. data/lib/shortcut_client_ruby/models/update_iteration.rb +91 -18
  282. data/lib/shortcut_client_ruby/models/update_label.rb +78 -15
  283. data/lib/shortcut_client_ruby/models/update_linked_file.rb +101 -21
  284. data/lib/shortcut_client_ruby/models/update_milestone.rb +73 -21
  285. data/lib/shortcut_client_ruby/models/update_project.rb +98 -20
  286. data/lib/shortcut_client_ruby/models/update_stories.rb +83 -36
  287. data/lib/shortcut_client_ruby/models/update_story.rb +135 -41
  288. data/lib/shortcut_client_ruby/models/update_story_comment.rb +44 -12
  289. data/lib/shortcut_client_ruby/models/update_story_contents.rb +57 -32
  290. data/lib/shortcut_client_ruby/models/update_story_link.rb +29 -16
  291. data/lib/shortcut_client_ruby/models/update_task.rb +29 -16
  292. data/lib/shortcut_client_ruby/models/uploaded_file.rb +41 -53
  293. data/lib/shortcut_client_ruby/models/workflow.rb +35 -22
  294. data/lib/shortcut_client_ruby/models/workflow_state.rb +60 -26
  295. data/lib/shortcut_client_ruby/version.rb +5 -4
  296. data/lib/shortcut_client_ruby.rb +4 -4
  297. data/openapi-generator-cli.jar +0 -0
  298. data/shortcut_client_ruby-0.0.4.gem +0 -0
  299. data/shortcut_client_ruby.gemspec +7 -6
  300. data/spec/api/default_api_spec.rb +64 -63
  301. data/spec/api_client_spec.rb +7 -44
  302. data/spec/configuration_spec.rb +7 -6
  303. data/spec/models/basic_workspace_info_spec.rb +8 -14
  304. data/spec/models/branch_spec.rb +8 -14
  305. data/spec/models/category_spec.rb +8 -14
  306. data/spec/models/commit_spec.rb +8 -14
  307. data/spec/models/create_category_params_spec.rb +8 -14
  308. data/spec/models/create_category_spec.rb +9 -15
  309. data/spec/models/create_comment_comment_spec.rb +8 -14
  310. data/spec/models/create_entity_template_spec.rb +8 -14
  311. data/spec/models/create_epic_comment_spec.rb +8 -14
  312. data/spec/models/create_epic_spec.rb +9 -15
  313. data/spec/models/create_group_spec.rb +9 -15
  314. data/spec/models/create_iteration_spec.rb +8 -14
  315. data/spec/models/create_label_params_spec.rb +8 -14
  316. data/spec/models/create_linked_file_spec.rb +9 -15
  317. data/spec/models/create_milestone_spec.rb +9 -15
  318. data/spec/models/create_or_delete_story_reaction_spec.rb +8 -14
  319. data/spec/models/create_project_spec.rb +8 -14
  320. data/spec/models/create_stories_spec.rb +8 -14
  321. data/spec/models/create_story_comment_params_spec.rb +8 -14
  322. data/spec/models/create_story_comment_spec.rb +8 -14
  323. data/spec/models/create_story_contents_spec.rb +8 -14
  324. data/spec/models/create_story_link_params_spec.rb +9 -15
  325. data/spec/models/create_story_link_spec.rb +9 -15
  326. data/spec/models/create_story_params_spec.rb +9 -15
  327. data/spec/models/create_task_params_spec.rb +8 -14
  328. data/spec/models/create_task_spec.rb +8 -14
  329. data/spec/models/delete_stories_spec.rb +8 -14
  330. data/spec/models/entity_template_spec.rb +8 -14
  331. data/spec/models/entity_template_task_spec.rb +8 -14
  332. data/spec/models/epic_search_results_spec.rb +8 -14
  333. data/spec/models/epic_slim_spec.rb +8 -14
  334. data/spec/models/epic_spec.rb +8 -14
  335. data/spec/models/epic_state_spec.rb +8 -14
  336. data/spec/models/epic_stats_spec.rb +8 -14
  337. data/spec/models/epic_workflow_spec.rb +8 -14
  338. data/spec/models/get_epic_stories_spec.rb +8 -14
  339. data/spec/models/get_external_link_stories_params_spec.rb +8 -14
  340. data/spec/models/get_iteration_stories_spec.rb +8 -14
  341. data/spec/models/get_label_stories_spec.rb +8 -14
  342. data/spec/models/get_member_spec.rb +8 -14
  343. data/spec/models/get_project_stories_spec.rb +8 -14
  344. data/spec/models/group_spec.rb +9 -15
  345. data/spec/models/history_action_branch_create_spec.rb +9 -15
  346. data/spec/models/history_action_branch_merge_spec.rb +9 -15
  347. data/spec/models/history_action_branch_push_spec.rb +9 -15
  348. data/spec/models/history_action_label_create_spec.rb +9 -15
  349. data/spec/models/history_action_label_delete_spec.rb +9 -15
  350. data/spec/models/history_action_label_update_spec.rb +9 -15
  351. data/spec/models/history_action_project_update_spec.rb +9 -15
  352. data/spec/models/history_action_pull_request_spec.rb +9 -15
  353. data/spec/models/history_action_story_comment_create_spec.rb +9 -15
  354. data/spec/models/history_action_story_create_spec.rb +10 -16
  355. data/spec/models/history_action_story_delete_spec.rb +10 -16
  356. data/spec/models/history_action_story_link_create_spec.rb +10 -16
  357. data/spec/models/history_action_story_link_delete_spec.rb +10 -16
  358. data/spec/models/history_action_story_link_update_spec.rb +10 -16
  359. data/spec/models/history_action_story_update_spec.rb +10 -16
  360. data/spec/models/history_action_task_create_spec.rb +9 -15
  361. data/spec/models/history_action_task_delete_spec.rb +9 -15
  362. data/spec/models/history_action_task_update_spec.rb +9 -15
  363. data/spec/models/history_changes_story_link_spec.rb +8 -14
  364. data/spec/models/history_changes_story_spec.rb +8 -14
  365. data/spec/models/history_changes_task_spec.rb +8 -14
  366. data/spec/models/history_reference_branch_spec.rb +8 -14
  367. data/spec/models/history_reference_commit_spec.rb +8 -14
  368. data/spec/models/history_reference_epic_spec.rb +8 -14
  369. data/spec/models/history_reference_general_spec.rb +8 -14
  370. data/spec/models/history_reference_group_spec.rb +8 -14
  371. data/spec/models/history_reference_iteration_spec.rb +8 -14
  372. data/spec/models/history_reference_label_spec.rb +8 -14
  373. data/spec/models/history_reference_project_spec.rb +8 -14
  374. data/spec/models/history_reference_story_spec.rb +9 -15
  375. data/spec/models/history_reference_story_task_spec.rb +8 -14
  376. data/spec/models/history_reference_workflow_state_spec.rb +9 -15
  377. data/spec/models/history_spec.rb +9 -15
  378. data/spec/models/icon_spec.rb +8 -14
  379. data/spec/models/identity_spec.rb +8 -14
  380. data/spec/models/iteration_slim_spec.rb +8 -14
  381. data/spec/models/iteration_spec.rb +8 -14
  382. data/spec/models/iteration_stats_spec.rb +8 -14
  383. data/spec/models/label_slim_spec.rb +8 -14
  384. data/spec/models/label_spec.rb +8 -14
  385. data/spec/models/label_stats_spec.rb +8 -14
  386. data/spec/models/linked_file_spec.rb +8 -14
  387. data/spec/models/list_epics_spec.rb +8 -14
  388. data/spec/models/list_group_stories_spec.rb +8 -14
  389. data/spec/models/list_labels_spec.rb +8 -14
  390. data/spec/models/list_members_spec.rb +8 -14
  391. data/spec/models/max_search_results_exceeded_error_spec.rb +11 -17
  392. data/spec/models/member_info_spec.rb +8 -14
  393. data/spec/models/member_spec.rb +9 -15
  394. data/spec/models/milestone_spec.rb +8 -14
  395. data/spec/models/milestone_stats_spec.rb +8 -14
  396. data/spec/models/profile_spec.rb +8 -14
  397. data/spec/models/project_spec.rb +8 -14
  398. data/spec/models/project_stats_spec.rb +8 -14
  399. data/spec/models/pull_request_label_spec.rb +8 -14
  400. data/spec/models/pull_request_spec.rb +8 -14
  401. data/spec/models/repository_spec.rb +8 -14
  402. data/spec/models/search_results_spec.rb +8 -14
  403. data/spec/models/search_spec.rb +9 -15
  404. data/spec/models/search_stories_spec.rb +10 -16
  405. data/spec/models/story_comment_spec.rb +8 -14
  406. data/spec/models/story_contents_spec.rb +8 -14
  407. data/spec/models/story_contents_task_spec.rb +8 -14
  408. data/spec/models/story_history_change_adds_removes_int_spec.rb +8 -14
  409. data/spec/models/story_history_change_adds_removes_uuid_spec.rb +8 -14
  410. data/spec/models/story_history_change_old_new_bool_spec.rb +8 -14
  411. data/spec/models/story_history_change_old_new_int_spec.rb +8 -14
  412. data/spec/models/story_history_change_old_new_str_spec.rb +8 -14
  413. data/spec/models/story_history_change_old_new_uuid_spec.rb +8 -14
  414. data/spec/models/story_link_spec.rb +8 -14
  415. data/spec/models/story_reaction_spec.rb +8 -14
  416. data/spec/models/story_search_results_spec.rb +8 -14
  417. data/spec/models/story_slim_spec.rb +8 -14
  418. data/spec/models/story_spec.rb +8 -14
  419. data/spec/models/story_stats_spec.rb +8 -14
  420. data/spec/models/task_spec.rb +8 -14
  421. data/spec/models/threaded_comment_spec.rb +8 -14
  422. data/spec/models/typed_story_link_spec.rb +8 -14
  423. data/spec/models/unusable_entitlement_error_spec.rb +9 -15
  424. data/spec/models/update_category_spec.rb +8 -14
  425. data/spec/models/update_comment_spec.rb +8 -14
  426. data/spec/models/update_entity_template_spec.rb +8 -14
  427. data/spec/models/update_epic_spec.rb +9 -15
  428. data/spec/models/update_file_spec.rb +8 -14
  429. data/spec/models/update_group_spec.rb +9 -15
  430. data/spec/models/update_iteration_spec.rb +8 -14
  431. data/spec/models/update_label_spec.rb +8 -14
  432. data/spec/models/update_linked_file_spec.rb +9 -15
  433. data/spec/models/update_milestone_spec.rb +9 -15
  434. data/spec/models/update_project_spec.rb +8 -14
  435. data/spec/models/update_stories_spec.rb +10 -16
  436. data/spec/models/update_story_comment_spec.rb +8 -14
  437. data/spec/models/update_story_contents_spec.rb +8 -14
  438. data/spec/models/update_story_link_spec.rb +9 -15
  439. data/spec/models/update_story_spec.rb +10 -16
  440. data/spec/models/update_task_spec.rb +8 -14
  441. data/spec/models/uploaded_file_spec.rb +8 -14
  442. data/spec/models/workflow_spec.rb +8 -14
  443. data/spec/models/workflow_state_spec.rb +8 -14
  444. data/spec/spec_helper.rb +4 -3
  445. metadata +18 -30
  446. data/docs/V3FilesBody.md +0 -11
  447. data/lib/shortcut/client/ruby/version.rb +0 -9
  448. data/lib/shortcut/client/ruby.rb +0 -12
  449. data/lib/shortcut_client_ruby/models/v3_files_body.rb +0 -252
  450. data/shortcut-client-ruby.gemspec +0 -36
  451. data/spec/base_object_spec.rb +0 -109
  452. data/spec/models/v3_files_body_spec.rb +0 -64
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  # Request parameters for creating a story.
@@ -150,36 +152,41 @@ module Shortcut
150
152
  }
151
153
  end
152
154
 
155
+ # Returns all the JSON keys this model knows about
156
+ def self.acceptable_attributes
157
+ attribute_map.values
158
+ end
159
+
153
160
  # Attribute type mapping.
154
161
  def self.openapi_types
155
162
  {
156
- :'description' => :'Object',
157
- :'archived' => :'Object',
158
- :'story_links' => :'Object',
159
- :'labels' => :'Object',
160
- :'story_type' => :'Object',
161
- :'file_ids' => :'Object',
162
- :'completed_at_override' => :'Object',
163
- :'name' => :'Object',
164
- :'comments' => :'Object',
165
- :'epic_id' => :'Object',
166
- :'story_template_id' => :'Object',
167
- :'external_links' => :'Object',
168
- :'requested_by_id' => :'Object',
169
- :'iteration_id' => :'Object',
170
- :'tasks' => :'Object',
171
- :'started_at_override' => :'Object',
172
- :'group_id' => :'Object',
173
- :'workflow_state_id' => :'Object',
174
- :'updated_at' => :'Object',
175
- :'follower_ids' => :'Object',
176
- :'owner_ids' => :'Object',
177
- :'external_id' => :'Object',
178
- :'estimate' => :'Object',
179
- :'project_id' => :'Object',
180
- :'linked_file_ids' => :'Object',
181
- :'deadline' => :'Object',
182
- :'created_at' => :'Object'
163
+ :'description' => :'String',
164
+ :'archived' => :'Boolean',
165
+ :'story_links' => :'Array<CreateStoryLinkParams>',
166
+ :'labels' => :'Array<CreateLabelParams>',
167
+ :'story_type' => :'String',
168
+ :'file_ids' => :'Array<Integer>',
169
+ :'completed_at_override' => :'Time',
170
+ :'name' => :'String',
171
+ :'comments' => :'Array<CreateStoryCommentParams>',
172
+ :'epic_id' => :'Integer',
173
+ :'story_template_id' => :'String',
174
+ :'external_links' => :'Array<String>',
175
+ :'requested_by_id' => :'String',
176
+ :'iteration_id' => :'Integer',
177
+ :'tasks' => :'Array<CreateTaskParams>',
178
+ :'started_at_override' => :'Time',
179
+ :'group_id' => :'String',
180
+ :'workflow_state_id' => :'Integer',
181
+ :'updated_at' => :'Time',
182
+ :'follower_ids' => :'Array<String>',
183
+ :'owner_ids' => :'Array<String>',
184
+ :'external_id' => :'String',
185
+ :'estimate' => :'Integer',
186
+ :'project_id' => :'Integer',
187
+ :'linked_file_ids' => :'Array<Integer>',
188
+ :'deadline' => :'Time',
189
+ :'created_at' => :'Time'
183
190
  }
184
191
  end
185
192
 
@@ -195,7 +202,7 @@ module Shortcut
195
202
  :'deadline',
196
203
  ])
197
204
  end
198
-
205
+
199
206
  # Initializes the object
200
207
  # @param [Hash] attributes Model attributes in the form of hash
201
208
  def initialize(attributes = {})
@@ -342,32 +349,99 @@ module Shortcut
342
349
  # @return Array for valid properties with the reasons
343
350
  def list_invalid_properties
344
351
  invalid_properties = Array.new
352
+ if !@description.nil? && @description.to_s.length > 100000
353
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 100000.')
354
+ end
355
+
345
356
  if @name.nil?
346
357
  invalid_properties.push('invalid value for "name", name cannot be nil.')
347
358
  end
348
359
 
360
+ if @name.to_s.length > 512
361
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 512.')
362
+ end
363
+
364
+ if @name.to_s.length < 1
365
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
366
+ end
367
+
349
368
  invalid_properties
350
369
  end
351
370
 
352
371
  # Check to see if the all the properties in the model are valid
353
372
  # @return true if the model is valid
354
373
  def valid?
355
- story_type_validator = EnumAttributeValidator.new('Object', ['feature', 'chore', 'bug'])
374
+ return false if !@description.nil? && @description.to_s.length > 100000
375
+ story_type_validator = EnumAttributeValidator.new('String', ["feature", "chore", "bug"])
356
376
  return false unless story_type_validator.valid?(@story_type)
357
377
  return false if @name.nil?
378
+ return false if @name.to_s.length > 512
379
+ return false if @name.to_s.length < 1
358
380
  true
359
381
  end
360
382
 
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] description Value to be assigned
385
+ def description=(description)
386
+ if !description.nil? && description.to_s.length > 100000
387
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 100000.'
388
+ end
389
+
390
+ @description = description
391
+ end
392
+
361
393
  # Custom attribute writer method checking allowed values (enum).
362
394
  # @param [Object] story_type Object to be assigned
363
395
  def story_type=(story_type)
364
- validator = EnumAttributeValidator.new('Object', ['feature', 'chore', 'bug'])
396
+ validator = EnumAttributeValidator.new('String', ["feature", "chore", "bug"])
365
397
  unless validator.valid?(story_type)
366
398
  fail ArgumentError, "invalid value for \"story_type\", must be one of #{validator.allowable_values}."
367
399
  end
368
400
  @story_type = story_type
369
401
  end
370
402
 
403
+ # Custom attribute writer method with validation
404
+ # @param [Object] file_ids Value to be assigned
405
+ def file_ids=(file_ids)
406
+ @file_ids = file_ids
407
+ end
408
+
409
+ # Custom attribute writer method with validation
410
+ # @param [Object] name Value to be assigned
411
+ def name=(name)
412
+ if name.nil?
413
+ fail ArgumentError, 'name cannot be nil'
414
+ end
415
+
416
+ if name.to_s.length > 512
417
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 512.'
418
+ end
419
+
420
+ if name.to_s.length < 1
421
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
422
+ end
423
+
424
+ @name = name
425
+ end
426
+
427
+ # Custom attribute writer method with validation
428
+ # @param [Object] follower_ids Value to be assigned
429
+ def follower_ids=(follower_ids)
430
+ @follower_ids = follower_ids
431
+ end
432
+
433
+ # Custom attribute writer method with validation
434
+ # @param [Object] owner_ids Value to be assigned
435
+ def owner_ids=(owner_ids)
436
+ @owner_ids = owner_ids
437
+ end
438
+
439
+ # Custom attribute writer method with validation
440
+ # @param [Object] linked_file_ids Value to be assigned
441
+ def linked_file_ids=(linked_file_ids)
442
+ @linked_file_ids = linked_file_ids
443
+ end
444
+
371
445
  # Checks equality by comparing each attribute.
372
446
  # @param [Object] Object to be compared
373
447
  def ==(o)
@@ -426,8 +500,11 @@ module Shortcut
426
500
  # @return [Object] Returns the model itself
427
501
  def build_from_hash(attributes)
428
502
  return nil unless attributes.is_a?(Hash)
503
+ attributes = attributes.transform_keys(&:to_sym)
429
504
  self.class.openapi_types.each_pair do |key, type|
430
- if type =~ /\AArray<(.*)>/i
505
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
506
+ self.send("#{key}=", nil)
507
+ elsif type =~ /\AArray<(.*)>/i
431
508
  # check to ensure the input is an array given that the attribute
432
509
  # is documented as an array but the input is not
433
510
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -435,8 +512,6 @@ module Shortcut
435
512
  end
436
513
  elsif !attributes[self.class.attribute_map[key]].nil?
437
514
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
438
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
439
- self.send("#{key}=", nil)
440
515
  end
441
516
  end
442
517
 
@@ -449,8 +524,8 @@ module Shortcut
449
524
  # @return [Object] Deserialized data
450
525
  def _deserialize(type, value)
451
526
  case type.to_sym
452
- when :DateTime
453
- DateTime.parse(value)
527
+ when :Time
528
+ Time.parse(value)
454
529
  when :Date
455
530
  Date.parse(value)
456
531
  when :String
@@ -480,7 +555,9 @@ module Shortcut
480
555
  end
481
556
  end
482
557
  else # model
483
- Shortcut.const_get(type).build_from_hash(value)
558
+ # models (e.g. Pet) or oneOf
559
+ klass = Shortcut.const_get(type)
560
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
484
561
  end
485
562
  end
486
563
 
@@ -528,5 +605,8 @@ module Shortcut
528
605
  else
529
606
  value
530
607
  end
531
- end end
608
+ end
609
+
610
+ end
611
+
532
612
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  class CreateTask
@@ -43,15 +45,20 @@ module Shortcut
43
45
  }
44
46
  end
45
47
 
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
46
53
  # Attribute type mapping.
47
54
  def self.openapi_types
48
55
  {
49
- :'description' => :'Object',
50
- :'complete' => :'Object',
51
- :'owner_ids' => :'Object',
52
- :'created_at' => :'Object',
53
- :'updated_at' => :'Object',
54
- :'external_id' => :'Object'
56
+ :'description' => :'String',
57
+ :'complete' => :'Boolean',
58
+ :'owner_ids' => :'Array<String>',
59
+ :'created_at' => :'Time',
60
+ :'updated_at' => :'Time',
61
+ :'external_id' => :'String'
55
62
  }
56
63
  end
57
64
 
@@ -60,7 +67,7 @@ module Shortcut
60
67
  Set.new([
61
68
  ])
62
69
  end
63
-
70
+
64
71
  # Initializes the object
65
72
  # @param [Hash] attributes Model attributes in the form of hash
66
73
  def initialize(attributes = {})
@@ -158,8 +165,11 @@ module Shortcut
158
165
  # @return [Object] Returns the model itself
159
166
  def build_from_hash(attributes)
160
167
  return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
161
169
  self.class.openapi_types.each_pair do |key, type|
162
- if type =~ /\AArray<(.*)>/i
170
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
+ self.send("#{key}=", nil)
172
+ elsif type =~ /\AArray<(.*)>/i
163
173
  # check to ensure the input is an array given that the attribute
164
174
  # is documented as an array but the input is not
165
175
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -167,8 +177,6 @@ module Shortcut
167
177
  end
168
178
  elsif !attributes[self.class.attribute_map[key]].nil?
169
179
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
170
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
- self.send("#{key}=", nil)
172
180
  end
173
181
  end
174
182
 
@@ -181,8 +189,8 @@ module Shortcut
181
189
  # @return [Object] Deserialized data
182
190
  def _deserialize(type, value)
183
191
  case type.to_sym
184
- when :DateTime
185
- DateTime.parse(value)
192
+ when :Time
193
+ Time.parse(value)
186
194
  when :Date
187
195
  Date.parse(value)
188
196
  when :String
@@ -212,7 +220,9 @@ module Shortcut
212
220
  end
213
221
  end
214
222
  else # model
215
- Shortcut.const_get(type).build_from_hash(value)
223
+ # models (e.g. Pet) or oneOf
224
+ klass = Shortcut.const_get(type)
225
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
216
226
  end
217
227
  end
218
228
 
@@ -260,5 +270,8 @@ module Shortcut
260
270
  else
261
271
  value
262
272
  end
263
- end end
273
+ end
274
+
275
+ end
276
+
264
277
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  # Request parameters for creating a Task on a Story.
@@ -44,15 +46,20 @@ module Shortcut
44
46
  }
45
47
  end
46
48
 
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
47
54
  # Attribute type mapping.
48
55
  def self.openapi_types
49
56
  {
50
- :'description' => :'Object',
51
- :'complete' => :'Object',
52
- :'owner_ids' => :'Object',
53
- :'created_at' => :'Object',
54
- :'updated_at' => :'Object',
55
- :'external_id' => :'Object'
57
+ :'description' => :'String',
58
+ :'complete' => :'Boolean',
59
+ :'owner_ids' => :'Array<String>',
60
+ :'created_at' => :'Time',
61
+ :'updated_at' => :'Time',
62
+ :'external_id' => :'String'
56
63
  }
57
64
  end
58
65
 
@@ -61,7 +68,7 @@ module Shortcut
61
68
  Set.new([
62
69
  ])
63
70
  end
64
-
71
+
65
72
  # Initializes the object
66
73
  # @param [Hash] attributes Model attributes in the form of hash
67
74
  def initialize(attributes = {})
@@ -159,8 +166,11 @@ module Shortcut
159
166
  # @return [Object] Returns the model itself
160
167
  def build_from_hash(attributes)
161
168
  return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
162
170
  self.class.openapi_types.each_pair do |key, type|
163
- if type =~ /\AArray<(.*)>/i
171
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
172
+ self.send("#{key}=", nil)
173
+ elsif type =~ /\AArray<(.*)>/i
164
174
  # check to ensure the input is an array given that the attribute
165
175
  # is documented as an array but the input is not
166
176
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -168,8 +178,6 @@ module Shortcut
168
178
  end
169
179
  elsif !attributes[self.class.attribute_map[key]].nil?
170
180
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
172
- self.send("#{key}=", nil)
173
181
  end
174
182
  end
175
183
 
@@ -182,8 +190,8 @@ module Shortcut
182
190
  # @return [Object] Deserialized data
183
191
  def _deserialize(type, value)
184
192
  case type.to_sym
185
- when :DateTime
186
- DateTime.parse(value)
193
+ when :Time
194
+ Time.parse(value)
187
195
  when :Date
188
196
  Date.parse(value)
189
197
  when :String
@@ -213,7 +221,9 @@ module Shortcut
213
221
  end
214
222
  end
215
223
  else # model
216
- Shortcut.const_get(type).build_from_hash(value)
224
+ # models (e.g. Pet) or oneOf
225
+ klass = Shortcut.const_get(type)
226
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
227
  end
218
228
  end
219
229
 
@@ -261,5 +271,8 @@ module Shortcut
261
271
  else
262
272
  value
263
273
  end
264
- end end
274
+ end
275
+
276
+ end
277
+
265
278
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  class DeleteStories
@@ -23,10 +25,15 @@ module Shortcut
23
25
  }
24
26
  end
25
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
26
33
  # Attribute type mapping.
27
34
  def self.openapi_types
28
35
  {
29
- :'story_ids' => :'Object'
36
+ :'story_ids' => :'Array<Integer>'
30
37
  }
31
38
  end
32
39
 
@@ -35,7 +42,7 @@ module Shortcut
35
42
  Set.new([
36
43
  ])
37
44
  end
38
-
45
+
39
46
  # Initializes the object
40
47
  # @param [Hash] attributes Model attributes in the form of hash
41
48
  def initialize(attributes = {})
@@ -76,6 +83,16 @@ module Shortcut
76
83
  true
77
84
  end
78
85
 
86
+ # Custom attribute writer method with validation
87
+ # @param [Object] story_ids Value to be assigned
88
+ def story_ids=(story_ids)
89
+ if story_ids.nil?
90
+ fail ArgumentError, 'story_ids cannot be nil'
91
+ end
92
+
93
+ @story_ids = story_ids
94
+ end
95
+
79
96
  # Checks equality by comparing each attribute.
80
97
  # @param [Object] Object to be compared
81
98
  def ==(o)
@@ -108,8 +125,11 @@ module Shortcut
108
125
  # @return [Object] Returns the model itself
109
126
  def build_from_hash(attributes)
110
127
  return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
111
129
  self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
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
113
133
  # check to ensure the input is an array given that the attribute
114
134
  # is documented as an array but the input is not
115
135
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -117,8 +137,6 @@ module Shortcut
117
137
  end
118
138
  elsif !attributes[self.class.attribute_map[key]].nil?
119
139
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
121
- self.send("#{key}=", nil)
122
140
  end
123
141
  end
124
142
 
@@ -131,8 +149,8 @@ module Shortcut
131
149
  # @return [Object] Deserialized data
132
150
  def _deserialize(type, value)
133
151
  case type.to_sym
134
- when :DateTime
135
- DateTime.parse(value)
152
+ when :Time
153
+ Time.parse(value)
136
154
  when :Date
137
155
  Date.parse(value)
138
156
  when :String
@@ -162,7 +180,9 @@ module Shortcut
162
180
  end
163
181
  end
164
182
  else # model
165
- Shortcut.const_get(type).build_from_hash(value)
183
+ # models (e.g. Pet) or oneOf
184
+ klass = Shortcut.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
166
186
  end
167
187
  end
168
188
 
@@ -210,5 +230,8 @@ module Shortcut
210
230
  else
211
231
  value
212
232
  end
213
- end end
233
+ end
234
+
235
+ end
236
+
214
237
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  # An entity template can be used to prefill various fields when creating new stories.
@@ -51,17 +53,22 @@ module Shortcut
51
53
  }
52
54
  end
53
55
 
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
54
61
  # Attribute type mapping.
55
62
  def self.openapi_types
56
63
  {
57
- :'entity_type' => :'Object',
58
- :'id' => :'Object',
59
- :'created_at' => :'Object',
60
- :'updated_at' => :'Object',
61
- :'name' => :'Object',
62
- :'author_id' => :'Object',
63
- :'last_used_at' => :'Object',
64
- :'story_contents' => :'Object'
64
+ :'entity_type' => :'String',
65
+ :'id' => :'String',
66
+ :'created_at' => :'Time',
67
+ :'updated_at' => :'Time',
68
+ :'name' => :'String',
69
+ :'author_id' => :'String',
70
+ :'last_used_at' => :'Time',
71
+ :'story_contents' => :'StoryContents'
65
72
  }
66
73
  end
67
74
 
@@ -70,7 +77,7 @@ module Shortcut
70
77
  Set.new([
71
78
  ])
72
79
  end
73
-
80
+
74
81
  # Initializes the object
75
82
  # @param [Hash] attributes Model attributes in the form of hash
76
83
  def initialize(attributes = {})
@@ -211,8 +218,11 @@ module Shortcut
211
218
  # @return [Object] Returns the model itself
212
219
  def build_from_hash(attributes)
213
220
  return nil unless attributes.is_a?(Hash)
221
+ attributes = attributes.transform_keys(&:to_sym)
214
222
  self.class.openapi_types.each_pair do |key, type|
215
- if type =~ /\AArray<(.*)>/i
223
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
224
+ self.send("#{key}=", nil)
225
+ elsif type =~ /\AArray<(.*)>/i
216
226
  # check to ensure the input is an array given that the attribute
217
227
  # is documented as an array but the input is not
218
228
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -220,8 +230,6 @@ module Shortcut
220
230
  end
221
231
  elsif !attributes[self.class.attribute_map[key]].nil?
222
232
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
223
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
224
- self.send("#{key}=", nil)
225
233
  end
226
234
  end
227
235
 
@@ -234,8 +242,8 @@ module Shortcut
234
242
  # @return [Object] Deserialized data
235
243
  def _deserialize(type, value)
236
244
  case type.to_sym
237
- when :DateTime
238
- DateTime.parse(value)
245
+ when :Time
246
+ Time.parse(value)
239
247
  when :Date
240
248
  Date.parse(value)
241
249
  when :String
@@ -265,7 +273,9 @@ module Shortcut
265
273
  end
266
274
  end
267
275
  else # model
268
- Shortcut.const_get(type).build_from_hash(value)
276
+ # models (e.g. Pet) or oneOf
277
+ klass = Shortcut.const_get(type)
278
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
269
279
  end
270
280
  end
271
281
 
@@ -313,5 +323,8 @@ module Shortcut
313
323
  else
314
324
  value
315
325
  end
316
- end end
326
+ end
327
+
328
+ end
329
+
317
330
  end