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



##########
File path: api/internal/core/store/validate.go
##########
@@ -125,17 +125,17 @@ func (v *APISIXJsonSchemaValidator) Validate(obj 
interface{}) error {
                for pluginName, pluginConf := range plugins {
                        schemaDef := conf.Schema.Get("plugins." + 
pluginName).String()
                        if schemaDef == "" {
-                               return fmt.Errorf("schema not found")
+                               return fmt.Errorf("scheme validate failed: 
schema not found")
                        }
 
                        s, err := 
gojsonschema.NewSchema(gojsonschema.NewStringLoader(schemaDef))
                        if err != nil {
-                               return fmt.Errorf("new schema failed: %w", err)
+                               return fmt.Errorf("scheme validate failed: %w", 
err)
                        }
 
                        ret, err := 
s.Validate(gojsonschema.NewGoLoader(pluginConf))
                        if err != nil {
-                               return fmt.Errorf("validate failed: %w", err)
+                               return fmt.Errorf("scheme validate failed: %w", 
err)

Review comment:
       Agree, but we can not do it in this version for now. When the first rc 
version is released, we will optimize it in next versions




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