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

Function Parent

dsl/http.go:1037–1044  ·  view source on GitHub ↗

Parent sets the name of the parent service. The parent service canonical method path is used as prefix for all the service HTTP endpoint paths. Attributes of the parent method payload that map to parent path parameters are automatically merged into the child method payload type if not already defin

(name string)

Source from the content-addressed store, hash-verified

1035//
1036// Parent accepts one argument: the name of the parent service.
1037func Parent(name string) {
1038 r, ok := eval.Current().(*expr.HTTPServiceExpr)
1039 if !ok {
1040 eval.IncompatibleDSL()
1041 return
1042 }
1043 r.ParentName = name
1044}
1045
1046// CanonicalMethod sets the name of the service canonical method. The canonical
1047// method endpoint HTTP path is used to prefix the paths to child service

Callers 1

endpoint_dsls.goFile · 0.85

Calls 2

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92

Tested by

no test coverage detected