Improved handling of FinishReason to avoid deserialization errors when Google introduces new values
#98
Annotations
10 warnings
|
Build:
src/GenerativeAI/Types/Batch/BatchJobResponseConverter.cs#L84
In externally visible method 'void BatchJobResponseConverter.Write(Utf8JsonWriter writer, BatchJobResponse value, JsonSerializerOptions options)', validate parameter 'value' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
|
Build:
src/GenerativeAI/Types/Converters/LenientFinishReasonConverter.cs#L43
In externally visible method 'void LenientFinishReasonConverter.Write(Utf8JsonWriter writer, FinishReason value, JsonSerializerOptions options)', validate parameter 'writer' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
|
Build:
src/GenerativeAI/Types/Jobs/JobStateConverter.cs#L29
'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'GenerativeAI.Types.JobStateConverter.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)
|
|
Build:
src/GenerativeAI/Types/Jobs/JobStateConverter.cs#L27
The behavior of 'string.StartsWith(string)' could vary based on the current user's locale settings. Replace this call in 'GenerativeAI.Types.JobStateConverter.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)' with a call to 'string.StartsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)
|
|
Build:
src/GenerativeAI/Types/Jobs/JobStateConverter.cs#L45
In externally visible method 'void JobStateConverter.Write(Utf8JsonWriter writer, JobState value, JsonSerializerOptions options)', validate parameter 'writer' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
|
Build:
src/GenerativeAI/Platforms/GoogleAIPlatformAdapter.cs#L219
In member string GoogleAIPlatformAdapter.GetBaseUrl(bool appendVersion = true, bool appendPublisher = true, bool appendLocation = true, bool appendProject = true), change parameter name appendVersion to appendVesion in order to match the identifier as it has been declared in string IPlatformAdapter.GetBaseUrl(bool appendVesion = true, bool appendPublisher = true, bool appendLocation = true, bool appendProject = true) (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725)
|
|
Build:
src/GenerativeAI/Platforms/VertextPlatformAdapter.cs#L331
In member string VertextPlatformAdapter.GetBaseUrl(bool appendVersion = true, bool appendPublisher = true, bool appendLocation = true, bool appendProject = true), change parameter name appendVersion to appendVesion in order to match the identifier as it has been declared in string IPlatformAdapter.GetBaseUrl(bool appendVesion = true, bool appendPublisher = true, bool appendLocation = true, bool appendProject = true) (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725)
|
|
Build:
src/GenerativeAI/Core/IPlatformAdapter.cs#L109
Parameter 'appendLocation' has no matching param tag in the XML comment for 'IPlatformAdapter.GetFullyQualifiedModelName(string, bool)' (but other parameters do)
|
|
Build:
src/GenerativeAI/Types/Jobs/JobStateConverter.cs#L43
Missing XML comment for publicly visible type or member 'JobStateConverter.Write(Utf8JsonWriter, JobState, JsonSerializerOptions)'
|
|
Build:
src/GenerativeAI/Types/Jobs/JobStateConverter.cs#L13
Missing XML comment for publicly visible type or member 'JobStateConverter.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)'
|
Loading