mhoppa commented on a change in pull request #2457: Add TO Go post deliveryservice_user URL: https://github.com/apache/trafficcontrol/pull/2457#discussion_r333715471
########## File path: lib/go-tc/deliveryservices.go ########## @@ -557,6 +557,23 @@ type DeliveryServiceUserPost struct { Replace *bool `json:"replace"` } +func (dsu *DeliveryServiceUserPost) Validate(tx *sql.Tx) error { + errs := []string{} + if dsu.UserID == nil { + errs = append(errs, "userId missing") + } + if dsu.DeliveryServices == nil { + errs = append(errs, "deliveryServices missing") + } + if dsu.Replace == nil { Review comment: the current api docs say this is optional - is that not true anymore? ---------------------------------------------------------------- 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 With regards, Apache Git Services