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

Allow configuring Controller's routes. #195

Open
Jezza opened this issue Aug 20, 2019 · 0 comments
Open

Allow configuring Controller's routes. #195

Jezza opened this issue Aug 20, 2019 · 0 comments

Comments

@Jezza
Copy link

Jezza commented Aug 20, 2019

Currently, we can only configure a route for a Controller via Annotations.

The annotations themselves aren't the problem, but rather that not all options are available/configurable.
Introducing every option as an annotation would be crazy, and borderline unmaintainable.
It would also be annoying if we need to specify a bunch of these annotations for a lot the routes.

I think a good solution would be allow us to specify a map, or a method, and add an annotation that either calls the method, or pulls the config from the map.

It would also be great if we could configure it for the Controller itself, because there are some options that I'd want to configure for all routes, but only a couple of options for a couple of specific routes.

I'd be happy to help out and submit a PR, if you approve of this idea or even have a better one.

One good example is the managed option.
I'm doing a lot of custom request processing, and decided to use controllers, because they allow declaring a context, but the downside is that I can't control the options directly.
I can see someone already opened an issue because of this. #182

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

No branches or pull requests

1 participant