Skip to content

New Adapter: BidWave#4523

Open
eng-bidwave wants to merge 1 commit into
prebid:masterfrom
bidwave-net:bidwave-adapter
Open

New Adapter: BidWave#4523
eng-bidwave wants to merge 1 commit into
prebid:masterfrom
bidwave-net:bidwave-adapter

Conversation

@eng-bidwave

@eng-bidwave eng-bidwave commented Jun 1, 2026

Copy link
Copy Markdown

Type of changes

  • new bid adapter

What's the context?

Adds the BidWave bidder adapter to Prebid Server Java.

Rationale behind the change

Enable publishers to access BidWave demand through Prebid Server.

A dedicated adapter is used because BidWave requires publisher ID handling and USD bid-floor normalization before forwarding requests.

New Bid Adapter Checklist

  • verify email contact works
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter
  • cover an adapter configuration with an integration test

Test plan

  • ./mvnw -pl . -Dtest=org.prebid.server.bidder.bidwave.BidwaveBidderTest,org.prebid.server.it.BidwaveTest test
  • git diff --check

Quality check

  • Are your changes following the code style guidelines?
  • Are there any breaking changes in your code? No.
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes? No.

Other info

@eng-bidwave eng-bidwave changed the title Add BidWave bidder adapter New Adapter: BidWave Jun 1, 2026
private static final String BIDWAVE_EXT = "bidwave";
private static final String PUBLISHER_ID_EXT = "pid";
private static final String BIDDER_CURRENCY = "USD";
private static final List<String> DEFAULT_CURRENCY = List.of(BIDDER_CURRENCY);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List.of -> Collections.singletonList

.formatted(imp.getId(), e.getMessage()));
}

final String publisherId = extImpBidwave != null ? extImpBidwave.getPublisherId() : null;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extImpBidwave can't be null

private ExtRequest createRequestExt(ExtRequest requestExt, String publisherId) {
final ExtRequest updatedExt = ExtRequest.of(requestExt != null ? requestExt.getPrebid() : null);
if (requestExt != null) {
updatedExt.addProperties(requestExt.getProperties());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapper.fillExtension(updatedExt, requestExt)


private static List<BidderBid> extractBids(BidRequest bidRequest, BidResponse bidResponse,
List<BidderError> errors) {
if (bidResponse == null || CollectionUtils.isEmpty(bidResponse.getSeatbid())) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    private static List<BidderBid> extractBids(BidRequest bidRequest,
                                               BidResponse bidResponse,
                                               List<BidderError> errors) {

        if (bidResponse == null || CollectionUtils.isEmpty(bidResponse.getSeatbid())) {

Comment on lines +184 to +186
private static BidderBid makeBidderBid(Bid bid, Map<String, Imp> impsById, String currency,
List<BidderError> errors) {
final BidType bidType;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    private static BidderBid makeBidderBid(Bid bid, 
                                           Map<String, Imp> impsById, 
                                           String currency,
                                           List<BidderError> errors) {

        final BidType bidType;

}

@Test
public void makeHttpRequestsShouldSetBidwaveExtDefaultCurrencyAndPreserveDeviceGeo()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split to multiple tests

}

@Test
public void makeHttpRequestsShouldGroupImpsByPublisherIdAndNormalizeCurrency() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check currency logic in separate test

throws IOException {
// given
final BidRequest bidRequest = givenBidRequest(
givenImp(imp -> imp.id("imp-1").banner(givenBanner()).ext(givenImpExt(PUBLISHER_ID))));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to specify banner/video/etc in makeHttpRequests since you don't utilise it

Comment on lines +111 to +114
assertThat(result.getValue().get(0).getPayload().getImp()).containsExactly(firstImp, thirdImp);
assertThat(result.getValue().get(0).getPayload().getExt().getProperty("bidwave").get("pid").asText())
.isEqualTo(PUBLISHER_ID);
assertThat(result.getValue().get(0).getPayload().getCur()).containsExactly("USD");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertThat(result.getValue().get(0).getPayload())
      .satisfies(payload -> {
               assertThat(payload.getImp()).containsExactly(...);
               ...
      })

Comment on lines +115 to +118
assertThat(result.getValue().get(1).getPayload().getImp()).containsExactly(secondImp);
assertThat(result.getValue().get(1).getPayload().getExt().getProperty("bidwave").get("pid").asText())
.isEqualTo(OTHER_PUBLISHER_ID);
assertThat(result.getValue().get(1).getPayload().getCur()).containsExactly("USD");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants