Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the RootResponse class by adding proper null-safety, introducing a dedicated RootResponseLinks class, and updating test data to match current Horizon API responses. The changes enforce that always-present properties are marked as required, improving type safety and preventing null reference issues.
Key Changes:
- Introduced
requiredmodifier to all always-present properties inRootResponse - Created a new
RootResponseLinksclass to properly model the_linkssection - Updated test data to reflect current Horizon API structure
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
StellarDotnetSdk/Responses/RootResponseLinks.cs |
New class modeling the _links section with strongly-typed link properties |
StellarDotnetSdk/Responses/RootResponse.cs |
Added required modifiers, XML documentation, new Links property, and removed nullable disable directive |
StellarDotnetSdk.Tests/TestData/Responses/root.json |
Updated test data with current Horizon API structure and protocol versions |
StellarDotnetSdk.Tests/Responses/RootDeserializerTest.cs |
Expanded test assertions to validate all properties including the new Links property |
Contributor
|
bugbot run |
ab49bea to
f1568a0
Compare
jopmiddelkamp
requested changes
Dec 4, 2025
jopmiddelkamp
approved these changes
Dec 8, 2025
jopmiddelkamp
requested changes
Dec 8, 2025
jopmiddelkamp
approved these changes
Dec 8, 2025
ea56c2d to
0e33c14
Compare
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.
Types of changes
RootResponseclass #93requiredmodifier to always-present propertiesNote
Introduce
RootResponseLinksand makeRootResponseinclude required properties and new fields aligned with Horizon 24.x; update tests and JSON fixture accordingly.StellarDotnetSdk/Responses/RootResponse.cs:sealed; add requiredLinksproperty and mark always-present fields asrequired.history_latest_ledger_closed_atandsupported_protocol_versionproperties.StellarDotnetSdk/Responses/RootResponseLinks.csdefining typed_linksforaccount,accounts,account_transactions,assets,claimable_balances,effects,fee_stats,friendbot,ledger,ledgers,liquidity_pools,offer,offers,operation,operations,order_book,payments,self,strict_receive_paths,strict_send_paths,trade_aggregations,trades,transaction,transactions.StellarDotnetSdk.Tests/TestData/Responses/root.jsonto Horizon/Core 24.x and testnet URLs; include new fields.StellarDotnetSdk.Tests/Responses/RootDeserializerTest.csto assert new properties and all link hrefs.Written by Cursor Bugbot for commit 473d54c. Configure here.