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

Introduce RouteGroup #23

Closed
ahopkins opened this issue Apr 8, 2021 · 0 comments · Fixed by #24
Closed

Introduce RouteGroup #23

ahopkins opened this issue Apr 8, 2021 · 0 comments · Fixed by #24

Comments

@ahopkins
Copy link
Member

ahopkins commented Apr 8, 2021

Currently, a route is defined as defined path to reach the endpoint. Multiple methods whether in a single definition, or multiple will result in a single route.

We should add a RouteGroup that has a near identical API to the Route.

In practical example, it means that this would yield a single route:

router.add("/path", methods=("foo", "bar"))

But this would yield two:

router.add("/path", methods=("foo",))
router.add("/path", methods=("bar"))

However, they should be joined into a single RouteGroup that the router does not distinguish between when generating the source or resolving a path.

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 a pull request may close this issue.

1 participant