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

Same endpoint, different methods, but only one is registered #1185

Open
slekup opened this issue Nov 4, 2024 · 1 comment
Open

Same endpoint, different methods, but only one is registered #1185

slekup opened this issue Nov 4, 2024 · 1 comment

Comments

@slekup
Copy link

slekup commented Nov 4, 2024

If I have two routes, like:

#[utoipa::path(
    patch,
    path = "/",
    tag = "Users",
)]
pub async fn update_user_handler() { ... }

#[utoipa::path(
    delete,
    path = "/",
    tag = "Users",
)]
pub async fn delete_user_handler() { ... }

only one of them registers. If I change the path of one of them to something different, both of them register.

How could I register both of them with the same path, but different methods? Or is this a bug?

@juhaku
Copy link
Owner

juhaku commented Nov 7, 2024

@slekup How did you register those 2 handlers? Did you use axum or what library you are using? Just based on above statement it is impossible to tell what is possibly wrong and where.

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

No branches or pull requests

2 participants