Speed up doc generation by avoiding repeated python language import
Fixes
@@ -160,10 +160,12 @@ func (d DocLanguageHelper) GetResourceFunctionResultName(modName string, f *sche
// GenPropertyCaseMap generates the case maps for a property.
func (d DocLanguageHelper) GenPropertyCaseMap(pkg *schema.Package, modName, tool string, prop *schema.Property, snakeCaseToCamelCase, camelCaseToSnakeCase map[string]string, seenTypes codegen.Set) {
+ if _, imported := pkg.Language["python"]; !imported {
if err := pkg.ImportLanguages(map[string]schema.Language{"python": Importer}); err != nil {
fmt.Printf("error building case map for %q in module %q", prop.Name, modName)
return
}
+ }
recordProperty(prop, snakeCaseToCamelCase, camelCaseToSnakeCase, seenTypes)
}
