Port Floxis: New Adapter#4529
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8763dcd to
86a34b6
Compare
…sistency seat lacked the explicit @JsonProperty that region and partner carry; add it so all three params are annotated uniformly (no behavioural change — seat already maps to the 'seat' key).
…tner are subdomain labels) Per the dev-guide, a bidder endpoint domain must not be fully variable. Move the fixed .floxis.tech suffix into the bidder-config endpoint and have resolveBidHost return just the validated region/partner subdomain label. Resolved URLs are unchanged (e.g. https://us-e.floxis.tech/pbs); matches the fixed-suffix pattern of merged region-routed adapters (rubicon, clydo, mediago, algorix).
Drop redundant in-adapter validation covered elsewhere: the empty-imp guard (framework guarantees at least one imp), the region/partner DNS-label regex (already enforced by floxis.json), and the custom isBlank helper (use StringUtils.isBlank). Restructure makeHttpRequests to parse the first imp ext then validate the rest in a loop; extract extractBids and countFormats helpers; URL-encode the dynamic host parts; drop redundant @JsonProperty on ExtImpFloxis and one-line @propertysource; remove explanatory comments. Tests updated to match.
|
Thanks for the thorough review @CTMBNara — all of it is addressed in 21d1900: dropped the redundant empty-imp check, the in-code DNS regex (floxis.json already covers it) and the custom isBlank helper; reworked makeHttpRequests into the parse-first/validate-the-rest shape; extracted extractBids and countFormats; url-encoded the host parts; and cleared out the comments. Also synced the PR description with the final code. Ready for another look whenever you have a moment. |
|
Hi @CTMBNara — thanks for the thorough review. I've applied all of the feedback in the latest commit:
I've replied inline on each thread. Whenever you have a moment, could you take another pass? Happy to adjust anything further — thanks again for your time. |
|
Documentation PR (per the add-new-bidder checklist): prebid/prebid.github.io#6596 — already approved by @muuki88; it sets @CTMBNara re-review is requested since 21d1900 addressed all of your feedback — and one note: the CI workflows on that commit (Java CI / functional tests / CodeQL / Trivy) are awaiting first-time-contributor approval, so they haven't run yet. Could you approve the runs when you pick this back up? |
🔧 Type of changes
✨ Whats the context?
This PR ports the Floxis bid adapter from PBS-Go to PBS-Java. Floxis is an ad exchange; the adapter sends standard OpenRTB 2.x server-to-server bid requests to the Floxis exchange so PBS publishers can access Floxis demand. It is the Java counterpart of the in-review Go adapter prebid/prebid-server#4811.
Scope:
appandsite).modifying-vast-xml-allowed: false.🧠 Rationale behind the change
Bidder params (
imp[].ext.prebid.bidder.floxis):seat(string, required, minLength 1) — the Floxis seat the publisher buys through; appended url-escaped to the endpoint as?seat=.region(string, optional, defaultus-e) — the regional RTB host, used as a subdomain label. Validated as a DNS label by the params JSON schema.partner(string, optional, defaultfloxis) — white-label partner, used as an additional subdomain label. Validated as a DNS label by the params JSON schema.Endpoint routing: the fixed parent domain (
.floxis.tech) is pinned in the adapter's endpoint config; only the{{Host}}subdomain is filled from the request. The subdomain isregion(e.g.us-e.floxis.tech), orpartner-regionfor a named white-label partner (e.g.acme-us-e.floxis.tech); the defaultfloxispartner adds no prefix.region/partnerare constrained to DNS labels by the params schema and url-encoded before interpolation, so the host can never be derived from a request-supplied hostname — satisfying the "no fully dynamic hostnames" requirement.seat/region/partnerare read from the first imp; a multi-imp request that mixes seats/regions/partners is rejected as bad input (one request routes to one host). The request body is forwarded unchanged (no caller-owned object is mutated).Bid type resolution treats
bid.mtype(OpenRTB 2.6) as authoritative (1/2/3/4 → banner/video/audio/native). Whenmtypeis absent, a single-format imp resolves to that media type; an imp without exactly one format cannot be disambiguated and surfaces abadServerResponse, while other bids in the response continue to be processed.gvlVendorIDis set to1609— Floxis (legal entity Ad Tech Company OÜ) is registered as an IAB TCF vendor with GVL ID 1609, so EU/TCF consent is enforced against that vendor ID.🔎 New Bid Adapter Checklist
🧪 Test plan
FloxisBidderTest— unit tests covering region/partner host resolution (default, explicit region, partner-prefixed host), url-encoding of the seat and the host parts, request-forwarded-unchanged, the per-imp consistency check, and the fullgetMediaTypeForBidmatrix (mtype-authoritative for all four types, unsupported mtype, single-format fallback for all four, the non-single-format error, imp-not-found), plus per-bid error accumulation. JaCoCo reports ~100% line coverage onFloxisBidder.FloxisTestintegration test — exercises the full auction path against WireMock and validates the adapter configuration is reachable.mvn test(unit + IT) andmvn checkstyle:checkpass locally.🏎 Quality check
Companion Go adapter: prebid/prebid-server#4811. The corresponding
prebid.github.iodocumentation PR: prebid/prebid.github.io#6596 (approved).Please add the
do not portlabel per the porting guide (I do not have label permissions on this repo).