Documentation ¶
Index ¶
- Constants
- 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 RedocOptions(options map[string]interface{}) Option
- func RedocUrl(url string) Option
- func Routers(routers map[string]map[string]*router.Router) Option
- func Servers(servers openapi3.Servers) 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
Constants ¶
View Source
const ( DEFAULT = "default" BINDING = "binding" DESCRIPTION = "description" QUERY = "query" FORM = "form" URI = "uri" HEADER = "header" COOKIE = "cookie" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(swagger *Swagger)
func Description ¶
func OpenAPIUrl ¶
func RedocOptions ¶
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 SwaggerOptions map[string]interface{} RedocOptions map[string]interface{} }
func (*Swagger) BuildOpenAPI ¶
func (swagger *Swagger) BuildOpenAPI()
func (*Swagger) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.