-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Redirect response type error #827
Labels
question
Further information is requested
Comments
I've found this conversion as a workaround: pub struct IndexApi;
#[poem_openapi::OpenApi]
impl IndexApi {
#[oai(path = "/", method = "get")]
async fn index(&self) -> poem::Result<()> {
Err(poem::error::Error::from_response(
poem::IntoResponse::into_response(poem::web::Redirect::see_other(
"http:https://127.0.0.1:3000/api/v1/swagger".to_owned(),
)),
))
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How should a redirect be done with poem_openapi?
Error:
poem::Response
andpoem_openapi::payload::Response<()>
have similar names, but are actually distinct typesIn:
The text was updated successfully, but these errors were encountered: