code: func (parser *Parser) ParseDefinition(pkgName, typeName string, typeSpec *ast.TypeSpec) error {
  	refTypeName := fullTypeName(pkgName, typeName)
  	if _, isParsed := parser.swagger.Definitions[refTypeName]; isParsed {
  		Println("Skipping '" + refTypeName + "', already parsed.")
  		return nil
  	}
  
  	if parser.isInStructStack(refTypeName) {
  		Println("Skipping '" + refTypeName + "', recursion detected.")
  		return nil
  	}
  	parser.structStack = append(parser.structStack, refTypeName)
  
  	Println("Generating " + refTypeName)
  
  	schema, err := parser.parseTypeExpr(pkgName, typeName, typeSpec.Type)
  	if err != nil {
  		return err
  	}
  	parser.swagger.Definitions[refTypeName] = schema
  	return nil
  }
docs: // ParseDefinition parses given type spec that corresponds to the type under
  // given name and package, and populates swagger schema definitions registry
  // with a schema for the given type