Documentation ¶
Index ¶
- type Components
- type Contact
- type Content
- type Edge
- type Edges
- type ExternalDocs
- type Field
- type Fields
- type Info
- type License
- type MediaType
- type MediaTypeObject
- type OAuthFlow
- type OAuthFlows
- type Operation
- type OperationResponse
- type Parameter
- type ParameterPlace
- type Path
- type RequestBody
- type Response
- type Schema
- type Security
- type SecurityScheme
- type Spec
- type Tag
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Content ¶
type Content map[MediaType]MediaTypeObject
type Edge ¶
func (Edge) MarshalJSON ¶
type ExternalDocs ¶
type Field ¶
type Field struct { Type Unique bool `json:"-"` Required bool `json:"-"` Example interface{} `json:"example,omitempty"` }
func (Field) MarshalJSON ¶
type MediaTypeObject ¶
type MediaTypeObject struct { Unique bool `json:"-"` Ref *Schema `json:"-"` Schema Schema `json:"schema"` }
func (MediaTypeObject) MarshalJSON ¶
func (o MediaTypeObject) MarshalJSON() ([]byte, error)
type OAuthFlows ¶
type Operation ¶
type Operation struct { Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` OperationID string `json:"operationId"` Parameters []*Parameter `json:"parameters,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty"` Responses map[string]*OperationResponse `json:"responses"` Deprecated bool `json:"deprecated,omitempty"` Security Security `json:"security,omitempty"` }
type OperationResponse ¶
func (OperationResponse) MarshalJSON ¶
func (r OperationResponse) MarshalJSON() ([]byte, error)
type Parameter ¶
type Parameter struct { Name string `json:"name"` In ParameterPlace `json:"in"` Description string `json:"description,omitempty"` Required bool `json:"required,omitempty"` Deprecated bool `json:"deprecated,omitempty"` AllowEmptyValue bool `json:"allowEmptyValue,omitempty"` Schema Type `json:"schema"` }
type ParameterPlace ¶
type ParameterPlace uint
ParameterPlace denotes where to find a parameter in the request.
const ( InQuery ParameterPlace = iota InHeader InPath InCookie )
func (ParameterPlace) MarshalJSON ¶
func (p ParameterPlace) MarshalJSON() ([]byte, error)
func (*ParameterPlace) UnmarshalJSON ¶
func (p *ParameterPlace) UnmarshalJSON(d []byte) error
type RequestBody ¶
type Schema ¶
func (Schema) MarshalJSON ¶
type SecurityScheme ¶
type SecurityScheme struct { Type string `json:"type"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` In string `json:"in,omitempty"` Scheme string `json:"scheme,omitempty"` BearerFormat string `json:"bearerFormat,omitempty"` Flows *OAuthFlows `json:"flows,omitempty"` OpenIdConnectUrl string `json:"openIdConnectUrl,omitempty"` }
type Spec ¶
type Spec struct { Info *Info `json:"info"` Tags []Tag `json:"tags,omitempty"` Paths map[string]*Path `json:"paths"` Components Components `json:"components"` Security Security `json:"security,omitempty"` ExternalDocs *ExternalDocs `json:"externalDocs,omitempty"` }
Spec represents a OAS.
func (Spec) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.