Created
June 14, 2018 23:50
-
-
Save shihanng/722ee569341597c6b4ca557e84223df4 to your computer and use it in GitHub Desktop.
c3c4ab8bfbb5/svc/servicea/design/design.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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