Skip to content

Commit

Permalink
Fix generation of imports for error mapping
Browse files Browse the repository at this point in the history
Both import and location of usage must use toFirstCharacterUpperCase() to match.
  • Loading branch information
papegaaij authored and baywet committed Jul 10, 2023
1 parent aedd1b2 commit f430352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ private void WriteRequestExecutorBody(CodeMethod codeElement, RequestParams requ
writer.StartBlock($"{errorMappingVarName}: Dict[str, ParsableFactory] = {{");
foreach (var errorMapping in codeElement.ErrorMappings)
{
writer.WriteLine($"\"{errorMapping.Key.ToUpperInvariant()}\": {errorMapping.Value.Name},");
writer.WriteLine($"\"{errorMapping.Key.ToUpperInvariant()}\": {errorMapping.Value.Name.ToFirstCharacterUpperCase()},");
}
writer.CloseBlock();
}
Expand Down

0 comments on commit f430352

Please sign in to comment.