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 support for actix_web::Either #436

Open
ManevilleF opened this issue Jun 2, 2022 · 0 comments
Open

Add support for actix_web::Either #436

ManevilleF opened this issue Jun 2, 2022 · 0 comments

Comments

@ManevilleF
Copy link

ManevilleF commented Jun 2, 2022

Using https://docs.rs/actix-web/latest/actix_web/enum.Either.html is not handled by paperclip.

Having an endpoint like:

#[api_v2_operation]
pub async my_endpoint(form: web::Either<web::Json<MyForm>, web::Form<MyForm>>) -> HttpResponse {
   let form : MyForm = match form {
        Either::Left(f) => f.0,
        Either::Right(f) => f.0,
    };
   // ...
}

Results in an error:

no variant or associated item named `update_definitions` found for enum `actix_web::Either` in the current scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants