New adapter: HypeLab#4488
Open
Minebomber wants to merge 2 commits into
Open
Conversation
CTMBNara
requested changes
May 13, 2026
Author
|
Thanks for the feedback, I made an update based off of your review @CTMBNara |
CTMBNara
requested changes
May 19, 2026
Comment on lines
+80
to
+82
| return Result.of(Collections.singletonList(BidderUtil.defaultRequest(outgoingRequest, headers(), endpointUrl, | ||
| mapper)), | ||
| errors); |
Collaborator
There was a problem hiding this comment.
return Result.of(
Collections.singletonList(BidderUtil.defaultRequest(
outgoingRequest,
headers(),
endpointUrl,
mapper)),
errors);
Comment on lines
+97
to
+99
| if (imp.getExt() == null) { | ||
| throw new PreBidException("imp %s: unable to unmarshal ext".formatted(imp.getId())); | ||
| } |
Collaborator
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; |
Collaborator
There was a problem hiding this comment.
imp.ext.prebid can't be null here
Comment on lines
+110
to
+112
| if (extImp == null) { | ||
| throw new PreBidException("imp %s: unable to unmarshal ext.bidder".formatted(imp.getId())); | ||
| } |
Comment on lines
+127
to
+129
| return mapper.fillExtension(outgoingExt, Map.of( | ||
| "source", SOURCE, | ||
| "provider_version", PROVIDER_VERSION_PREFIX + pbsVersion())); |
Collaborator
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)); |
Collaborator
There was a problem hiding this comment.
imp -> imp -> Function.identity()
| mediaTypeCount++; | ||
| } | ||
|
|
||
| return mediaTypeCount == 1 ? Optional.of(bidType) : Optional.empty(); |
Collaborator
There was a problem hiding this comment.
Optional.of -> Optional.ofNullable
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.
🔧 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