diff --git a/pkg/plugin/implementation/reqpreprocessor/cmd/plugin.go b/pkg/plugin/implementation/reqpreprocessor/cmd/plugin.go index 331ec80..e5ae3e2 100644 --- a/pkg/plugin/implementation/reqpreprocessor/cmd/plugin.go +++ b/pkg/plugin/implementation/reqpreprocessor/cmd/plugin.go @@ -3,6 +3,7 @@ package main import ( "context" "net/http" + "strings" "github.com/beckn/beckn-onix/pkg/plugin/implementation/reqpreprocessor" ) @@ -14,6 +15,9 @@ func (p provider) New(ctx context.Context, c map[string]string) (func(http.Handl if role, ok := c["role"]; ok { config.Role = role } + if contextKeys, ok := c["contextKeys"]; ok { + config.ContextKeys = strings.Split(contextKeys, ",") + } return reqpreprocessor.NewPreProcessor(config) } diff --git a/pkg/plugin/implementation/schemavalidator/schemavalidator.go b/pkg/plugin/implementation/schemavalidator/schemavalidator.go index bab2dba..f7e28c5 100644 --- a/pkg/plugin/implementation/schemavalidator/schemavalidator.go +++ b/pkg/plugin/implementation/schemavalidator/schemavalidator.go @@ -78,7 +78,7 @@ func (v *schemaValidator) Validate(ctx context.Context, url *url.URL, data []byt // Retrieve the schema from the cache. schema, exists := v.schemaCache[schemaFileName] if !exists { - return model.NewBadReqErr(errors.New("schema not found for domain")) + return model.NewBadReqErr(errors.New(fmt.Sprintf("schema not found for domain: %s", domain))) } var jsonData any