Skip to content

Instantly share code, notes, and snippets.

@shihanng
Created June 14, 2018 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shihanng/722ee569341597c6b4ca557e84223df4 to your computer and use it in GitHub Desktop.
Save shihanng/722ee569341597c6b4ca557e84223df4 to your computer and use it in GitHub Desktop.
c3c4ab8bfbb5/svc/servicea/design/design.go
package design
import . "goa.design/goa/http/design"
import . "goa.design/goa/http/dsl"
import _ "goa.design/goa/codegen/generator"
var _ = API("servicea", func() {
Title("The service a")
})
var Info = ResultType("application/gaegoasample.info", func() {
Description("Info about service a")
Attributes(func() {
Attribute("id", String, "ID of the service")
Attribute("service_name", String, "Service's name")
Attribute("version", String, "Service's version")
})
})
var _ = Service("api", func() {
Description("API of the service")
HTTP(func() {
Path("/api")
})
Method("info", func() {
Description("Show info of the service")
Payload(Empty)
Result(Info)
HTTP(func() {
GET("/info")
Response(StatusOK)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment