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 committed Jul 6, 2023
1 parent 58a0865 commit 386b07f
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 386b07f

Please sign in to comment.