Java SDK调用On-Demand Flight Status API时Gate字段异常问题及功能优化建议
Hey folks,
I’ve run into a frustrating issue while using the Java SDK to call the On-Demand Flight Status API, plus I have a couple of feature tweaks that would make the tool even more useful—here’s the breakdown:
SDK Error: Gate Parameter Mismatch
When specifying the Gate parameter in my request, I’m getting this exception:
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $[0].flightPoints[0].departure.gate
From the API documentation, the gate field is supposed to be a JSONObject that includes the mainGate property. But it looks like the Java SDK is incorrectly encoding this field as a JSONArray instead. I’m trying to rule out if this is a mistake in my implementation, or if there’s an inconsistency in the SDK itself—any insights here would be really appreciated!
Feature Enhancement Suggestions
- When searching with a code-share flight number, could the
segments.partnershipfield return the actual operating carrier’s flight number? Right now, if I search for A37136, it returns OA0 instead of the correct OA136. - Could the
segments.partnershipfield be updated to return all code-share flight numbers linked to a given flight, rather than just a single entry? - I’d love to see a way to access fare rule details directly from Flight Offers. I know displaying city-pair fares is part of the Enterprise API (which I might not have access to), but being able to pull travel and sales restriction data like this would be a game-changer:
VALID FOR TRAVEL COMMENCING ON/AFTER 20SEP 21 AND ON/BEFORE 10MAR 22. TICKETS MUST BE ISSUED ON/BEFORE 29SEP 21.
As always, thanks a ton for the hard work you put into these tools!
内容的提问来源于stack exchange,提问作者Offworld99

