code: func GenerateAllClasses(apiDef *raml.APIDefinition, dir string, capnp bool) ([]string, error) {
  	// array of tip that need to be generated in the end of this
  	// process. because it needs other object to be registered first
  	delayedMI := []string{} // delayed multiple inheritance
  	template := "./templates/python/class_python.tmpl"
  	templateName := "class_python"
  
  	names := []string{}
  	for name, t := range types.AllTypes(apiDef, "") {
  		var errGen error
  		var results []string
  		switch tip := t.Type.(type) {
  		case string:
  			rt := raml.Type{
  				Type: tip,
  			}
  			if rt.IsMultipleInheritance() {
  				delayedMI = append(delayedMI, tip)
  			}
  		case types.TypeInBody:
  			newTipName := types.PascalCaseTypeName(tip)
  			pc := newClass(apiDef, raml.Type{Type: "object"}, newTipName, "", tip.Properties, capnp)
  			results, errGen = pc.generate(dir, template, templateName)
  		case raml.Type:
  			if name == "UUID" {
  				continue
  			}
  			pc := newClassFromType(apiDef, tip, name, capnp)
  			results, errGen = pc.generate(dir, template, templateName)
  		}
  
  		if errGen != nil {
  			return names, errGen
  		}
  		names = append(names, results...)
  	}
  
  	for _, tip := range delayedMI {
  		rt := raml.Type{
  			Type: tip,
  		}
  		if parents, isMult := rt.MultipleInheritance(); isMult {
  			pc := newClassFromType(apiDef, rt, strings.Join(parents, ""), capnp)
  			results, err := pc.generate(dir, template, templateName)
  			if err != nil {
  				return names, err
  			}
  			names = append(names, results...)
  		}
  
  	}
  	return names, nil
  
  }
docs: // generate all python classes from a RAML document