Uh oh!
There was an error while loading. Please reload this page.
chore(deps): drop unused utoipa, utoipa-axum, utoipa-scalar - #306
Conversation
These three workspace dependencies (and their transitives) have zero in-tree usage: - 0 `use utoipa` / `use utoipa_axum` / `use utoipa_scalar` imports - 0 `#[derive(ToSchema)]` / `#[derive(IntoParams)]` derives - The only mention is a doc-comment in `crates/aisix-admin/src/openapi.rs:15-19` explaining why the OpenAPI 3.1 document is hand-written rather than derived — that rationale is preserved. Removing them shrinks the dependency tree (59 lines off Cargo.lock) without any behavior change. Verified with `cargo check --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`, and `cargo fmt --all -- --check`.
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughOpenAPI-related dependencies ( ChangesOpenAPI Dependency Removal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. Comment |
Summary
Removes three workspace dependencies that have zero in-tree usage:
utoipa = "5"utoipa-axum = "0.1"utoipa-scalar = "0.2"Why
These were introduced in case the admin OpenAPI 3.1 doc would be derived via
utoipa's#[derive(ToSchema)]macros, butcrates/aisix-admin/src/openapi.rs:15-19records the team's decision to keep the spec hand-written:The decision has been in effect for some time and the unused deps are pure noise in
Cargo.lock(~59 lines of transitive crates). Removing them is a preparatory tidy-up before the upcoming canonical JSON Schema work (#304 item #1), which will follow a different code path (schemarsderive on resource structs inaisix-core) and benefit from a clean dependency baseline.Verification
grep -rE "utoipa|ToSchema|IntoParams" --include="*.rs" crates/— only the doc-comment match inopenapi.rs(kept as historical context)cargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkScope
Zero behavior change. The hand-written OpenAPI doc and Scalar mount at
/admin/openapi.json//admin/openapi-scalarcontinue to serve exactly the same content; nothing about how requests flow throughaisix-adminis touched.Refs #304 (#1).
Summary by CodeRabbit