swag: github.com/swaggo/swag/gen Index | Files

package gen

import "github.com/swaggo/swag/gen"

Index

Package Files

gen.go

type Config Uses

type Config struct {
    // SearchDir the swag would be parse
    SearchDir string

    // OutputDir represents the output directory for all the generated files
    OutputDir string

    // MainAPIFile the Go file path in which 'swagger general API Info' is written
    MainAPIFile string

    // PropNamingStrategy represents property naming strategy like snakecase,camelcase,pascalcase
    PropNamingStrategy string

    // ParseVendor whether swag should be parse vendor folder
    ParseVendor bool

    // ParseDependencies whether swag should be parse outside dependency folder
    ParseDependency bool

    // MarkdownFilesDir used to find markdownfiles, which can be used for tag descriptions
    MarkdownFilesDir string
}

Config presents Gen configurations.

type Gen Uses

type Gen struct {
    // contains filtered or unexported fields
}

Gen presents a generate tool for swag.

func New Uses

func New() *Gen

New creates a new Gen.

func (*Gen) Build Uses

func (g *Gen) Build(config *Config) error

Build builds swagger json file for given searchDir and mainAPIFile. Returns json

Package gen imports 14 packages (graph) and is imported by 2 packages. Updated 2019-11-04. Refresh now. Tools for package owners.