design

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Greeting = Type("Greeting", func() {
	Attribute("id", Integer, func() {
		Description("A required int field in the parent type.")
	})
	Attribute("message", String, func() {
		Description("A required string field in the parent type.")
	})
	Attribute("parent_optional", Boolean, func() {
		Description("An optional boolean field in the parent type.")
	})
	Required("id", "message")
})
View Source
var GreetingMedia = MediaType("application/vnd.io.bluecanvas.helloworld.greeting.v1+json", func() {
	TypeName("GreetingMedia")
	Reference(Greeting)

	Attributes(func() {
		Attribute("id")
		Attribute("message")
		Attribute("parent_optional")
		Attribute("href", String, func() {
			Description("A required string field in the response media type.")
		})
		Required("id", "message", "href")
	})

	View("default", func() {
		Attribute("id")
		Attribute("message")
		Attribute("parent_optional")
		Attribute("href")
	})
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL