Is your feature request related to a problem? Please describe.
OpenAPI Generator currently has three Rust server options: rust-axum, rust-server (hyper-based), and the deprecated rust-server-deprecated. There is no generator for Salvo, a maturing Rust web framework with a first-class salvo::oapi layer for OpenAPI-driven APIs that an OpenAPI Generator output can target cleanly.
Describe the solution you'd like
Add a rust-salvo server generator that mirrors the rust-axum baseline (security, schema composition, parameter/wire format coverage) and produces code idiomatic to Salvo >= 0.76:
- Handlers use
#[salvo::oapi::endpoint] and the typed extractors in salvo::oapi::extract (JsonBody<T>, PathParam<T>, QueryParam<T, REQUIRED>, HeaderParam<T, REQUIRED>, FormBody<T>).
- Models derive
salvo::oapi::ToSchema so they flow through those extractors and surface in the generated OpenAPI doc.
- Routes use the
{name} path syntax (Salvo 0.76+).
- Optional
enableAuthMiddleware / enableCorsMiddleware / enableRequestValidation toggles, with auth middleware (ApiKeyAuth / BasicAuth / BearerAuth) emitted from the spec's securitySchemes.
- Pinned to current stable Salvo 0.93 and validator 0.20.
Describe alternatives you've considered
Maintaining a downstream-only generator, but that fragments the ecosystem. rust-axum covers axum but cannot be retargeted to Salvo's macro-driven OpenAPI integration.
Additional context
Implementation is ready and validated:
- Java tests: 7/7 pass (
RustSalvoServerCodegenTest).
- Generated petstore + the three rust-salvo test specs compile with
cargo check cleanly against Salvo 0.93 (0 errors, 0 warnings).
- Generator doc auto-exported to
docs/generators/rust-salvo.md; declared feature set matches rust-axum (allOf / anyOf / oneOf, JSON wire, ApiKey + Basic + Bearer).
- Pull request to follow.
Is your feature request related to a problem? Please describe.
OpenAPI Generator currently has three Rust server options:
rust-axum,rust-server(hyper-based), and the deprecatedrust-server-deprecated. There is no generator for Salvo, a maturing Rust web framework with a first-classsalvo::oapilayer for OpenAPI-driven APIs that an OpenAPI Generator output can target cleanly.Describe the solution you'd like
Add a
rust-salvoserver generator that mirrors the rust-axum baseline (security, schema composition, parameter/wire format coverage) and produces code idiomatic to Salvo >= 0.76:#[salvo::oapi::endpoint]and the typed extractors insalvo::oapi::extract(JsonBody<T>,PathParam<T>,QueryParam<T, REQUIRED>,HeaderParam<T, REQUIRED>,FormBody<T>).salvo::oapi::ToSchemaso they flow through those extractors and surface in the generated OpenAPI doc.{name}path syntax (Salvo 0.76+).enableAuthMiddleware/enableCorsMiddleware/enableRequestValidationtoggles, with auth middleware (ApiKeyAuth/BasicAuth/BearerAuth) emitted from the spec'ssecuritySchemes.Describe alternatives you've considered
Maintaining a downstream-only generator, but that fragments the ecosystem.
rust-axumcovers axum but cannot be retargeted to Salvo's macro-driven OpenAPI integration.Additional context
Implementation is ready and validated:
RustSalvoServerCodegenTest).cargo checkcleanly against Salvo 0.93 (0 errors, 0 warnings).docs/generators/rust-salvo.md; declared feature set matchesrust-axum(allOf / anyOf / oneOf, JSON wire, ApiKey + Basic + Bearer).