Skip to content

Conversation

@tsjdev-apps
Copy link
Owner

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.Json with System.Text.Json for serialization. Additionally, the LanguageCode enum has been expanded to include more supported languages.

Framework and Dependency Upgrades:

Code Enhancements:

Serialization Refactor:

Enum Expansion:

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.
@tsjdev-apps tsjdev-apps merged commit 5450f7c into main Jul 22, 2025
1 check passed
@tsjdev-apps tsjdev-apps deleted the feature/newtonsoft-json-replacement branch July 22, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants