Documentation
¶
Index ¶
- Constants
- func ExtractContent(...) map[string]*MediaType
- func ExtractEncoding(...) map[string]*Encoding
- func ExtractHeaders(...) map[string]*Header
- type Callback
- type Components
- type Document
- type Encoding
- type Header
- type Link
- type MediaType
- type OAuthFlow
- type OAuthFlows
- type Operation
- type Parameter
- type PathItem
- type Paths
- type RequestBody
- type Response
- type Responses
- type SecurityRequirement
- type SecurityScheme
- type Server
- type ServerVariable
Constants ¶
View Source
const ( NameLabel = "name" DescriptionLabel = "description" ExternalDocsLabel = "externalDocs" )
Variables ¶
This section is empty.
Functions ¶
func ExtractContent ¶
func ExtractContent(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.MediaType]) map[string]*MediaType
func ExtractEncoding ¶
func ExtractEncoding(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.Encoding]) map[string]*Encoding
func ExtractHeaders ¶
func ExtractHeaders(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.Header]) map[string]*Header
Types ¶
type Callback ¶
type Callback struct {
Expression map[string]*PathItem
Extensions map[string]any
// contains filtered or unexported fields
}
func NewCallback ¶
type Components ¶
type Components struct {
Schemas map[string]*highbase.SchemaProxy
Responses map[string]*Response
Parameters map[string]*Parameter
Examples map[string]*highbase.Example
RequestBodies map[string]*RequestBody
Headers map[string]*Header
SecuritySchemes map[string]*SecurityScheme
Links map[string]*Link
Callbacks map[string]*Callback
Extensions map[string]any
// contains filtered or unexported fields
}
func NewComponents ¶
func NewComponents(comp *low.Components) *Components
func (*Components) GoLow ¶
func (c *Components) GoLow() *low.Components
type Document ¶
type Document struct {
Version string
Info *base.Info
Servers []*Server
Paths *Paths
Components *Components
Security *SecurityRequirement
Tags []*base.Tag
ExternalDocs *base.ExternalDoc
Extensions map[string]any
Index *index.SpecIndex
// contains filtered or unexported fields
}
func NewDocument ¶
type Encoding ¶
type Encoding struct {
ContentType string
Headers map[string]*Header
Style string
Explode bool
AllowReserved bool
// contains filtered or unexported fields
}
func NewEncoding ¶
type Header ¶
type Header struct {
Description string
Required bool
Deprecated bool
AllowEmptyValue bool
Style string
Explode bool
AllowReserved bool
Schema *highbase.SchemaProxy
Example any
Examples map[string]*highbase.Example
Content map[string]*MediaType
Extensions map[string]any
// contains filtered or unexported fields
}
type Link ¶
type MediaType ¶
type MediaType struct {
Schema *base.SchemaProxy
Example any
Examples map[string]*base.Example
Encoding map[string]*Encoding
Extensions map[string]any
// contains filtered or unexported fields
}
func NewMediaType ¶
type OAuthFlow ¶
type OAuthFlow struct {
AuthorizationUrl string
TokenUrl string
RefreshUrl string
Scopes map[string]string
Extensions map[string]any
// contains filtered or unexported fields
}
func NewOAuthFlow ¶
type OAuthFlows ¶
type OAuthFlows struct {
Implicit *OAuthFlow
Password *OAuthFlow
ClientCredentials *OAuthFlow
AuthorizationCode *OAuthFlow
Extensions map[string]any
// contains filtered or unexported fields
}
func NewOAuthFlows ¶
func NewOAuthFlows(flows *low.OAuthFlows) *OAuthFlows
func (*OAuthFlows) GoLow ¶
func (o *OAuthFlows) GoLow() *low.OAuthFlows
type Operation ¶
type Operation struct {
Tags []string
Summary string
Description string
ExternalDocs *base.ExternalDoc
OperationId string
Parameters []*Parameter
RequestBody *RequestBody
Responses *Responses
Callbacks map[string]*Callback
Deprecated bool
Security *SecurityRequirement
Servers []*Server
Extensions map[string]any
// contains filtered or unexported fields
}
func NewOperation ¶
type Parameter ¶
type Parameter struct {
Name string
In string
Description string
Required bool
Deprecated bool
AllowEmptyValue bool
Style string
Explode bool
AllowReserved bool
Schema *base.SchemaProxy
Example any
Examples map[string]*base.Example
Content map[string]*MediaType
Extensions map[string]any
// contains filtered or unexported fields
}
func NewParameter ¶
type PathItem ¶
type PathItem struct {
Description string
Summary string
Get *Operation
Put *Operation
Post *Operation
Delete *Operation
Options *Operation
Head *Operation
Patch *Operation
Trace *Operation
Servers []*Server
Parameters []*Parameter
Extensions map[string]any
// contains filtered or unexported fields
}
func NewPathItem ¶
type Paths ¶
type RequestBody ¶
type RequestBody struct {
Description string
Content map[string]*MediaType
Required bool
Extensions map[string]any
// contains filtered or unexported fields
}
func NewRequestBody ¶
func NewRequestBody(rb *low.RequestBody) *RequestBody
func (*RequestBody) GoLow ¶
func (r *RequestBody) GoLow() *low.RequestBody
type Response ¶
type Response struct {
Description string
Headers map[string]*Header
Content map[string]*MediaType
Extensions map[string]any
Links map[string]*Link
// contains filtered or unexported fields
}
func NewResponse ¶
type Responses ¶
type Responses struct {
Codes map[string]*Response
Default *Response
// contains filtered or unexported fields
}
func NewResponses ¶
func (*Responses) FindResponseByCode ¶
type SecurityRequirement ¶
type SecurityRequirement struct {
ValueRequirements []map[string][]string
// contains filtered or unexported fields
}
func NewSecurityRequirement ¶
func NewSecurityRequirement(req *low.SecurityRequirement) *SecurityRequirement
func (*SecurityRequirement) GoLow ¶
func (s *SecurityRequirement) GoLow() *low.SecurityRequirement
type SecurityScheme ¶
type SecurityScheme struct {
Type string
Description string
Name string
In string
Scheme string
BearerFormat string
Flows *OAuthFlows
OpenIdConnectUrl string
Extensions map[string]any
// contains filtered or unexported fields
}
func NewSecurityScheme ¶
func NewSecurityScheme(ss *low.SecurityScheme) *SecurityScheme
func (*SecurityScheme) GoLow ¶
func (s *SecurityScheme) GoLow() *low.SecurityScheme
type Server ¶
type Server struct {
URL string
Description string
Variables map[string]*ServerVariable
// contains filtered or unexported fields
}
type ServerVariable ¶
type ServerVariable struct {
Enum []string
Default string
Description string
// contains filtered or unexported fields
}
func NewServerVariable ¶
func NewServerVariable(variable *low.ServerVariable) *ServerVariable
func (*ServerVariable) GoLow ¶
func (s *ServerVariable) GoLow() *low.ServerVariable
Source Files
¶
Click to show internal directories.
Click to hide internal directories.