Documentation
¶
Index ¶
- type Option
- func Contact(Contact *openapi3.Contact) Option
- func Description(description string) Option
- func DocsUrl(url string) Option
- func License(License *openapi3.License) Option
- func OpenAPIUrl(url string) Option
- func RedocEnable(enable bool) Option
- func RedocOptions(options map[string]interface{}) Option
- func RedocUrl(url string) Option
- func Servers(servers openapi3.Servers) Option
- func SwaggerEnable(enable bool) Option
- func SwaggerOptions(options map[string]interface{}) Option
- func TermsOfService(TermsOfService string) Option
- func Title(title string) Option
- func Version(version string) Option
- type Swagger
- func (swagger *Swagger) BuildOpenAPI()
- func (swagger *Swagger) MarshalJSON() ([]byte, error)
- func (swagger *Swagger) WithContact(contact *openapi3.Contact) *Swagger
- func (swagger *Swagger) WithDescription(description string) *Swagger
- func (swagger *Swagger) WithDocsUrl(url string) *Swagger
- func (swagger *Swagger) WithLicense(license *openapi3.License) *Swagger
- func (swagger *Swagger) WithOpenAPIUrl(url string) *Swagger
- func (swagger *Swagger) WithRedocOptions(options map[string]interface{}) *Swagger
- func (swagger *Swagger) WithRedocUrl(url string) *Swagger
- func (swagger *Swagger) WithServers(servers []*openapi3.Server) *Swagger
- func (swagger *Swagger) WithSwaggerOptions(options map[string]interface{}) *Swagger
- func (swagger *Swagger) WithTermsOfService(termsOfService string) *Swagger
- func (swagger *Swagger) WithTitle(title string) *Swagger
- func (swagger *Swagger) WithVersion(version string) *Swagger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(swagger *Swagger)
func Description ¶
func OpenAPIUrl ¶
func RedocEnable ¶
func RedocOptions ¶
func SwaggerEnable ¶
func SwaggerOptions ¶
func TermsOfService ¶
type Swagger ¶
type Swagger struct { Title string Description string Version string DocsUrl string RedocUrl string OpenAPIUrl string Routers map[string]map[string]*router.Router Servers openapi3.Servers TermsOfService string Contact *openapi3.Contact License *openapi3.License OpenAPI *openapi3.T SwaggerEnable bool RedocEnable bool SwaggerOptions map[string]interface{} RedocOptions map[string]interface{} }
func (*Swagger) BuildOpenAPI ¶
func (swagger *Swagger) BuildOpenAPI()
func (*Swagger) MarshalJSON ¶
func (*Swagger) WithContact ¶
func (*Swagger) WithDescription ¶
func (*Swagger) WithDocsUrl ¶
func (*Swagger) WithLicense ¶
func (*Swagger) WithOpenAPIUrl ¶
func (*Swagger) WithRedocOptions ¶
func (*Swagger) WithRedocUrl ¶
func (*Swagger) WithServers ¶
func (*Swagger) WithSwaggerOptions ¶
func (*Swagger) WithTermsOfService ¶
func (*Swagger) WithVersion ¶
Click to show internal directories.
Click to hide internal directories.