github.com/shogo82148/goa-v1@v1.6.2/goagen/gen_swagger/internal/design/api_definition.go (about) 1 package design 2 3 import ( 4 . "github.com/shogo82148/goa-v1/design" 5 . "github.com/shogo82148/goa-v1/design/apidsl" 6 ) 7 8 // This is the cellar application API design used by goa to generate 9 // the application code, client, tests, documentation etc. 10 var _ = API("cellar", func() { 11 Title("The virtual wine cellar") 12 Description("A basic example of a CRUD API implemented with goa") 13 Contact(func() { 14 Name("goa team") 15 Email("admin@goa.design") 16 URL("http://goa.design") 17 }) 18 License(func() { 19 Name("MIT") 20 URL("https://github.com/shogo82148/goa-v1/blob/master/LICENSE") 21 }) 22 Docs(func() { 23 Description("goa guide") 24 URL("http://goa.design/getting-started.html") 25 }) 26 Host("localhost:8081") 27 Scheme("http") 28 BasePath("/cellar") 29 30 Origin("http://swagger.goa.design", func() { 31 Methods("GET", "POST", "PUT", "PATCH", "DELETE") 32 MaxAge(600) 33 Credentials() 34 }) 35 36 ResponseTemplate(Created, func(pattern string) { 37 Description("Resource created") 38 Status(201) 39 Headers(func() { 40 Header("Location", String, "href to created resource", func() { 41 Pattern(pattern) 42 }) 43 }) 44 }) 45 })