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/20 02:38:55 UTC

[GitHub] [apisix-dashboard] ShiningRush commented on a change in pull request #563: feat: compatible with HTTP status of `admin api`

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