forgejo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +9 -0
- data/LICENSE~ +9 -0
- data/Makefile +23 -0
- data/Makefile~ +2 -0
- data/README.md +717 -0
- data/Rakefile +10 -0
- data/docs/APIError.md +20 -0
- data/docs/AccessToken.md +26 -0
- data/docs/ActionTask.md +42 -0
- data/docs/ActionTaskResponse.md +20 -0
- data/docs/ActionVariable.md +24 -0
- data/docs/Activity.md +42 -0
- data/docs/ActivityPub.md +18 -0
- data/docs/ActivitypubApi.md +289 -0
- data/docs/AddCollaboratorOption.md +18 -0
- data/docs/AddTimeOption.md +22 -0
- data/docs/AdminApi.md +1672 -0
- data/docs/AnnotatedTag.md +32 -0
- data/docs/AnnotatedTagObject.md +22 -0
- data/docs/Attachment.md +30 -0
- data/docs/BlockedUser.md +20 -0
- data/docs/Branch.md +34 -0
- data/docs/BranchProtection.md +70 -0
- data/docs/ChangeFileOperation.md +26 -0
- data/docs/ChangeFilesOptions.md +32 -0
- data/docs/ChangedFile.md +34 -0
- data/docs/CombinedStatus.md +30 -0
- data/docs/Comment.md +38 -0
- data/docs/Commit.md +36 -0
- data/docs/CommitAffectedFiles.md +20 -0
- data/docs/CommitDateOptions.md +20 -0
- data/docs/CommitMeta.md +22 -0
- data/docs/CommitStats.md +22 -0
- data/docs/CommitStatus.md +34 -0
- data/docs/CommitUser.md +22 -0
- data/docs/Compare.md +20 -0
- data/docs/ContentsResponse.md +46 -0
- data/docs/CreateAccessTokenOption.md +20 -0
- data/docs/CreateBranchProtectionOption.md +66 -0
- data/docs/CreateBranchRepoOption.md +22 -0
- data/docs/CreateEmailOption.md +18 -0
- data/docs/CreateFileOptions.md +32 -0
- data/docs/CreateForkOption.md +20 -0
- data/docs/CreateGPGKeyOption.md +20 -0
- data/docs/CreateHookOption.md +28 -0
- data/docs/CreateIssueCommentOption.md +20 -0
- data/docs/CreateIssueOption.md +34 -0
- data/docs/CreateKeyOption.md +22 -0
- data/docs/CreateLabelOption.md +26 -0
- data/docs/CreateMilestoneOption.md +24 -0
- data/docs/CreateOAuth2ApplicationOptions.md +22 -0
- data/docs/CreateOrUpdateSecretOption.md +18 -0
- data/docs/CreateOrgOption.md +32 -0
- data/docs/CreatePullRequestOption.md +34 -0
- data/docs/CreatePullReviewComment.md +24 -0
- data/docs/CreatePullReviewOptions.md +24 -0
- data/docs/CreatePushMirrorOption.md +26 -0
- data/docs/CreateReleaseOption.md +30 -0
- data/docs/CreateRepoOption.md +40 -0
- data/docs/CreateStatusOption.md +24 -0
- data/docs/CreateTagOption.md +22 -0
- data/docs/CreateTagProtectionOption.md +22 -0
- data/docs/CreateTeamOption.md +30 -0
- data/docs/CreateUserOption.md +38 -0
- data/docs/CreateVariableOption.md +18 -0
- data/docs/CreateWikiPageOptions.md +22 -0
- data/docs/Cron.md +26 -0
- data/docs/DeleteEmailOption.md +18 -0
- data/docs/DeleteFileOptions.md +32 -0
- data/docs/DeleteLabelsOption.md +18 -0
- data/docs/DeployKey.md +34 -0
- data/docs/DismissPullReviewOptions.md +20 -0
- data/docs/DispatchWorkflowOption.md +20 -0
- data/docs/EditAttachmentOptions.md +18 -0
- data/docs/EditBranchProtectionOption.md +62 -0
- data/docs/EditDeadlineOption.md +18 -0
- data/docs/EditGitHookOption.md +18 -0
- data/docs/EditHookOption.md +26 -0
- data/docs/EditIssueCommentOption.md +20 -0
- data/docs/EditIssueOption.md +36 -0
- data/docs/EditLabelOption.md +26 -0
- data/docs/EditMilestoneOption.md +24 -0
- data/docs/EditOrgOption.md +30 -0
- data/docs/EditPullRequestOption.md +38 -0
- data/docs/EditReactionOption.md +18 -0
- data/docs/EditReleaseOption.md +30 -0
- data/docs/EditRepoOption.md +82 -0
- data/docs/EditTagProtectionOption.md +22 -0
- data/docs/EditTeamOption.md +30 -0
- data/docs/EditUserOption.md +54 -0
- data/docs/Email.md +26 -0
- data/docs/ExternalTracker.md +24 -0
- data/docs/ExternalWiki.md +18 -0
- data/docs/FileCommitResponse.md +34 -0
- data/docs/FileDeleteResponse.md +22 -0
- data/docs/FileLinksResponse.md +22 -0
- data/docs/FileResponse.md +22 -0
- data/docs/FilesResponse.md +22 -0
- data/docs/GPGKey.md +42 -0
- data/docs/GPGKeyEmail.md +20 -0
- data/docs/GeneralAPISettings.md +24 -0
- data/docs/GeneralAttachmentSettings.md +24 -0
- data/docs/GeneralRepoSettings.md +30 -0
- data/docs/GeneralUISettings.md +22 -0
- data/docs/GenerateRepoOption.md +40 -0
- data/docs/GitBlobResponse.md +26 -0
- data/docs/GitEntry.md +28 -0
- data/docs/GitHook.md +22 -0
- data/docs/GitObject.md +22 -0
- data/docs/GitTreeResponse.md +28 -0
- data/docs/GitignoreTemplateInfo.md +20 -0
- data/docs/Hook.md +40 -0
- data/docs/Identity.md +20 -0
- data/docs/InternalTracker.md +22 -0
- data/docs/Issue.md +66 -0
- data/docs/IssueApi.md +5206 -0
- data/docs/IssueConfig.md +20 -0
- data/docs/IssueConfigContactLink.md +22 -0
- data/docs/IssueConfigValidation.md +20 -0
- data/docs/IssueDeadline.md +18 -0
- data/docs/IssueFormField.md +26 -0
- data/docs/IssueLabelsOption.md +20 -0
- data/docs/IssueMeta.md +22 -0
- data/docs/IssueTemplate.md +32 -0
- data/docs/Label.md +30 -0
- data/docs/LabelTemplate.md +24 -0
- data/docs/LicenseTemplateInfo.md +26 -0
- data/docs/LicensesTemplateListEntry.md +22 -0
- data/docs/MarkdownOption.md +24 -0
- data/docs/MarkupOption.md +26 -0
- data/docs/MergePullRequestOption.md +32 -0
- data/docs/MigrateRepoOptions.md +56 -0
- data/docs/Milestone.md +36 -0
- data/docs/MiscellaneousApi.md +833 -0
- data/docs/NewIssuePinsAllowed.md +20 -0
- data/docs/NodeInfo.md +30 -0
- data/docs/NodeInfoServices.md +20 -0
- data/docs/NodeInfoSoftware.md +24 -0
- data/docs/NodeInfoUsage.md +22 -0
- data/docs/NodeInfoUsageUsers.md +22 -0
- data/docs/Note.md +20 -0
- data/docs/NotificationApi.md +550 -0
- data/docs/NotificationCount.md +18 -0
- data/docs/NotificationSubject.md +30 -0
- data/docs/NotificationThread.md +30 -0
- data/docs/OAuth2Application.md +30 -0
- data/docs/Organization.md +38 -0
- data/docs/OrganizationApi.md +4259 -0
- data/docs/OrganizationPermissions.md +26 -0
- data/docs/PRBranchInfo.md +26 -0
- data/docs/Package.md +34 -0
- data/docs/PackageApi.md +314 -0
- data/docs/PackageFile.md +30 -0
- data/docs/PayloadCommit.md +36 -0
- data/docs/PayloadCommitVerification.md +26 -0
- data/docs/PayloadUser.md +22 -0
- data/docs/Permission.md +22 -0
- data/docs/PublicKey.md +34 -0
- data/docs/PullRequest.md +88 -0
- data/docs/PullRequestMeta.md +24 -0
- data/docs/PullReview.md +44 -0
- data/docs/PullReviewComment.md +46 -0
- data/docs/PullReviewRequestOptions.md +20 -0
- data/docs/PushMirror.md +32 -0
- data/docs/Reaction.md +22 -0
- data/docs/Reference.md +22 -0
- data/docs/Release.md +52 -0
- data/docs/RenameUserOption.md +18 -0
- data/docs/ReplaceFlagsOption.md +18 -0
- data/docs/RepoCollaboratorPermission.md +22 -0
- data/docs/RepoCommit.md +28 -0
- data/docs/RepoCreateReleaseAttachmentRequest.md +18 -0
- data/docs/RepoTopicOptions.md +18 -0
- data/docs/RepoTransfer.md +22 -0
- data/docs/Repository.md +140 -0
- data/docs/RepositoryApi.md +13022 -0
- data/docs/RepositoryMeta.md +24 -0
- data/docs/SearchResults.md +20 -0
- data/docs/Secret.md +20 -0
- data/docs/ServerVersion.md +18 -0
- data/docs/SettingsApi.md +275 -0
- data/docs/StopWatch.md +30 -0
- data/docs/SubmitPullReviewOptions.md +20 -0
- data/docs/Tag.md +30 -0
- data/docs/TagArchiveDownloadCount.md +20 -0
- data/docs/TagProtection.md +28 -0
- data/docs/Team.md +34 -0
- data/docs/TeamSearch200Response.md +20 -0
- data/docs/TimelineComment.md +74 -0
- data/docs/TopicName.md +18 -0
- data/docs/TopicResponse.md +26 -0
- data/docs/TrackedTime.md +30 -0
- data/docs/TransferRepoOption.md +20 -0
- data/docs/UpdateFileOptions.md +36 -0
- data/docs/UpdateRepoAvatarOption.md +18 -0
- data/docs/UpdateUserAvatarOption.md +18 -0
- data/docs/UpdateVariableOption.md +20 -0
- data/docs/User.md +62 -0
- data/docs/UserApi.md +4969 -0
- data/docs/UserHeatmapData.md +20 -0
- data/docs/UserSearch200Response.md +20 -0
- data/docs/UserSettings.md +38 -0
- data/docs/UserSettingsOptions.md +38 -0
- data/docs/WatchInfo.md +28 -0
- data/docs/WikiCommit.md +24 -0
- data/docs/WikiCommitList.md +20 -0
- data/docs/WikiPage.md +32 -0
- data/docs/WikiPageMetaData.md +24 -0
- data/forgejo.gemspec +49 -0
- data/git_push.sh +57 -0
- data/lib/forgejo/api/activitypub_api.rb +269 -0
- data/lib/forgejo/api/admin_api.rb +1496 -0
- data/lib/forgejo/api/issue_api.rb +5282 -0
- data/lib/forgejo/api/miscellaneous_api.rb +725 -0
- data/lib/forgejo/api/notification_api.rb +520 -0
- data/lib/forgejo/api/organization_api.rb +3898 -0
- data/lib/forgejo/api/package_api.rb +334 -0
- data/lib/forgejo/api/repository_api.rb +12849 -0
- data/lib/forgejo/api/settings_api.rb +242 -0
- data/lib/forgejo/api/user_api.rb +4314 -0
- data/lib/forgejo/api_client.rb +437 -0
- data/lib/forgejo/api_error.rb +58 -0
- data/lib/forgejo/configuration.rb +392 -0
- data/lib/forgejo/models/access_token.rb +252 -0
- data/lib/forgejo/models/action_task.rb +323 -0
- data/lib/forgejo/models/action_task_response.rb +226 -0
- data/lib/forgejo/models/action_variable.rb +246 -0
- data/lib/forgejo/models/activity.rb +357 -0
- data/lib/forgejo/models/activity_pub.rb +215 -0
- data/lib/forgejo/models/add_collaborator_option.rb +215 -0
- data/lib/forgejo/models/add_time_option.rb +242 -0
- data/lib/forgejo/models/annotated_tag.rb +278 -0
- data/lib/forgejo/models/annotated_tag_object.rb +233 -0
- data/lib/forgejo/models/api_error.rb +224 -0
- data/lib/forgejo/models/attachment.rb +269 -0
- data/lib/forgejo/models/blocked_user.rb +223 -0
- data/lib/forgejo/models/branch.rb +289 -0
- data/lib/forgejo/models/branch_protection.rb +464 -0
- data/lib/forgejo/models/change_file_operation.rb +304 -0
- data/lib/forgejo/models/change_files_options.rb +292 -0
- data/lib/forgejo/models/changed_file.rb +287 -0
- data/lib/forgejo/models/combined_status.rb +272 -0
- data/lib/forgejo/models/comment.rb +307 -0
- data/lib/forgejo/models/commit.rb +299 -0
- data/lib/forgejo/models/commit_affected_files.rb +224 -0
- data/lib/forgejo/models/commit_date_options.rb +224 -0
- data/lib/forgejo/models/commit_meta.rb +232 -0
- data/lib/forgejo/models/commit_stats.rb +233 -0
- data/lib/forgejo/models/commit_status.rb +288 -0
- data/lib/forgejo/models/commit_user.rb +232 -0
- data/lib/forgejo/models/compare.rb +225 -0
- data/lib/forgejo/models/contents_response.rb +346 -0
- data/lib/forgejo/models/create_access_token_option.rb +233 -0
- data/lib/forgejo/models/create_branch_protection_option.rb +446 -0
- data/lib/forgejo/models/create_branch_repo_option.rb +243 -0
- data/lib/forgejo/models/create_email_option.rb +218 -0
- data/lib/forgejo/models/create_file_options.rb +290 -0
- data/lib/forgejo/models/create_fork_option.rb +226 -0
- data/lib/forgejo/models/create_gpg_key_option.rb +232 -0
- data/lib/forgejo/models/create_hook_option.rb +315 -0
- data/lib/forgejo/models/create_issue_comment_option.rb +231 -0
- data/lib/forgejo/models/create_issue_option.rb +301 -0
- data/lib/forgejo/models/create_key_option.rb +250 -0
- data/lib/forgejo/models/create_label_option.rb +265 -0
- data/lib/forgejo/models/create_milestone_option.rb +276 -0
- data/lib/forgejo/models/create_o_auth2_application_options.rb +235 -0
- data/lib/forgejo/models/create_or_update_secret_option.rb +223 -0
- data/lib/forgejo/models/create_org_option.rb +320 -0
- data/lib/forgejo/models/create_pull_request_option.rb +291 -0
- data/lib/forgejo/models/create_pull_review_comment.rb +245 -0
- data/lib/forgejo/models/create_pull_review_options.rb +245 -0
- data/lib/forgejo/models/create_push_mirror_option.rb +250 -0
- data/lib/forgejo/models/create_release_option.rb +276 -0
- data/lib/forgejo/models/create_repo_option.rb +379 -0
- data/lib/forgejo/models/create_status_option.rb +243 -0
- data/lib/forgejo/models/create_tag_option.rb +240 -0
- data/lib/forgejo/models/create_tag_protection_option.rb +237 -0
- data/lib/forgejo/models/create_team_option.rb +314 -0
- data/lib/forgejo/models/create_user_option.rb +320 -0
- data/lib/forgejo/models/create_variable_option.rb +223 -0
- data/lib/forgejo/models/create_wiki_page_options.rb +236 -0
- data/lib/forgejo/models/cron.rb +251 -0
- data/lib/forgejo/models/delete_email_option.rb +218 -0
- data/lib/forgejo/models/delete_file_options.rb +290 -0
- data/lib/forgejo/models/delete_labels_option.rb +215 -0
- data/lib/forgejo/models/deploy_key.rb +287 -0
- data/lib/forgejo/models/dismiss_pull_review_options.rb +224 -0
- data/lib/forgejo/models/dispatch_workflow_option.rb +235 -0
- data/lib/forgejo/models/edit_attachment_options.rb +215 -0
- data/lib/forgejo/models/edit_branch_protection_option.rb +427 -0
- data/lib/forgejo/models/edit_deadline_option.rb +222 -0
- data/lib/forgejo/models/edit_git_hook_option.rb +215 -0
- data/lib/forgejo/models/edit_hook_option.rb +255 -0
- data/lib/forgejo/models/edit_issue_comment_option.rb +231 -0
- data/lib/forgejo/models/edit_issue_option.rb +299 -0
- data/lib/forgejo/models/edit_label_option.rb +251 -0
- data/lib/forgejo/models/edit_milestone_option.rb +242 -0
- data/lib/forgejo/models/edit_org_option.rb +304 -0
- data/lib/forgejo/models/edit_pull_request_option.rb +309 -0
- data/lib/forgejo/models/edit_reaction_option.rb +215 -0
- data/lib/forgejo/models/edit_release_option.rb +269 -0
- data/lib/forgejo/models/edit_repo_option.rb +533 -0
- data/lib/forgejo/models/edit_tag_protection_option.rb +237 -0
- data/lib/forgejo/models/edit_team_option.rb +314 -0
- data/lib/forgejo/models/edit_user_option.rb +377 -0
- data/lib/forgejo/models/email.rb +251 -0
- data/lib/forgejo/models/external_tracker.rb +246 -0
- data/lib/forgejo/models/external_wiki.rb +216 -0
- data/lib/forgejo/models/file_commit_response.rb +288 -0
- data/lib/forgejo/models/file_delete_response.rb +233 -0
- data/lib/forgejo/models/file_links_response.rb +233 -0
- data/lib/forgejo/models/file_response.rb +233 -0
- data/lib/forgejo/models/files_response.rb +235 -0
- data/lib/forgejo/models/general_api_settings.rb +242 -0
- data/lib/forgejo/models/general_attachment_settings.rb +242 -0
- data/lib/forgejo/models/general_repo_settings.rb +269 -0
- data/lib/forgejo/models/general_ui_settings.rb +237 -0
- data/lib/forgejo/models/generate_repo_option.rb +340 -0
- data/lib/forgejo/models/git_blob_response.rb +251 -0
- data/lib/forgejo/models/git_entry.rb +260 -0
- data/lib/forgejo/models/git_hook.rb +233 -0
- data/lib/forgejo/models/git_object.rb +232 -0
- data/lib/forgejo/models/git_tree_response.rb +262 -0
- data/lib/forgejo/models/gitignore_template_info.rb +224 -0
- data/lib/forgejo/models/gpg_key.rb +327 -0
- data/lib/forgejo/models/gpg_key_email.rb +224 -0
- data/lib/forgejo/models/hook.rb +319 -0
- data/lib/forgejo/models/identity.rb +224 -0
- data/lib/forgejo/models/internal_tracker.rb +236 -0
- data/lib/forgejo/models/issue.rb +438 -0
- data/lib/forgejo/models/issue_config.rb +225 -0
- data/lib/forgejo/models/issue_config_contact_link.rb +232 -0
- data/lib/forgejo/models/issue_config_validation.rb +223 -0
- data/lib/forgejo/models/issue_deadline.rb +215 -0
- data/lib/forgejo/models/issue_form_field.rb +257 -0
- data/lib/forgejo/models/issue_labels_option.rb +227 -0
- data/lib/forgejo/models/issue_meta.rb +233 -0
- data/lib/forgejo/models/issue_template.rb +282 -0
- data/lib/forgejo/models/label.rb +269 -0
- data/lib/forgejo/models/label_template.rb +242 -0
- data/lib/forgejo/models/license_template_info.rb +251 -0
- data/lib/forgejo/models/licenses_template_list_entry.rb +233 -0
- data/lib/forgejo/models/markdown_option.rb +246 -0
- data/lib/forgejo/models/markup_option.rb +256 -0
- data/lib/forgejo/models/merge_pull_request_option.rb +319 -0
- data/lib/forgejo/models/migrate_repo_options.rb +436 -0
- data/lib/forgejo/models/milestone.rb +297 -0
- data/lib/forgejo/models/new_issue_pins_allowed.rb +224 -0
- data/lib/forgejo/models/node_info.rb +271 -0
- data/lib/forgejo/models/node_info_services.rb +228 -0
- data/lib/forgejo/models/node_info_software.rb +242 -0
- data/lib/forgejo/models/node_info_usage.rb +233 -0
- data/lib/forgejo/models/node_info_usage_users.rb +233 -0
- data/lib/forgejo/models/note.rb +224 -0
- data/lib/forgejo/models/notification_count.rb +215 -0
- data/lib/forgejo/models/notification_subject.rb +271 -0
- data/lib/forgejo/models/notification_thread.rb +269 -0
- data/lib/forgejo/models/o_auth2_application.rb +270 -0
- data/lib/forgejo/models/organization.rb +306 -0
- data/lib/forgejo/models/organization_permissions.rb +251 -0
- data/lib/forgejo/models/package.rb +287 -0
- data/lib/forgejo/models/package_file.rb +269 -0
- data/lib/forgejo/models/payload_commit.rb +303 -0
- data/lib/forgejo/models/payload_commit_verification.rb +251 -0
- data/lib/forgejo/models/payload_user.rb +234 -0
- data/lib/forgejo/models/permission.rb +233 -0
- data/lib/forgejo/models/pr_branch_info.rb +251 -0
- data/lib/forgejo/models/public_key.rb +287 -0
- data/lib/forgejo/models/pull_request.rb +538 -0
- data/lib/forgejo/models/pull_request_meta.rb +242 -0
- data/lib/forgejo/models/pull_review.rb +333 -0
- data/lib/forgejo/models/pull_review_comment.rb +341 -0
- data/lib/forgejo/models/pull_review_request_options.rb +228 -0
- data/lib/forgejo/models/push_mirror.rb +278 -0
- data/lib/forgejo/models/reaction.rb +233 -0
- data/lib/forgejo/models/reference.rb +232 -0
- data/lib/forgejo/models/release.rb +370 -0
- data/lib/forgejo/models/rename_user_option.rb +223 -0
- data/lib/forgejo/models/replace_flags_option.rb +217 -0
- data/lib/forgejo/models/repo_collaborator_permission.rb +233 -0
- data/lib/forgejo/models/repo_commit.rb +259 -0
- data/lib/forgejo/models/repo_create_release_attachment_request.rb +215 -0
- data/lib/forgejo/models/repo_topic_options.rb +218 -0
- data/lib/forgejo/models/repo_transfer.rb +235 -0
- data/lib/forgejo/models/repository.rb +801 -0
- data/lib/forgejo/models/repository_meta.rb +242 -0
- data/lib/forgejo/models/search_results.rb +226 -0
- data/lib/forgejo/models/secret.rb +225 -0
- data/lib/forgejo/models/server_version.rb +215 -0
- data/lib/forgejo/models/stop_watch.rb +269 -0
- data/lib/forgejo/models/submit_pull_review_options.rb +225 -0
- data/lib/forgejo/models/tag.rb +269 -0
- data/lib/forgejo/models/tag_archive_download_count.rb +224 -0
- data/lib/forgejo/models/tag_protection.rb +264 -0
- data/lib/forgejo/models/team.rb +325 -0
- data/lib/forgejo/models/team_search200_response.rb +225 -0
- data/lib/forgejo/models/timeline_comment.rb +469 -0
- data/lib/forgejo/models/topic_name.rb +217 -0
- data/lib/forgejo/models/topic_response.rb +251 -0
- data/lib/forgejo/models/tracked_time.rb +272 -0
- data/lib/forgejo/models/transfer_repo_option.rb +234 -0
- data/lib/forgejo/models/update_file_options.rb +317 -0
- data/lib/forgejo/models/update_repo_avatar_option.rb +216 -0
- data/lib/forgejo/models/update_user_avatar_option.rb +216 -0
- data/lib/forgejo/models/update_variable_option.rb +233 -0
- data/lib/forgejo/models/user.rb +433 -0
- data/lib/forgejo/models/user_heatmap_data.rb +225 -0
- data/lib/forgejo/models/user_search200_response.rb +225 -0
- data/lib/forgejo/models/user_settings.rb +306 -0
- data/lib/forgejo/models/user_settings_options.rb +306 -0
- data/lib/forgejo/models/watch_info.rb +260 -0
- data/lib/forgejo/models/wiki_commit.rb +242 -0
- data/lib/forgejo/models/wiki_commit_list.rb +226 -0
- data/lib/forgejo/models/wiki_page.rb +279 -0
- data/lib/forgejo/models/wiki_page_meta_data.rb +242 -0
- data/lib/forgejo/version.rb +15 -0
- data/lib/forgejo.rb +241 -0
- data/manifest.scm +2 -0
- data/patch +7 -0
- data/patch~ +1 -0
- data/smoke +16 -0
- data/smoke~ +1 -0
- data/spec/api/activitypub_api_spec.rb +80 -0
- data/spec/api/admin_api_spec.rb +308 -0
- data/spec/api/issue_api_spec.rb +998 -0
- data/spec/api/miscellaneous_api_spec.rb +161 -0
- data/spec/api/notification_api_spec.rb +134 -0
- data/spec/api/organization_api_spec.rb +752 -0
- data/spec/api/package_api_spec.rb +92 -0
- data/spec/api/repository_api_spec.rb +2366 -0
- data/spec/api/settings_api_spec.rb +75 -0
- data/spec/api/user_api_spec.rb +839 -0
- data/spec/models/access_token_spec.rb +60 -0
- data/spec/models/action_task_response_spec.rb +42 -0
- data/spec/models/action_task_spec.rb +108 -0
- data/spec/models/action_variable_spec.rb +54 -0
- data/spec/models/activity_pub_spec.rb +36 -0
- data/spec/models/activity_spec.rb +112 -0
- data/spec/models/add_collaborator_option_spec.rb +36 -0
- data/spec/models/add_time_option_spec.rb +48 -0
- data/spec/models/annotated_tag_object_spec.rb +48 -0
- data/spec/models/annotated_tag_spec.rb +78 -0
- data/spec/models/api_error_spec.rb +42 -0
- data/spec/models/attachment_spec.rb +72 -0
- data/spec/models/blocked_user_spec.rb +42 -0
- data/spec/models/branch_protection_spec.rb +192 -0
- data/spec/models/branch_spec.rb +84 -0
- data/spec/models/change_file_operation_spec.rb +64 -0
- data/spec/models/change_files_options_spec.rb +78 -0
- data/spec/models/changed_file_spec.rb +84 -0
- data/spec/models/combined_status_spec.rb +72 -0
- data/spec/models/comment_spec.rb +96 -0
- data/spec/models/commit_affected_files_spec.rb +42 -0
- data/spec/models/commit_date_options_spec.rb +42 -0
- data/spec/models/commit_meta_spec.rb +48 -0
- data/spec/models/commit_spec.rb +90 -0
- data/spec/models/commit_stats_spec.rb +48 -0
- data/spec/models/commit_status_spec.rb +84 -0
- data/spec/models/commit_user_spec.rb +48 -0
- data/spec/models/compare_spec.rb +42 -0
- data/spec/models/contents_response_spec.rb +120 -0
- data/spec/models/create_access_token_option_spec.rb +42 -0
- data/spec/models/create_branch_protection_option_spec.rb +180 -0
- data/spec/models/create_branch_repo_option_spec.rb +48 -0
- data/spec/models/create_email_option_spec.rb +36 -0
- data/spec/models/create_file_options_spec.rb +78 -0
- data/spec/models/create_fork_option_spec.rb +42 -0
- data/spec/models/create_gpg_key_option_spec.rb +42 -0
- data/spec/models/create_hook_option_spec.rb +70 -0
- data/spec/models/create_issue_comment_option_spec.rb +42 -0
- data/spec/models/create_issue_option_spec.rb +84 -0
- data/spec/models/create_key_option_spec.rb +48 -0
- data/spec/models/create_label_option_spec.rb +60 -0
- data/spec/models/create_milestone_option_spec.rb +58 -0
- data/spec/models/create_o_auth2_application_options_spec.rb +48 -0
- data/spec/models/create_or_update_secret_option_spec.rb +36 -0
- data/spec/models/create_org_option_spec.rb +82 -0
- data/spec/models/create_pull_request_option_spec.rb +84 -0
- data/spec/models/create_pull_review_comment_spec.rb +54 -0
- data/spec/models/create_pull_review_options_spec.rb +54 -0
- data/spec/models/create_push_mirror_option_spec.rb +60 -0
- data/spec/models/create_release_option_spec.rb +72 -0
- data/spec/models/create_repo_option_spec.rb +110 -0
- data/spec/models/create_status_option_spec.rb +54 -0
- data/spec/models/create_tag_option_spec.rb +48 -0
- data/spec/models/create_tag_protection_option_spec.rb +48 -0
- data/spec/models/create_team_option_spec.rb +76 -0
- data/spec/models/create_user_option_spec.rb +96 -0
- data/spec/models/create_variable_option_spec.rb +36 -0
- data/spec/models/create_wiki_page_options_spec.rb +48 -0
- data/spec/models/cron_spec.rb +60 -0
- data/spec/models/delete_email_option_spec.rb +36 -0
- data/spec/models/delete_file_options_spec.rb +78 -0
- data/spec/models/delete_labels_option_spec.rb +36 -0
- data/spec/models/deploy_key_spec.rb +84 -0
- data/spec/models/dismiss_pull_review_options_spec.rb +42 -0
- data/spec/models/dispatch_workflow_option_spec.rb +42 -0
- data/spec/models/edit_attachment_options_spec.rb +36 -0
- data/spec/models/edit_branch_protection_option_spec.rb +168 -0
- data/spec/models/edit_deadline_option_spec.rb +36 -0
- data/spec/models/edit_git_hook_option_spec.rb +36 -0
- data/spec/models/edit_hook_option_spec.rb +60 -0
- data/spec/models/edit_issue_comment_option_spec.rb +42 -0
- data/spec/models/edit_issue_option_spec.rb +90 -0
- data/spec/models/edit_label_option_spec.rb +60 -0
- data/spec/models/edit_milestone_option_spec.rb +54 -0
- data/spec/models/edit_org_option_spec.rb +76 -0
- data/spec/models/edit_pull_request_option_spec.rb +96 -0
- data/spec/models/edit_reaction_option_spec.rb +36 -0
- data/spec/models/edit_release_option_spec.rb +72 -0
- data/spec/models/edit_repo_option_spec.rb +228 -0
- data/spec/models/edit_tag_protection_option_spec.rb +48 -0
- data/spec/models/edit_team_option_spec.rb +76 -0
- data/spec/models/edit_user_option_spec.rb +144 -0
- data/spec/models/email_spec.rb +60 -0
- data/spec/models/external_tracker_spec.rb +54 -0
- data/spec/models/external_wiki_spec.rb +36 -0
- data/spec/models/file_commit_response_spec.rb +84 -0
- data/spec/models/file_delete_response_spec.rb +48 -0
- data/spec/models/file_links_response_spec.rb +48 -0
- data/spec/models/file_response_spec.rb +48 -0
- data/spec/models/files_response_spec.rb +48 -0
- data/spec/models/general_api_settings_spec.rb +54 -0
- data/spec/models/general_attachment_settings_spec.rb +54 -0
- data/spec/models/general_repo_settings_spec.rb +72 -0
- data/spec/models/general_ui_settings_spec.rb +48 -0
- data/spec/models/generate_repo_option_spec.rb +102 -0
- data/spec/models/git_blob_response_spec.rb +60 -0
- data/spec/models/git_entry_spec.rb +66 -0
- data/spec/models/git_hook_spec.rb +48 -0
- data/spec/models/git_object_spec.rb +48 -0
- data/spec/models/git_tree_response_spec.rb +66 -0
- data/spec/models/gitignore_template_info_spec.rb +42 -0
- data/spec/models/gpg_key_email_spec.rb +42 -0
- data/spec/models/gpg_key_spec.rb +108 -0
- data/spec/models/hook_spec.rb +102 -0
- data/spec/models/identity_spec.rb +42 -0
- data/spec/models/internal_tracker_spec.rb +48 -0
- data/spec/models/issue_config_contact_link_spec.rb +48 -0
- data/spec/models/issue_config_spec.rb +42 -0
- data/spec/models/issue_config_validation_spec.rb +42 -0
- data/spec/models/issue_deadline_spec.rb +36 -0
- data/spec/models/issue_form_field_spec.rb +60 -0
- data/spec/models/issue_labels_option_spec.rb +42 -0
- data/spec/models/issue_meta_spec.rb +48 -0
- data/spec/models/issue_spec.rb +180 -0
- data/spec/models/issue_template_spec.rb +78 -0
- data/spec/models/label_spec.rb +72 -0
- data/spec/models/label_template_spec.rb +54 -0
- data/spec/models/license_template_info_spec.rb +60 -0
- data/spec/models/licenses_template_list_entry_spec.rb +48 -0
- data/spec/models/markdown_option_spec.rb +54 -0
- data/spec/models/markup_option_spec.rb +60 -0
- data/spec/models/merge_pull_request_option_spec.rb +82 -0
- data/spec/models/migrate_repo_options_spec.rb +154 -0
- data/spec/models/milestone_spec.rb +90 -0
- data/spec/models/new_issue_pins_allowed_spec.rb +42 -0
- data/spec/models/node_info_services_spec.rb +42 -0
- data/spec/models/node_info_software_spec.rb +54 -0
- data/spec/models/node_info_spec.rb +72 -0
- data/spec/models/node_info_usage_spec.rb +48 -0
- data/spec/models/node_info_usage_users_spec.rb +48 -0
- data/spec/models/note_spec.rb +42 -0
- data/spec/models/notification_count_spec.rb +36 -0
- data/spec/models/notification_subject_spec.rb +72 -0
- data/spec/models/notification_thread_spec.rb +72 -0
- data/spec/models/o_auth2_application_spec.rb +72 -0
- data/spec/models/organization_permissions_spec.rb +60 -0
- data/spec/models/organization_spec.rb +96 -0
- data/spec/models/package_file_spec.rb +72 -0
- data/spec/models/package_spec.rb +84 -0
- data/spec/models/payload_commit_spec.rb +90 -0
- data/spec/models/payload_commit_verification_spec.rb +60 -0
- data/spec/models/payload_user_spec.rb +48 -0
- data/spec/models/permission_spec.rb +48 -0
- data/spec/models/pr_branch_info_spec.rb +60 -0
- data/spec/models/public_key_spec.rb +84 -0
- data/spec/models/pull_request_meta_spec.rb +54 -0
- data/spec/models/pull_request_spec.rb +246 -0
- data/spec/models/pull_review_comment_spec.rb +120 -0
- data/spec/models/pull_review_request_options_spec.rb +42 -0
- data/spec/models/pull_review_spec.rb +114 -0
- data/spec/models/push_mirror_spec.rb +78 -0
- data/spec/models/reaction_spec.rb +48 -0
- data/spec/models/reference_spec.rb +48 -0
- data/spec/models/release_spec.rb +138 -0
- data/spec/models/rename_user_option_spec.rb +36 -0
- data/spec/models/replace_flags_option_spec.rb +36 -0
- data/spec/models/repo_collaborator_permission_spec.rb +48 -0
- data/spec/models/repo_commit_spec.rb +66 -0
- data/spec/models/repo_create_release_attachment_request_spec.rb +36 -0
- data/spec/models/repo_topic_options_spec.rb +36 -0
- data/spec/models/repo_transfer_spec.rb +48 -0
- data/spec/models/repository_meta_spec.rb +54 -0
- data/spec/models/repository_spec.rb +406 -0
- data/spec/models/search_results_spec.rb +42 -0
- data/spec/models/secret_spec.rb +42 -0
- data/spec/models/server_version_spec.rb +36 -0
- data/spec/models/stop_watch_spec.rb +72 -0
- data/spec/models/submit_pull_review_options_spec.rb +42 -0
- data/spec/models/tag_archive_download_count_spec.rb +42 -0
- data/spec/models/tag_protection_spec.rb +66 -0
- data/spec/models/tag_spec.rb +72 -0
- data/spec/models/team_search200_response_spec.rb +42 -0
- data/spec/models/team_spec.rb +88 -0
- data/spec/models/timeline_comment_spec.rb +204 -0
- data/spec/models/topic_name_spec.rb +36 -0
- data/spec/models/topic_response_spec.rb +60 -0
- data/spec/models/tracked_time_spec.rb +72 -0
- data/spec/models/transfer_repo_option_spec.rb +42 -0
- data/spec/models/update_file_options_spec.rb +90 -0
- data/spec/models/update_repo_avatar_option_spec.rb +36 -0
- data/spec/models/update_user_avatar_option_spec.rb +36 -0
- data/spec/models/update_variable_option_spec.rb +42 -0
- data/spec/models/user_heatmap_data_spec.rb +42 -0
- data/spec/models/user_search200_response_spec.rb +42 -0
- data/spec/models/user_settings_options_spec.rb +96 -0
- data/spec/models/user_settings_spec.rb +96 -0
- data/spec/models/user_spec.rb +168 -0
- data/spec/models/watch_info_spec.rb +66 -0
- data/spec/models/wiki_commit_list_spec.rb +42 -0
- data/spec/models/wiki_commit_spec.rb +54 -0
- data/spec/models/wiki_page_meta_data_spec.rb +54 -0
- data/spec/models/wiki_page_spec.rb +78 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger.v1.json +26802 -0
- data/swagger.v1.patched.json +1 -0
- metadata +949 -0
@@ -0,0 +1,304 @@
|
|
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
|
+
# ChangeFileOperation for creating, updating or deleting a file
|
18
|
+
class ChangeFileOperation
|
19
|
+
# new or updated file content, must be base64 encoded
|
20
|
+
attr_accessor :content
|
21
|
+
|
22
|
+
# old path of the file to move
|
23
|
+
attr_accessor :from_path
|
24
|
+
|
25
|
+
# indicates what to do with the file
|
26
|
+
attr_accessor :operation
|
27
|
+
|
28
|
+
# path to the existing or new file
|
29
|
+
attr_accessor :path
|
30
|
+
|
31
|
+
# sha is the SHA for the file that already exists, required for update or delete
|
32
|
+
attr_accessor :sha
|
33
|
+
|
34
|
+
class EnumAttributeValidator
|
35
|
+
attr_reader :datatype
|
36
|
+
attr_reader :allowable_values
|
37
|
+
|
38
|
+
def initialize(datatype, allowable_values)
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
40
|
+
case datatype.to_s
|
41
|
+
when /Integer/i
|
42
|
+
value.to_i
|
43
|
+
when /Float/i
|
44
|
+
value.to_f
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def valid?(value)
|
52
|
+
!value || allowable_values.include?(value)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'content' => :'content',
|
60
|
+
:'from_path' => :'from_path',
|
61
|
+
:'operation' => :'operation',
|
62
|
+
:'path' => :'path',
|
63
|
+
:'sha' => :'sha'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns all the JSON keys this model knows about
|
68
|
+
def self.acceptable_attributes
|
69
|
+
attribute_map.values
|
70
|
+
end
|
71
|
+
|
72
|
+
# Attribute type mapping.
|
73
|
+
def self.openapi_types
|
74
|
+
{
|
75
|
+
:'content' => :'String',
|
76
|
+
:'from_path' => :'String',
|
77
|
+
:'operation' => :'String',
|
78
|
+
:'path' => :'String',
|
79
|
+
:'sha' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# List of attributes with nullable: true
|
84
|
+
def self.openapi_nullable
|
85
|
+
Set.new([
|
86
|
+
])
|
87
|
+
end
|
88
|
+
|
89
|
+
# Initializes the object
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
def initialize(attributes = {})
|
92
|
+
if (!attributes.is_a?(Hash))
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::ChangeFileOperation` initialize method"
|
94
|
+
end
|
95
|
+
|
96
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
97
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
98
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
99
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::ChangeFileOperation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
100
|
+
end
|
101
|
+
h[k.to_sym] = v
|
102
|
+
}
|
103
|
+
|
104
|
+
if attributes.key?(:'content')
|
105
|
+
self.content = attributes[:'content']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'from_path')
|
109
|
+
self.from_path = attributes[:'from_path']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'operation')
|
113
|
+
self.operation = attributes[:'operation']
|
114
|
+
else
|
115
|
+
self.operation = nil
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'path')
|
119
|
+
self.path = attributes[:'path']
|
120
|
+
else
|
121
|
+
self.path = nil
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'sha')
|
125
|
+
self.sha = attributes[:'sha']
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
130
|
+
# @return Array for valid properties with the reasons
|
131
|
+
def list_invalid_properties
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
133
|
+
invalid_properties = Array.new
|
134
|
+
if @operation.nil?
|
135
|
+
invalid_properties.push('invalid value for "operation", operation cannot be nil.')
|
136
|
+
end
|
137
|
+
|
138
|
+
if @path.nil?
|
139
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
140
|
+
end
|
141
|
+
|
142
|
+
invalid_properties
|
143
|
+
end
|
144
|
+
|
145
|
+
# Check to see if the all the properties in the model are valid
|
146
|
+
# @return true if the model is valid
|
147
|
+
def valid?
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
149
|
+
return false if @operation.nil?
|
150
|
+
operation_validator = EnumAttributeValidator.new('String', ["create", "update", "delete"])
|
151
|
+
return false unless operation_validator.valid?(@operation)
|
152
|
+
return false if @path.nil?
|
153
|
+
true
|
154
|
+
end
|
155
|
+
|
156
|
+
# Custom attribute writer method checking allowed values (enum).
|
157
|
+
# @param [Object] operation Object to be assigned
|
158
|
+
def operation=(operation)
|
159
|
+
validator = EnumAttributeValidator.new('String', ["create", "update", "delete"])
|
160
|
+
unless validator.valid?(operation)
|
161
|
+
fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}."
|
162
|
+
end
|
163
|
+
@operation = operation
|
164
|
+
end
|
165
|
+
|
166
|
+
# Checks equality by comparing each attribute.
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def ==(o)
|
169
|
+
return true if self.equal?(o)
|
170
|
+
self.class == o.class &&
|
171
|
+
content == o.content &&
|
172
|
+
from_path == o.from_path &&
|
173
|
+
operation == o.operation &&
|
174
|
+
path == o.path &&
|
175
|
+
sha == o.sha
|
176
|
+
end
|
177
|
+
|
178
|
+
# @see the `==` method
|
179
|
+
# @param [Object] Object to be compared
|
180
|
+
def eql?(o)
|
181
|
+
self == o
|
182
|
+
end
|
183
|
+
|
184
|
+
# Calculates hash code according to all attributes.
|
185
|
+
# @return [Integer] Hash code
|
186
|
+
def hash
|
187
|
+
[content, from_path, operation, path, sha].hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Builds the object from hash
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
192
|
+
# @return [Object] Returns the model itself
|
193
|
+
def self.build_from_hash(attributes)
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
195
|
+
attributes = attributes.transform_keys(&:to_sym)
|
196
|
+
transformed_hash = {}
|
197
|
+
openapi_types.each_pair do |key, type|
|
198
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = nil
|
200
|
+
elsif type =~ /\AArray<(.*)>/i
|
201
|
+
# check to ensure the input is an array given that the attribute
|
202
|
+
# is documented as an array but the input is not
|
203
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
204
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
205
|
+
end
|
206
|
+
elsif !attributes[attribute_map[key]].nil?
|
207
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
208
|
+
end
|
209
|
+
end
|
210
|
+
new(transformed_hash)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Deserializes the data based on type
|
214
|
+
# @param string type Data type
|
215
|
+
# @param string value Value to be deserialized
|
216
|
+
# @return [Object] Deserialized data
|
217
|
+
def self._deserialize(type, value)
|
218
|
+
case type.to_sym
|
219
|
+
when :Time
|
220
|
+
Time.parse(value)
|
221
|
+
when :Date
|
222
|
+
Date.parse(value)
|
223
|
+
when :String
|
224
|
+
value.to_s
|
225
|
+
when :Integer
|
226
|
+
value.to_i
|
227
|
+
when :Float
|
228
|
+
value.to_f
|
229
|
+
when :Boolean
|
230
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
231
|
+
true
|
232
|
+
else
|
233
|
+
false
|
234
|
+
end
|
235
|
+
when :Object
|
236
|
+
# generic object (usually a Hash), return directly
|
237
|
+
value
|
238
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
239
|
+
inner_type = Regexp.last_match[:inner_type]
|
240
|
+
value.map { |v| _deserialize(inner_type, v) }
|
241
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
242
|
+
k_type = Regexp.last_match[:k_type]
|
243
|
+
v_type = Regexp.last_match[:v_type]
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each do |k, v|
|
246
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
else # model
|
250
|
+
# models (e.g. Pet) or oneOf
|
251
|
+
klass = Forgejo.const_get(type)
|
252
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# Returns the string representation of the object
|
257
|
+
# @return [String] String presentation of the object
|
258
|
+
def to_s
|
259
|
+
to_hash.to_s
|
260
|
+
end
|
261
|
+
|
262
|
+
# to_body is an alias to to_hash (backward compatibility)
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
264
|
+
def to_body
|
265
|
+
to_hash
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns the object in the form of hash
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_hash
|
271
|
+
hash = {}
|
272
|
+
self.class.attribute_map.each_pair do |attr, param|
|
273
|
+
value = self.send(attr)
|
274
|
+
if value.nil?
|
275
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
276
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
277
|
+
end
|
278
|
+
|
279
|
+
hash[param] = _to_hash(value)
|
280
|
+
end
|
281
|
+
hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Outputs non-array value in the form of hash
|
285
|
+
# For object, use to_hash. Otherwise, just return the value
|
286
|
+
# @param [Object] value Any valid value
|
287
|
+
# @return [Hash] Returns the value in the form of hash
|
288
|
+
def _to_hash(value)
|
289
|
+
if value.is_a?(Array)
|
290
|
+
value.compact.map { |v| _to_hash(v) }
|
291
|
+
elsif value.is_a?(Hash)
|
292
|
+
{}.tap do |hash|
|
293
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
294
|
+
end
|
295
|
+
elsif value.respond_to? :to_hash
|
296
|
+
value.to_hash
|
297
|
+
else
|
298
|
+
value
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
end
|
303
|
+
|
304
|
+
end
|
@@ -0,0 +1,292 @@
|
|
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
|
+
# ChangeFilesOptions options for creating, updating or deleting multiple files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
|
18
|
+
class ChangeFilesOptions
|
19
|
+
attr_accessor :author
|
20
|
+
|
21
|
+
# branch (optional) to base this file from. if not given, the default branch is used
|
22
|
+
attr_accessor :branch
|
23
|
+
|
24
|
+
attr_accessor :committer
|
25
|
+
|
26
|
+
attr_accessor :dates
|
27
|
+
|
28
|
+
# list of file operations
|
29
|
+
attr_accessor :files
|
30
|
+
|
31
|
+
# message (optional) for the commit of this file. if not supplied, a default message will be used
|
32
|
+
attr_accessor :message
|
33
|
+
|
34
|
+
# new_branch (optional) will make a new branch from `branch` before creating the file
|
35
|
+
attr_accessor :new_branch
|
36
|
+
|
37
|
+
# Add a Signed-off-by trailer by the committer at the end of the commit log message.
|
38
|
+
attr_accessor :signoff
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'author' => :'author',
|
44
|
+
:'branch' => :'branch',
|
45
|
+
:'committer' => :'committer',
|
46
|
+
:'dates' => :'dates',
|
47
|
+
:'files' => :'files',
|
48
|
+
:'message' => :'message',
|
49
|
+
:'new_branch' => :'new_branch',
|
50
|
+
:'signoff' => :'signoff'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'author' => :'Identity',
|
63
|
+
:'branch' => :'String',
|
64
|
+
:'committer' => :'Identity',
|
65
|
+
:'dates' => :'CommitDateOptions',
|
66
|
+
:'files' => :'Array<ChangeFileOperation>',
|
67
|
+
:'message' => :'String',
|
68
|
+
:'new_branch' => :'String',
|
69
|
+
:'signoff' => :'Boolean'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
def self.openapi_nullable
|
75
|
+
Set.new([
|
76
|
+
])
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
if (!attributes.is_a?(Hash))
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::ChangeFilesOptions` initialize method"
|
84
|
+
end
|
85
|
+
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
88
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::ChangeFilesOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
90
|
+
end
|
91
|
+
h[k.to_sym] = v
|
92
|
+
}
|
93
|
+
|
94
|
+
if attributes.key?(:'author')
|
95
|
+
self.author = attributes[:'author']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'branch')
|
99
|
+
self.branch = attributes[:'branch']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'committer')
|
103
|
+
self.committer = attributes[:'committer']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'dates')
|
107
|
+
self.dates = attributes[:'dates']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'files')
|
111
|
+
if (value = attributes[:'files']).is_a?(Array)
|
112
|
+
self.files = value
|
113
|
+
end
|
114
|
+
else
|
115
|
+
self.files = nil
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'message')
|
119
|
+
self.message = attributes[:'message']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'new_branch')
|
123
|
+
self.new_branch = attributes[:'new_branch']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'signoff')
|
127
|
+
self.signoff = attributes[:'signoff']
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
132
|
+
# @return Array for valid properties with the reasons
|
133
|
+
def list_invalid_properties
|
134
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
135
|
+
invalid_properties = Array.new
|
136
|
+
if @files.nil?
|
137
|
+
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
138
|
+
end
|
139
|
+
|
140
|
+
invalid_properties
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check to see if the all the properties in the model are valid
|
144
|
+
# @return true if the model is valid
|
145
|
+
def valid?
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
147
|
+
return false if @files.nil?
|
148
|
+
true
|
149
|
+
end
|
150
|
+
|
151
|
+
# Checks equality by comparing each attribute.
|
152
|
+
# @param [Object] Object to be compared
|
153
|
+
def ==(o)
|
154
|
+
return true if self.equal?(o)
|
155
|
+
self.class == o.class &&
|
156
|
+
author == o.author &&
|
157
|
+
branch == o.branch &&
|
158
|
+
committer == o.committer &&
|
159
|
+
dates == o.dates &&
|
160
|
+
files == o.files &&
|
161
|
+
message == o.message &&
|
162
|
+
new_branch == o.new_branch &&
|
163
|
+
signoff == o.signoff
|
164
|
+
end
|
165
|
+
|
166
|
+
# @see the `==` method
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def eql?(o)
|
169
|
+
self == o
|
170
|
+
end
|
171
|
+
|
172
|
+
# Calculates hash code according to all attributes.
|
173
|
+
# @return [Integer] Hash code
|
174
|
+
def hash
|
175
|
+
[author, branch, committer, dates, files, message, new_branch, signoff].hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Builds the object from hash
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
+
# @return [Object] Returns the model itself
|
181
|
+
def self.build_from_hash(attributes)
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
184
|
+
transformed_hash = {}
|
185
|
+
openapi_types.each_pair do |key, type|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
187
|
+
transformed_hash["#{key}"] = nil
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
189
|
+
# check to ensure the input is an array given that the attribute
|
190
|
+
# is documented as an array but the input is not
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
193
|
+
end
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
196
|
+
end
|
197
|
+
end
|
198
|
+
new(transformed_hash)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Deserializes the data based on type
|
202
|
+
# @param string type Data type
|
203
|
+
# @param string value Value to be deserialized
|
204
|
+
# @return [Object] Deserialized data
|
205
|
+
def self._deserialize(type, value)
|
206
|
+
case type.to_sym
|
207
|
+
when :Time
|
208
|
+
Time.parse(value)
|
209
|
+
when :Date
|
210
|
+
Date.parse(value)
|
211
|
+
when :String
|
212
|
+
value.to_s
|
213
|
+
when :Integer
|
214
|
+
value.to_i
|
215
|
+
when :Float
|
216
|
+
value.to_f
|
217
|
+
when :Boolean
|
218
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
219
|
+
true
|
220
|
+
else
|
221
|
+
false
|
222
|
+
end
|
223
|
+
when :Object
|
224
|
+
# generic object (usually a Hash), return directly
|
225
|
+
value
|
226
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
227
|
+
inner_type = Regexp.last_match[:inner_type]
|
228
|
+
value.map { |v| _deserialize(inner_type, v) }
|
229
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
230
|
+
k_type = Regexp.last_match[:k_type]
|
231
|
+
v_type = Regexp.last_match[:v_type]
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each do |k, v|
|
234
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
else # model
|
238
|
+
# models (e.g. Pet) or oneOf
|
239
|
+
klass = Forgejo.const_get(type)
|
240
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
# Returns the string representation of the object
|
245
|
+
# @return [String] String presentation of the object
|
246
|
+
def to_s
|
247
|
+
to_hash.to_s
|
248
|
+
end
|
249
|
+
|
250
|
+
# to_body is an alias to to_hash (backward compatibility)
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_body
|
253
|
+
to_hash
|
254
|
+
end
|
255
|
+
|
256
|
+
# Returns the object in the form of hash
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
258
|
+
def to_hash
|
259
|
+
hash = {}
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
261
|
+
value = self.send(attr)
|
262
|
+
if value.nil?
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
265
|
+
end
|
266
|
+
|
267
|
+
hash[param] = _to_hash(value)
|
268
|
+
end
|
269
|
+
hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Outputs non-array value in the form of hash
|
273
|
+
# For object, use to_hash. Otherwise, just return the value
|
274
|
+
# @param [Object] value Any valid value
|
275
|
+
# @return [Hash] Returns the value in the form of hash
|
276
|
+
def _to_hash(value)
|
277
|
+
if value.is_a?(Array)
|
278
|
+
value.compact.map { |v| _to_hash(v) }
|
279
|
+
elsif value.is_a?(Hash)
|
280
|
+
{}.tap do |hash|
|
281
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
282
|
+
end
|
283
|
+
elsif value.respond_to? :to_hash
|
284
|
+
value.to_hash
|
285
|
+
else
|
286
|
+
value
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
end
|
291
|
+
|
292
|
+
end
|