Skip to content

Commit

Permalink
Fix request build using wrong path parameter name
Browse files Browse the repository at this point in the history
The name used for the URL template needs to match the serialized name of the custom parameter.
  • Loading branch information
ricardoboss committed Jan 8, 2025
1 parent 4f64689 commit 8e81020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Writers/Dart/DartConventionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal void AddRequestBuilderBody(CodeClass parentClass, string returnType, La
urlTplRef = TempDictionaryVarName;
writer.WriteLine($"var {urlTplRef} = Map.of({pathParametersProp.Name.ToFirstCharacterLowerCase()});");
foreach (var param in customParameters)
writer.WriteLine($"{urlTplRef}.putIfAbsent('{param.Name.ToFirstCharacterLowerCase()}', ()=> {param.Name.ToFirstCharacterLowerCase()});");
writer.WriteLine($"{urlTplRef}.putIfAbsent('{param.SerializationName}', () => {param.Name.ToFirstCharacterLowerCase()});");
}
writer.WriteLine($"{prefix}{returnType}({urlTplRef}, {requestAdapterProp.Name.ToFirstCharacterLowerCase()}{pathParametersSuffix});");
}
Expand Down

0 comments on commit 8e81020

Please sign in to comment.