| 374 | } |
| 375 | |
| 376 | func getTemplateCommand() cli.Command { |
| 377 | return cli.Command{ |
| 378 | Name: "template", |
| 379 | ShortName: "template", |
| 380 | Usage: "Convert gohan schema using pongo2 template", |
| 381 | Description: "Convert gohan schema using pongo2 template", |
| 382 | Flags: []cli.Flag{ |
| 383 | cli.StringFlag{Name: "config-file", Value: "gohan.yaml", Usage: "Server config File"}, |
| 384 | cli.StringFlag{Name: "template, t", Value: "", Usage: "Template File"}, |
| 385 | cli.StringFlag{Name: "split-by-resource-group", Value: "", Usage: "Split output file for each resource groups"}, |
| 386 | cli.StringFlag{Name: "split-by-resource", Value: "", Usage: "Split output file for each resources"}, |
| 387 | cli.StringFlag{Name: "output-path", Value: "__resource__.json", Usage: "Output Path. You can use __resource__ as a resource name"}, |
| 388 | cli.StringFlag{Name: "policy", Value: "", Usage: "Policy"}, |
| 389 | }, |
| 390 | Action: doTemplate, |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | func getOpenAPICommand() cli.Command { |
| 395 | return cli.Command{ |