Replies: 1 comment 1 reply
-
When I ran into this, I just created the two routes. I don't think there's a workaround right now, this is based on the underlying |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm struggling to make a catchall route work on Axum 0.8, since the wildcard doesn't match an empty string. The easy way out of this would be to duplicate the route (one for
prefix/
, one forprefix/{*rest}
), but I'm using utoipa for openapi generation and this approach leads to duplicate routes in the generated openapi document. Anyone know of a workaround for this?For context, I've built a Git service and am trying to build out the HTTP api for accessing files in a way that is compatible with Github's contents API (both
/owner/repo/contents/path/to/file.txt
and/owner/repo/contents
need to work).axum version
0.8.1
Beta Was this translation helpful? Give feedback.
All reactions