-
Notifications
You must be signed in to change notification settings - Fork 64
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
Multiple path parameters from tuple are ignored #113
Comments
As far as I remember I left this out intentionally as tuples don't contain name information for parameters and the schema generation is decoupled from the path itself. That being said it could be possible to support this in some way during generation, we would have to parse the path to look for parameters and adjust the schemas accordingly, I'm not sure if it's worth the effort but I'm not against it if it's doable without a major bump in complexity. |
Understood. I'd suggest to at least change the current behaviour. At the moment it fails silently which is less than ideal. I've spent unreasonable amount of time chasing this one (it showed up on the client-side after code-generator which also had a related bug 🤦). Perhaps just fail the whole compilation with a way to override the failure? |
any update? having the same issue |
When the path has multiple parameters, Axum supports two ways of passing them to the handler. First is to make a struct which is then parsed. This use case works well. Second is to accept it as tuple. Both cases presented in Axum documentation.
The tuple-based path is not handled properly by Aide. I have made a small change to the example to demonstrate the issue.
I defined two new handlers using both approaches. The function
depends_on_todo_struct
has its OpenAPI spec as followsThe function is missing the
parameters
field completelyThe text was updated successfully, but these errors were encountered: