Advertisement
Guest User

Untitled

a guest
Mar 1st, 2016
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AIMMS 0.63 KB | None | 0 0
  1. var _ = API("cellar", func() {
  2.         Title("The virtual wine cellar")
  3.         Description("A basic example of an API implemented with goa")
  4.         Scheme("http")
  5.         Host("localhost:8989")
  6. })
  7.  
  8. var _ = Resource("bottle", func() {
  9.         BasePath("/bottles")
  10.         DefaultMedia(BottleMedia)
  11.         Action("show", func() {
  12.                 Description("Retrieve bottle with given id")
  13.                 Routing(GET("/:bottleID"))
  14.                 Params(func() {
  15.                         Param("bottleID", Integer, "Bottle ID")
  16.                 })
  17.                 Response(OK)
  18.                 Response(NotFound)
  19.         })
  20. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement