raml

package
Version: v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body map[string]Example // Content-Type to Example

type Documentation

type Documentation struct {
	Title   string `yaml:"title"`
	Content string `yaml:"content"`
}

type Example

type Example struct {
	Example string `yaml:"example,omitempty"`
}

type RAML

type RAML struct {
	Title         string          `yaml:"title,omitempty"`
	BaseUri       string          `yaml:"baseUri,omitempty"`
	Protocols     []string        `yaml:"protocols,omitempty"`
	MediaType     string          `yaml:"mediaType,omitempty"`
	Version       string          `yaml:"version,omitempty"`
	Documentation []Documentation `yaml:"documentation,omitempty"`

	Resources `yaml:",inline"`
}

func (*RAML) Add

func (r *RAML) Add(method string, route string, resource *Resource) error

func (*RAML) AddUnder

func (r *RAML) AddUnder(parentRoute string, method string, route string, resource *Resource) error

func (*RAML) String

func (r *RAML) String() string

type Resource

type Resource struct {
	DisplayName     string    `yaml:"displayName,omitempty"`
	Description     string    `yaml:"description,omitempty"`
	Responses       Responses `yaml:"responses,omitempty"`
	Body            Body      `yaml:"body,omitempty"`
	Is              []string  `yaml:"is,omitempty"`
	Type            string    `yaml:"type,omitempty"`
	SecuredBy       []string  `yaml:"securedBy,omitempty"`
	UriParameters   []string  `yaml:"uirParameters,omitempty"`
	QueryParameters []string  `yaml:"queryParameters,omitempty"`

	Resources `yaml:",inline"`
}

type Resources

type Resources map[string]*Resource

type Response

type Response struct {
	Body `yaml:"body,omitempty"`
}

type Responses

type Responses map[int]Response

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL