diff --git a/pkg/pubsub/pubsub_unmarshal.go b/pkg/pubsub/pubsub_unmarshal.go index dd95e7d..c3a9618 100644 --- a/pkg/pubsub/pubsub_unmarshal.go +++ b/pkg/pubsub/pubsub_unmarshal.go @@ -15,6 +15,7 @@ package pubsub import ( + "fmt" "io" "sync" @@ -91,7 +92,14 @@ func readJSONFromIterator(out *PubSub, iterator *jsoniter.Iterator) error { if iterator.Error != nil { return iterator.Error } - + // Skip checking EndPointURI here since it is not used in http transport. + // Check EndPointURI in O-RAN REST API handler + //if endpointUri == "" { + // return fmt.Errorf("mandatory field EndPointURI is not set") + //} + if resource == "" { + return fmt.Errorf("mandatory field ResourceAddress is not set") + } out.SetID(id) out.SetEndpointURI(endpointUri) //nolint:errcheck out.SetURILocation(uriLocation) //nolint:errcheck