Skip to content
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

Merged
merged 3 commits into from Dec 7, 2017
Merged

新增查询所有schema和summary接口 #197

merged 3 commits into from Dec 7, 2017

Conversation

sjh0027
Copy link
Contributor

@sjh0027 sjh0027 commented Dec 7, 2017

(cherry picked from commit 75d50ab)

(cherry picked from commit 75d50ab)
func GetInfoFromSchemaSummaryKV(kv *mvccpb.KeyValue) (schemaId string, data []byte) {
keys, data := KvToResponse(kv)
l := len(keys)
if l < 7 {
Copy link
Member

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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里格式错误 ':servic eId'

}

schemasList := service.Schemas
if schemasList == nil || len(schemasList) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不需要报错,只是空列表即可

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 71.531% when pulling 99df964 on sjh0027:master into 2288562 on ServiceComb:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 71.621% when pulling 0dd8af9 on sjh0027:master into 2288562 on ServiceComb:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 71.508% when pulling 3c84338 on sjh0027:master into 2288562 on ServiceComb:master.

@little-cui little-cui merged commit 7662a9b into apache:master Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants