Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation for utoipa-actix-web bindings #1158

Merged
merged 1 commit into from
Oct 22, 2024

Commits on Oct 22, 2024

  1. Add implementation for utoipa-actix-web bindings

    Implements wrappers for `ServiceConfig`, `App`, `Scope` of actix-web.
    This allows users to create `App` with collecting `paths` and `schemas`
    recursively without registering them to `#[openapi(...)]` attribute.
    
    Example of new supported syntax.
    ```rust
     use actix_web::{get, App};
     use utoipa_actix_web::{scope, AppExt};
    
     #[derive(utoipa::ToSchema)]
     struct User {
         id: i32,
     }
    
     #[utoipa::path(responses((status = OK, body = User)))]
     #[get("/user")]
     async fn get_user() -> Json<User> {
         Json(User { id: 1 })
     }
    
     let (_, mut api) = App::new()
         .into_utoipa_app()
         .service(scope::scope("/api/v1").service(get_user))
         .split_for_parts();
    ```
    
    Relates #283 Relates #662
    Closes #121 Closes #657
    juhaku committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    d1812cb View commit details
    Browse the repository at this point in the history