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

SwaggerUI dont work with axum 0.7.x #808

Closed
dayvejones opened this issue Nov 27, 2023 · 5 comments · Fixed by #807
Closed

SwaggerUI dont work with axum 0.7.x #808

dayvejones opened this issue Nov 27, 2023 · 5 comments · Fixed by #807

Comments

@dayvejones
Copy link

Hello !

I updated axum version from 0.6.20 to 0.7.1 and got the problem.

axum = "0.7.1"
utoipa = { version = "4.1.0", features = ["axum_extras", "chrono", "preserve_path_order"] }
utoipa-swagger-ui = { version = "4.0.0", features = ["axum"] }
Router::new()
    .merge(SwaggerUi::new("/swagger-ui").url("/api-doc/openapi.json", ApiDoc::openapi()))

problem:

the trait bound `Router<StateData>: From<SwaggerUi>` is not satisfied
required for `SwaggerUi` to implement `Into<Router<StateData>>

thank you for super useful crate!

@arshia-gh
Copy link

Yep I'm having the same issue

@arkadiuszspiewak
Copy link

this PR should fix it

@asyncfncom
Copy link

@juhaku Is it possible to get a new release with this fix?

@juhaku
Copy link
Owner

juhaku commented Nov 28, 2023

@juhaku Is it possible to get a new release with this fix?

Sure, I make the release shortly. It will be a breaking change for the utoipa-swagger-ui, utoipa-redoc and utoipa-rapidoc.

@juhaku juhaku closed this as completed Nov 28, 2023
@asyncfncom
Copy link

@juhaku @Libbum Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants