Derive route from interface name and/or operation names. #4675
-
Coming from GRPC, I wonder if there is any decorators that one can use to automatically derive route path by the name of the operation? @route("/someservice") // regular route
interface SomeService {
@autoRoute // mapped to '/someservice/create'
op create(): Response;
}
// Or when applied to interface/namespace
@autoRoute // mapped to '/someservice'
interface SomeService {
op create(): Response; // mapped to '/someservice/create'
} Is there any ways to achieve something similar to this? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
timotheeguerin
Oct 10, 2024
Replies: 1 comment 1 reply
-
You can use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
boan-anbo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
@action
for this from the rest libraryPlayground