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 2022/08/08 08:41:10 UTC
[GitHub] [servicecomb-service-center] tianxiaoliang commented on a diff in pull request #1323: refactor policy validator
tianxiaoliang commented on code in PR #1323:
URL: https://github.com/apache/servicecomb-service-center/pull/1323#discussion_r939979379
##########
server/ext/policy/buitin.go:
##########
@@ -0,0 +1,51 @@
+package policy
+
+import (
+ "github.com/apache/servicecomb-service-center/server/service/grc"
+ "k8s.io/kube-openapi/pkg/validation/spec"
+)
+
+func init() {
+ grc.RegisterPolicySchema("loadbalancer", &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"object"},
+ Required: []string{"rule"},
+ Properties: map[string]spec.Schema{
+ "rule": {
+ SchemaProps: spec.SchemaProps{Type: []string{"string"}}},
+ },
+ }})
+ grc.RegisterPolicySchema("circuitBreaker", &spec.Schema{
Review Comment:
其实也可以。我开放open api后,就可以拿json格式提交了
--
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.
To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org