Skip to content

Instantly share code, notes, and snippets.

@stevecrozz
Last active June 12, 2017 23:16
Show Gist options
  • Select an option

  • Save stevecrozz/63cb64e5217beab99342e4b0aea9551f to your computer and use it in GitHub Desktop.

Select an option

Save stevecrozz/63cb64e5217beab99342e4b0aea9551f to your computer and use it in GitHub Desktop.
# clone into the appropriate place in your $GOPATH
git clone git@gist.github.com:63cb64e5217beab99342e4b0aea9551f.git

# change into the buggy project
cd 63cb64e5217beab99342e4b0aea9551f

# generate a client package
"$GOPATH/bin/goagen" -o . -d gist.github.com/63cb64e5217beab99342e4b0aea9551f client

# attempt to build
cd client
go build
package design
import (
. "github.com/goadesign/goa/design"
. "github.com/goadesign/goa/design/apidsl"
)
var OneThing = Type("OneThing", func() {
Attribute("one_things", ArrayOf(AnotherThing), "Ordered list of another_things")
Required("one_things")
})
var AnotherThing = MediaType("application/vnd.myvendor.myproduct.another_thing+json", func() {
Attribute("anattribute", String, "Some attribute")
View("default", func() {
Attribute("anattribute")
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment