Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasePath ¶
func BasePath(path string) func(*swagger.ApiDeclaration)
func Description ¶
func Description(desc string) func(*swagger.ApiDeclaration)
func Swagger ¶
func Swagger(e *gin.Engine, title string, options ...func(*swagger.ApiDeclaration)) gin.HandlerFunc
func Version ¶
func Version(version string) func(*swagger.ApiDeclaration)
Types ¶
type SchemaGenerator ¶
type SchemaGenerator struct {
// contains filtered or unexported fields
}
SchemaGenerator is the object users have to manipulate, it internally collects data about packages used by handlers and so on
func NewSchemaGenerator ¶
func NewSchemaGenerator() *SchemaGenerator
NewSchemaGenerator bootstraps a generator, don't instantiate SchemaGenerator yourself
func (*SchemaGenerator) GenerateSwagDeclaration ¶
func (s *SchemaGenerator) GenerateSwagDeclaration(routes map[string]*tonic.Route, basePath, version string, godoc *doc.Infos) error
GenerateSwagDeclaration parses all routes (handlers, structs) and returns ready to serialize/use ApiDeclaration
Click to show internal directories.
Click to hide internal directories.