Documentation
¶
Index ¶
- type Config
- type Contact
- type License
- type Operation
- func (op *Operation) AddResponse(name string, resp interface{}) *Operation
- func (op *Operation) AddSecurity(security ...security.Security) *Operation
- func (op *Operation) Openapi() *openapi3.PathItem
- func (op *Operation) SetDescription(description string) *Operation
- func (op *Operation) SetExclude(exclude bool) *Operation
- func (op *Operation) SetModel(req interface{}, rsp interface{}) *Operation
- func (op *Operation) SetOperation(operationID string) *Operation
- func (op *Operation) SetPath(operationID string, path string) *Operation
- func (op *Operation) SetSummary(summary string) *Operation
- type Server
- type Servers
- type Service
- func (s *Service) AddContentType(contentType ...string) *Service
- func (s *Service) AddSecurity(security ...security.Security) *Service
- func (s *Service) DeleteOf(cb func(op *Operation)) *Service
- func (s *Service) GetOf(cb func(op *Operation)) *Service
- func (s *Service) Openapi() map[string]*openapi3.PathItem
- func (s *Service) PatchOf(cb func(op *Operation)) *Service
- func (s *Service) PostOf(cb func(op *Operation)) *Service
- func (s *Service) PutOf(cb func(op *Operation)) *Service
- func (s *Service) SetPrefix(prefix string) *Service
- type Swagger
- func (s *Swagger) InitRouter(r fiber.Router)
- func (s *Swagger) MarshalJSON() ([]byte, error)
- func (s *Swagger) MarshalYAML() ([]byte, error)
- func (s *Swagger) OpenapiDataHandler() fiber.Handler
- func (s *Swagger) ServiceOf(name string, cb func(srv *Service))
- func (s *Swagger) SetRootPath(path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Title string `yaml:"title"`
OpenapiRouter string `yaml:"path"`
OpenapiRedocRouter string `yaml:"redoc-path"`
OpenapiUrl string `yaml:"openapi-path"`
OpenapiOpt map[string]interface{} `yaml:"options"`
}
func DefaultCfg ¶
func DefaultCfg() *Config
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
func (*Operation) AddResponse ¶ added in v0.0.4
func (*Operation) AddSecurity ¶
func (*Operation) SetDescription ¶
func (*Operation) SetExclude ¶ added in v0.0.4
func (*Operation) SetOperation ¶ added in v0.0.4
func (*Operation) SetSummary ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddContentType ¶
type Swagger ¶
type Swagger struct {
Config *Config
Description string
Version string
TermsOfService string
Routers []*Service
Servers openapi3.Servers
Contact *openapi3.Contact
License *openapi3.License
// contains filtered or unexported fields
}
func (*Swagger) InitRouter ¶
func (*Swagger) MarshalJSON ¶
func (*Swagger) MarshalYAML ¶
func (*Swagger) OpenapiDataHandler ¶
func (*Swagger) SetRootPath ¶
Click to show internal directories.
Click to hide internal directories.