fix: ESG query-string binding and EntityRisk CountryOfIncorporation casing#1
Merged
Merged
Conversation
…asing
Cross-repo audit of all SDK methods against the live QubitOn API
surfaced two issues. Same drift surface as the SAP, Oracle, Go, and
Node SDK PRs.
1. lookupESGScore (Esg.ESGRequest)
country and domain are bound on the server as [FromQuery] on
ESGController, not body. Java SDK was sending them in the JSON
body where they were silently dropped, causing scoring to default
to global / no-domain results.
Fix: marked the country and domain fields with @JsonIgnore so
Jackson omits them from the marshalled body, and added an esgPath
helper that serialises them into the URL query string with
URLEncoder + StandardCharsets.UTF_8.
2. EntityRiskRequest.countryOfIncorporation (Risk.java)
The canonical API DTO pins this property as PascalCase via
[JsonPropertyName("CountryOfIncorporation")] which overrides the
global camelCase naming policy. The server is case-sensitive here,
so the lowercase camelCase wire name was silently dropped on
deserialisation -- the country was never associated with the
request. Java SDK was tagging the field as
@JsonProperty("countryOfIncorporation") (camelCase). Changed to
@JsonProperty("CountryOfIncorporation") (PascalCase) and added a
comment explaining the trap so a future "consistency cleanup"
doesn't revert it.
Public Java method signatures and getter/setter names are unchanged
(setter is still setCountryOfIncorporation, builder method is still
.countryOfIncorporation(...)). Only the wire JSON key changes.
Audit findings outside this PR
-------------------------------
Spot-checked the other drift candidates -- all clean:
- TaxRequest: identityNumber/identityNumberType/country/entityName ✅
- TaxFormatRequest: identityNumber/identityNumberType/countryIso2 ✅
- BusinessRegistrationRequest: entityName ✅
Tests
-----
mvn -B test passes (no failures).
This was referenced May 6, 2026
Merged
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.
Summary
Cross-repo audit of all SDK methods against the live QubitOn API surfaced 2 issues in the Java SDK. Same drift surface as the SAP, Oracle, Go, and Node connector PRs:
Fixes (2)
Public Java method signatures and getter/setter/builder names are unchanged (`setCountryOfIncorporation`, `.countryOfIncorporation(...)`, `getCountry()`, `getDomain()`, etc.). Only the wire JSON keys change.
Backwards compatibility
Audit findings outside this PR
Spot-checked the other drift candidates — all clean:
The Java SDK previously had three of the four common drift traps already correct — only the ESG query-binding and the `CountryOfIncorporation` PascalCase override were missed.
Test plan
Diff
`+40 / -5` across `Esg.java`, `Risk.java`, and `QubitOnClient.java`.