Documentation ¶
Index ¶
- Variables
- func MatchAll(_ string) bool
- func MatchExtension(key string) bool
- func MatchNonEmptyKeys(key string) bool
- func NOPNormalizer(s string) string
- type Callback
- type Components
- type Contact
- type Discriminator
- type Encoding
- type Example
- type Extensions
- func (e Extensions) Add(key string, value interface{})
- func (e Extensions) Get(key string) interface{}
- func (e Extensions) GetBool(key string) (bool, bool)
- func (e Extensions) GetInt(key string) (int, bool)
- func (e Extensions) GetInt32(key string) (int32, bool)
- func (e Extensions) GetInt64(key string) (int64, bool)
- func (e Extensions) GetOK(key string) (interface{}, bool)
- func (e Extensions) GetString(key string) (string, bool)
- func (e Extensions) GetStringSlice(key string) ([]string, bool)
- func (e Extensions) MarshalEasyJSON(w *jwriter.Writer)
- func (e Extensions) MarshalJSON() ([]byte, error)
- func (e Extensions) Set(key string, value interface{}) bool
- func (e *Extensions) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (e *Extensions) UnmarshalJSON(data []byte) error
- type ExternalDocumentation
- type Filter
- type Header
- type Info
- type License
- type Link
- type MapEntry
- type MediaType
- type Normalizer
- type OAuthFlow
- type OAuthFlows
- type OpenAPI
- type Operation
- type OrderedCallbacks
- type OrderedEncodings
- type OrderedExamples
- type OrderedHeaders
- type OrderedLinks
- type OrderedMap
- func (s *OrderedMap) Delete(k string) bool
- func (s *OrderedMap) Entries() []MapEntry
- func (s *OrderedMap) ForEach(fn func(string, interface{}) error) error
- func (s *OrderedMap) Get(key string) interface{}
- func (s *OrderedMap) GetOK(key string) (interface{}, bool)
- func (s *OrderedMap) Keys() []string
- func (s *OrderedMap) Len() int
- func (s OrderedMap) MarshalEasyJSON(w *jwriter.Writer)
- func (s OrderedMap) MarshalJSON() ([]byte, error)
- func (s *OrderedMap) Set(key string, value interface{}) bool
- func (s OrderedMap) String() string
- func (s *OrderedMap) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (s *OrderedMap) UnmarshalJSON(data []byte) error
- func (s *OrderedMap) Values() []interface{}
- type OrderedMediaTypes
- func (s *OrderedMediaTypes) ForEach(fn func(string, *MediaType) error) error
- func (s *OrderedMediaTypes) Get(key string) *MediaType
- func (s *OrderedMediaTypes) GetOK(key string) (*MediaType, bool)
- func (s *OrderedMediaTypes) Keys() []string
- func (s *OrderedMediaTypes) Set(key string, val *MediaType) bool
- type OrderedParameters
- func (s *OrderedParameters) ForEach(fn func(string, *Parameter) error) error
- func (s *OrderedParameters) Get(key string) *Parameter
- func (s *OrderedParameters) GetOK(key string) (*Parameter, bool)
- func (s *OrderedParameters) Keys() []string
- func (s *OrderedParameters) Set(key string, val *Parameter) bool
- type OrderedRequestBodies
- func (s *OrderedRequestBodies) ForEach(fn func(string, *RequestBody) error) error
- func (s *OrderedRequestBodies) Get(key string) *RequestBody
- func (s *OrderedRequestBodies) GetOK(key string) (*RequestBody, bool)
- func (s *OrderedRequestBodies) Keys() []string
- func (s *OrderedRequestBodies) Set(key string, val *RequestBody) bool
- type OrderedResponses
- func (s *OrderedResponses) ForEach(fn func(string, *Response) error) error
- func (s *OrderedResponses) Get(key string) *Response
- func (s *OrderedResponses) GetOK(key string) (*Response, bool)
- func (s *OrderedResponses) Keys() []string
- func (s OrderedResponses) MarshalEasyJSON(w *jwriter.Writer)
- func (s OrderedResponses) MarshalJSON() ([]byte, error)
- func (s *OrderedResponses) Set(key string, val *Response) bool
- func (s *OrderedResponses) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (s *OrderedResponses) UnmarshalJSON(data []byte) error
- type OrderedSchemas
- type OrderedSecuritySchemes
- func (s *OrderedSecuritySchemes) ForEach(fn func(string, *SecurityScheme) error) error
- func (s *OrderedSecuritySchemes) Get(key string) *SecurityScheme
- func (s *OrderedSecuritySchemes) GetOK(key string) (*SecurityScheme, bool)
- func (s *OrderedSecuritySchemes) Keys() []string
- func (s *OrderedSecuritySchemes) Set(key string, val *SecurityScheme) bool
- type OrderedStrings
- type Parameter
- type PathItem
- type Paths
- func (p *Paths) ForEach(fn func(string, []string) error) error
- func (p *Paths) Get(path string) *PathItem
- func (p *Paths) GetOK(path string) (*PathItem, bool)
- func (p *Paths) Keys() []string
- func (p Paths) MarshalEasyJSON(w *jwriter.Writer)
- func (p Paths) MarshalJSON() ([]byte, error)
- func (p *Paths) Set(path string, item *PathItem) bool
- func (p *Paths) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (p *Paths) UnmarshalJSON(data []byte) error
- type Reference
- type RequestBody
- type Response
- type Schema
- type SecurityRequirement
- func (s *SecurityRequirement) ForEach(fn func(string, []string) error) error
- func (s *SecurityRequirement) Get(key string) []string
- func (s *SecurityRequirement) GetOK(key string) ([]string, bool)
- func (s *SecurityRequirement) Keys() []string
- func (s SecurityRequirement) MarshalEasyJSON(w *jwriter.Writer)
- func (s SecurityRequirement) MarshalJSON() ([]byte, error)
- func (s *SecurityRequirement) Set(key string, scopes ...string) bool
- func (s *SecurityRequirement) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (s *SecurityRequirement) UnmarshalJSON(data []byte) error
- type SecurityScheme
- type Server
- type ServerVariable
- type ServerVariables
- func (s *ServerVariables) ForEach(fn func(string, *ServerVariable) error) error
- func (s *ServerVariables) Get(key string) *ServerVariable
- func (s *ServerVariables) GetOK(key string) (*ServerVariable, bool)
- func (s *ServerVariables) Keys() []string
- func (v ServerVariables) MarshalEasyJSON(w *jwriter.Writer)
- func (v ServerVariables) MarshalJSON() ([]byte, error)
- func (s *ServerVariables) Set(key string, val *ServerVariable) bool
- func (v *ServerVariables) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ServerVariables) UnmarshalJSON(data []byte) error
- type Tag
- type VendorExtensible
- type XML
Constants ¶
This section is empty.
Variables ¶
var LowerCaseKeys = strings.ToLower
LowerCaseKeys lowercases keys when looking up in the map
Functions ¶
func MatchExtension ¶
MatchExtension is used as filter for vendor extensions
func MatchNonEmptyKeys ¶
MatchNonEmptyKeys keys, is used to allow only non empty strings
func NOPNormalizer ¶
NOPNormalizer passes the key through, used as default
Types ¶
type Callback ¶
type Callback struct {
// contains filtered or unexported fields
}
Callback A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
func NewCallback ¶
func NewCallback() Callback
NewCallback creates a new instance of Callback with correct filter
type Components ¶
type Components struct { VendorExtensible Schemas OrderedSchemas `json:"schemas,omitempty"` Responses OrderedResponses `json:"responses,omitempty"` Parameters OrderedParameters `json:"parameters,omitempty"` Examples OrderedExamples `json:"examples,omitempty"` RequestBodies OrderedRequestBodies `json:"requestBodies,omitempty"` Headers OrderedHeaders `json:"headers,omitempty"` SecuritySchemes OrderedSecuritySchemes `json:"securitySchemes,omitempty"` Links OrderedLinks `json:"links,omitempty"` Callbacks OrderedCallbacks `json:"callbacks,omitempty"` }
Components holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
type Contact ¶
type Contact struct { VendorExtensible Name string URL string Email string }
Contact contains information for the exposed API.
func (Contact) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Contact) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Contact) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Contact) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Discriminator ¶
type Discriminator struct { PropertyName string `json:"propertyName"` Mapping OrderedStrings `json:"mapping"` }
Discriminator When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.
type Encoding ¶
type Encoding struct { VendorExtensible ContentType string `json:"contentType,omitempty"` Headers OrderedHeaders `json:"headers,omitempty"` Style string `json:"style,omitempty"` Explode bool `json:"explode,omitempty"` AllowReserved bool `json:"allowReserved,omitempty"` }
Encoding definition applied to a single schema property.
type Example ¶
type Example struct { VendorExtensible Reference Summary string `json:"summary"` Description string `json:"description"` Value interface{} `json:"value"` ExternalValue string `json:"externalValue"` }
Example
type Extensions ¶
type Extensions struct {
// contains filtered or unexported fields
}
Extensions vendor specific extensions
func (Extensions) Add ¶
func (e Extensions) Add(key string, value interface{})
Add adds a value to these extensions
func (Extensions) Get ¶
func (e Extensions) Get(key string) interface{}
func (Extensions) GetBool ¶
func (e Extensions) GetBool(key string) (bool, bool)
GetBool gets a boolean value from the extensions
func (Extensions) GetInt ¶
func (e Extensions) GetInt(key string) (int, bool)
GetInt gets an int value from the extensions
func (Extensions) GetInt32 ¶
func (e Extensions) GetInt32(key string) (int32, bool)
GetInt32 gets an int32 value from the extensions
func (Extensions) GetInt64 ¶
func (e Extensions) GetInt64(key string) (int64, bool)
GetInt64 gets an int64 value from the extensions
func (Extensions) GetOK ¶
func (e Extensions) GetOK(key string) (interface{}, bool)
func (Extensions) GetString ¶
func (e Extensions) GetString(key string) (string, bool)
GetString gets a string value from the extensions
func (Extensions) GetStringSlice ¶
func (e Extensions) GetStringSlice(key string) ([]string, bool)
GetStringSlice gets a string value from the extensions
func (Extensions) MarshalEasyJSON ¶
func (e Extensions) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (Extensions) MarshalJSON ¶
func (e Extensions) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (Extensions) Set ¶
func (e Extensions) Set(key string, value interface{}) bool
func (*Extensions) UnmarshalEasyJSON ¶
func (e *Extensions) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Extensions) UnmarshalJSON ¶
func (e *Extensions) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ExternalDocumentation ¶
type ExternalDocumentation struct { VendorExtensible Description string URL string }
ExternalDocumentation allows referencing an external resource for extended documentation. easyjson:json
func (ExternalDocumentation) MarshalEasyJSON ¶
func (v ExternalDocumentation) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ExternalDocumentation) MarshalJSON ¶
func (v ExternalDocumentation) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ExternalDocumentation) UnmarshalEasyJSON ¶
func (v *ExternalDocumentation) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ExternalDocumentation) UnmarshalJSON ¶
func (v *ExternalDocumentation) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Info ¶
type Info struct { VendorExtensible Title string Description string TermsOfService string Contact *Contact License *License Version string }
Info provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. easyjson:json
func (Info) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Info) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Info) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Info) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type License ¶
type License struct { VendorExtensible Name string URL string }
License contains information for the exposed API. easyjson:json
func (License) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (License) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*License) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*License) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Link ¶
type Link struct { VendorExtensible Reference OperationRef string `json:"operationRef,omitempty"` OperationID string `json:"operationId,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` RequestBody interface{} `json:"requestBody,omitempty"` Description string `json:"description,omitempty"` Server Server `json:"server,omitempty"` }
Link represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
type MapEntry ¶
type MapEntry struct { Key string Value interface{} }
MapEntry represents a key value pair
type MediaType ¶
type MediaType struct { VendorExtensible Schema Schema `json:"schema,omitempty"` Example interface{} `json:"example,omitempty"` Examples OrderedExamples `json:"examples,omitempty"` Encoding OrderedEncodings `json:"encoding,omitempty"` }
MediaType provides schema and examples for the media type identified by its key.
type Normalizer ¶
Normalizer is used to normalize keys when writing to a map
type OAuthFlow ¶
type OAuthFlow struct { VendorExtensible AuthorizationURL string `json:"authorizationUrl,omitempty"` TokenURL string `json:"tokenUrl,omitempty"` RefreshURL string `json:"refreshUrl,omitempty"` Scopes OrderedStrings `json:"scopes,omitempty"` }
OAuthFlow configuration details for a supported OAuth Flow
type OAuthFlows ¶
type OAuthFlows struct { VendorExtensible Implicit OAuthFlow `json:"implicit,omitempty"` Password OAuthFlow `json:"password,omitempty"` ClientCredentials OAuthFlow `json:"clientCredentials,omitempty"` AuthorizationCode OAuthFlow `json:"authorizationCode,omitempty"` }
OAuthFlows allows configuration of the supported OAuth Flows.
type OpenAPI ¶
type OpenAPI struct { VendorExtensible Components *Components `json:"components,omitempty"` ExternalDocs []ExternalDocumentation `json:"externalDocs,omitempty"` Info *Info `json:"info,omitempty"` OpenAPI string `json:"openapi"` Paths *PathItem `json:"paths"` Security []SecurityRequirement `json:"security,omitempty"` Servers []Server `json:"servers,omitempty"` Tags []Tag `json:"tags,omitempty"` }
OpenAPI is the root document object of the OpenAPI document
type Operation ¶
type Operation struct { VendorExtensible Tags []string `json:"tags,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` ExternalDocs ExternalDocumentation `json:"externalDocs,omitempty"` OperationID string `json:"operationId,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` RequestBody RequestBody `json:"requestBody,omitempty"` Responses OrderedResponses `json:"responses,omitempty"` Callbacks map[string]Callback `json:"callbacks,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Security []SecurityRequirement `json:"security,omitempty"` Servers []Server `json:"servers,omitempty"` }
Operation describes a single API operation on a path.
type OrderedCallbacks ¶
type OrderedCallbacks struct {
// contains filtered or unexported fields
}
OrderedCallbacks is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedCallbacks ¶
func NewOrderedCallbacks() OrderedCallbacks
NewOrderedCallbacks creates a new instance of OrderedCallbacks with correct filter
func (*OrderedCallbacks) ForEach ¶
func (s *OrderedCallbacks) ForEach(fn func(string, *Callback) error) error
ForEach executes the function for each security requirement
func (*OrderedCallbacks) Get ¶
func (s *OrderedCallbacks) Get(key string) *Callback
Get gets the security requirement by key
func (*OrderedCallbacks) GetOK ¶
func (s *OrderedCallbacks) GetOK(key string) (*Callback, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedCallbacks) Keys ¶
func (s *OrderedCallbacks) Keys() []string
Keys gets the list of keys
type OrderedEncodings ¶
type OrderedEncodings struct {
// contains filtered or unexported fields
}
OrderedEncodings is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedEncodings ¶
func NewOrderedEncodings() OrderedEncodings
NewOrderedEncodings creates a new instance of OrderedEncodings with correct filter
func (*OrderedEncodings) ForEach ¶
func (s *OrderedEncodings) ForEach(fn func(string, *Encoding) error) error
ForEach executes the function for each security requirement
func (*OrderedEncodings) Get ¶
func (s *OrderedEncodings) Get(key string) *Encoding
Get gets the security requirement by key
func (*OrderedEncodings) GetOK ¶
func (s *OrderedEncodings) GetOK(key string) (*Encoding, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedEncodings) Keys ¶
func (s *OrderedEncodings) Keys() []string
Keys gets the list of keys
type OrderedExamples ¶
type OrderedExamples struct {
// contains filtered or unexported fields
}
OrderedExamples is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedExamples ¶
func NewOrderedExamples() OrderedExamples
NewOrderedExamples creates a new instance of OrderedExamples with correct filter
func (*OrderedExamples) ForEach ¶
func (s *OrderedExamples) ForEach(fn func(string, *Example) error) error
ForEach executes the function for each security requirement
func (*OrderedExamples) Get ¶
func (s *OrderedExamples) Get(key string) *Example
Get gets the security requirement by key
type OrderedHeaders ¶
type OrderedHeaders struct {
// contains filtered or unexported fields
}
OrderedHeaders is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedHeaders ¶
func NewOrderedHeaders() OrderedHeaders
NewOrderedHeaders creates a new instance of OrderedHeaders with correct filter
func (*OrderedHeaders) ForEach ¶
func (s *OrderedHeaders) ForEach(fn func(string, *Header) error) error
ForEach executes the function for each security requirement
func (*OrderedHeaders) Get ¶
func (s *OrderedHeaders) Get(key string) *Header
Get gets the security requirement by key
type OrderedLinks ¶
type OrderedLinks struct {
// contains filtered or unexported fields
}
OrderedLinks is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedLinks ¶
func NewOrderedLinks() OrderedLinks
NewOrderedLinks creates a new instance of OrderedLinks with correct filter
func (*OrderedLinks) ForEach ¶
func (s *OrderedLinks) ForEach(fn func(string, *Link) error) error
ForEach executes the function for each security requirement
func (*OrderedLinks) Get ¶
func (s *OrderedLinks) Get(key string) *Link
Get gets the security requirement by key
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
OrderedMap is a map that preserves insertion order
func (*OrderedMap) Entries ¶
func (s *OrderedMap) Entries() []MapEntry
Entries in the order of addition to the map
func (*OrderedMap) ForEach ¶
func (s *OrderedMap) ForEach(fn func(string, interface{}) error) error
ForEach executes a function for each value in the map
func (*OrderedMap) Get ¶
func (s *OrderedMap) Get(key string) interface{}
Get get a value for the specified key
func (*OrderedMap) GetOK ¶
func (s *OrderedMap) GetOK(key string) (interface{}, bool)
GetOK get a value for the specified key, the boolean result indicates if the value was found or not
func (*OrderedMap) Keys ¶
func (s *OrderedMap) Keys() []string
Keys in the order of addition to the map
func (OrderedMap) MarshalEasyJSON ¶
func (s OrderedMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (OrderedMap) MarshalJSON ¶
func (s OrderedMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*OrderedMap) Set ¶
func (s *OrderedMap) Set(key string, value interface{}) bool
Set a value in the map
func (OrderedMap) String ¶
func (s OrderedMap) String() string
func (*OrderedMap) UnmarshalEasyJSON ¶
func (s *OrderedMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*OrderedMap) UnmarshalJSON ¶
func (s *OrderedMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*OrderedMap) Values ¶
func (s *OrderedMap) Values() []interface{}
Values in the order of addition to the map
type OrderedMediaTypes ¶
type OrderedMediaTypes struct {
// contains filtered or unexported fields
}
OrderedMediaTypes is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedMediaTypes ¶
func NewOrderedMediaTypes() OrderedMediaTypes
NewOrderedMediaTypes creates a new instance of OrderedMediaTypes with correct filter
func (*OrderedMediaTypes) ForEach ¶
func (s *OrderedMediaTypes) ForEach(fn func(string, *MediaType) error) error
ForEach executes the function for each security requirement
func (*OrderedMediaTypes) Get ¶
func (s *OrderedMediaTypes) Get(key string) *MediaType
Get gets the security requirement by key
func (*OrderedMediaTypes) GetOK ¶
func (s *OrderedMediaTypes) GetOK(key string) (*MediaType, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedMediaTypes) Keys ¶
func (s *OrderedMediaTypes) Keys() []string
Keys gets the list of keys
type OrderedParameters ¶
type OrderedParameters struct {
// contains filtered or unexported fields
}
func NewOrderedParameters ¶
func NewOrderedParameters() OrderedParameters
func (*OrderedParameters) ForEach ¶
func (s *OrderedParameters) ForEach(fn func(string, *Parameter) error) error
ForEach executes the function for each security requirement
func (*OrderedParameters) Get ¶
func (s *OrderedParameters) Get(key string) *Parameter
Get gets the security requirement by key
func (*OrderedParameters) GetOK ¶
func (s *OrderedParameters) GetOK(key string) (*Parameter, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedParameters) Keys ¶
func (s *OrderedParameters) Keys() []string
Keys gets the list of keys
type OrderedRequestBodies ¶
type OrderedRequestBodies struct {
// contains filtered or unexported fields
}
OrderedRequestBodies is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedRequestBodies ¶
func NewOrderedRequestBodies() OrderedRequestBodies
NewOrderedRequestBodies creates a new instance of OrderedRequestBodies with correct filter
func (*OrderedRequestBodies) ForEach ¶
func (s *OrderedRequestBodies) ForEach(fn func(string, *RequestBody) error) error
ForEach executes the function for each security requirement
func (*OrderedRequestBodies) Get ¶
func (s *OrderedRequestBodies) Get(key string) *RequestBody
Get gets the security requirement by key
func (*OrderedRequestBodies) GetOK ¶
func (s *OrderedRequestBodies) GetOK(key string) (*RequestBody, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedRequestBodies) Keys ¶
func (s *OrderedRequestBodies) Keys() []string
Keys gets the list of keys
func (*OrderedRequestBodies) Set ¶
func (s *OrderedRequestBodies) Set(key string, val *RequestBody) bool
Set sets the value to the security requirement
type OrderedResponses ¶
type OrderedResponses struct {
// contains filtered or unexported fields
}
OrderedResponses is a container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
func NewOrderedResponses ¶
func NewOrderedResponses() OrderedResponses
NewOrderedResponses creates the new instance of the OrderedResponses with correct key-filter
func (*OrderedResponses) ForEach ¶
func (s *OrderedResponses) ForEach(fn func(string, *Response) error) error
ForEach executes the function for each security requirement
func (*OrderedResponses) Get ¶
func (s *OrderedResponses) Get(key string) *Response
Get gets the security requirement by key
func (*OrderedResponses) GetOK ¶
func (s *OrderedResponses) GetOK(key string) (*Response, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedResponses) Keys ¶
func (s *OrderedResponses) Keys() []string
Keys gets the list of keys
func (OrderedResponses) MarshalEasyJSON ¶
func (s OrderedResponses) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (OrderedResponses) MarshalJSON ¶
func (s OrderedResponses) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*OrderedResponses) Set ¶
func (s *OrderedResponses) Set(key string, val *Response) bool
Set sets the value to the security requirement
func (*OrderedResponses) UnmarshalEasyJSON ¶
func (s *OrderedResponses) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*OrderedResponses) UnmarshalJSON ¶
func (s *OrderedResponses) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type OrderedSchemas ¶
type OrderedSchemas struct {
// contains filtered or unexported fields
}
OrderedSchemas is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedSchemas ¶
func NewOrderedSchemas() OrderedSchemas
NewOrderedSchemas creates a new instance of OrderedSchemas with correct filter
func (*OrderedSchemas) ForEach ¶
func (s *OrderedSchemas) ForEach(fn func(string, *Schema) error) error
ForEach executes the function for each security requirement
func (*OrderedSchemas) Get ¶
func (s *OrderedSchemas) Get(key string) *Schema
Get gets the security requirement by key
type OrderedSecuritySchemes ¶
type OrderedSecuritySchemes struct {
// contains filtered or unexported fields
}
OrderedSecuritySchemes is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedSecuritySchemes ¶
func NewOrderedSecuritySchemes() OrderedSecuritySchemes
NewOrderedSecuritySchemes creates a new instance of OrderedSecuritySchemes with correct filter
func (*OrderedSecuritySchemes) ForEach ¶
func (s *OrderedSecuritySchemes) ForEach(fn func(string, *SecurityScheme) error) error
ForEach executes the function for each security requirement
func (*OrderedSecuritySchemes) Get ¶
func (s *OrderedSecuritySchemes) Get(key string) *SecurityScheme
Get gets the security requirement by key
func (*OrderedSecuritySchemes) GetOK ¶
func (s *OrderedSecuritySchemes) GetOK(key string) (*SecurityScheme, bool)
GetOK checks if the key exists in the security requirement
func (*OrderedSecuritySchemes) Keys ¶
func (s *OrderedSecuritySchemes) Keys() []string
Keys gets the list of keys
func (*OrderedSecuritySchemes) Set ¶
func (s *OrderedSecuritySchemes) Set(key string, val *SecurityScheme) bool
Set sets the value to the security requirement
type OrderedStrings ¶
type OrderedStrings struct {
// contains filtered or unexported fields
}
OrderedStrings is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewOrderedStrings ¶
func NewOrderedStrings() OrderedStrings
NewOrderedStrings creates a new instance of OrderedStrings with correct filter
func (*OrderedStrings) ForEach ¶
func (s *OrderedStrings) ForEach(fn func(string, *string) error) error
ForEach executes the function for each security requirement
func (*OrderedStrings) Get ¶
func (s *OrderedStrings) Get(key string) *string
Get gets the security requirement by key
type Parameter ¶
type Parameter struct { VendorExtensible Reference Name string `json:"name"` In string `json:"in"` Description string `json:"description"` Required bool `json:"required"` Deprecated bool `json:"deprecated"` AllowEmptyValue bool `json:"allowEmptyValue"` Style string `json:"style"` Explode bool `json:"explode"` AllowReserved bool `json:"allowReserved"` Schema Schema `json:"schema"` Example interface{} `json:"example"` Examples OrderedExamples `json:"examples"` Contents OrderedMediaTypes `json:"contents"` }
Parameter describes a single operation parameter. A unique parameter is defined by a combination of a name and location.
type PathItem ¶
type PathItem struct { Reference Summary string `json:"summary"` Description string `json:"description"` Get Operation `json:"get"` Put Operation `json:"put"` Post Operation `json:"post"` Delete Operation `json:"delete"` Options Operation `json:"options"` Head Operation `json:"head"` Patch Operation `json:"patch"` Trace Operation `json:"trace"` Servers []Server `json:"servers"` Parameters []Parameter `json:"parameters"` }
PathItem describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
type Paths ¶
type Paths struct {
// contains filtered or unexported fields
}
Paths holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.
func (Paths) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Paths) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Paths) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Paths) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Reference ¶
type Reference struct {
Ref jsonreference.Ref
}
Reference is a simple object to allow referencing other components in the specification, internally and externally.
type RequestBody ¶
type RequestBody struct { VendorExtensible Reference Description string `json:"description,omitempty"` Content string `json:"content,omitempty"` Required string `json:"required,omitempty"` }
RequestBody describes a single request body.
type Response ¶
type Response struct { VendorExtensible Reference Description string `json:"description"` Headers OrderedHeaders `json:"headers"` Content OrderedMediaTypes `json:"content"` Links OrderedLinks `json:"links"` }
Response describes a single response from an API Operation, including design-time, static links to operations based on the response.
type Schema ¶
type Schema struct { VendorExtensible Reference }
Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.
type SecurityRequirement ¶
type SecurityRequirement struct {
// contains filtered or unexported fields
}
SecurityRequirement lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.
func (*SecurityRequirement) ForEach ¶
func (s *SecurityRequirement) ForEach(fn func(string, []string) error) error
ForEach executes the function for each security requirement
func (*SecurityRequirement) Get ¶
func (s *SecurityRequirement) Get(key string) []string
Get gets the security requirement by key
func (*SecurityRequirement) GetOK ¶
func (s *SecurityRequirement) GetOK(key string) ([]string, bool)
GetOK checks if the key exists in the security requirement
func (*SecurityRequirement) Keys ¶
func (s *SecurityRequirement) Keys() []string
Keys gets the list of keys
func (SecurityRequirement) MarshalEasyJSON ¶
func (s SecurityRequirement) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SecurityRequirement) MarshalJSON ¶
func (s SecurityRequirement) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SecurityRequirement) Set ¶
func (s *SecurityRequirement) Set(key string, scopes ...string) bool
Set sets the value to the security requirement
func (*SecurityRequirement) UnmarshalEasyJSON ¶
func (s *SecurityRequirement) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SecurityRequirement) UnmarshalJSON ¶
func (s *SecurityRequirement) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SecurityScheme ¶
type SecurityScheme struct { VendorExtensible Reference Type string `json:"type,omitempty"` 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 OAuthFlow `json:"flows,omitempty"` OpenIDConnectURL string `json:"openIdConnectUrl,omitempty"` }
SecurityScheme defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery.
type Server ¶
type Server struct { VendorExtensible URL string Description string Variables ServerVariables }
Server object representing a Server. easyjson:json
func (Server) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Server) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Server) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Server) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ServerVariable ¶
type ServerVariable struct { VendorExtensible Enum []string Default string Description string }
ServerVariable object representing a Server Variable for server URL template substitution.
func (ServerVariable) MarshalEasyJSON ¶
func (v ServerVariable) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ServerVariable) MarshalJSON ¶
func (v ServerVariable) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ServerVariable) UnmarshalEasyJSON ¶
func (v *ServerVariable) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ServerVariable) UnmarshalJSON ¶
func (v *ServerVariable) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ServerVariables ¶
type ServerVariables struct {
// contains filtered or unexported fields
}
ServerVariables is a map between a variable name and its value. The value is used for substitution in the server's URL template.
func NewServerVariables ¶
func NewServerVariables() ServerVariables
NewServerVariables creates a new instance of ServerVariables with correct filter
func (*ServerVariables) ForEach ¶
func (s *ServerVariables) ForEach(fn func(string, *ServerVariable) error) error
ForEach executes the function for each security requirement
func (*ServerVariables) Get ¶
func (s *ServerVariables) Get(key string) *ServerVariable
Get gets the security requirement by key
func (*ServerVariables) GetOK ¶
func (s *ServerVariables) GetOK(key string) (*ServerVariable, bool)
GetOK checks if the key exists in the security requirement
func (ServerVariables) MarshalEasyJSON ¶
func (v ServerVariables) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ServerVariables) MarshalJSON ¶
func (v ServerVariables) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ServerVariables) Set ¶
func (s *ServerVariables) Set(key string, val *ServerVariable) bool
Set sets the value to the security requirement
func (*ServerVariables) UnmarshalEasyJSON ¶
func (v *ServerVariables) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ServerVariables) UnmarshalJSON ¶
func (v *ServerVariables) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Tag ¶
type Tag struct { VendorExtensible Name string Description string ExternalDocs *ExternalDocumentation }
Tag adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. easyjson:json
func (Tag) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Tag) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Tag) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Tag) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type VendorExtensible ¶
type VendorExtensible struct {
Extensions Extensions
}
VendorExtensible composition block.
func (*VendorExtensible) AddExtension ¶
func (v *VendorExtensible) AddExtension(key string, value interface{})
AddExtension adds an extension to this extensible object
func (VendorExtensible) MarshalJSON ¶
func (v VendorExtensible) MarshalJSON() ([]byte, error)
MarshalJSON marshals the extensions to json
func (*VendorExtensible) UnmarshalJSON ¶
func (v *VendorExtensible) UnmarshalJSON(data []byte) error
UnmarshalJSON for this extensible object
Source Files ¶
- callback.go
- components.go
- contact.go
- contact_easyjson.go
- discriminator.go
- doc.go
- encoding.go
- example.go
- extensions.go
- external_documentation.go
- external_documentation_easyjson.go
- header.go
- info.go
- info_easyjson.go
- license.go
- license_easyjson.go
- link.go
- media_type.go
- oauth_flows.go
- open_api.go
- operation.go
- orderedmap.go
- parameter.go
- path_item.go
- paths.go
- reference.go
- request_body.go
- responses.go
- schema.go
- security_requirement.go
- security_scheme.go
- server.go
- server_easyjson.go
- tag.go
- tag_easyjson.go
- xml.go