Versions in this module Expand all Collapse all v1 v1.0.2 May 4, 2020 Changes in this version + const CamelCase + const Name + const PascalCase + const SnakeCase + const Version + var ErrFailedConvertPrimitiveType = errors.New("swag property: failed convert primitive type") + func CheckSchemaType(typeName string) error + func IsGolangPrimitiveType(typeName string) bool + func IsNumericType(typeName string) bool + func IsPrimitiveType(typeName string) bool + func IsSimplePrimitiveType(typeName string) bool + func Printf(format string, v ...interface{}) + func Println(v ...interface{}) + func ReadDoc() (string, error) + func Register(name string, swagger Swagger) + func SetExcludedDirsAndFiles(excludes string) func(*Parser) + func SetMarkdownFileDirectory(directoryPath string) func(*Parser) + func TransToValidCollectionFormat(format string) string + func TransToValidSchemeType(typeName string) string + func TypeDocName(pkgName string, spec *ast.TypeSpec) string + type Operation struct + HTTPMethod string + Path string + func NewOperation() *Operation + func (operation *Operation) ParseAcceptComment(commentLine string) error + func (operation *Operation) ParseComment(comment string, astFile *ast.File) error + func (operation *Operation) ParseDescriptionComment(lineRemainder string) + func (operation *Operation) ParseEmptyResponseComment(commentLine string) error + func (operation *Operation) ParseEmptyResponseOnly(commentLine string) error + func (operation *Operation) ParseMetadata(attribute, lowerAttribute, lineRemainder string) error + func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.File) error + func (operation *Operation) ParseProduceComment(commentLine string) error + func (operation *Operation) ParseResponseComment(commentLine string, astFile *ast.File) error + func (operation *Operation) ParseResponseHeaderComment(commentLine string, astFile *ast.File) error + func (operation *Operation) ParseRouterComment(commentLine string) error + func (operation *Operation) ParseSecurityComment(commentLine string) error + func (operation *Operation) ParseTagsComment(commentLine string) + type Parser struct + CustomPrimitiveTypes map[string]string + ImportAliases map[string]map[string]*ast.ImportSpec + ParseDependency bool + ParseVendor bool + PropNamingStrategy string + TypeDefinitions map[string]map[string]*ast.TypeSpec + func New(options ...func(*Parser)) *Parser + func (parser *Parser) GetSwagger() *spec.Swagger + func (parser *Parser) ParseAPI(searchDir string, mainAPIFile string) error + func (parser *Parser) ParseDefinition(pkgName, typeName string, typeSpec *ast.TypeSpec) error + func (parser *Parser) ParseGeneralAPIInfo(mainAPIFile string) error + func (parser *Parser) ParseRouterAPIInfo(fileName string, astFile *ast.File) error + func (parser *Parser) ParseType(astFile *ast.File) + func (parser *Parser) Skip(path string, f os.FileInfo) error + type Swagger interface + ReadDoc func() string