Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update org.stellar.sdk.responses, add missing fields. #570

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

overcat
Copy link
Member

@overcat overcat commented Jan 31, 2024

This PR updates org.stellar.sdk.responses to add missing fields and adjusts the order of some fields to correspond with the order in stellar/go, making it easier for future maintenance.

@overcat
Copy link
Member Author

overcat commented Mar 1, 2024

Hi @sreuland @tamirms, could you add an approving review?

@SerializedName("num_archived_contracts")
int numArchivedContracts;

// TODO: remove the above fields when Horizon 3.0 is released.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what 3.0 will look like, maybe can remove this, tackle it later when it's known?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that relevant comment has been added in stellar/go. But we can remove this TODO first, and then remove it here after horizon confirms its removal.

@SerializedName("core_supported_protocol_version")
int coreSupportedProtocolVersion;

@SerializedName("_links")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consideration, Links stands on it's own, could be worth pulling up to it's own class file rather than static under RootResponse.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many Response models have their own Links, and I think it's easier to maintain them by putting them together, just like what we did in stellar/go: https://github.com/stellar/go/blob/master/protocols/horizon/main.go#L225-L231

Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice work!

@overcat overcat merged commit a96f517 into lightsail-network:master Mar 4, 2024
6 checks passed
@overcat overcat deleted the update-models branch March 4, 2024 03:03
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