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:
us...@infra.apache.org


Reply via email to