ExampleServerFiles returns an example http service implementation.
(genpkg string, data *ServicesData)
| 13 | |
| 14 | // ExampleServerFiles returns an example http service implementation. |
| 15 | func ExampleServerFiles(genpkg string, data *ServicesData) []*codegen.File { |
| 16 | var fw []*codegen.File |
| 17 | for _, svr := range data.Root.API.Servers { |
| 18 | if m := ExampleServer(genpkg, data.Root, svr, data); m != nil { |
| 19 | fw = append(fw, m) |
| 20 | } |
| 21 | } |
| 22 | for _, svc := range data.Expressions.Services { |
| 23 | if f := dummyMultipartFile(genpkg, data.Root, svc, data); f != nil { |
| 24 | fw = append(fw, f) |
| 25 | } |
| 26 | } |
| 27 | return fw |
| 28 | } |
| 29 | |
| 30 | // ExampleServer returns an example HTTP server implementation. |
| 31 | func ExampleServer(genpkg string, root *expr.RootExpr, svr *expr.ServerExpr, services *ServicesData) *codegen.File { |