Skip to content

Commit

Permalink
Correct (de)serialization of iterable int
Browse files Browse the repository at this point in the history
  • Loading branch information
joanne-ter-maat committed Sep 25, 2024
1 parent fbe5927 commit 76a51bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Kiota.Builder/Writers/Dart/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ private string GetDeserializationMethodName(CodeTypeBase propType, CodeMethod me
}
return propertyType switch
{
"Iterable<int>" => "getCollectionOfPrimitiveValues<int>()",
"UuidValue" => "getGuidValue()",
"byte[]" => "getByteArrayValue()",
_ when conventions.IsPrimitiveType(propertyType) => $"get{propertyType.TrimEnd(DartConventionService.NullableMarker).ToFirstCharacterUpperCase()}Value()",
Expand Down Expand Up @@ -735,6 +736,7 @@ private string GetSerializationMethodName(CodeTypeBase propType, CodeMethod meth
{
"byte[]" => "writeByteArrayValue",
"String" => "writeStringValue",
"Iterable<int>" => "writeCollectionOfPrimitiveValues<int>",
_ when conventions.IsPrimitiveType(propertyType) => $"write{propertyType.TrimEnd(DartConventionService.NullableMarker).ToFirstCharacterUpperCase()}Value",
_ => $"writeObjectValue<{propertyType.ToFirstCharacterUpperCase()}{(includeNullableRef ? "?" : "")}>",
};
Expand Down

0 comments on commit 76a51bd

Please sign in to comment.