You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/12 04:16:24 UTC

[GitHub] [apisix-dashboard] ShiningRush commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

ShiningRush commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503026268



##########
File path: api/conf/conf.go
##########
@@ -54,6 +58,11 @@ func setEnvironment() {
 	} else {
 		ENV = env
 	}
+
+	if env := os.Getenv("APIX_DAG_LIB_PATH"); env != "" {
+		DagLibPath = env

Review comment:
       We can use `viper` to maintain config file source.

##########
File path: api/internal/handler/consumer/consumer.go
##########
@@ -101,6 +102,10 @@ func (h *Handler) Create(c droplet.Context) (interface{}, error) {
 	}
 	input.ID = input.Username
 
+	if err := utils.SchemaCheck("main.consumer", input); err != nil {

Review comment:
       `GenericStore` has already implement it, plz have a look at `validate.go` and `validate_test.go`, We can init it with `GenericStore` at same time. 




----------------------------------------------------------------
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