3a22c4265d
- Add gen_openapi binary for generating OpenAPI specification - Implement comprehensive pull request API endpoints including core operations - Add pull request reviews, check runs, labels, assignees, and events APIs - Include pull request status and merge strategy management endpoints - Add wiki page CRUD operations with revision history and comparison - Update OpenAPI documentation with Pull Requests and Wiki tags - Modify workspace find function visibility for external access - Integrate new API modules into main OpenAPI router configuration
31 lines
898 B
Rust
31 lines
898 B
Rust
use actix_web::web;
|
|
use actix_web::web::scope;
|
|
|
|
use crate::api::auth;
|
|
use crate::api::issue;
|
|
use crate::api::pr;
|
|
use crate::api::repo;
|
|
use crate::api::user;
|
|
use crate::api::wiki;
|
|
use crate::api::workspace;
|
|
|
|
pub fn init_routes(cfg: &mut web::ServiceConfig) {
|
|
cfg.service(
|
|
scope("/api/v1")
|
|
.configure(auth::configure)
|
|
.configure(user::configure)
|
|
.configure(workspace::configure)
|
|
.configure(repo::configure)
|
|
.service(
|
|
scope("/workspaces/{workspace_name}")
|
|
.configure(issue::configure)
|
|
.service(
|
|
scope("/repos/{repo_name}")
|
|
.configure(issue::configure_repo_level)
|
|
.configure(pr::configure)
|
|
.configure(wiki::configure),
|
|
),
|
|
),
|
|
);
|
|
}
|