Back to godoc.org

Package swag

v0.10.2
Latest Go to latest

The latest major version is .

Published: Jul 15, 2020 | License: MIT | Module: github.com/celer/gadgeto

Index

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)

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier