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 customization of the API endpoint #81

Open
axos88 opened this issue Mar 22, 2019 · 0 comments
Open

Allow customization of the API endpoint #81

axos88 opened this issue Mar 22, 2019 · 0 comments

Comments

@axos88
Copy link

axos88 commented Mar 22, 2019

package a.b.c.d.e.f.shared

trait Api {
  def store(data: Seq[Todo]): Unit
  def load(): Seq[Todo]
}
  val routes: Route = pathPrefix("api") {
    path(Segments) { segments =>
      post(AutowireServer.dispatch(segments))
    }
  }

This results in calls such as /api/a/b/c/d/e/f/shared/Api/store, which is a bit weird. I'd love it if it would be possible to leave out the namespacing, and leave only /api/store, or some customizable prefix, using a class attribute perhaps?

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