Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of UUID for model attributes is not functional #137

Open
jrnt30 opened this issue Feb 20, 2017 · 0 comments
Open

Support of UUID for model attributes is not functional #137

jrnt30 opened this issue Feb 20, 2017 · 0 comments

Comments

@jrnt30
Copy link

jrnt30 commented Feb 20, 2017

Currently if you have a model that has an attribute of type UUID the generator fails to properly parse and build the model.

Output:

[design/models.go:33] Unsupported type: 0x6 token in unnamed BuildSource
make: *** [generate] Error 1

Example:

var UserType = Type("UserPayload", func() {
	Attribute("id", Integer, "Unique User ID")
	Attribute("real_name", String, "Actual name of user")
	Attribute("user_name", String, "Username of user")
	Attribute("email", String, "Email address of user")
	Attribute("slack_id", String, "Slack ID of user")
	Attribute("token", UUID, "Generated UUID of a user")
})
var UserMedia = MediaType("application/vnd.user+json", func() {
	Reference(UserType)

	Attributes(func() {
		Attribute("id")
		Attribute("real_name")
		Attribute("user_name")
		Attribute("email")
		Attribute("slack_id")
		Attribute("token")
	})

	Required("real_name", "user_name", "email", "slack_id")

	View("default", func() {
		Attribute("id")
		Attribute("real_name")
		Attribute("user_name")
		Attribute("email")
		Attribute("slack_id")
	})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant