Documentation
¶
Index ¶
- type Store
- func (s *Store) GetCallback(name string) (*v3.Callback, bool)
- func (s *Store) GetExample(name string) (*base.Example, bool)
- func (s *Store) GetHeader(name string) (*v3.Header, bool)
- func (s *Store) GetLink(name string) (*v3.Link, bool)
- func (s *Store) GetParameter(name string) (*v3.Parameter, bool)
- func (s *Store) GetPathItem(name string) (*v3.PathItem, bool)
- func (s *Store) GetRequestBody(name string) (*v3.RequestBody, bool)
- func (s *Store) GetResponse(name string) (*v3.Response, bool)
- func (s *Store) GetSchema(t reflect.Type) (*base.SchemaProxy, bool)
- func (s *Store) GetSecurityScheme(name string) (*v3.SecurityScheme, bool)
- func (s *Store) SetCallback(name string, cb *v3.Callback) *v3.Callback
- func (s *Store) SetExample(name string, e *base.Example) *base.Example
- func (s *Store) SetHeader(name string, h *v3.Header) *v3.Header
- func (s *Store) SetLink(name string, l *v3.Link) *v3.Link
- func (s *Store) SetParameter(name string, p *v3.Parameter) *v3.Parameter
- func (s *Store) SetPathItem(name string, p *v3.PathItem) *v3.PathItem
- func (s *Store) SetRequestBody(name string, b *v3.RequestBody) *v3.RequestBody
- func (s *Store) SetResponse(name string, r *v3.Response) *v3.Response
- func (s *Store) SetSchema(t reflect.Type, name string, p *base.SchemaProxy) *base.SchemaProxy
- func (s *Store) SetSecurityScheme(name string, ss *v3.SecurityScheme) *v3.SecurityScheme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store tracks component references by writing them into the OpenAPI document's components object.
func New ¶
func New(components *v3.Components) *Store
New creates a Store backed by the given components object.
func (*Store) GetCallback ¶
GetCallback returns a stored callback $ref.
func (*Store) GetExample ¶
GetExample returns a stored example $ref.
func (*Store) GetParameter ¶
GetParameter returns a stored parameter $ref.
func (*Store) GetPathItem ¶
GetPathItem returns a stored path item $ref.
func (*Store) GetRequestBody ¶
func (s *Store) GetRequestBody(name string) (*v3.RequestBody, bool)
GetRequestBody returns a stored request body $ref.
func (*Store) GetResponse ¶
GetResponse returns a stored response $ref.
func (*Store) GetSecurityScheme ¶
func (s *Store) GetSecurityScheme(name string) (*v3.SecurityScheme, bool)
GetSecurityScheme returns a stored security scheme $ref.
func (*Store) SetCallback ¶
SetCallback stores a callback in components/callbacks if not already stored, and returns the $ref.
func (*Store) SetExample ¶
SetExample stores an example in components/examples if not already stored, and returns the $ref.
func (*Store) SetHeader ¶
SetHeader stores a header in components/headers if not already stored, and returns the $ref.
func (*Store) SetLink ¶
SetLink stores a link in components/links if not already stored, and returns the $ref.
func (*Store) SetParameter ¶
SetParameter stores a parameter in components/parameters if not already stored, and returns the $ref.
func (*Store) SetPathItem ¶
SetPathItem stores a path item in components/pathItems if not already stored, and returns the $ref.
func (*Store) SetRequestBody ¶
func (s *Store) SetRequestBody(name string, b *v3.RequestBody) *v3.RequestBody
SetRequestBody stores a request body in components/requestBodies if not already stored, and returns the $ref.
func (*Store) SetResponse ¶
SetResponse stores a response in components/responses if not already stored, and returns the $ref.
func (*Store) SetSchema ¶
func (s *Store) SetSchema(t reflect.Type, name string, p *base.SchemaProxy) *base.SchemaProxy
SetSchema stores a schema for t in components/schemas if not already stored, and returns the $ref.
func (*Store) SetSecurityScheme ¶
func (s *Store) SetSecurityScheme(name string, ss *v3.SecurityScheme) *v3.SecurityScheme
SetSecurityScheme stores a security scheme in components/securitySchemes if not already stored, and returns the $ref.