Documentation
¶
Index ¶
Constants ¶
View Source
const ( InQuery = In("query") InHeader = In("header") InCookie = In("cookie") InPath = In("path") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentSpec ¶
type SchemaSpec ¶
type SchemaSpec struct {
schema.Schema `flatten:""`
// Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for "query" - "form"; for "path" - "simple"; for "header" - "simple"; for "cookie" - "form".
Style *string `json:"style,omitempty"`
// When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this field has no effect. When style is "form", the default value is true. For all other styles, the default value is false. Note that despite false being the default for deepObject, the combination of false with deepObject is undefined.
Explode *bool `json:"explode,omitempty"`
Example *shared.Json `json:"example,omitempty"`
Examples *[]example.Example `json:"examples,omitempty"`
}
func (SchemaSpec) MarshalJSON ¶
func (s SchemaSpec) MarshalJSON() ([]byte, error)
type Spec ¶
type Spec struct {
// The name of the parameter. Parameter names are case sensitive.
//
// If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
// If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
// For all other cases, the name corresponds to the parameter name used by the in field.
Name string `json:"name"`
// The location of the parameter. Possible values are "query", "header", "path" or "cookie".
In In `json:"in"`
// Description. May include Markdown.
Description *string `json:"description,omitempty"`
Required bool `json:"required,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
// Structure and syntax of the parameter.
//
// Mutually exclusive with Schema.
*ContentSpec `json:"content,omitempty" flatten:""`
// Media type and schema for the parameter.
//
// Mutually exclusive with Content.
*SchemaSpec `json:"schema,omitempty"`
}
Specification for a parameter.
func (Spec) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.