scalecube / scalecube-services

Microservices library - scalecube-services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing
http://scalecube.github.io/
Apache License 2.0
610 stars 105 forks source link

Support qualifier format with version #756

Closed artem-v closed 1 year ago

artem-v commented 4 years ago

Support new qualfier format: version/namespace/action. Version: must be in a format v{d+} character v plus 1 or more digits.

namespace/action   or  /namespace/action
<= 0

If this is old qualfier format (/namespace/action or namespace/action) then 0 must be returned.


Example:

@Version(1)
@Service("auth")
interface AuthService {

  @ServiceMethod
  Response createAccessKey(Request)
}

Expected qualfier: v1/auth/createAccessKey


@Version(0)
@Service("auth")
interface AuthService {

  @ServiceMethod
  Response createAccessKey(Request)
}

Expected: exception saying it's not allowed to set 0 as a version. **NOTE: 0 is registered value, it's used to denote absence of @Version annotation.


@Version(1)
@Service("auth")
interface AuthService {

  @ServiceMethod
  Response createAccessKey(Request)

  @ServiceMethod("v2/auth/create_access_key")
  Response createAccessKey2(Request)
}
@Service("auth")
interface AuthService {

  @ServiceMethod("v1/auth/create_access_key")
  Response createAccessKey(Request)
}

Expected: exception in both examples saying it's not allowed to set versions on service method.

artem-v commented 1 year ago

Won't fix.