MCPcopy Create free account
hub / github.com/goadesign/goa / Validate

Method Validate

expr/grpc_service.go:99–115  ·  view source on GitHub ↗

Validate makes sure the service is valid.

()

Source from the content-addressed store, hash-verified

97
98// Validate makes sure the service is valid.
99func (svc *GRPCServiceExpr) Validate() error {
100 verr := new(eval.ValidationErrors)
101 // Validate errors
102 for _, er := range svc.GRPCErrors {
103 verr.Merge(er.Validate())
104 }
105 for _, er := range Root.API.GRPC.Errors {
106 // This may result in the same error being validated multiple
107 // times however service is the top level expression being
108 // walked and errors cannot be walked until all expressions have
109 // run. Another solution could be to append a new dynamically
110 // generated root that the eval engine would process after. Keep
111 // things simple for now.
112 verr.Merge(er.Validate())
113 }
114 return verr
115}

Callers

nothing calls this directly

Calls 2

ValidateMethod · 0.65
MergeMethod · 0.45

Tested by

no test coverage detected