scalecube-services icon indicating copy to clipboard operation
scalecube-services copied to clipboard

Add new service annotation - `@Method(GET|POST|PUT|...)`

Open artem-v opened this issue 1 year ago • 5 comments

Add support of optional service annotation @Method with value as HTTP method. Must be defined only on methods with annotation @ServiceMethod.

Idea is to support clients who wants to call scalecube service through the HTTP gateway and to support http methods RESTful semantic.

Expected changes

  • There must be new enum type in scalecube-services-api with all http methods.
  • ServiceReference, ServiceMethodDefinition objects must have method field (optional).
  • Add logic to our "out-of-the-box" routers (RandomServiceRouter and RoundRobinServiceRouter) so they begin to support method in the routing logic.

Depends on

https://github.com/scalecube/scalecube-services/issues/856

artem-v avatar Oct 11 '24 13:10 artem-v