You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Folks - How would one go about matching routes with variable segments in which the left-most, and, the right-most have a fixed interpretation but the "inside" segments are everything else. E.g.:
docker pull docker.io/hello-world:latest.: left-most is registry, rightmost is tag, everything else is repository. Then that rule holds for all these:
I currently handle this with explicit routes but I'm wondering if there's a more flexible way - such as one route with "wildcards". I'm generating the Echo code using oapi-codegen. OAPI 3 does not support this but if Echo did, that might lead me to move away from oapi at least in the short time. (I understand OAPI 4 is going to support this.)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Folks - How would one go about matching routes with variable segments in which the left-most, and, the right-most have a fixed interpretation but the "inside" segments are everything else. E.g.:
docker pull docker.io/hello-world:latest.: left-most is registry, rightmost is tag, everything else is repository. Then that rule holds for all these:docker pull docker.io/foo/bar:latest.docker pull docker.io/foo/bar/baz:latest.docker pull docker.io/foo/bar/baz/and/so/on:latest.I currently handle this with explicit routes but I'm wondering if there's a more flexible way - such as one route with "wildcards". I'm generating the Echo code using oapi-codegen. OAPI 3 does not support this but if Echo did, that might lead me to move away from oapi at least in the short time. (I understand OAPI 4 is going to support this.)
Beta Was this translation helpful? Give feedback.
All reactions