Skip to content

Commit

Permalink
refactor: remove hatsu_openapi crate
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Sep 14, 2024
1 parent d4b1ef7 commit 1e868cb
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 39 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ members = [
"crates/db_schema",
"crates/feed",
"crates/nodeinfo",
"crates/openapi",
"crates/tracing",
"crates/utils",
"crates/well_known",
Expand All @@ -79,7 +78,6 @@ hatsu_db_migration = { path = "./crates/db_migration" }
hatsu_db_schema = { path = "./crates/db_schema" }
hatsu_feed = { path = "./crates/feed" }
hatsu_nodeinfo = { path = "./crates/nodeinfo" }
hatsu_openapi = { path = "./crates/openapi" }
hatsu_tracing = { path = "./crates/tracing" }
hatsu_utils = { path = "./crates/utils" }
hatsu_well_known = { path = "./crates/well_known" }
Expand Down Expand Up @@ -146,7 +144,6 @@ uuid = { version = "1.8", features = [
hatsu_api_apub = { workspace = true }
hatsu_apub = { workspace = true }
hatsu_backend = { workspace = true }
# hatsu_cron = { workspace = true }
hatsu_db_migration = { workspace = true }
hatsu_db_schema = { workspace = true }
hatsu_tracing = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ hatsu_api_apub = { workspace = true }
hatsu_api_mastodon = { workspace = true }
hatsu_cron = { workspace = true }
hatsu_nodeinfo = { workspace = true }
hatsu_openapi = { workspace = true }
hatsu_well_known = { workspace = true }
hatsu_utils = { workspace = true }
activitypub_federation = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use tower_http::{
use tracing::Level;

mod favicon;
mod openapi;
mod routes;

pub struct Server {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions crates/backend/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use utoipa::OpenApi;
use utoipa_axum::router::OpenApiRouter;
use utoipa_scalar::{Scalar, Servable};

use crate::favicon;
use crate::{favicon, openapi::ApiDoc};

// ./hatsu --version
async fn root() -> Response<String> {
Response::new(AppEnv::info())
}

pub fn routes() -> Router {
let (api_router, api) = OpenApiRouter::with_openapi(hatsu_openapi::ApiDoc::openapi())
let (api_router, api) = OpenApiRouter::with_openapi(ApiDoc::openapi())
.merge(hatsu_api::routes())
.merge(hatsu_api_admin::routes())
.merge(hatsu_api_apub::routes())
Expand Down
21 changes: 0 additions & 21 deletions crates/openapi/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions crates/openapi/src/lib.rs

This file was deleted.

0 comments on commit 1e868cb

Please sign in to comment.