use utoipa::OpenApi; use crate::features::archive; use crate::features::branch; use crate::features::branch_protection; use crate::features::collab; use crate::features::commit_status; use crate::features::compare; use crate::features::contents; use crate::features::deploy_key; use crate::features::git_ref; use crate::features::lifecycle; use crate::features::release; use crate::features::subscriber; use crate::features::sync; use crate::features::tag; use crate::features::tag_protection; use crate::features::topic; #[derive(OpenApi)] #[openapi( info( title = "lib/repo", version = env!("CARGO_PKG_VERSION"), description = "Repository service for the space / channel / repo hierarchy.", ), paths( crate::handler::lifecycle::create::handler, crate::handler::lifecycle::get::handler, crate::handler::lifecycle::list::handler, crate::handler::lifecycle::update::handler, crate::handler::lifecycle::delete::handler, crate::handler::lifecycle::transfer::handler, crate::handler::lifecycle::archive::handler, crate::handler::lifecycle::rename::handler, crate::handler::lifecycle::fork::handler, crate::handler::lifecycle::generate::handler, crate::handler::branch::list::handler, crate::handler::branch::get::handler, crate::handler::branch::create::handler, crate::handler::branch::update::handler, crate::handler::branch::delete::handler, crate::handler::branch::rename::handler, crate::handler::branch::merge_upstream::handler, crate::handler::branch_protection::list::handler, crate::handler::branch_protection::create::handler, crate::handler::branch_protection::get::handler, crate::handler::branch_protection::edit::handler, crate::handler::branch_protection::delete::handler, crate::handler::branch_protection::priority::handler, crate::handler::tag::list::handler, crate::handler::tag::get::handler, crate::handler::tag::create::handler, crate::handler::tag::delete::handler, crate::handler::tag_protection::list::handler, crate::handler::tag_protection::create::handler, crate::handler::tag_protection::get::handler, crate::handler::tag_protection::edit::handler, crate::handler::tag_protection::delete::handler, crate::handler::release::list::handler, crate::handler::release::latest::handler, crate::handler::release::create::handler, crate::handler::release::get::handler, crate::handler::release::by_tag::handler, crate::handler::release::edit::handler, crate::handler::release::delete::handler, crate::handler::release::delete_by_tag::handler, crate::handler::collab::list::handler, crate::handler::collab::is::handler, crate::handler::collab::add::handler, crate::handler::collab::delete::handler, crate::handler::collab::permission::handler, crate::handler::deploy_key::list::handler, crate::handler::deploy_key::create::handler, crate::handler::deploy_key::get::handler, crate::handler::deploy_key::delete::handler, crate::handler::topic::list::handler, crate::handler::topic::update::handler, crate::handler::topic::add::handler, crate::handler::topic::delete::handler, crate::handler::topic::search::handler, crate::handler::commit_status::list::handler, crate::handler::commit_status::create::handler, crate::handler::commit_status::list_by_ref::handler, crate::handler::commit_status::combined::handler, crate::handler::subscriber::list::handler, crate::handler::contents::get_list::handler, crate::handler::contents::get::handler, crate::handler::contents::create::handler, crate::handler::contents::update::handler, crate::handler::contents::delete::handler, crate::handler::contents::change_files::handler, crate::handler::contents::diff_patch::handler, crate::handler::archive::get::handler, crate::handler::compare::compare::handler, crate::handler::git_ref::refs::handler, crate::handler::git_ref::refs_filter::handler, crate::handler::git_ref::commit::handler, crate::handler::git_ref::diff::handler, crate::handler::git_ref::annotated_tag::handler, crate::handler::git_ref::tree::handler, crate::handler::git_ref::blob::handler, crate::handler::git_ref::notes::handler, crate::handler::sync::get::handler, crate::handler::sync::run::handler, ), components(schemas( lifecycle::RepoView, lifecycle::CreateRepoOption, lifecycle::UpdateRepoOption, lifecycle::TransferRepoOption, lifecycle::ArchiveRepoOption, lifecycle::RenameRepoOption, lifecycle::ForkRepoOption, lifecycle::GenerateRepoOption, lifecycle::ListRepoQuery, lifecycle::RepoPage, lifecycle::Permission, lifecycle::InternalTracker, lifecycle::ExternalTracker, lifecycle::ExternalWiki, lifecycle::ChannelSummary, lifecycle::SpaceSummary, branch::BranchView, branch::CreateBranchOption, branch::UpdateBranchOption, branch::RenameBranchOption, branch::MergeUpstreamRequest, branch::MergeUpstreamResponse, branch::ListBranchQuery, branch::BranchPage, branch::CommitMeta, branch_protection::BranchProtectionView, branch_protection::CreateBranchProtectionOption, branch_protection::EditBranchProtectionOption, branch_protection::BranchProtectionPage, branch_protection::ListBranchProtectionQuery, branch_protection::UpdateBranchProtectionPriorities, tag::TagView, tag::CreateTagOption, tag::TagPage, tag::ListTagQuery, tag_protection::TagProtectionView, tag_protection::CreateTagProtectionOption, tag_protection::EditTagProtectionOption, tag_protection::TagProtectionPage, tag_protection::ListTagProtectionQuery, release::ReleaseView, release::CreateReleaseOption, release::EditReleaseOption, release::ListReleaseQuery, release::ReleasePage, release::PublisherSummary, collab::CollaboratorView, collab::AddCollaboratorOption, collab::CollaboratorPage, collab::ListCollaboratorQuery, collab::RepoCollaboratorPermission, collab::UserSummary, deploy_key::DeployKeyView, deploy_key::CreateDeployKeyOption, deploy_key::DeployKeyPage, deploy_key::ListDeployKeyQuery, topic::TopicView, topic::TopicList, topic::TopicSearchResult, topic::RepoTopicOptions, topic::TopicSearchQuery, commit_status::CommitStatusView, commit_status::CommitStatusPage, commit_status::CreateStatusOption, commit_status::CombinedStatusView, commit_status::ListStatusQuery, subscriber::SubscriberView, subscriber::SubscriberPage, subscriber::ListSubscriberQuery, contents::ContentsResponse, contents::ContentsListResponse, contents::CreateFileOption, contents::UpdateFileOption, contents::DeleteFileOption, contents::ChangeFileEntry, contents::ChangeFilesOptions, contents::ApplyDiffPatchFileOptions, contents::FilesResponse, contents::CommitSummary, contents::GitIdentity, contents::ContentsQuery, contents::FileOptions, archive::ArchiveFormatQuery, compare::CompareView, compare::CompareFileDiff, git_ref::GitRef, git_ref::CommitView, git_ref::CommitDiffPayload, git_ref::TreeView, git_ref::TreeEntryView, git_ref::BlobView, git_ref::NoteView, sync::SyncStatus, sync::SyncResult, )), tags( (name = "repo", description = "Repository service (lib/repo)"), ) )] pub struct ApiDoc; pub fn build_openapi() -> utoipa::openapi::OpenApi { ::openapi() }