Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(config Config, svcConfig ServiceConfig) error
Types ¶
type Config ¶
type Config struct {
// SearchDir the swag would be parse
SearchDir string
// excludes dirs and files in SearchDir,comma separated
Excludes string
//OutputFlag represents whether output swagger.json file to local directory
OutputFlag bool
// 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
// ParseInternal whether swag should parse internal packages
ParseInternal bool
// MarkdownFilesDir used to find markdownfiles, which can be used for tag descriptions
MarkdownFilesDir string
// GeneratedTime whether swag should generate the timestamp at the top of docs.go
GeneratedTime bool
// CodeExampleFilesDir used to find code example files, which can be used for x-codeSamples
CodeExampleFilesDir string
// ParseDepth dependency parse depth
ParseDepth int
}
func DefaultConfig ¶
func DefaultConfig() Config
type ServiceConfig ¶
type ServiceConfig struct {
// SwaggerService represents remote swagger service
SwaggerService string
// APIPath
APIPath string
// ServiceName is the service name, used for app_name
ServiceName string
// Release is the service release
Release string
// Contributors is Contributors of the service
Contributors []string
}
Click to show internal directories.
Click to hide internal directories.