-
Notifications
You must be signed in to change notification settings - Fork 159
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
Update org.stellar.sdk.responses
, add missing fields.
#570
Conversation
ab47471
to
a84f757
Compare
@SerializedName("num_archived_contracts") | ||
int numArchivedContracts; | ||
|
||
// TODO: remove the above fields when Horizon 3.0 is released. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, nice work!
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.