New Adapter: Adswag - #4597
Conversation
Port of the Go adapter (prebid/prebid-server#4908), authored by the Adswag team. Banner, video, audio; site and app; GVL vendor 1417; consent-gated usersync redirect.
a6c29df to
3eba77e
Compare
|
All five workflows on this PR are currently pending "approve workflows" (first-time contributor), so no checks have run yet. Could a maintainer approve the workflow runs when convenient? The adapter is ready for review. Thanks! |
| if (StringUtils.isBlank(body)) { | ||
| return Result.empty(); | ||
| } |
There was a problem hiding this comment.
No need for this check. Inline body
There was a problem hiding this comment.
Kept this one, with apologies: the Adswag endpoint answers a no-bid on this path as an empty-body HTTP 200 (alongside the conventional 204), and core only substitutes a safe body for 204 (HttpBidderRequester#toHttpCallWithSafeResponseBody), so removing the check would surface every no-bid as a bad_server_response decode error. Happy to drop it if you'd prefer we require 204-only no-bids from the endpoint instead.
There was a problem hiding this comment.
@westerschmal It's safe to remove, because mapper.decodeValue(body, BidResponse.class); will return null and you have
if (bidResponse == null || CollectionUtils.isEmpty(bidResponse.getSeatbid())) {
return Collections.emptyList();
}
- remove explanatory comments and javadoc - drop redundant null check in validateImpExt; unnamed lambda parameter - restructure bid materialization into per-type methods behind a switch expression; iframe markup via text block (output unchanged) - tests: text blocks for markup constants, givenBidRequest/givenImp helper idiom, explanations removed - drop the live-captured fixture and its test; adm passthrough is now covered by a synthetic case The empty-body no-bid check in makeBids is deliberately kept: the endpoint answers no-bid as an empty-body HTTP 200 as well as 204, and core only shields makeBids for 204.
|
Review addressed in 221dfc4 — all points taken, with one exception argued on its thread: the empty-body check in makeBids stays for now because the endpoint answers no-bid as an empty-body HTTP 200 and core only shields 204. Unit tests (22) + the WireMock IT and checkstyle are green locally. |
🔧 Type of changes
✨ What's the context?
Adds the Adswag bid adapter — our own port of the Go adapter (prebid/prebid-server#4908, opened alongside by us, the adapter maintainers). Adswag is directly-integrated European supply: banner, video and audio; site and app; EU-hosted endpoint
https://bid.adswag.ai/prebid/bid; GVL vendor 1417; GPP supported; geoscope EEA.🧠 Rationale behind the change
Same semantics as the Go adapter: per-imp param validation (
publisherIdrequired; invalid imps dropped with a bad-input error, valid ones proceed),imp.extrewritten toimp.ext.adswag.placement_id, publisher id promoted tosite.publisher.id/app.publisher.id, everything else passes through in-band. Response side resolves media type per bid (banner/video/audio), backfills w/h/mtype, defaults currency to EUR, and synthesizes iframe markup only for legacy serve-url-only display bids (current production sends markup inadm).modifying-vast-xml-allowed: false— our ad server owns VAST composition and measurement beacons. Consent-gated usersync redirect onev.adswag.ai(uid only with vendor-1417 + Purpose-1 consent).🔎 New Bid Adapter Checklist
Bidder<BidRequest>via the standard HttpRequest/BidderBid typesAdswagTest(WireMock exchange) + IT fixtures🧪 Test plan
AdswagBidderTest: 21/21 (includes a captured-production-response mapping test; fixture tokens synthetic)AdswagTest: 1/1 (full Spring boot + WireMock)BidderParamValidatorTest25/25 andApplicationTest27/27 (config/schema consistency gates, re-run with the adswag yaml registered){ "publisherId": "prebid-test", "placementId": "prebid-test-display" }(display imps must include 300x250;prebid-test-video/prebid-test-audiofor video/audio)🏎 Quality check
Docs PR (one bidder page, pbs + pbs_app_supported metadata): prebid/prebid.github.io#6702