-
Notifications
You must be signed in to change notification settings - Fork 84
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
Optional fragments depending on other fragments #9
Comments
Hi The colon template in uri_template is currently ultra-simple, so this isn't currently possible. I think it would be great if that was possible. My initial idea for the colon style templates was to implement rails/sinatra-style patterns so that people can simply reuse their routing patterns. So I'd prefer the rails syntax for conditionals: Anyway, you have push access now. Cheers' |
Thanks! I'll work on this asap. |
Cool! |
Any progress so far? Can I help? |
Hey @hannesg - I was actually on a family vacation all week last week. Going to start on this in the next few days. I'll let you know where I can help, perhaps we can pair on it! |
I would be more than willing to implement this, but I was wondering if it's desired or if it's already possible:
Let's say, you have the following template:
:optional2:
would only be added if:optional1
existed. In other words:I have seen this pattern implemented in a few APIs (we can debate the design of said APIs another time). Is this possible with uri_template? If not, would there be any interest in me adding it?
If there is interest in me adding it, could we discuss what the pattern would look like for both formats?
Thanks!
The text was updated successfully, but these errors were encountered: