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)
| 67 | // Title("divider API") |
| 68 | // }) |
| 69 | func 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 | // |
no test coverage detected