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

Fix find actual request body TypeTree #977

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Commits on Jul 24, 2024

  1. Fix find actual request body TypeTree

    Prior to this commit the find actual request body did not work for
    uknown types. This PR changes the implmentation so that it does not care
    about the uknown wrapper types and will try to search from it's children
    if it has generics.
    
    The example demostrates `Validated<T>` custom wrapper type being used on
    body type as an out most wrapper. Before this gave a bad error but is
    now supported.
    
    ```rust
     #[utoipa::path()]
     #[post("/item")]
     async fn post_item(_body: Validated<Json<Item>>) -> Json<Item> {
         Json(Item(String::new()))
     }
    ```
    juhaku committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    7dbb217 View commit details
    Browse the repository at this point in the history