forgejo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (630) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +9 -0
  4. data/LICENSE~ +9 -0
  5. data/Makefile +23 -0
  6. data/Makefile~ +2 -0
  7. data/README.md +717 -0
  8. data/Rakefile +10 -0
  9. data/docs/APIError.md +20 -0
  10. data/docs/AccessToken.md +26 -0
  11. data/docs/ActionTask.md +42 -0
  12. data/docs/ActionTaskResponse.md +20 -0
  13. data/docs/ActionVariable.md +24 -0
  14. data/docs/Activity.md +42 -0
  15. data/docs/ActivityPub.md +18 -0
  16. data/docs/ActivitypubApi.md +289 -0
  17. data/docs/AddCollaboratorOption.md +18 -0
  18. data/docs/AddTimeOption.md +22 -0
  19. data/docs/AdminApi.md +1672 -0
  20. data/docs/AnnotatedTag.md +32 -0
  21. data/docs/AnnotatedTagObject.md +22 -0
  22. data/docs/Attachment.md +30 -0
  23. data/docs/BlockedUser.md +20 -0
  24. data/docs/Branch.md +34 -0
  25. data/docs/BranchProtection.md +70 -0
  26. data/docs/ChangeFileOperation.md +26 -0
  27. data/docs/ChangeFilesOptions.md +32 -0
  28. data/docs/ChangedFile.md +34 -0
  29. data/docs/CombinedStatus.md +30 -0
  30. data/docs/Comment.md +38 -0
  31. data/docs/Commit.md +36 -0
  32. data/docs/CommitAffectedFiles.md +20 -0
  33. data/docs/CommitDateOptions.md +20 -0
  34. data/docs/CommitMeta.md +22 -0
  35. data/docs/CommitStats.md +22 -0
  36. data/docs/CommitStatus.md +34 -0
  37. data/docs/CommitUser.md +22 -0
  38. data/docs/Compare.md +20 -0
  39. data/docs/ContentsResponse.md +46 -0
  40. data/docs/CreateAccessTokenOption.md +20 -0
  41. data/docs/CreateBranchProtectionOption.md +66 -0
  42. data/docs/CreateBranchRepoOption.md +22 -0
  43. data/docs/CreateEmailOption.md +18 -0
  44. data/docs/CreateFileOptions.md +32 -0
  45. data/docs/CreateForkOption.md +20 -0
  46. data/docs/CreateGPGKeyOption.md +20 -0
  47. data/docs/CreateHookOption.md +28 -0
  48. data/docs/CreateIssueCommentOption.md +20 -0
  49. data/docs/CreateIssueOption.md +34 -0
  50. data/docs/CreateKeyOption.md +22 -0
  51. data/docs/CreateLabelOption.md +26 -0
  52. data/docs/CreateMilestoneOption.md +24 -0
  53. data/docs/CreateOAuth2ApplicationOptions.md +22 -0
  54. data/docs/CreateOrUpdateSecretOption.md +18 -0
  55. data/docs/CreateOrgOption.md +32 -0
  56. data/docs/CreatePullRequestOption.md +34 -0
  57. data/docs/CreatePullReviewComment.md +24 -0
  58. data/docs/CreatePullReviewOptions.md +24 -0
  59. data/docs/CreatePushMirrorOption.md +26 -0
  60. data/docs/CreateReleaseOption.md +30 -0
  61. data/docs/CreateRepoOption.md +40 -0
  62. data/docs/CreateStatusOption.md +24 -0
  63. data/docs/CreateTagOption.md +22 -0
  64. data/docs/CreateTagProtectionOption.md +22 -0
  65. data/docs/CreateTeamOption.md +30 -0
  66. data/docs/CreateUserOption.md +38 -0
  67. data/docs/CreateVariableOption.md +18 -0
  68. data/docs/CreateWikiPageOptions.md +22 -0
  69. data/docs/Cron.md +26 -0
  70. data/docs/DeleteEmailOption.md +18 -0
  71. data/docs/DeleteFileOptions.md +32 -0
  72. data/docs/DeleteLabelsOption.md +18 -0
  73. data/docs/DeployKey.md +34 -0
  74. data/docs/DismissPullReviewOptions.md +20 -0
  75. data/docs/DispatchWorkflowOption.md +20 -0
  76. data/docs/EditAttachmentOptions.md +18 -0
  77. data/docs/EditBranchProtectionOption.md +62 -0
  78. data/docs/EditDeadlineOption.md +18 -0
  79. data/docs/EditGitHookOption.md +18 -0
  80. data/docs/EditHookOption.md +26 -0
  81. data/docs/EditIssueCommentOption.md +20 -0
  82. data/docs/EditIssueOption.md +36 -0
  83. data/docs/EditLabelOption.md +26 -0
  84. data/docs/EditMilestoneOption.md +24 -0
  85. data/docs/EditOrgOption.md +30 -0
  86. data/docs/EditPullRequestOption.md +38 -0
  87. data/docs/EditReactionOption.md +18 -0
  88. data/docs/EditReleaseOption.md +30 -0
  89. data/docs/EditRepoOption.md +82 -0
  90. data/docs/EditTagProtectionOption.md +22 -0
  91. data/docs/EditTeamOption.md +30 -0
  92. data/docs/EditUserOption.md +54 -0
  93. data/docs/Email.md +26 -0
  94. data/docs/ExternalTracker.md +24 -0
  95. data/docs/ExternalWiki.md +18 -0
  96. data/docs/FileCommitResponse.md +34 -0
  97. data/docs/FileDeleteResponse.md +22 -0
  98. data/docs/FileLinksResponse.md +22 -0
  99. data/docs/FileResponse.md +22 -0
  100. data/docs/FilesResponse.md +22 -0
  101. data/docs/GPGKey.md +42 -0
  102. data/docs/GPGKeyEmail.md +20 -0
  103. data/docs/GeneralAPISettings.md +24 -0
  104. data/docs/GeneralAttachmentSettings.md +24 -0
  105. data/docs/GeneralRepoSettings.md +30 -0
  106. data/docs/GeneralUISettings.md +22 -0
  107. data/docs/GenerateRepoOption.md +40 -0
  108. data/docs/GitBlobResponse.md +26 -0
  109. data/docs/GitEntry.md +28 -0
  110. data/docs/GitHook.md +22 -0
  111. data/docs/GitObject.md +22 -0
  112. data/docs/GitTreeResponse.md +28 -0
  113. data/docs/GitignoreTemplateInfo.md +20 -0
  114. data/docs/Hook.md +40 -0
  115. data/docs/Identity.md +20 -0
  116. data/docs/InternalTracker.md +22 -0
  117. data/docs/Issue.md +66 -0
  118. data/docs/IssueApi.md +5206 -0
  119. data/docs/IssueConfig.md +20 -0
  120. data/docs/IssueConfigContactLink.md +22 -0
  121. data/docs/IssueConfigValidation.md +20 -0
  122. data/docs/IssueDeadline.md +18 -0
  123. data/docs/IssueFormField.md +26 -0
  124. data/docs/IssueLabelsOption.md +20 -0
  125. data/docs/IssueMeta.md +22 -0
  126. data/docs/IssueTemplate.md +32 -0
  127. data/docs/Label.md +30 -0
  128. data/docs/LabelTemplate.md +24 -0
  129. data/docs/LicenseTemplateInfo.md +26 -0
  130. data/docs/LicensesTemplateListEntry.md +22 -0
  131. data/docs/MarkdownOption.md +24 -0
  132. data/docs/MarkupOption.md +26 -0
  133. data/docs/MergePullRequestOption.md +32 -0
  134. data/docs/MigrateRepoOptions.md +56 -0
  135. data/docs/Milestone.md +36 -0
  136. data/docs/MiscellaneousApi.md +833 -0
  137. data/docs/NewIssuePinsAllowed.md +20 -0
  138. data/docs/NodeInfo.md +30 -0
  139. data/docs/NodeInfoServices.md +20 -0
  140. data/docs/NodeInfoSoftware.md +24 -0
  141. data/docs/NodeInfoUsage.md +22 -0
  142. data/docs/NodeInfoUsageUsers.md +22 -0
  143. data/docs/Note.md +20 -0
  144. data/docs/NotificationApi.md +550 -0
  145. data/docs/NotificationCount.md +18 -0
  146. data/docs/NotificationSubject.md +30 -0
  147. data/docs/NotificationThread.md +30 -0
  148. data/docs/OAuth2Application.md +30 -0
  149. data/docs/Organization.md +38 -0
  150. data/docs/OrganizationApi.md +4259 -0
  151. data/docs/OrganizationPermissions.md +26 -0
  152. data/docs/PRBranchInfo.md +26 -0
  153. data/docs/Package.md +34 -0
  154. data/docs/PackageApi.md +314 -0
  155. data/docs/PackageFile.md +30 -0
  156. data/docs/PayloadCommit.md +36 -0
  157. data/docs/PayloadCommitVerification.md +26 -0
  158. data/docs/PayloadUser.md +22 -0
  159. data/docs/Permission.md +22 -0
  160. data/docs/PublicKey.md +34 -0
  161. data/docs/PullRequest.md +88 -0
  162. data/docs/PullRequestMeta.md +24 -0
  163. data/docs/PullReview.md +44 -0
  164. data/docs/PullReviewComment.md +46 -0
  165. data/docs/PullReviewRequestOptions.md +20 -0
  166. data/docs/PushMirror.md +32 -0
  167. data/docs/Reaction.md +22 -0
  168. data/docs/Reference.md +22 -0
  169. data/docs/Release.md +52 -0
  170. data/docs/RenameUserOption.md +18 -0
  171. data/docs/ReplaceFlagsOption.md +18 -0
  172. data/docs/RepoCollaboratorPermission.md +22 -0
  173. data/docs/RepoCommit.md +28 -0
  174. data/docs/RepoCreateReleaseAttachmentRequest.md +18 -0
  175. data/docs/RepoTopicOptions.md +18 -0
  176. data/docs/RepoTransfer.md +22 -0
  177. data/docs/Repository.md +140 -0
  178. data/docs/RepositoryApi.md +13022 -0
  179. data/docs/RepositoryMeta.md +24 -0
  180. data/docs/SearchResults.md +20 -0
  181. data/docs/Secret.md +20 -0
  182. data/docs/ServerVersion.md +18 -0
  183. data/docs/SettingsApi.md +275 -0
  184. data/docs/StopWatch.md +30 -0
  185. data/docs/SubmitPullReviewOptions.md +20 -0
  186. data/docs/Tag.md +30 -0
  187. data/docs/TagArchiveDownloadCount.md +20 -0
  188. data/docs/TagProtection.md +28 -0
  189. data/docs/Team.md +34 -0
  190. data/docs/TeamSearch200Response.md +20 -0
  191. data/docs/TimelineComment.md +74 -0
  192. data/docs/TopicName.md +18 -0
  193. data/docs/TopicResponse.md +26 -0
  194. data/docs/TrackedTime.md +30 -0
  195. data/docs/TransferRepoOption.md +20 -0
  196. data/docs/UpdateFileOptions.md +36 -0
  197. data/docs/UpdateRepoAvatarOption.md +18 -0
  198. data/docs/UpdateUserAvatarOption.md +18 -0
  199. data/docs/UpdateVariableOption.md +20 -0
  200. data/docs/User.md +62 -0
  201. data/docs/UserApi.md +4969 -0
  202. data/docs/UserHeatmapData.md +20 -0
  203. data/docs/UserSearch200Response.md +20 -0
  204. data/docs/UserSettings.md +38 -0
  205. data/docs/UserSettingsOptions.md +38 -0
  206. data/docs/WatchInfo.md +28 -0
  207. data/docs/WikiCommit.md +24 -0
  208. data/docs/WikiCommitList.md +20 -0
  209. data/docs/WikiPage.md +32 -0
  210. data/docs/WikiPageMetaData.md +24 -0
  211. data/forgejo.gemspec +49 -0
  212. data/git_push.sh +57 -0
  213. data/lib/forgejo/api/activitypub_api.rb +269 -0
  214. data/lib/forgejo/api/admin_api.rb +1496 -0
  215. data/lib/forgejo/api/issue_api.rb +5282 -0
  216. data/lib/forgejo/api/miscellaneous_api.rb +725 -0
  217. data/lib/forgejo/api/notification_api.rb +520 -0
  218. data/lib/forgejo/api/organization_api.rb +3898 -0
  219. data/lib/forgejo/api/package_api.rb +334 -0
  220. data/lib/forgejo/api/repository_api.rb +12849 -0
  221. data/lib/forgejo/api/settings_api.rb +242 -0
  222. data/lib/forgejo/api/user_api.rb +4314 -0
  223. data/lib/forgejo/api_client.rb +437 -0
  224. data/lib/forgejo/api_error.rb +58 -0
  225. data/lib/forgejo/configuration.rb +392 -0
  226. data/lib/forgejo/models/access_token.rb +252 -0
  227. data/lib/forgejo/models/action_task.rb +323 -0
  228. data/lib/forgejo/models/action_task_response.rb +226 -0
  229. data/lib/forgejo/models/action_variable.rb +246 -0
  230. data/lib/forgejo/models/activity.rb +357 -0
  231. data/lib/forgejo/models/activity_pub.rb +215 -0
  232. data/lib/forgejo/models/add_collaborator_option.rb +215 -0
  233. data/lib/forgejo/models/add_time_option.rb +242 -0
  234. data/lib/forgejo/models/annotated_tag.rb +278 -0
  235. data/lib/forgejo/models/annotated_tag_object.rb +233 -0
  236. data/lib/forgejo/models/api_error.rb +224 -0
  237. data/lib/forgejo/models/attachment.rb +269 -0
  238. data/lib/forgejo/models/blocked_user.rb +223 -0
  239. data/lib/forgejo/models/branch.rb +289 -0
  240. data/lib/forgejo/models/branch_protection.rb +464 -0
  241. data/lib/forgejo/models/change_file_operation.rb +304 -0
  242. data/lib/forgejo/models/change_files_options.rb +292 -0
  243. data/lib/forgejo/models/changed_file.rb +287 -0
  244. data/lib/forgejo/models/combined_status.rb +272 -0
  245. data/lib/forgejo/models/comment.rb +307 -0
  246. data/lib/forgejo/models/commit.rb +299 -0
  247. data/lib/forgejo/models/commit_affected_files.rb +224 -0
  248. data/lib/forgejo/models/commit_date_options.rb +224 -0
  249. data/lib/forgejo/models/commit_meta.rb +232 -0
  250. data/lib/forgejo/models/commit_stats.rb +233 -0
  251. data/lib/forgejo/models/commit_status.rb +288 -0
  252. data/lib/forgejo/models/commit_user.rb +232 -0
  253. data/lib/forgejo/models/compare.rb +225 -0
  254. data/lib/forgejo/models/contents_response.rb +346 -0
  255. data/lib/forgejo/models/create_access_token_option.rb +233 -0
  256. data/lib/forgejo/models/create_branch_protection_option.rb +446 -0
  257. data/lib/forgejo/models/create_branch_repo_option.rb +243 -0
  258. data/lib/forgejo/models/create_email_option.rb +218 -0
  259. data/lib/forgejo/models/create_file_options.rb +290 -0
  260. data/lib/forgejo/models/create_fork_option.rb +226 -0
  261. data/lib/forgejo/models/create_gpg_key_option.rb +232 -0
  262. data/lib/forgejo/models/create_hook_option.rb +315 -0
  263. data/lib/forgejo/models/create_issue_comment_option.rb +231 -0
  264. data/lib/forgejo/models/create_issue_option.rb +301 -0
  265. data/lib/forgejo/models/create_key_option.rb +250 -0
  266. data/lib/forgejo/models/create_label_option.rb +265 -0
  267. data/lib/forgejo/models/create_milestone_option.rb +276 -0
  268. data/lib/forgejo/models/create_o_auth2_application_options.rb +235 -0
  269. data/lib/forgejo/models/create_or_update_secret_option.rb +223 -0
  270. data/lib/forgejo/models/create_org_option.rb +320 -0
  271. data/lib/forgejo/models/create_pull_request_option.rb +291 -0
  272. data/lib/forgejo/models/create_pull_review_comment.rb +245 -0
  273. data/lib/forgejo/models/create_pull_review_options.rb +245 -0
  274. data/lib/forgejo/models/create_push_mirror_option.rb +250 -0
  275. data/lib/forgejo/models/create_release_option.rb +276 -0
  276. data/lib/forgejo/models/create_repo_option.rb +379 -0
  277. data/lib/forgejo/models/create_status_option.rb +243 -0
  278. data/lib/forgejo/models/create_tag_option.rb +240 -0
  279. data/lib/forgejo/models/create_tag_protection_option.rb +237 -0
  280. data/lib/forgejo/models/create_team_option.rb +314 -0
  281. data/lib/forgejo/models/create_user_option.rb +320 -0
  282. data/lib/forgejo/models/create_variable_option.rb +223 -0
  283. data/lib/forgejo/models/create_wiki_page_options.rb +236 -0
  284. data/lib/forgejo/models/cron.rb +251 -0
  285. data/lib/forgejo/models/delete_email_option.rb +218 -0
  286. data/lib/forgejo/models/delete_file_options.rb +290 -0
  287. data/lib/forgejo/models/delete_labels_option.rb +215 -0
  288. data/lib/forgejo/models/deploy_key.rb +287 -0
  289. data/lib/forgejo/models/dismiss_pull_review_options.rb +224 -0
  290. data/lib/forgejo/models/dispatch_workflow_option.rb +235 -0
  291. data/lib/forgejo/models/edit_attachment_options.rb +215 -0
  292. data/lib/forgejo/models/edit_branch_protection_option.rb +427 -0
  293. data/lib/forgejo/models/edit_deadline_option.rb +222 -0
  294. data/lib/forgejo/models/edit_git_hook_option.rb +215 -0
  295. data/lib/forgejo/models/edit_hook_option.rb +255 -0
  296. data/lib/forgejo/models/edit_issue_comment_option.rb +231 -0
  297. data/lib/forgejo/models/edit_issue_option.rb +299 -0
  298. data/lib/forgejo/models/edit_label_option.rb +251 -0
  299. data/lib/forgejo/models/edit_milestone_option.rb +242 -0
  300. data/lib/forgejo/models/edit_org_option.rb +304 -0
  301. data/lib/forgejo/models/edit_pull_request_option.rb +309 -0
  302. data/lib/forgejo/models/edit_reaction_option.rb +215 -0
  303. data/lib/forgejo/models/edit_release_option.rb +269 -0
  304. data/lib/forgejo/models/edit_repo_option.rb +533 -0
  305. data/lib/forgejo/models/edit_tag_protection_option.rb +237 -0
  306. data/lib/forgejo/models/edit_team_option.rb +314 -0
  307. data/lib/forgejo/models/edit_user_option.rb +377 -0
  308. data/lib/forgejo/models/email.rb +251 -0
  309. data/lib/forgejo/models/external_tracker.rb +246 -0
  310. data/lib/forgejo/models/external_wiki.rb +216 -0
  311. data/lib/forgejo/models/file_commit_response.rb +288 -0
  312. data/lib/forgejo/models/file_delete_response.rb +233 -0
  313. data/lib/forgejo/models/file_links_response.rb +233 -0
  314. data/lib/forgejo/models/file_response.rb +233 -0
  315. data/lib/forgejo/models/files_response.rb +235 -0
  316. data/lib/forgejo/models/general_api_settings.rb +242 -0
  317. data/lib/forgejo/models/general_attachment_settings.rb +242 -0
  318. data/lib/forgejo/models/general_repo_settings.rb +269 -0
  319. data/lib/forgejo/models/general_ui_settings.rb +237 -0
  320. data/lib/forgejo/models/generate_repo_option.rb +340 -0
  321. data/lib/forgejo/models/git_blob_response.rb +251 -0
  322. data/lib/forgejo/models/git_entry.rb +260 -0
  323. data/lib/forgejo/models/git_hook.rb +233 -0
  324. data/lib/forgejo/models/git_object.rb +232 -0
  325. data/lib/forgejo/models/git_tree_response.rb +262 -0
  326. data/lib/forgejo/models/gitignore_template_info.rb +224 -0
  327. data/lib/forgejo/models/gpg_key.rb +327 -0
  328. data/lib/forgejo/models/gpg_key_email.rb +224 -0
  329. data/lib/forgejo/models/hook.rb +319 -0
  330. data/lib/forgejo/models/identity.rb +224 -0
  331. data/lib/forgejo/models/internal_tracker.rb +236 -0
  332. data/lib/forgejo/models/issue.rb +438 -0
  333. data/lib/forgejo/models/issue_config.rb +225 -0
  334. data/lib/forgejo/models/issue_config_contact_link.rb +232 -0
  335. data/lib/forgejo/models/issue_config_validation.rb +223 -0
  336. data/lib/forgejo/models/issue_deadline.rb +215 -0
  337. data/lib/forgejo/models/issue_form_field.rb +257 -0
  338. data/lib/forgejo/models/issue_labels_option.rb +227 -0
  339. data/lib/forgejo/models/issue_meta.rb +233 -0
  340. data/lib/forgejo/models/issue_template.rb +282 -0
  341. data/lib/forgejo/models/label.rb +269 -0
  342. data/lib/forgejo/models/label_template.rb +242 -0
  343. data/lib/forgejo/models/license_template_info.rb +251 -0
  344. data/lib/forgejo/models/licenses_template_list_entry.rb +233 -0
  345. data/lib/forgejo/models/markdown_option.rb +246 -0
  346. data/lib/forgejo/models/markup_option.rb +256 -0
  347. data/lib/forgejo/models/merge_pull_request_option.rb +319 -0
  348. data/lib/forgejo/models/migrate_repo_options.rb +436 -0
  349. data/lib/forgejo/models/milestone.rb +297 -0
  350. data/lib/forgejo/models/new_issue_pins_allowed.rb +224 -0
  351. data/lib/forgejo/models/node_info.rb +271 -0
  352. data/lib/forgejo/models/node_info_services.rb +228 -0
  353. data/lib/forgejo/models/node_info_software.rb +242 -0
  354. data/lib/forgejo/models/node_info_usage.rb +233 -0
  355. data/lib/forgejo/models/node_info_usage_users.rb +233 -0
  356. data/lib/forgejo/models/note.rb +224 -0
  357. data/lib/forgejo/models/notification_count.rb +215 -0
  358. data/lib/forgejo/models/notification_subject.rb +271 -0
  359. data/lib/forgejo/models/notification_thread.rb +269 -0
  360. data/lib/forgejo/models/o_auth2_application.rb +270 -0
  361. data/lib/forgejo/models/organization.rb +306 -0
  362. data/lib/forgejo/models/organization_permissions.rb +251 -0
  363. data/lib/forgejo/models/package.rb +287 -0
  364. data/lib/forgejo/models/package_file.rb +269 -0
  365. data/lib/forgejo/models/payload_commit.rb +303 -0
  366. data/lib/forgejo/models/payload_commit_verification.rb +251 -0
  367. data/lib/forgejo/models/payload_user.rb +234 -0
  368. data/lib/forgejo/models/permission.rb +233 -0
  369. data/lib/forgejo/models/pr_branch_info.rb +251 -0
  370. data/lib/forgejo/models/public_key.rb +287 -0
  371. data/lib/forgejo/models/pull_request.rb +538 -0
  372. data/lib/forgejo/models/pull_request_meta.rb +242 -0
  373. data/lib/forgejo/models/pull_review.rb +333 -0
  374. data/lib/forgejo/models/pull_review_comment.rb +341 -0
  375. data/lib/forgejo/models/pull_review_request_options.rb +228 -0
  376. data/lib/forgejo/models/push_mirror.rb +278 -0
  377. data/lib/forgejo/models/reaction.rb +233 -0
  378. data/lib/forgejo/models/reference.rb +232 -0
  379. data/lib/forgejo/models/release.rb +370 -0
  380. data/lib/forgejo/models/rename_user_option.rb +223 -0
  381. data/lib/forgejo/models/replace_flags_option.rb +217 -0
  382. data/lib/forgejo/models/repo_collaborator_permission.rb +233 -0
  383. data/lib/forgejo/models/repo_commit.rb +259 -0
  384. data/lib/forgejo/models/repo_create_release_attachment_request.rb +215 -0
  385. data/lib/forgejo/models/repo_topic_options.rb +218 -0
  386. data/lib/forgejo/models/repo_transfer.rb +235 -0
  387. data/lib/forgejo/models/repository.rb +801 -0
  388. data/lib/forgejo/models/repository_meta.rb +242 -0
  389. data/lib/forgejo/models/search_results.rb +226 -0
  390. data/lib/forgejo/models/secret.rb +225 -0
  391. data/lib/forgejo/models/server_version.rb +215 -0
  392. data/lib/forgejo/models/stop_watch.rb +269 -0
  393. data/lib/forgejo/models/submit_pull_review_options.rb +225 -0
  394. data/lib/forgejo/models/tag.rb +269 -0
  395. data/lib/forgejo/models/tag_archive_download_count.rb +224 -0
  396. data/lib/forgejo/models/tag_protection.rb +264 -0
  397. data/lib/forgejo/models/team.rb +325 -0
  398. data/lib/forgejo/models/team_search200_response.rb +225 -0
  399. data/lib/forgejo/models/timeline_comment.rb +469 -0
  400. data/lib/forgejo/models/topic_name.rb +217 -0
  401. data/lib/forgejo/models/topic_response.rb +251 -0
  402. data/lib/forgejo/models/tracked_time.rb +272 -0
  403. data/lib/forgejo/models/transfer_repo_option.rb +234 -0
  404. data/lib/forgejo/models/update_file_options.rb +317 -0
  405. data/lib/forgejo/models/update_repo_avatar_option.rb +216 -0
  406. data/lib/forgejo/models/update_user_avatar_option.rb +216 -0
  407. data/lib/forgejo/models/update_variable_option.rb +233 -0
  408. data/lib/forgejo/models/user.rb +433 -0
  409. data/lib/forgejo/models/user_heatmap_data.rb +225 -0
  410. data/lib/forgejo/models/user_search200_response.rb +225 -0
  411. data/lib/forgejo/models/user_settings.rb +306 -0
  412. data/lib/forgejo/models/user_settings_options.rb +306 -0
  413. data/lib/forgejo/models/watch_info.rb +260 -0
  414. data/lib/forgejo/models/wiki_commit.rb +242 -0
  415. data/lib/forgejo/models/wiki_commit_list.rb +226 -0
  416. data/lib/forgejo/models/wiki_page.rb +279 -0
  417. data/lib/forgejo/models/wiki_page_meta_data.rb +242 -0
  418. data/lib/forgejo/version.rb +15 -0
  419. data/lib/forgejo.rb +241 -0
  420. data/manifest.scm +2 -0
  421. data/patch +7 -0
  422. data/patch~ +1 -0
  423. data/smoke +16 -0
  424. data/smoke~ +1 -0
  425. data/spec/api/activitypub_api_spec.rb +80 -0
  426. data/spec/api/admin_api_spec.rb +308 -0
  427. data/spec/api/issue_api_spec.rb +998 -0
  428. data/spec/api/miscellaneous_api_spec.rb +161 -0
  429. data/spec/api/notification_api_spec.rb +134 -0
  430. data/spec/api/organization_api_spec.rb +752 -0
  431. data/spec/api/package_api_spec.rb +92 -0
  432. data/spec/api/repository_api_spec.rb +2366 -0
  433. data/spec/api/settings_api_spec.rb +75 -0
  434. data/spec/api/user_api_spec.rb +839 -0
  435. data/spec/models/access_token_spec.rb +60 -0
  436. data/spec/models/action_task_response_spec.rb +42 -0
  437. data/spec/models/action_task_spec.rb +108 -0
  438. data/spec/models/action_variable_spec.rb +54 -0
  439. data/spec/models/activity_pub_spec.rb +36 -0
  440. data/spec/models/activity_spec.rb +112 -0
  441. data/spec/models/add_collaborator_option_spec.rb +36 -0
  442. data/spec/models/add_time_option_spec.rb +48 -0
  443. data/spec/models/annotated_tag_object_spec.rb +48 -0
  444. data/spec/models/annotated_tag_spec.rb +78 -0
  445. data/spec/models/api_error_spec.rb +42 -0
  446. data/spec/models/attachment_spec.rb +72 -0
  447. data/spec/models/blocked_user_spec.rb +42 -0
  448. data/spec/models/branch_protection_spec.rb +192 -0
  449. data/spec/models/branch_spec.rb +84 -0
  450. data/spec/models/change_file_operation_spec.rb +64 -0
  451. data/spec/models/change_files_options_spec.rb +78 -0
  452. data/spec/models/changed_file_spec.rb +84 -0
  453. data/spec/models/combined_status_spec.rb +72 -0
  454. data/spec/models/comment_spec.rb +96 -0
  455. data/spec/models/commit_affected_files_spec.rb +42 -0
  456. data/spec/models/commit_date_options_spec.rb +42 -0
  457. data/spec/models/commit_meta_spec.rb +48 -0
  458. data/spec/models/commit_spec.rb +90 -0
  459. data/spec/models/commit_stats_spec.rb +48 -0
  460. data/spec/models/commit_status_spec.rb +84 -0
  461. data/spec/models/commit_user_spec.rb +48 -0
  462. data/spec/models/compare_spec.rb +42 -0
  463. data/spec/models/contents_response_spec.rb +120 -0
  464. data/spec/models/create_access_token_option_spec.rb +42 -0
  465. data/spec/models/create_branch_protection_option_spec.rb +180 -0
  466. data/spec/models/create_branch_repo_option_spec.rb +48 -0
  467. data/spec/models/create_email_option_spec.rb +36 -0
  468. data/spec/models/create_file_options_spec.rb +78 -0
  469. data/spec/models/create_fork_option_spec.rb +42 -0
  470. data/spec/models/create_gpg_key_option_spec.rb +42 -0
  471. data/spec/models/create_hook_option_spec.rb +70 -0
  472. data/spec/models/create_issue_comment_option_spec.rb +42 -0
  473. data/spec/models/create_issue_option_spec.rb +84 -0
  474. data/spec/models/create_key_option_spec.rb +48 -0
  475. data/spec/models/create_label_option_spec.rb +60 -0
  476. data/spec/models/create_milestone_option_spec.rb +58 -0
  477. data/spec/models/create_o_auth2_application_options_spec.rb +48 -0
  478. data/spec/models/create_or_update_secret_option_spec.rb +36 -0
  479. data/spec/models/create_org_option_spec.rb +82 -0
  480. data/spec/models/create_pull_request_option_spec.rb +84 -0
  481. data/spec/models/create_pull_review_comment_spec.rb +54 -0
  482. data/spec/models/create_pull_review_options_spec.rb +54 -0
  483. data/spec/models/create_push_mirror_option_spec.rb +60 -0
  484. data/spec/models/create_release_option_spec.rb +72 -0
  485. data/spec/models/create_repo_option_spec.rb +110 -0
  486. data/spec/models/create_status_option_spec.rb +54 -0
  487. data/spec/models/create_tag_option_spec.rb +48 -0
  488. data/spec/models/create_tag_protection_option_spec.rb +48 -0
  489. data/spec/models/create_team_option_spec.rb +76 -0
  490. data/spec/models/create_user_option_spec.rb +96 -0
  491. data/spec/models/create_variable_option_spec.rb +36 -0
  492. data/spec/models/create_wiki_page_options_spec.rb +48 -0
  493. data/spec/models/cron_spec.rb +60 -0
  494. data/spec/models/delete_email_option_spec.rb +36 -0
  495. data/spec/models/delete_file_options_spec.rb +78 -0
  496. data/spec/models/delete_labels_option_spec.rb +36 -0
  497. data/spec/models/deploy_key_spec.rb +84 -0
  498. data/spec/models/dismiss_pull_review_options_spec.rb +42 -0
  499. data/spec/models/dispatch_workflow_option_spec.rb +42 -0
  500. data/spec/models/edit_attachment_options_spec.rb +36 -0
  501. data/spec/models/edit_branch_protection_option_spec.rb +168 -0
  502. data/spec/models/edit_deadline_option_spec.rb +36 -0
  503. data/spec/models/edit_git_hook_option_spec.rb +36 -0
  504. data/spec/models/edit_hook_option_spec.rb +60 -0
  505. data/spec/models/edit_issue_comment_option_spec.rb +42 -0
  506. data/spec/models/edit_issue_option_spec.rb +90 -0
  507. data/spec/models/edit_label_option_spec.rb +60 -0
  508. data/spec/models/edit_milestone_option_spec.rb +54 -0
  509. data/spec/models/edit_org_option_spec.rb +76 -0
  510. data/spec/models/edit_pull_request_option_spec.rb +96 -0
  511. data/spec/models/edit_reaction_option_spec.rb +36 -0
  512. data/spec/models/edit_release_option_spec.rb +72 -0
  513. data/spec/models/edit_repo_option_spec.rb +228 -0
  514. data/spec/models/edit_tag_protection_option_spec.rb +48 -0
  515. data/spec/models/edit_team_option_spec.rb +76 -0
  516. data/spec/models/edit_user_option_spec.rb +144 -0
  517. data/spec/models/email_spec.rb +60 -0
  518. data/spec/models/external_tracker_spec.rb +54 -0
  519. data/spec/models/external_wiki_spec.rb +36 -0
  520. data/spec/models/file_commit_response_spec.rb +84 -0
  521. data/spec/models/file_delete_response_spec.rb +48 -0
  522. data/spec/models/file_links_response_spec.rb +48 -0
  523. data/spec/models/file_response_spec.rb +48 -0
  524. data/spec/models/files_response_spec.rb +48 -0
  525. data/spec/models/general_api_settings_spec.rb +54 -0
  526. data/spec/models/general_attachment_settings_spec.rb +54 -0
  527. data/spec/models/general_repo_settings_spec.rb +72 -0
  528. data/spec/models/general_ui_settings_spec.rb +48 -0
  529. data/spec/models/generate_repo_option_spec.rb +102 -0
  530. data/spec/models/git_blob_response_spec.rb +60 -0
  531. data/spec/models/git_entry_spec.rb +66 -0
  532. data/spec/models/git_hook_spec.rb +48 -0
  533. data/spec/models/git_object_spec.rb +48 -0
  534. data/spec/models/git_tree_response_spec.rb +66 -0
  535. data/spec/models/gitignore_template_info_spec.rb +42 -0
  536. data/spec/models/gpg_key_email_spec.rb +42 -0
  537. data/spec/models/gpg_key_spec.rb +108 -0
  538. data/spec/models/hook_spec.rb +102 -0
  539. data/spec/models/identity_spec.rb +42 -0
  540. data/spec/models/internal_tracker_spec.rb +48 -0
  541. data/spec/models/issue_config_contact_link_spec.rb +48 -0
  542. data/spec/models/issue_config_spec.rb +42 -0
  543. data/spec/models/issue_config_validation_spec.rb +42 -0
  544. data/spec/models/issue_deadline_spec.rb +36 -0
  545. data/spec/models/issue_form_field_spec.rb +60 -0
  546. data/spec/models/issue_labels_option_spec.rb +42 -0
  547. data/spec/models/issue_meta_spec.rb +48 -0
  548. data/spec/models/issue_spec.rb +180 -0
  549. data/spec/models/issue_template_spec.rb +78 -0
  550. data/spec/models/label_spec.rb +72 -0
  551. data/spec/models/label_template_spec.rb +54 -0
  552. data/spec/models/license_template_info_spec.rb +60 -0
  553. data/spec/models/licenses_template_list_entry_spec.rb +48 -0
  554. data/spec/models/markdown_option_spec.rb +54 -0
  555. data/spec/models/markup_option_spec.rb +60 -0
  556. data/spec/models/merge_pull_request_option_spec.rb +82 -0
  557. data/spec/models/migrate_repo_options_spec.rb +154 -0
  558. data/spec/models/milestone_spec.rb +90 -0
  559. data/spec/models/new_issue_pins_allowed_spec.rb +42 -0
  560. data/spec/models/node_info_services_spec.rb +42 -0
  561. data/spec/models/node_info_software_spec.rb +54 -0
  562. data/spec/models/node_info_spec.rb +72 -0
  563. data/spec/models/node_info_usage_spec.rb +48 -0
  564. data/spec/models/node_info_usage_users_spec.rb +48 -0
  565. data/spec/models/note_spec.rb +42 -0
  566. data/spec/models/notification_count_spec.rb +36 -0
  567. data/spec/models/notification_subject_spec.rb +72 -0
  568. data/spec/models/notification_thread_spec.rb +72 -0
  569. data/spec/models/o_auth2_application_spec.rb +72 -0
  570. data/spec/models/organization_permissions_spec.rb +60 -0
  571. data/spec/models/organization_spec.rb +96 -0
  572. data/spec/models/package_file_spec.rb +72 -0
  573. data/spec/models/package_spec.rb +84 -0
  574. data/spec/models/payload_commit_spec.rb +90 -0
  575. data/spec/models/payload_commit_verification_spec.rb +60 -0
  576. data/spec/models/payload_user_spec.rb +48 -0
  577. data/spec/models/permission_spec.rb +48 -0
  578. data/spec/models/pr_branch_info_spec.rb +60 -0
  579. data/spec/models/public_key_spec.rb +84 -0
  580. data/spec/models/pull_request_meta_spec.rb +54 -0
  581. data/spec/models/pull_request_spec.rb +246 -0
  582. data/spec/models/pull_review_comment_spec.rb +120 -0
  583. data/spec/models/pull_review_request_options_spec.rb +42 -0
  584. data/spec/models/pull_review_spec.rb +114 -0
  585. data/spec/models/push_mirror_spec.rb +78 -0
  586. data/spec/models/reaction_spec.rb +48 -0
  587. data/spec/models/reference_spec.rb +48 -0
  588. data/spec/models/release_spec.rb +138 -0
  589. data/spec/models/rename_user_option_spec.rb +36 -0
  590. data/spec/models/replace_flags_option_spec.rb +36 -0
  591. data/spec/models/repo_collaborator_permission_spec.rb +48 -0
  592. data/spec/models/repo_commit_spec.rb +66 -0
  593. data/spec/models/repo_create_release_attachment_request_spec.rb +36 -0
  594. data/spec/models/repo_topic_options_spec.rb +36 -0
  595. data/spec/models/repo_transfer_spec.rb +48 -0
  596. data/spec/models/repository_meta_spec.rb +54 -0
  597. data/spec/models/repository_spec.rb +406 -0
  598. data/spec/models/search_results_spec.rb +42 -0
  599. data/spec/models/secret_spec.rb +42 -0
  600. data/spec/models/server_version_spec.rb +36 -0
  601. data/spec/models/stop_watch_spec.rb +72 -0
  602. data/spec/models/submit_pull_review_options_spec.rb +42 -0
  603. data/spec/models/tag_archive_download_count_spec.rb +42 -0
  604. data/spec/models/tag_protection_spec.rb +66 -0
  605. data/spec/models/tag_spec.rb +72 -0
  606. data/spec/models/team_search200_response_spec.rb +42 -0
  607. data/spec/models/team_spec.rb +88 -0
  608. data/spec/models/timeline_comment_spec.rb +204 -0
  609. data/spec/models/topic_name_spec.rb +36 -0
  610. data/spec/models/topic_response_spec.rb +60 -0
  611. data/spec/models/tracked_time_spec.rb +72 -0
  612. data/spec/models/transfer_repo_option_spec.rb +42 -0
  613. data/spec/models/update_file_options_spec.rb +90 -0
  614. data/spec/models/update_repo_avatar_option_spec.rb +36 -0
  615. data/spec/models/update_user_avatar_option_spec.rb +36 -0
  616. data/spec/models/update_variable_option_spec.rb +42 -0
  617. data/spec/models/user_heatmap_data_spec.rb +42 -0
  618. data/spec/models/user_search200_response_spec.rb +42 -0
  619. data/spec/models/user_settings_options_spec.rb +96 -0
  620. data/spec/models/user_settings_spec.rb +96 -0
  621. data/spec/models/user_spec.rb +168 -0
  622. data/spec/models/watch_info_spec.rb +66 -0
  623. data/spec/models/wiki_commit_list_spec.rb +42 -0
  624. data/spec/models/wiki_commit_spec.rb +54 -0
  625. data/spec/models/wiki_page_meta_data_spec.rb +54 -0
  626. data/spec/models/wiki_page_spec.rb +78 -0
  627. data/spec/spec_helper.rb +111 -0
  628. data/swagger.v1.json +26802 -0
  629. data/swagger.v1.patched.json +1 -0
  630. metadata +949 -0
