We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@path
The most common pattern we have in our wiro/tapiro based applications is:
@path("resource") trait ResourceController[F[_], T] { @query def example(): F[Example] }
which will produce this endpoint:
GET /resource/example
Omitting @path will instead result in
GET /ResourceController/example
which is virtually never what we want.
I propose we optimize for the most common use case by automatically inferring path from the controller name using a regex like ^(\w+)Controller$.
path
^(\w+)Controller$
Under this scheme one would be able to omit path
trait ResourceController { @query def example(): F[Example] }
and have an endpoint
Using @path is still supported if one needs a custom prefix
To summarize, the strategy to generate a the path prefix would be (in order of descending priority)
What do you think @calippo?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The most common pattern we have in our wiro/tapiro based applications is:
which will produce this endpoint:
Omitting
@path
will instead result inwhich is virtually never what we want.
I propose we optimize for the most common use case by automatically inferring
path
from the controller name using a regex like^(\w+)Controller$
.Under this scheme one would be able to omit path
and have an endpoint
Using
@path
is still supported if one needs a custom prefixTo summarize, the strategy to generate a the path prefix would be (in order of descending priority)
@path
if provided^(\w+)Controller$
)What do you think @calippo?
The text was updated successfully, but these errors were encountered: