You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ti...@apache.org on 2021/08/23 01:00:34 UTC

[servicecomb-kie] branch master updated: Fix: List KV API miss field 'status' desc (#205)

This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git


The following commit(s) were added to refs/heads/master by this push:
     new e15c43d  Fix: List KV API miss field 'status' desc (#205)
e15c43d is described below

commit e15c43d337e34de9e6c18fd79afd022f96067734
Author: little-cui <su...@qq.com>
AuthorDate: Mon Aug 23 09:00:29 2021 +0800

    Fix: List KV API miss field 'status' desc (#205)
---
 server/resource/v1/doc_struct.go  | 8 ++++++++
 server/resource/v1/kv_resource.go | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/server/resource/v1/doc_struct.go b/server/resource/v1/doc_struct.go
index 388bb0d..8a3ddac 100644
--- a/server/resource/v1/doc_struct.go
+++ b/server/resource/v1/doc_struct.go
@@ -100,6 +100,9 @@ var (
 		DataType:  "string",
 		Name:      common.QueryParamKey,
 		ParamType: goRestful.QueryParameterKind,
+		Desc: "key support prefix matching syntax, e.g. beginWith(servicecomb.) means to filter KV staring with 'servicecomb.'. " +
+			"And support wildcard matching syntax, e.g. wildcard(*consumer*) means to filter KV include 'consumer'. " +
+			"In addition to the above syntax means to filter KV full matching the input 'key'",
 	}
 	DocQueryLabelParameters = &restful.Parameters{
 		DataType:  "string",
@@ -107,6 +110,11 @@ var (
 		ParamType: goRestful.QueryParameterKind,
 		Desc:      "label pairs,for example &label=service:order&label=version:1.0.0",
 	}
+	DocQueryStatusParameters = &restful.Parameters{
+		DataType:  "string",
+		Name:      common.QueryParamStatus,
+		ParamType: goRestful.QueryParameterKind,
+	}
 	DocQueryLimitParameters = &restful.Parameters{
 		DataType:  "string",
 		Name:      common.QueryParamLimit,
diff --git a/server/resource/v1/kv_resource.go b/server/resource/v1/kv_resource.go
index e96c058..882dc87 100644
--- a/server/resource/v1/kv_resource.go
+++ b/server/resource/v1/kv_resource.go
@@ -414,8 +414,8 @@ func (r *KVResource) URLPatterns() []restful.Route {
 			ResourceFunc: r.List,
 			FuncDesc:     "list key values by labels and key",
 			Parameters: []*restful.Parameters{
-				DocPathProject, DocQueryKeyParameters, DocQueryLabelParameters, DocQueryWait, DocQueryMatch, DocQueryRev,
-				DocQueryLimitParameters, DocQueryOffsetParameters,
+				DocPathProject, DocQueryKeyParameters, DocQueryStatusParameters, DocQueryLabelParameters,
+				DocQueryWait, DocQueryMatch, DocQueryRev, DocQueryLimitParameters, DocQueryOffsetParameters,
 			},
 			Returns: []*restful.Returns{
 				{