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

Function Title

dsl/api.go:69–78  ·  view source on GitHub ↗

Title sets the API title. It is used by the generated OpenAPI specification. Title must appear in an API expression or any expression implementing TitleHolder. Title accepts a single string argument. Example: var _ = API("divider", func() { Title("divider API") })

(val string)

Source from the content-addressed store, hash-verified

67// Title("divider API")
68// })
69func Title(val string) {
70 switch e := eval.Current().(type) {
71 case *expr.APIExpr:
72 e.Title = val
73 case expr.TitleHolder:
74 e.SetTitle(val)
75 default:
76 eval.IncompatibleDSL()
77 }
78}
79
80// Version specifies the API version. One design describes one version.
81//

Callers 4

dsls.goFile · 0.50
dsl_spec_test.goFile · 0.50
dsls.goFile · 0.50

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
SetTitleMethod · 0.80

Tested by

no test coverage detected