New adapter: HypeLab#4488
Conversation
|
Thanks for the feedback, I made an update based off of your review @CTMBNara |
| return Result.of(Collections.singletonList(BidderUtil.defaultRequest(outgoingRequest, headers(), endpointUrl, | ||
| mapper)), | ||
| errors); |
There was a problem hiding this comment.
return Result.of(
Collections.singletonList(BidderUtil.defaultRequest(
outgoingRequest,
headers(),
endpointUrl,
mapper)),
errors);
| if (imp.getExt() == null) { | ||
| throw new PreBidException("imp %s: unable to unmarshal ext".formatted(imp.getId())); | ||
| } |
There was a problem hiding this comment.
imp.ext can't be null here. Remove this check
| try { | ||
| final ExtPrebid<?, ExtImpHypeLab> extPrebid = | ||
| mapper.mapper().convertValue(imp.getExt(), HYPELAB_EXT_TYPE_REFERENCE); | ||
| extImp = extPrebid != null ? extPrebid.getBidder() : null; |
There was a problem hiding this comment.
imp.ext.prebid can't be null here
| if (extImp == null) { | ||
| throw new PreBidException("imp %s: unable to unmarshal ext.bidder".formatted(imp.getId())); | ||
| } |
| return mapper.fillExtension(outgoingExt, Map.of( | ||
| "source", SOURCE, | ||
| "provider_version", PROVIDER_VERSION_PREFIX + pbsVersion())); |
There was a problem hiding this comment.
Here you can add properties as usual. I asked you to use mapper.fillExtension for ext.getProperties() so it will make a deep copy
| } | ||
|
|
||
| final Map<String, Imp> impIdToImp = request.getImp().stream() | ||
| .collect(Collectors.toMap(Imp::getId, imp -> imp)); |
There was a problem hiding this comment.
imp -> imp -> Function.identity()
| mediaTypeCount++; | ||
| } | ||
|
|
||
| return mediaTypeCount == 1 ? Optional.of(bidType) : Optional.empty(); |
There was a problem hiding this comment.
Optional.of -> Optional.ofNullable
|
Thanks for helping me work through this @CTMBNara. I pushed a patch for your requested changes. |
|
@Minebomber currently, PBS is on hold for adapter merges. The main focus is the next major update, 4.0, which should be finished by the end of Q2. Once that is done, we should be unblocked for merging other PRs. Sorry for the inconvenience. |
🔧 Type of changes
✨ What's the context?
This PR adds the HypeLab bid adapter to Prebid Server Java.
The adapter supports site banner, native, and video inventory. It accepts
property_slugandplacement_slugbidder params, forwards eligible OpenRTB 2.6 requests to HypeLab, adds HypeLab display manager metadata, and maps HypeLab bid responses back into Prebid bid types.🧠 Rationale behind the change
HypeLab needs a dedicated adapter because the request is not just a raw OpenRTB pass-through. The adapter validates required bidder params, sets
tagidfromplacement_slug, preserves the HypeLab bidder ext, adds provider metadata, and resolves response bid type frommtype,ext.hypelab.creative_type, VAST markup, or the original impression media type.🔎 New Bid Adapter Checklist
🧪 Test plan
How do you know the changes are safe to ship to production?
/openrtb2/auctionpath and HypeLab adapter configuration../mvnw -Dtest=HypeLabBidderTest testsuccessfully.HypeLabBidder: 96% instruction coverage and 97% line coverage.🏎 Quality check