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

Add Support for axum::extract::Path #14

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Conversation

bachp
Copy link
Contributor

@bachp bachp commented Feb 15, 2024

This change adds support to add parameters passed via axum::extract::Path to the parameters section.

It's currently draft because I couldn't figure out how I could get the path parameter name to set the name value. And thus the test is currently failing.

@kurtbuilds Any idea how this could be achieved?

bachp and others added 3 commits February 15, 2024 15:55
@kurtbuilds
Copy link
Owner

kurtbuilds commented Feb 15, 2024

Thank you for submitting this and including the test case. Made it incredibly easy to help you out.

The Parameter schema doesn't have the route information, so this logic can't be in the macro, but it's pretty straight forward to put the logic in the route registration function.

I updated the logic, pushed to the PR.

Let me know if there's anything else you were aiming to include in the PR. Otherwise happy to merge and cut a patch release.

@kurtbuilds kurtbuilds marked this pull request as ready for review February 15, 2024 16:50
@bachp
Copy link
Contributor Author

bachp commented Feb 15, 2024

@kurtbuilds Thanks for fixing this. I will probably come back with some more features, mainly around Autnentication but for now this PR is ready from my side.

@kurtbuilds kurtbuilds merged commit 23abc41 into kurtbuilds:master Feb 15, 2024
1 check passed
@kurtbuilds
Copy link
Owner

Sounds great. Cut and published as 0.20.1.

Happy to chat about auth when you dive deeper on that front.

@bachp bachp deleted the axum-path branch February 15, 2024 21:22
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 this pull request may close these issues.

2 participants