Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { Summary string `yaml:"summary" json:"summary"` Description string `yaml:"description" json:"description"` RequestBody *RequestBody `yaml:"requestBody" json:"requestBody,omitempty"` Parameters Parameters `yaml:"parameters" json:"parameters"` Tags []string `yaml:"tags" json:"tags,omitempty"` Responses map[string]*Response `yaml:"responses" json:"responses"` OperationID string `json:"operationId,omitempty"` }
type Extension ¶
type Extension struct { Base string `json:"base"` Fields []*ExtensionField `json:"fields"` }
type ExtensionField ¶
type Parameter ¶
type Parameter struct { Name string `json:"name,omitempty"` Description string `json:"description"` Enum []string `json:"enum,omitempty"` Format string `json:"format,omitempty"` In string `json:"in,omitempty"` Items *Schema `json:"items,omitempty"` Ref string `json:"$ref,omitempty"` Required bool `json:"required"` Schema *Schema `json:"schema,omitempty"` Type string `json:"type,omitempty"` Example interface{} `json:"example,omitempty"` }
type Parameters ¶
type Parameters []*Parameter
type RequestBody ¶ added in v0.6.3
type RequestBody struct { Description string `yaml:"summary" json:"description"` Required bool `yaml:"summary" json:"required"` Content RequestBodyContent `yaml:"summary" json:"content"` }
type RequestBodyContent ¶ added in v0.6.3
type RequestBodyContent struct { Json *RequestBodyContentType `yaml:"application/json" json:"application/json,omitempty"` XML *RequestBodyContentType `yaml:"application/xml" json:"application/xml,omitempty"` Form *RequestBodyContentType `yaml:"application/x-www-form-urlencoded" json:"application/x-www-form-urlencoded,omitempty"` Text *RequestBodyContentType `yaml:"text/plain" json:"text/plain,omitempty"` }
type RequestBodyContentType ¶ added in v0.6.3
type RequestBodyContentType struct { Schema Schema `yaml:"schema" json:"schema"` Examples interface{} `yaml:"examples" json:"examples,omitempty"` }
type Schema ¶
type Schema struct { Description string `json:"description,omitempty"` Ref string `json:"$ref,omitempty"` Type string `json:"type,omitempty"` Format string `json:"format,omitempty"` Enum []string `json:"enum,omitempty"` // objects Required []string `json:"required,omitempty"` Properties map[string]*Schema `json:"properties,omitempty"` // is an array Items *Schema `json:"items,omitempty"` Pattern string `json:"pattern,omitempty"` MaxLength int `json:"maxLength,omitempty"` MinLength int `json:"minLength,omitempty"` Maximum int `json:"maximum,omitempty"` Minimum int `json:"minimum,omitempty"` Example interface{} `json:"example,omitempty"` // only for the different Doc when it's Ref object AllOf []*Schema `json:"allOf,omitempty"` }
type Spec ¶
type Spec struct { Swagger string `json:"swagger"` Info Info `json:"info"` Host string `json:"host,omitempty"` Schemes []string `json:"schemes,omitempty"` BasePath string `json:"basePath,omitempty"` Tags []Tag `json:"tags,omitempty"` Produces []string `json:"produces,omitempty"` Paths map[string]*Path `json:"paths,omitempty"` Definitions map[string]*Schema `json:"definitions,omitempty"` Parameters map[string]*Parameter `json:"parameters,omitempty"` Extensions []*Extension `json:"x-extensions,omitempty"` GlobalOptions map[string]string `json:"x-global-options,omitempty"` }
Click to show internal directories.
Click to hide internal directories.