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

Route Prefixes and Versions #1511

Open
4 tasks
alexrabin opened this issue Sep 13, 2024 · 2 comments
Open
4 tasks

Route Prefixes and Versions #1511

alexrabin opened this issue Sep 13, 2024 · 2 comments
Labels
feature A new feature or request p3 Issues that we currently consider unimportant

Comments

@alexrabin
Copy link

alexrabin commented Sep 13, 2024

Description

Just wanted to say thank you so much for this package. I love it.

Okay so I was curious if it would be possible to allow the developer to add a global route prefix and possibly specify a version for the route. Like in Nest.js with global prefixes and Versioning.

So for example, i want my api’s to start with “/api/v1/“. Right now I would have to create two folders and then put all my routes in those folders but instead I’d like to be able to specify the global prefix in the custom server endpoint and then within each route I’d like to then specify the version of the route.

Requirements

  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.
  • Developer can specify a global prefix
  • Developer can specify versions for routes

Additional Context

No response

@tomarra
Copy link
Contributor

tomarra commented Sep 24, 2024

Hi @alexrabin 👋 Thanks for opening this issue.

Overall we think that the suggestion is valid but also doesn't fit the main development style we have implemented in Dart Frog. Typically given how file path based frameworks work the solution of creating new folders and copying in (or referencing) files is the typically way to achieve what your looking for. That being said we did have some questions around the use case your trying to solve here. Is it just for versioning in a Production deployment or are there development use cases that could be aided by having this functionality as well?

This could be something that may be solved by our work on a plugin/codegen system to allow others to write plugins that modify the build process for a Dart Frog project as well but we don't have an ETA right now for that landing.

@tomarra tomarra added the p3 Issues that we currently consider unimportant label Sep 24, 2024
@tomarra tomarra moved this from Needs Triage to Backlog in VGV Open Source 🦄 🧙🌟 Sep 24, 2024
@alexrabin
Copy link
Author

This is for production. In the event I need to make different versions of an api, I'd like to.

The codegen route sounds promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or request p3 Issues that we currently consider unimportant
Projects
Status: Backlog
Development

No branches or pull requests

2 participants