Skip to content

Commit

Permalink
Update Job.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet authored Oct 11, 2023
1 parent d08c05a commit f324425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MlCli/JobApiCall/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public static string GetTargetFileName(bool isDefaultTargetFileMode, string curr
if (_fileLoader.FileExists(settingsPath))
{
var settingsContent = await _fileLoader.ReadAllTextInFileAsync(settingsPath);
_logger.LogInformation(settingsContent);
try
{
var callApiSettings = JsonSerializer.Deserialize<CallApiSettings>(settingsContent,

Check warning on line 225 in src/MlCli/JobApiCall/Job.cs

View workflow job for this annotation

GitHub Actions / release

Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String, JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.

Check warning on line 225 in src/MlCli/JobApiCall/Job.cs

View workflow job for this annotation

GitHub Actions / release

Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String, JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.
Expand Down Expand Up @@ -285,4 +286,4 @@ public static string GetTargetFileName(bool isDefaultTargetFileMode, string curr
};
return httpResult;
}
}
}

0 comments on commit f324425

Please sign in to comment.