Update dependencies and replace Newtonsoft.Json with System.Text.Json#9
Merged
tsjdev-apps merged 10 commits intomainfrom Jul 22, 2025
Merged
Update dependencies and replace Newtonsoft.Json with System.Text.Json#9tsjdev-apps merged 10 commits intomainfrom
tsjdev-apps merged 10 commits intomainfrom
Conversation
Upgraded Spectre.Console in the console sample to v0.50.0. Updated test project to target net9.0 and refreshed package versions for xunit, test SDK, and coverlet. Removed GlobalUsings.cs and added explicit Xunit using in test file.
Changed the TargetFramework in the console project from net7.0 to net9.0 to support the latest .NET features and improvements.
Replaced Newtonsoft.Json attributes with System.Text.Json equivalents across all model classes for improved performance and native .NET support. Updated project dependencies and refactored HttpService to use System.Text.Json for deserialization. Also removed the ThreeHours property from Volume and added 2x/4x icon URL properties to WeatherRoot.
Added new language codes (BE, IS, KU, SK, SQ) and reordered some entries in the LanguageCode enum to better reflect supported languages. Removed AL and adjusted placement of SV and NO for consistency.
Changed the GitHub Actions workflow to use .NET 9.0.x instead of 7.0.x for setup. This ensures the CI pipeline uses the latest .NET version.
Enhanced XML documentation comments across models, enums, interfaces, and service classes for better clarity and maintainability. Updated method parameter descriptions, added missing remarks, and improved summary tags. Refactored some code for consistency, fixed typos, and clarified obsolete warnings. No functional changes were made.
Improved test naming for clarity and consistency, added new tests for language and unit options, invalid city and coordinates, and constructor behavior. Refactored existing tests for readability and updated assertions to use correct argument order. These changes enhance coverage and maintainability of the integration tests for OpenWeatherMapService.
Reorganized the OpenWeatherMapSharp.Console Program.cs for clearer structure and readability. Improved variable naming, grouped related logic, enhanced error handling messages, and simplified panel creation for location and weather display.
Updated variable declarations in Program.cs, LongExtensions.cs, and OpenWeatherMapServiceTests.cs to use explicit types and object initializers for improved readability and consistency. No functional changes were made.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgraded Spectre.Console in the console sample to v0.50.0. Updated test project to target net9.0 and refreshed package versions for xunit, test SDK, and coverlet. Removed GlobalUsings.cs and added explicit Xunit using in test file.
This pull request introduces several updates to the OpenWeatherMapSharp project, focusing on upgrading dependencies, improving code clarity, and enhancing functionality. Key changes include transitioning to .NET 9.0, updating package versions, refactoring service interfaces, and replacing
Newtonsoft.JsonwithSystem.Text.Jsonfor serialization. Additionally, theLanguageCodeenum has been expanded to include more supported languages.Framework and Dependency Upgrades:
.github/workflows/dotnet.yml: Updated the .NET version from7.0.xto9.0.xfor CI workflows.samples/OpenWeatherMapSharp.Console/OpenWeatherMapSharp.Console.csproj: Upgraded the target framework tonet9.0and updated theSpectre.Consolepackage from version0.47.0to0.50.0.Code Enhancements:
samples/OpenWeatherMapSharp.Console/Program.cs: Refactored the console application to improve readability and maintainability, including better error handling, structured sections, and enhanced UI formatting for weather data.src/OpenWeatherMapSharp/IOpenWeatherMapService.cs: Improved documentation for service methods and updated parameter descriptions for clarity. Deprecated methods now include updated warnings about maintenance status.Serialization Refactor:
Newtonsoft.JsonwithSystem.Text.Jsonacross multiple model files for serialization:src/OpenWeatherMapSharp/Models/City.cs: Updated property attributes to use[JsonPropertyName]and improved property descriptions.src/OpenWeatherMapSharp/Models/Clouds.cs: Transitioned to[JsonPropertyName]and clarified the cloudiness percentage description.src/OpenWeatherMapSharp/Models/Coordinates.cs: Updated attributes to[JsonPropertyName]and refined coordinate descriptions.Enum Expansion:
src/OpenWeatherMapSharp/Models/Enums/LanguageCode.cs: Expanded theLanguageCodeenum to include additional supported languages, aligning with OpenWeatherMap API specifications. Each language now includes detailed documentation.