You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/09 08:23:08 UTC

[GitHub] [servicecomb-kie] tianxiaoliang opened a new pull request #113: update open api, delete unused code

tianxiaoliang opened a new pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390125472
 
 

 ##########
 File path: server/resource/v1/kv_resource.go
 ##########
 @@ -385,47 +316,39 @@ func (r *KVResource) URLPatterns() []restful.Route {
 			FuncDesc:     "get key values by key and labels",
 			Parameters: []*restful.Parameters{
 				DocPathProject, DocPathKey, DocQueryLabelParameters, DocQueryWait, DocQueryMatch, DocQueryRev,
+				DocQueryLimitParameters, DocQueryOffsetParameters,
 			},
 			Returns: []*restful.Returns{
 				{
 					Code:    http.StatusOK,
 					Message: "get key value success",
-					Model:   []model.KVResponse{},
+					Model:   DocResponseGetKey{},
+					Headers: map[string]goRestful.Header{
+						"X-Kie-Revision": DocHeaderRevision,
 
 Review comment:
   "X-Kie-Revision"抽一下

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] tianxiaoliang merged pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
tianxiaoliang merged pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390120415
 
 

 ##########
 File path: docs/api.yaml
 ##########
 @@ -30,37 +38,28 @@ paths:
         '200':
           description: ''
           schema:
-            $ref: '#/definitions/KVResponse'
-          headers:
-            X-RateLimit-Limit:
-              type: integer
-              description: Request limit per hour.
 
 Review comment:
   这里还是有header的,只不过名字换了,X-Kie-Revision,升到最新版go-chassis用代码定义吧

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 removed a comment on issue #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 removed a comment on issue #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#issuecomment-597432196
 
 
   /lgtm

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on issue #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on issue #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#issuecomment-597432196
 
 
   /lgtm

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390126946
 
 

 ##########
 File path: server/resource/v1/kv_resource.go
 ##########
 @@ -385,47 +316,39 @@ func (r *KVResource) URLPatterns() []restful.Route {
 			FuncDesc:     "get key values by key and labels",
 			Parameters: []*restful.Parameters{
 				DocPathProject, DocPathKey, DocQueryLabelParameters, DocQueryWait, DocQueryMatch, DocQueryRev,
+				DocQueryLimitParameters, DocQueryOffsetParameters,
 			},
 			Returns: []*restful.Returns{
 				{
 					Code:    http.StatusOK,
 					Message: "get key value success",
-					Model:   []model.KVResponse{},
+					Model:   DocResponseGetKey{},
+					Headers: map[string]goRestful.Header{
+						"X-Kie-Revision": DocHeaderRevision,
 
 Review comment:
   那样的话,map可就要写到一起去了,没法拆分组合

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390125235
 
 

 ##########
 File path: server/resource/v1/doc_struct.go
 ##########
 @@ -136,3 +136,23 @@ type KVBody struct {
 type ErrorMsg struct {
 	Msg string `json:"msg"`
 }
+
+//DocResponseSingleKey is response doc
+type DocResponseSingleKey struct {
 
 Review comment:
   如果这个结构体不只是URLPatterns用,decode也用的话不要用Doc开头了吧

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390735842
 
 

 ##########
 File path: server/resource/v1/history_resource.go
 ##########
 @@ -18,10 +18,10 @@
 package v1
 
 import (
+	"github.com/apache/servicecomb-kie/pkg/model"
 	"net/http"
 
 	"github.com/apache/servicecomb-kie/pkg/common"
-	"github.com/apache/servicecomb-kie/pkg/model"
 
 Review comment:
   位置移了,这里的修改去掉吧

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390120694
 
 

 ##########
 File path: docs/api.yaml
 ##########
 @@ -30,37 +38,28 @@ paths:
         '200':
           description: ''
           schema:
-            $ref: '#/definitions/KVResponse'
-          headers:
-            X-RateLimit-Limit:
-              type: integer
-              description: Request limit per hour.
+            $ref: '#/definitions/v1.DocResponseGetKey'
 
 Review comment:
   404也有response header X-Kie-Revision,这里要不要加上404的

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] zhulijian1 commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
zhulijian1 commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390121412
 
 

 ##########
 File path: docs/api.yaml
 ##########
 @@ -148,105 +157,52 @@ paths:
       responses:
         '200':
           description: 'true'
+          headers:
+            X-Kie-Revision:
 
 Review comment:
   我试了下这个接口返回没有X-Kie-Revision

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390125791
 
 

 ##########
 File path: server/resource/v1/doc_struct.go
 ##########
 @@ -136,3 +136,23 @@ type KVBody struct {
 type ErrorMsg struct {
 	Msg string `json:"msg"`
 }
+
+//DocResponseSingleKey is response doc
+type DocResponseSingleKey struct {
 
 Review comment:
   是的,我挪下

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #113: update open api, delete unused code

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #113: update open api, delete unused code
URL: https://github.com/apache/servicecomb-kie/pull/113#discussion_r390126213
 
 

 ##########
 File path: docs/api.yaml
 ##########
 @@ -30,37 +38,28 @@ paths:
         '200':
           description: ''
           schema:
-            $ref: '#/definitions/KVResponse'
-          headers:
-            X-RateLimit-Limit:
-              type: integer
-              description: Request limit per hour.
+            $ref: '#/definitions/v1.DocResponseGetKey'
 
 Review comment:
   ok

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services