We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
swagger-ui
I have two endpoints where each of them in the own module, and they have equal names, so we need to join them by nest:
nest
mod first { use utoipa::OpenApi; #[derive(OpenApi)] #[openapi(paths(get))] pub struct Doc; #[utoipa::path(get, path = "")] pub async fn get() -> &'static str { "First" } } mod second { use utoipa::OpenApi; #[derive(OpenApi)] #[openapi(paths(get))] pub struct Doc; #[utoipa::path(get, path = "")] pub async fn get() -> &'static str { "Second" } } #[derive(OpenApi)] #[openapi( nest( (path = "/second", api = second::Doc), (path = "/first", api = first::Doc), ), )] pub struct ApiDoc;
I open /swagger endpoint and use /second, but it calls /first, what is incorrect, so I tried to do so with RapiDoc and it doesn't have the problem.
/swagger
/second
/first
RapiDoc
I created an example to demonstrate that correct utoipa usage with axum leads to incorrect UI in Swagger.
utoipa
axum
The text was updated successfully, but these errors were encountered:
Changing the name of one of the endpoints solves the problem
Sorry, something went wrong.
No branches or pull requests
I have two endpoints where each of them in the own module, and they have equal names, so we need to join them by
nest
:I open
/swagger
endpoint and use/second
, but it calls/first
, what is incorrect, so I tried to do so withRapiDoc
and it doesn't have the problem.I created an example to demonstrate that correct
utoipa
usage withaxum
leads to incorrect UI in Swagger.The text was updated successfully, but these errors were encountered: