New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
新增查询所有schema和summary接口 #197
Conversation
(cherry picked from commit 75d50ab)
server/core/proto/services.go
Outdated
func GetInfoFromSchemaSummaryKV(kv *mvccpb.KeyValue) (schemaId string, data []byte) { | ||
keys, data := KvToResponse(kv) | ||
l := len(keys) | ||
if l < 7 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里小于2 return即可,仅做溢出保护,不涉及兼容性
@@ -28,5 +28,6 @@ func (this *SchemaService) URLPatterns() []rest.Route { | |||
{rest.HTTP_METHOD_PUT, "/registry/v3/microservices/:serviceId/schemas/:schemaId", this.ModifySchema}, | |||
{rest.HTTP_METHOD_DELETE, "/registry/v3/microservices/:serviceId/schemas/:schemaId", this.DeleteSchemas}, | |||
{rest.HTTP_METHOD_POST, "/registry/v3/microservices/:serviceId/schemas", this.ModifySchemas}, | |||
{rest.HTTP_METHOD_GET, "/registry/v3/microservices/:servic eId/schemas", this.GetAllSchemas}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里格式错误 ':servic eId'
server/service/schema.go
Outdated
} | ||
|
||
schemasList := service.Schemas | ||
if schemasList == nil || len(schemasList) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不需要报错,只是空列表即可
(cherry picked from commit 75d50ab)