Should we move routing to individual controllers? #93
Regenhardt
started this conversation in
Polls
Replies: 2 comments
-
To me the current implementation looks like minimal APIs, which I like a lot and seems to be the new way to implement APIs. At least for somewhat small APIs. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I personally like controllers more than minimal APIs. But before we tackle this here in anyway. I would suggest that we look into bringing the application away from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, controllers have methods, but the mapping to endpoints happens in
BaGetterEndpointBuilder.MapEndpoints
.BaGetterEndpointBuilder
also has the individual endpoint mapping methods set to public, to technically somebody integrating BaGet/BaGetter into their own application could have used those public methods to map certain controllers and features and not map others (although I can't of a good reason to do so).So instead of something like this:
I would like to move it to something like this:
What do you think? Is the
MapEndpoints
just a nice way of having everything in one place, or is it just convoluted and complicated to have to look in there to find a route for a controller you're currently working on? Are there reasons to not automatically map the controller endpoints, like when integrating BaGetter in another web application?4 votes ·
Beta Was this translation helpful? Give feedback.
All reactions