@@ -0,0 +1,259 @@
1
+ =begin
2
+ #Forgejo API
3
+
4
+ #This documentation describes the Forgejo API.
5
+
6
+ The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Forgejo
17
+ class RepoCommit
18
+ attr_accessor :author
19
+
20
+ attr_accessor :committer
21
+
22
+ attr_accessor :message
23
+
24
+ attr_accessor :tree
25
+
26
+ attr_accessor :url
27
+
28
+ attr_accessor :verification
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'author' => :'author',
34
+ :'committer' => :'committer',
35
+ :'message' => :'message',
36
+ :'tree' => :'tree',
37
+ :'url' => :'url',
38
+ :'verification' => :'verification'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'author' => :'CommitUser',
51
+ :'committer' => :'CommitUser',
52
+ :'message' => :'String',
53
+ :'tree' => :'CommitMeta',
54
+ :'url' => :'String',
55
+ :'verification' => :'PayloadCommitVerification'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::RepoCommit` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::RepoCommit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'author')
81
+ self.author = attributes[:'author']
82
+ end
83
+
84
+ if attributes.key?(:'committer')
85
+ self.committer = attributes[:'committer']
86
+ end
87
+
88
+ if attributes.key?(:'message')
89
+ self.message = attributes[:'message']
90
+ end
91
+
92
+ if attributes.key?(:'tree')
93
+ self.tree = attributes[:'tree']
94
+ end
95
+
96
+ if attributes.key?(:'url')
97
+ self.url = attributes[:'url']
98
+ end
99
+
100
+ if attributes.key?(:'verification')
101
+ self.verification = attributes[:'verification']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ author == o.author &&
126
+ committer == o.committer &&
127
+ message == o.message &&
128
+ tree == o.tree &&
129
+ url == o.url &&
130
+ verification == o.verification
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [author, committer, message, tree, url, verification].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def self._deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = Forgejo.const_get(type)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -0,0 +1,215 @@
1
+ =begin
2
+ #Forgejo API
3
+
4
+ #This documentation describes the Forgejo API.
5
+
6
+ The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Forgejo
17
+ class RepoCreateReleaseAttachmentRequest
18
+ # attachment to upload
19
+ attr_accessor :attachment
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'attachment' => :'attachment'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'attachment' => :'File'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::RepoCreateReleaseAttachmentRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::RepoCreateReleaseAttachmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'attachment')
62
+ self.attachment = attributes[:'attachment']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ attachment == o.attachment
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [attachment].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ attributes = attributes.transform_keys(&:to_sym)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
116
+ end
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
119
+ end
120
+ end
121
+ new(transformed_hash)
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def self._deserialize(type, value)
129
+ case type.to_sym
130
+ when :Time
131
+ Time.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ # models (e.g. Pet) or oneOf
162
+ klass = Forgejo.const_get(type)
163
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #Forgejo API
3
+
4
+ #This documentation describes the Forgejo API.
5
+
6
+ The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Forgejo
17
+ # RepoTopicOptions a collection of repo topic names
18
+ class RepoTopicOptions
19
+ # list of topic names
20
+ attr_accessor :topics
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'topics' => :'topics'
26
+ }
27
+ end
28
+
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'topics' => :'Array<String>'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::RepoTopicOptions` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::RepoTopicOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'topics')
63
+ if (value = attributes[:'topics']).is_a?(Array)
64
+ self.topics = value
65
+ end
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ warn '[DEPRECATED] the `valid?` method is obsolete'
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ topics == o.topics
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [topics].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ transformed_hash = {}
111
+ openapi_types.each_pair do |key, type|
112
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
113
+ transformed_hash["#{key}"] = nil
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[attribute_map[key]].is_a?(Array)
118
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
+ end
120
+ elsif !attributes[attribute_map[key]].nil?
121
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
+ end
123
+ end
124
+ new(transformed_hash)
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def self._deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = Forgejo.const_get(type)
166
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end