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,801 @@
|
|
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
|
+
# Repository represents a repository
|
18
|
+
class Repository
|
19
|
+
attr_accessor :allow_fast_forward_only_merge
|
20
|
+
|
21
|
+
attr_accessor :allow_merge_commits
|
22
|
+
|
23
|
+
attr_accessor :allow_rebase
|
24
|
+
|
25
|
+
attr_accessor :allow_rebase_explicit
|
26
|
+
|
27
|
+
attr_accessor :allow_rebase_update
|
28
|
+
|
29
|
+
attr_accessor :allow_squash_merge
|
30
|
+
|
31
|
+
attr_accessor :archived
|
32
|
+
|
33
|
+
attr_accessor :archived_at
|
34
|
+
|
35
|
+
attr_accessor :avatar_url
|
36
|
+
|
37
|
+
attr_accessor :clone_url
|
38
|
+
|
39
|
+
attr_accessor :created_at
|
40
|
+
|
41
|
+
attr_accessor :default_allow_maintainer_edit
|
42
|
+
|
43
|
+
attr_accessor :default_branch
|
44
|
+
|
45
|
+
attr_accessor :default_delete_branch_after_merge
|
46
|
+
|
47
|
+
attr_accessor :default_merge_style
|
48
|
+
|
49
|
+
attr_accessor :description
|
50
|
+
|
51
|
+
attr_accessor :empty
|
52
|
+
|
53
|
+
attr_accessor :external_tracker
|
54
|
+
|
55
|
+
attr_accessor :external_wiki
|
56
|
+
|
57
|
+
attr_accessor :fork
|
58
|
+
|
59
|
+
attr_accessor :forks_count
|
60
|
+
|
61
|
+
attr_accessor :full_name
|
62
|
+
|
63
|
+
attr_accessor :globally_editable_wiki
|
64
|
+
|
65
|
+
attr_accessor :has_actions
|
66
|
+
|
67
|
+
attr_accessor :has_issues
|
68
|
+
|
69
|
+
attr_accessor :has_packages
|
70
|
+
|
71
|
+
attr_accessor :has_projects
|
72
|
+
|
73
|
+
attr_accessor :has_pull_requests
|
74
|
+
|
75
|
+
attr_accessor :has_releases
|
76
|
+
|
77
|
+
attr_accessor :has_wiki
|
78
|
+
|
79
|
+
attr_accessor :html_url
|
80
|
+
|
81
|
+
attr_accessor :id
|
82
|
+
|
83
|
+
attr_accessor :ignore_whitespace_conflicts
|
84
|
+
|
85
|
+
attr_accessor :internal
|
86
|
+
|
87
|
+
attr_accessor :internal_tracker
|
88
|
+
|
89
|
+
attr_accessor :language
|
90
|
+
|
91
|
+
attr_accessor :languages_url
|
92
|
+
|
93
|
+
attr_accessor :link
|
94
|
+
|
95
|
+
attr_accessor :mirror
|
96
|
+
|
97
|
+
attr_accessor :mirror_interval
|
98
|
+
|
99
|
+
attr_accessor :mirror_updated
|
100
|
+
|
101
|
+
attr_accessor :name
|
102
|
+
|
103
|
+
# ObjectFormatName of the underlying git repository
|
104
|
+
attr_accessor :object_format_name
|
105
|
+
|
106
|
+
attr_accessor :open_issues_count
|
107
|
+
|
108
|
+
attr_accessor :open_pr_counter
|
109
|
+
|
110
|
+
attr_accessor :original_url
|
111
|
+
|
112
|
+
attr_accessor :owner
|
113
|
+
|
114
|
+
attr_accessor :parent
|
115
|
+
|
116
|
+
attr_accessor :permissions
|
117
|
+
|
118
|
+
attr_accessor :private
|
119
|
+
|
120
|
+
attr_accessor :release_counter
|
121
|
+
|
122
|
+
attr_accessor :repo_transfer
|
123
|
+
|
124
|
+
attr_accessor :size
|
125
|
+
|
126
|
+
attr_accessor :ssh_url
|
127
|
+
|
128
|
+
attr_accessor :stars_count
|
129
|
+
|
130
|
+
attr_accessor :template
|
131
|
+
|
132
|
+
attr_accessor :topics
|
133
|
+
|
134
|
+
attr_accessor :updated_at
|
135
|
+
|
136
|
+
attr_accessor :url
|
137
|
+
|
138
|
+
attr_accessor :watchers_count
|
139
|
+
|
140
|
+
attr_accessor :website
|
141
|
+
|
142
|
+
attr_accessor :wiki_branch
|
143
|
+
|
144
|
+
class EnumAttributeValidator
|
145
|
+
attr_reader :datatype
|
146
|
+
attr_reader :allowable_values
|
147
|
+
|
148
|
+
def initialize(datatype, allowable_values)
|
149
|
+
@allowable_values = allowable_values.map do |value|
|
150
|
+
case datatype.to_s
|
151
|
+
when /Integer/i
|
152
|
+
value.to_i
|
153
|
+
when /Float/i
|
154
|
+
value.to_f
|
155
|
+
else
|
156
|
+
value
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
def valid?(value)
|
162
|
+
!value || allowable_values.include?(value)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
167
|
+
def self.attribute_map
|
168
|
+
{
|
169
|
+
:'allow_fast_forward_only_merge' => :'allow_fast_forward_only_merge',
|
170
|
+
:'allow_merge_commits' => :'allow_merge_commits',
|
171
|
+
:'allow_rebase' => :'allow_rebase',
|
172
|
+
:'allow_rebase_explicit' => :'allow_rebase_explicit',
|
173
|
+
:'allow_rebase_update' => :'allow_rebase_update',
|
174
|
+
:'allow_squash_merge' => :'allow_squash_merge',
|
175
|
+
:'archived' => :'archived',
|
176
|
+
:'archived_at' => :'archived_at',
|
177
|
+
:'avatar_url' => :'avatar_url',
|
178
|
+
:'clone_url' => :'clone_url',
|
179
|
+
:'created_at' => :'created_at',
|
180
|
+
:'default_allow_maintainer_edit' => :'default_allow_maintainer_edit',
|
181
|
+
:'default_branch' => :'default_branch',
|
182
|
+
:'default_delete_branch_after_merge' => :'default_delete_branch_after_merge',
|
183
|
+
:'default_merge_style' => :'default_merge_style',
|
184
|
+
:'description' => :'description',
|
185
|
+
:'empty' => :'empty',
|
186
|
+
:'external_tracker' => :'external_tracker',
|
187
|
+
:'external_wiki' => :'external_wiki',
|
188
|
+
:'fork' => :'fork',
|
189
|
+
:'forks_count' => :'forks_count',
|
190
|
+
:'full_name' => :'full_name',
|
191
|
+
:'globally_editable_wiki' => :'globally_editable_wiki',
|
192
|
+
:'has_actions' => :'has_actions',
|
193
|
+
:'has_issues' => :'has_issues',
|
194
|
+
:'has_packages' => :'has_packages',
|
195
|
+
:'has_projects' => :'has_projects',
|
196
|
+
:'has_pull_requests' => :'has_pull_requests',
|
197
|
+
:'has_releases' => :'has_releases',
|
198
|
+
:'has_wiki' => :'has_wiki',
|
199
|
+
:'html_url' => :'html_url',
|
200
|
+
:'id' => :'id',
|
201
|
+
:'ignore_whitespace_conflicts' => :'ignore_whitespace_conflicts',
|
202
|
+
:'internal' => :'internal',
|
203
|
+
:'internal_tracker' => :'internal_tracker',
|
204
|
+
:'language' => :'language',
|
205
|
+
:'languages_url' => :'languages_url',
|
206
|
+
:'link' => :'link',
|
207
|
+
:'mirror' => :'mirror',
|
208
|
+
:'mirror_interval' => :'mirror_interval',
|
209
|
+
:'mirror_updated' => :'mirror_updated',
|
210
|
+
:'name' => :'name',
|
211
|
+
:'object_format_name' => :'object_format_name',
|
212
|
+
:'open_issues_count' => :'open_issues_count',
|
213
|
+
:'open_pr_counter' => :'open_pr_counter',
|
214
|
+
:'original_url' => :'original_url',
|
215
|
+
:'owner' => :'owner',
|
216
|
+
:'parent' => :'parent',
|
217
|
+
:'permissions' => :'permissions',
|
218
|
+
:'private' => :'private',
|
219
|
+
:'release_counter' => :'release_counter',
|
220
|
+
:'repo_transfer' => :'repo_transfer',
|
221
|
+
:'size' => :'size',
|
222
|
+
:'ssh_url' => :'ssh_url',
|
223
|
+
:'stars_count' => :'stars_count',
|
224
|
+
:'template' => :'template',
|
225
|
+
:'topics' => :'topics',
|
226
|
+
:'updated_at' => :'updated_at',
|
227
|
+
:'url' => :'url',
|
228
|
+
:'watchers_count' => :'watchers_count',
|
229
|
+
:'website' => :'website',
|
230
|
+
:'wiki_branch' => :'wiki_branch'
|
231
|
+
}
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns all the JSON keys this model knows about
|
235
|
+
def self.acceptable_attributes
|
236
|
+
attribute_map.values
|
237
|
+
end
|
238
|
+
|
239
|
+
# Attribute type mapping.
|
240
|
+
def self.openapi_types
|
241
|
+
{
|
242
|
+
:'allow_fast_forward_only_merge' => :'Boolean',
|
243
|
+
:'allow_merge_commits' => :'Boolean',
|
244
|
+
:'allow_rebase' => :'Boolean',
|
245
|
+
:'allow_rebase_explicit' => :'Boolean',
|
246
|
+
:'allow_rebase_update' => :'Boolean',
|
247
|
+
:'allow_squash_merge' => :'Boolean',
|
248
|
+
:'archived' => :'Boolean',
|
249
|
+
:'archived_at' => :'Time',
|
250
|
+
:'avatar_url' => :'String',
|
251
|
+
:'clone_url' => :'String',
|
252
|
+
:'created_at' => :'Time',
|
253
|
+
:'default_allow_maintainer_edit' => :'Boolean',
|
254
|
+
:'default_branch' => :'String',
|
255
|
+
:'default_delete_branch_after_merge' => :'Boolean',
|
256
|
+
:'default_merge_style' => :'String',
|
257
|
+
:'description' => :'String',
|
258
|
+
:'empty' => :'Boolean',
|
259
|
+
:'external_tracker' => :'ExternalTracker',
|
260
|
+
:'external_wiki' => :'ExternalWiki',
|
261
|
+
:'fork' => :'Boolean',
|
262
|
+
:'forks_count' => :'Integer',
|
263
|
+
:'full_name' => :'String',
|
264
|
+
:'globally_editable_wiki' => :'Boolean',
|
265
|
+
:'has_actions' => :'Boolean',
|
266
|
+
:'has_issues' => :'Boolean',
|
267
|
+
:'has_packages' => :'Boolean',
|
268
|
+
:'has_projects' => :'Boolean',
|
269
|
+
:'has_pull_requests' => :'Boolean',
|
270
|
+
:'has_releases' => :'Boolean',
|
271
|
+
:'has_wiki' => :'Boolean',
|
272
|
+
:'html_url' => :'String',
|
273
|
+
:'id' => :'Integer',
|
274
|
+
:'ignore_whitespace_conflicts' => :'Boolean',
|
275
|
+
:'internal' => :'Boolean',
|
276
|
+
:'internal_tracker' => :'InternalTracker',
|
277
|
+
:'language' => :'String',
|
278
|
+
:'languages_url' => :'String',
|
279
|
+
:'link' => :'String',
|
280
|
+
:'mirror' => :'Boolean',
|
281
|
+
:'mirror_interval' => :'String',
|
282
|
+
:'mirror_updated' => :'Time',
|
283
|
+
:'name' => :'String',
|
284
|
+
:'object_format_name' => :'String',
|
285
|
+
:'open_issues_count' => :'Integer',
|
286
|
+
:'open_pr_counter' => :'Integer',
|
287
|
+
:'original_url' => :'String',
|
288
|
+
:'owner' => :'User',
|
289
|
+
:'parent' => :'Repository',
|
290
|
+
:'permissions' => :'Permission',
|
291
|
+
:'private' => :'Boolean',
|
292
|
+
:'release_counter' => :'Integer',
|
293
|
+
:'repo_transfer' => :'RepoTransfer',
|
294
|
+
:'size' => :'Integer',
|
295
|
+
:'ssh_url' => :'String',
|
296
|
+
:'stars_count' => :'Integer',
|
297
|
+
:'template' => :'Boolean',
|
298
|
+
:'topics' => :'Array<String>',
|
299
|
+
:'updated_at' => :'Time',
|
300
|
+
:'url' => :'String',
|
301
|
+
:'watchers_count' => :'Integer',
|
302
|
+
:'website' => :'String',
|
303
|
+
:'wiki_branch' => :'String'
|
304
|
+
}
|
305
|
+
end
|
306
|
+
|
307
|
+
# List of attributes with nullable: true
|
308
|
+
def self.openapi_nullable
|
309
|
+
Set.new([
|
310
|
+
])
|
311
|
+
end
|
312
|
+
|
313
|
+
# Initializes the object
|
314
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
315
|
+
def initialize(attributes = {})
|
316
|
+
if (!attributes.is_a?(Hash))
|
317
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Forgejo::Repository` initialize method"
|
318
|
+
end
|
319
|
+
|
320
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
321
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
322
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
323
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Forgejo::Repository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
324
|
+
end
|
325
|
+
h[k.to_sym] = v
|
326
|
+
}
|
327
|
+
|
328
|
+
if attributes.key?(:'allow_fast_forward_only_merge')
|
329
|
+
self.allow_fast_forward_only_merge = attributes[:'allow_fast_forward_only_merge']
|
330
|
+
end
|
331
|
+
|
332
|
+
if attributes.key?(:'allow_merge_commits')
|
333
|
+
self.allow_merge_commits = attributes[:'allow_merge_commits']
|
334
|
+
end
|
335
|
+
|
336
|
+
if attributes.key?(:'allow_rebase')
|
337
|
+
self.allow_rebase = attributes[:'allow_rebase']
|
338
|
+
end
|
339
|
+
|
340
|
+
if attributes.key?(:'allow_rebase_explicit')
|
341
|
+
self.allow_rebase_explicit = attributes[:'allow_rebase_explicit']
|
342
|
+
end
|
343
|
+
|
344
|
+
if attributes.key?(:'allow_rebase_update')
|
345
|
+
self.allow_rebase_update = attributes[:'allow_rebase_update']
|
346
|
+
end
|
347
|
+
|
348
|
+
if attributes.key?(:'allow_squash_merge')
|
349
|
+
self.allow_squash_merge = attributes[:'allow_squash_merge']
|
350
|
+
end
|
351
|
+
|
352
|
+
if attributes.key?(:'archived')
|
353
|
+
self.archived = attributes[:'archived']
|
354
|
+
end
|
355
|
+
|
356
|
+
if attributes.key?(:'archived_at')
|
357
|
+
self.archived_at = attributes[:'archived_at']
|
358
|
+
end
|
359
|
+
|
360
|
+
if attributes.key?(:'avatar_url')
|
361
|
+
self.avatar_url = attributes[:'avatar_url']
|
362
|
+
end
|
363
|
+
|
364
|
+
if attributes.key?(:'clone_url')
|
365
|
+
self.clone_url = attributes[:'clone_url']
|
366
|
+
end
|
367
|
+
|
368
|
+
if attributes.key?(:'created_at')
|
369
|
+
self.created_at = attributes[:'created_at']
|
370
|
+
end
|
371
|
+
|
372
|
+
if attributes.key?(:'default_allow_maintainer_edit')
|
373
|
+
self.default_allow_maintainer_edit = attributes[:'default_allow_maintainer_edit']
|
374
|
+
end
|
375
|
+
|
376
|
+
if attributes.key?(:'default_branch')
|
377
|
+
self.default_branch = attributes[:'default_branch']
|
378
|
+
end
|
379
|
+
|
380
|
+
if attributes.key?(:'default_delete_branch_after_merge')
|
381
|
+
self.default_delete_branch_after_merge = attributes[:'default_delete_branch_after_merge']
|
382
|
+
end
|
383
|
+
|
384
|
+
if attributes.key?(:'default_merge_style')
|
385
|
+
self.default_merge_style = attributes[:'default_merge_style']
|
386
|
+
end
|
387
|
+
|
388
|
+
if attributes.key?(:'description')
|
389
|
+
self.description = attributes[:'description']
|
390
|
+
end
|
391
|
+
|
392
|
+
if attributes.key?(:'empty')
|
393
|
+
self.empty = attributes[:'empty']
|
394
|
+
end
|
395
|
+
|
396
|
+
if attributes.key?(:'external_tracker')
|
397
|
+
self.external_tracker = attributes[:'external_tracker']
|
398
|
+
end
|
399
|
+
|
400
|
+
if attributes.key?(:'external_wiki')
|
401
|
+
self.external_wiki = attributes[:'external_wiki']
|
402
|
+
end
|
403
|
+
|
404
|
+
if attributes.key?(:'fork')
|
405
|
+
self.fork = attributes[:'fork']
|
406
|
+
end
|
407
|
+
|
408
|
+
if attributes.key?(:'forks_count')
|
409
|
+
self.forks_count = attributes[:'forks_count']
|
410
|
+
end
|
411
|
+
|
412
|
+
if attributes.key?(:'full_name')
|
413
|
+
self.full_name = attributes[:'full_name']
|
414
|
+
end
|
415
|
+
|
416
|
+
if attributes.key?(:'globally_editable_wiki')
|
417
|
+
self.globally_editable_wiki = attributes[:'globally_editable_wiki']
|
418
|
+
end
|
419
|
+
|
420
|
+
if attributes.key?(:'has_actions')
|
421
|
+
self.has_actions = attributes[:'has_actions']
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.key?(:'has_issues')
|
425
|
+
self.has_issues = attributes[:'has_issues']
|
426
|
+
end
|
427
|
+
|
428
|
+
if attributes.key?(:'has_packages')
|
429
|
+
self.has_packages = attributes[:'has_packages']
|
430
|
+
end
|
431
|
+
|
432
|
+
if attributes.key?(:'has_projects')
|
433
|
+
self.has_projects = attributes[:'has_projects']
|
434
|
+
end
|
435
|
+
|
436
|
+
if attributes.key?(:'has_pull_requests')
|
437
|
+
self.has_pull_requests = attributes[:'has_pull_requests']
|
438
|
+
end
|
439
|
+
|
440
|
+
if attributes.key?(:'has_releases')
|
441
|
+
self.has_releases = attributes[:'has_releases']
|
442
|
+
end
|
443
|
+
|
444
|
+
if attributes.key?(:'has_wiki')
|
445
|
+
self.has_wiki = attributes[:'has_wiki']
|
446
|
+
end
|
447
|
+
|
448
|
+
if attributes.key?(:'html_url')
|
449
|
+
self.html_url = attributes[:'html_url']
|
450
|
+
end
|
451
|
+
|
452
|
+
if attributes.key?(:'id')
|
453
|
+
self.id = attributes[:'id']
|
454
|
+
end
|
455
|
+
|
456
|
+
if attributes.key?(:'ignore_whitespace_conflicts')
|
457
|
+
self.ignore_whitespace_conflicts = attributes[:'ignore_whitespace_conflicts']
|
458
|
+
end
|
459
|
+
|
460
|
+
if attributes.key?(:'internal')
|
461
|
+
self.internal = attributes[:'internal']
|
462
|
+
end
|
463
|
+
|
464
|
+
if attributes.key?(:'internal_tracker')
|
465
|
+
self.internal_tracker = attributes[:'internal_tracker']
|
466
|
+
end
|
467
|
+
|
468
|
+
if attributes.key?(:'language')
|
469
|
+
self.language = attributes[:'language']
|
470
|
+
end
|
471
|
+
|
472
|
+
if attributes.key?(:'languages_url')
|
473
|
+
self.languages_url = attributes[:'languages_url']
|
474
|
+
end
|
475
|
+
|
476
|
+
if attributes.key?(:'link')
|
477
|
+
self.link = attributes[:'link']
|
478
|
+
end
|
479
|
+
|
480
|
+
if attributes.key?(:'mirror')
|
481
|
+
self.mirror = attributes[:'mirror']
|
482
|
+
end
|
483
|
+
|
484
|
+
if attributes.key?(:'mirror_interval')
|
485
|
+
self.mirror_interval = attributes[:'mirror_interval']
|
486
|
+
end
|
487
|
+
|
488
|
+
if attributes.key?(:'mirror_updated')
|
489
|
+
self.mirror_updated = attributes[:'mirror_updated']
|
490
|
+
end
|
491
|
+
|
492
|
+
if attributes.key?(:'name')
|
493
|
+
self.name = attributes[:'name']
|
494
|
+
end
|
495
|
+
|
496
|
+
if attributes.key?(:'object_format_name')
|
497
|
+
self.object_format_name = attributes[:'object_format_name']
|
498
|
+
end
|
499
|
+
|
500
|
+
if attributes.key?(:'open_issues_count')
|
501
|
+
self.open_issues_count = attributes[:'open_issues_count']
|
502
|
+
end
|
503
|
+
|
504
|
+
if attributes.key?(:'open_pr_counter')
|
505
|
+
self.open_pr_counter = attributes[:'open_pr_counter']
|
506
|
+
end
|
507
|
+
|
508
|
+
if attributes.key?(:'original_url')
|
509
|
+
self.original_url = attributes[:'original_url']
|
510
|
+
end
|
511
|
+
|
512
|
+
if attributes.key?(:'owner')
|
513
|
+
self.owner = attributes[:'owner']
|
514
|
+
end
|
515
|
+
|
516
|
+
if attributes.key?(:'parent')
|
517
|
+
self.parent = attributes[:'parent']
|
518
|
+
end
|
519
|
+
|
520
|
+
if attributes.key?(:'permissions')
|
521
|
+
self.permissions = attributes[:'permissions']
|
522
|
+
end
|
523
|
+
|
524
|
+
if attributes.key?(:'private')
|
525
|
+
self.private = attributes[:'private']
|
526
|
+
end
|
527
|
+
|
528
|
+
if attributes.key?(:'release_counter')
|
529
|
+
self.release_counter = attributes[:'release_counter']
|
530
|
+
end
|
531
|
+
|
532
|
+
if attributes.key?(:'repo_transfer')
|
533
|
+
self.repo_transfer = attributes[:'repo_transfer']
|
534
|
+
end
|
535
|
+
|
536
|
+
if attributes.key?(:'size')
|
537
|
+
self.size = attributes[:'size']
|
538
|
+
end
|
539
|
+
|
540
|
+
if attributes.key?(:'ssh_url')
|
541
|
+
self.ssh_url = attributes[:'ssh_url']
|
542
|
+
end
|
543
|
+
|
544
|
+
if attributes.key?(:'stars_count')
|
545
|
+
self.stars_count = attributes[:'stars_count']
|
546
|
+
end
|
547
|
+
|
548
|
+
if attributes.key?(:'template')
|
549
|
+
self.template = attributes[:'template']
|
550
|
+
end
|
551
|
+
|
552
|
+
if attributes.key?(:'topics')
|
553
|
+
if (value = attributes[:'topics']).is_a?(Array)
|
554
|
+
self.topics = value
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
if attributes.key?(:'updated_at')
|
559
|
+
self.updated_at = attributes[:'updated_at']
|
560
|
+
end
|
561
|
+
|
562
|
+
if attributes.key?(:'url')
|
563
|
+
self.url = attributes[:'url']
|
564
|
+
end
|
565
|
+
|
566
|
+
if attributes.key?(:'watchers_count')
|
567
|
+
self.watchers_count = attributes[:'watchers_count']
|
568
|
+
end
|
569
|
+
|
570
|
+
if attributes.key?(:'website')
|
571
|
+
self.website = attributes[:'website']
|
572
|
+
end
|
573
|
+
|
574
|
+
if attributes.key?(:'wiki_branch')
|
575
|
+
self.wiki_branch = attributes[:'wiki_branch']
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
580
|
+
# @return Array for valid properties with the reasons
|
581
|
+
def list_invalid_properties
|
582
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
583
|
+
invalid_properties = Array.new
|
584
|
+
invalid_properties
|
585
|
+
end
|
586
|
+
|
587
|
+
# Check to see if the all the properties in the model are valid
|
588
|
+
# @return true if the model is valid
|
589
|
+
def valid?
|
590
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
591
|
+
object_format_name_validator = EnumAttributeValidator.new('String', ["sha1", "sha256"])
|
592
|
+
return false unless object_format_name_validator.valid?(@object_format_name)
|
593
|
+
true
|
594
|
+
end
|
595
|
+
|
596
|
+
# Custom attribute writer method checking allowed values (enum).
|
597
|
+
# @param [Object] object_format_name Object to be assigned
|
598
|
+
def object_format_name=(object_format_name)
|
599
|
+
validator = EnumAttributeValidator.new('String', ["sha1", "sha256"])
|
600
|
+
unless validator.valid?(object_format_name)
|
601
|
+
fail ArgumentError, "invalid value for \"object_format_name\", must be one of #{validator.allowable_values}."
|
602
|
+
end
|
603
|
+
@object_format_name = object_format_name
|
604
|
+
end
|
605
|
+
|
606
|
+
# Checks equality by comparing each attribute.
|
607
|
+
# @param [Object] Object to be compared
|
608
|
+
def ==(o)
|
609
|
+
return true if self.equal?(o)
|
610
|
+
self.class == o.class &&
|
611
|
+
allow_fast_forward_only_merge == o.allow_fast_forward_only_merge &&
|
612
|
+
allow_merge_commits == o.allow_merge_commits &&
|
613
|
+
allow_rebase == o.allow_rebase &&
|
614
|
+
allow_rebase_explicit == o.allow_rebase_explicit &&
|
615
|
+
allow_rebase_update == o.allow_rebase_update &&
|
616
|
+
allow_squash_merge == o.allow_squash_merge &&
|
617
|
+
archived == o.archived &&
|
618
|
+
archived_at == o.archived_at &&
|
619
|
+
avatar_url == o.avatar_url &&
|
620
|
+
clone_url == o.clone_url &&
|
621
|
+
created_at == o.created_at &&
|
622
|
+
default_allow_maintainer_edit == o.default_allow_maintainer_edit &&
|
623
|
+
default_branch == o.default_branch &&
|
624
|
+
default_delete_branch_after_merge == o.default_delete_branch_after_merge &&
|
625
|
+
default_merge_style == o.default_merge_style &&
|
626
|
+
description == o.description &&
|
627
|
+
empty == o.empty &&
|
628
|
+
external_tracker == o.external_tracker &&
|
629
|
+
external_wiki == o.external_wiki &&
|
630
|
+
fork == o.fork &&
|
631
|
+
forks_count == o.forks_count &&
|
632
|
+
full_name == o.full_name &&
|
633
|
+
globally_editable_wiki == o.globally_editable_wiki &&
|
634
|
+
has_actions == o.has_actions &&
|
635
|
+
has_issues == o.has_issues &&
|
636
|
+
has_packages == o.has_packages &&
|
637
|
+
has_projects == o.has_projects &&
|
638
|
+
has_pull_requests == o.has_pull_requests &&
|
639
|
+
has_releases == o.has_releases &&
|
640
|
+
has_wiki == o.has_wiki &&
|
641
|
+
html_url == o.html_url &&
|
642
|
+
id == o.id &&
|
643
|
+
ignore_whitespace_conflicts == o.ignore_whitespace_conflicts &&
|
644
|
+
internal == o.internal &&
|
645
|
+
internal_tracker == o.internal_tracker &&
|
646
|
+
language == o.language &&
|
647
|
+
languages_url == o.languages_url &&
|
648
|
+
link == o.link &&
|
649
|
+
mirror == o.mirror &&
|
650
|
+
mirror_interval == o.mirror_interval &&
|
651
|
+
mirror_updated == o.mirror_updated &&
|
652
|
+
name == o.name &&
|
653
|
+
object_format_name == o.object_format_name &&
|
654
|
+
open_issues_count == o.open_issues_count &&
|
655
|
+
open_pr_counter == o.open_pr_counter &&
|
656
|
+
original_url == o.original_url &&
|
657
|
+
owner == o.owner &&
|
658
|
+
parent == o.parent &&
|
659
|
+
permissions == o.permissions &&
|
660
|
+
private == o.private &&
|
661
|
+
release_counter == o.release_counter &&
|
662
|
+
repo_transfer == o.repo_transfer &&
|
663
|
+
size == o.size &&
|
664
|
+
ssh_url == o.ssh_url &&
|
665
|
+
stars_count == o.stars_count &&
|
666
|
+
template == o.template &&
|
667
|
+
topics == o.topics &&
|
668
|
+
updated_at == o.updated_at &&
|
669
|
+
url == o.url &&
|
670
|
+
watchers_count == o.watchers_count &&
|
671
|
+
website == o.website &&
|
672
|
+
wiki_branch == o.wiki_branch
|
673
|
+
end
|
674
|
+
|
675
|
+
# @see the `==` method
|
676
|
+
# @param [Object] Object to be compared
|
677
|
+
def eql?(o)
|
678
|
+
self == o
|
679
|
+
end
|
680
|
+
|
681
|
+
# Calculates hash code according to all attributes.
|
682
|
+
# @return [Integer] Hash code
|
683
|
+
def hash
|
684
|
+
[allow_fast_forward_only_merge, allow_merge_commits, allow_rebase, allow_rebase_explicit, allow_rebase_update, allow_squash_merge, archived, archived_at, avatar_url, clone_url, created_at, default_allow_maintainer_edit, default_branch, default_delete_branch_after_merge, default_merge_style, description, empty, external_tracker, external_wiki, fork, forks_count, full_name, globally_editable_wiki, has_actions, has_issues, has_packages, has_projects, has_pull_requests, has_releases, has_wiki, html_url, id, ignore_whitespace_conflicts, internal, internal_tracker, language, languages_url, link, mirror, mirror_interval, mirror_updated, name, object_format_name, open_issues_count, open_pr_counter, original_url, owner, parent, permissions, private, release_counter, repo_transfer, size, ssh_url, stars_count, template, topics, updated_at, url, watchers_count, website, wiki_branch].hash
|
685
|
+
end
|
686
|
+
|
687
|
+
# Builds the object from hash
|
688
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
689
|
+
# @return [Object] Returns the model itself
|
690
|
+
def self.build_from_hash(attributes)
|
691
|
+
return nil unless attributes.is_a?(Hash)
|
692
|
+
attributes = attributes.transform_keys(&:to_sym)
|
693
|
+
transformed_hash = {}
|
694
|
+
openapi_types.each_pair do |key, type|
|
695
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
696
|
+
transformed_hash["#{key}"] = nil
|
697
|
+
elsif type =~ /\AArray<(.*)>/i
|
698
|
+
# check to ensure the input is an array given that the attribute
|
699
|
+
# is documented as an array but the input is not
|
700
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
701
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
702
|
+
end
|
703
|
+
elsif !attributes[attribute_map[key]].nil?
|
704
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
705
|
+
end
|
706
|
+
end
|
707
|
+
new(transformed_hash)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Deserializes the data based on type
|
711
|
+
# @param string type Data type
|
712
|
+
# @param string value Value to be deserialized
|
713
|
+
# @return [Object] Deserialized data
|
714
|
+
def self._deserialize(type, value)
|
715
|
+
case type.to_sym
|
716
|
+
when :Time
|
717
|
+
Time.parse(value)
|
718
|
+
when :Date
|
719
|
+
Date.parse(value)
|
720
|
+
when :String
|
721
|
+
value.to_s
|
722
|
+
when :Integer
|
723
|
+
value.to_i
|
724
|
+
when :Float
|
725
|
+
value.to_f
|
726
|
+
when :Boolean
|
727
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
728
|
+
true
|
729
|
+
else
|
730
|
+
false
|
731
|
+
end
|
732
|
+
when :Object
|
733
|
+
# generic object (usually a Hash), return directly
|
734
|
+
value
|
735
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
736
|
+
inner_type = Regexp.last_match[:inner_type]
|
737
|
+
value.map { |v| _deserialize(inner_type, v) }
|
738
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
739
|
+
k_type = Regexp.last_match[:k_type]
|
740
|
+
v_type = Regexp.last_match[:v_type]
|
741
|
+
{}.tap do |hash|
|
742
|
+
value.each do |k, v|
|
743
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
744
|
+
end
|
745
|
+
end
|
746
|
+
else # model
|
747
|
+
# models (e.g. Pet) or oneOf
|
748
|
+
klass = Forgejo.const_get(type)
|
749
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
750
|
+
end
|
751
|
+
end
|
752
|
+
|
753
|
+
# Returns the string representation of the object
|
754
|
+
# @return [String] String presentation of the object
|
755
|
+
def to_s
|
756
|
+
to_hash.to_s
|
757
|
+
end
|
758
|
+
|
759
|
+
# to_body is an alias to to_hash (backward compatibility)
|
760
|
+
# @return [Hash] Returns the object in the form of hash
|
761
|
+
def to_body
|
762
|
+
to_hash
|
763
|
+
end
|
764
|
+
|
765
|
+
# Returns the object in the form of hash
|
766
|
+
# @return [Hash] Returns the object in the form of hash
|
767
|
+
def to_hash
|
768
|
+
hash = {}
|
769
|
+
self.class.attribute_map.each_pair do |attr, param|
|
770
|
+
value = self.send(attr)
|
771
|
+
if value.nil?
|
772
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
773
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
774
|
+
end
|
775
|
+
|
776
|
+
hash[param] = _to_hash(value)
|
777
|
+
end
|
778
|
+
hash
|
779
|
+
end
|
780
|
+
|
781
|
+
# Outputs non-array value in the form of hash
|
782
|
+
# For object, use to_hash. Otherwise, just return the value
|
783
|
+
# @param [Object] value Any valid value
|
784
|
+
# @return [Hash] Returns the value in the form of hash
|
785
|
+
def _to_hash(value)
|
786
|
+
if value.is_a?(Array)
|
787
|
+
value.compact.map { |v| _to_hash(v) }
|
788
|
+
elsif value.is_a?(Hash)
|
789
|
+
{}.tap do |hash|
|
790
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
791
|
+
end
|
792
|
+
elsif value.respond_to? :to_hash
|
793
|
+
value.to_hash
|
794
|
+
else
|
795
|
+
value
|
796
|
+
end
|
797
|
+
end
|
798
|
+
|
799
|
+
end
|
800
|
+
|
801
|
+
end
|