popozy edited a comment on issue #690:
URL: 
https://github.com/apache/servicecomb-service-center/issues/690#issuecomment-692450662


   > **Describe the bug**
   > 
   > ```
   >   /v4/{project}/registry/instances:
   >     get:
   >       description: |
   >         实例注册后可以根据微服务版本规则或字段条件 
发现该微服务的实例。同时会将此微服务版本规则记录到依赖关系中,当发现相同微服务的不同版本规则时,会覆盖已有的依赖关系。
   >       operationId: find
   >       parameters:
   >         - name: x-domain-name
   >           in: header
   >           type: string
   >           default: default
   >         - name: x-resource-revsion
   >           in: header
   >           type: string
   >           description: 
客户端缓存的版本号,由上一次请求该API返回Header中获得;如请求版本号不为空且与服务端不匹配则服务端返回其最新的实例集合和版本号;如匹配则服务端返回304状态且Body为空。
   >         - name: X-ConsumerId
   > ```
   > 
   > x-resource-revsion is not a parameter, but a response header.
   > 
   > **To Reproduce**
   > 
   > **Expected behavior**
   > 
   > **Platform And Runtime (please complete the following information):**
   > 
   > **Additional context**
   
   @liubao68 Hi, liubao86. I think you get confused when reading the v4.yaml to 
make it clear how to use the sc with api. Do you means that we should put 
"x-resource-revsion" in reponse header, not as a parameter?
   Here is my advice:
   1. The v4.yaml should be checked in swagger format just like its project 
path: servicecomb-service-center/blob/master/server/core/**swagger**/v4.yaml. I 
made  it for you  
[here](https://app.swaggerhub.com/apis/popozy/service-center_api/4.0.0#/instances/find)
   2. It can be figured it easily about the fact that,  the key 
"x-resource-revsion" will be put in request header by client , and the server 
will check it out with the newest revision, if not match, return the newest 
revision back to client.
   
   If I misunderstood, plz make a more detailed description about the "bug": )
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to