github.com/brycereitano/goa@v0.0.0-20170315073847-8ffa6c85e265/_integration_tests/readme/design/design.go (about) 1 package design 2 3 import ( 4 . "github.com/goadesign/goa/design" 5 . "github.com/goadesign/goa/design/apidsl" 6 ) 7 8 var _ = API("adder", func() { 9 Title("The adder API") 10 Description("A teaser for goa") 11 Host("localhost:8080") 12 Scheme("http") 13 }) 14 15 var _ = Resource("operands", func() { 16 Action("add", func() { 17 Routing(GET("add/:left/:right")) 18 Description("add returns the sum of the left and right parameters in the response body") 19 Params(func() { 20 Param("left", Integer, "Left operand") 21 Param("right", Integer, "Right operand") 22 }) 23 Response(OK, "text/plain") 24 }) 25 26 })