import (
"errors"
+ "fmt"
+ "net/url"
)
func (ied *APIInvokerEnrolmentDetails) Validate() error {
return errors.New("APIInvokerEnrolmentDetails missing required NotificationDestination")
}
+ if _, err := url.ParseRequestURI(string(ied.NotificationDestination)); err != nil {
+ return fmt.Errorf("APIInvokerEnrolmentDetails has invalid NotificationDestination, err=%s", err)
+ }
+
if ied.OnboardingInformation.ApiInvokerPublicKey == "" {
return errors.New("APIInvokerEnrolmentDetails missing required OnboardingInformation.ApiInvokerPublicKey")
}