Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Documentation ¶
type Raml ¶
type Raml struct { // A short, plain-text label for the API. // Its value is a string. Title string `yaml:"title"` // A substantial, human-friendly description of the API. // Its value is a string and MAY be formatted using markdown. Description string `yaml:"description"` // The version of the API, for example "v1". // Its value is a string. Version string `yaml:"version"` // A URI that serves as the base for URIs of all resources. // Often used as the base of the URL of each resource containing the location of the API. // Can be a template URI. BaseUri string `yaml:"baseUri"` // The default media types to use for request and response bodies (payloads), for example "application/json". MediaType []string `yaml:"mediaType"` // Additional overall documentation for the API. Documentation []Documentation `yaml:"documentation"` Types map[string]Type `yaml:"types"` Routes map[string]map[string]Route `yaml:"-"` }
The root section of the RAML document describes the basic information about an API, such as its title and version. The root section also defines assets used elsewhere in the RAML document, such as types and traits.
type Type ¶
type Type struct { // The type which the current type extends or just wraps. // The value of a type node MUST be either // a) the name of a user-defined type or // b) the name of a built-in RAML data type (object, array, or one of the scalar types) Type string `yaml:"type"` // An alternate, human-friendly name for the type DisplayName string `yaml:"displayName,omitempty"` // A substantial, human-friendly description of the type. // Its value is a string and MAY be formatted using markdown. Description string `yaml:"description,omitempty"` Properties map[string]Property `yaml:"properties,omitempty"` }
Click to show internal directories.
Click to hide internal directories.