diff --git a/src/main/java/org/prebid/server/auction/ImpAdjuster.java b/src/main/java/org/prebid/server/auction/ImpAdjuster.java index 32ecff524c5..86e581b06e8 100644 --- a/src/main/java/org/prebid/server/auction/ImpAdjuster.java +++ b/src/main/java/org/prebid/server/auction/ImpAdjuster.java @@ -41,18 +41,17 @@ public Imp adjust(Imp originalImp, String bidder, BidderAliases bidderAliases, L final JsonNode bidderNode = getBidderNode(bidder, bidderAliases, impExtPrebidImp); if (bidderNode == null || bidderNode.isEmpty()) { + removeImpExtPrebidImp(originalImp.getExt()); return originalImp; } - // remove circular references according to the requirements removeExtPrebidBidder(bidderNode); try { final JsonNode originalImpNode = jacksonMapper.mapper().valueToTree(originalImp); final JsonNode mergedImpNode = jsonMerger.merge(bidderNode, originalImpNode); - // clean up merged imp.ext.prebid.imp - removeImpExtPrebidImp(mergedImpNode); + removeImpExtPrebidImp(mergedImpNode.get(IMP_EXT)); final Imp resultImp = jacksonMapper.mapper().convertValue(mergedImpNode, Imp.class); @@ -61,6 +60,7 @@ public Imp adjust(Imp originalImp, String bidder, BidderAliases bidderAliases, L } catch (Exception e) { debugMessages.add("imp.ext.prebid.imp.%s can not be merged into original imp [id=%s], reason: %s" .formatted(bidder, originalImp.getId(), e.getMessage())); + removeImpExtPrebidImp(originalImp.getExt()); return originalImp; } } @@ -90,9 +90,8 @@ private static void removeExtPrebidBidder(JsonNode bidderNode) { .ifPresent(ext -> ext.remove(EXT_PREBID_BIDDER)); } - private static void removeImpExtPrebidImp(JsonNode mergedImpNode) { - Optional.ofNullable(mergedImpNode.get(IMP_EXT)) - .map(extNode -> extNode.get(EXT_PREBID)) + private static void removeImpExtPrebidImp(JsonNode impExt) { + Optional.ofNullable(impExt.get(EXT_PREBID)) .map(ObjectNode.class::cast) .ifPresent(prebid -> prebid.remove(EXT_PREBID_IMP)); } diff --git a/src/main/java/org/prebid/server/bidder/liftoff/model/LiftoffImpressionExt.java b/src/main/java/org/prebid/server/bidder/liftoff/model/LiftoffImpressionExt.java deleted file mode 100644 index 541867ad71a..00000000000 --- a/src/main/java/org/prebid/server/bidder/liftoff/model/LiftoffImpressionExt.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.prebid.server.bidder.liftoff.model; - -import lombok.Builder; -import lombok.Getter; -import org.prebid.server.proto.openrtb.ext.request.ExtImpPrebid; -import org.prebid.server.proto.openrtb.ext.request.liftoff.ExtImpLiftoff; - -@Builder(toBuilder = true) -@Getter -public class LiftoffImpressionExt { - - ExtImpPrebid prebid; - - ExtImpLiftoff bidder; - - ExtImpLiftoff vungle; -} diff --git a/src/main/java/org/prebid/server/bidder/metax/MetaxBidder.java b/src/main/java/org/prebid/server/bidder/metax/MetaxBidder.java new file mode 100644 index 00000000000..08b7aec984e --- /dev/null +++ b/src/main/java/org/prebid/server/bidder/metax/MetaxBidder.java @@ -0,0 +1,158 @@ +package org.prebid.server.bidder.metax; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.iab.openrtb.request.Banner; +import com.iab.openrtb.request.BidRequest; +import com.iab.openrtb.request.Format; +import com.iab.openrtb.request.Imp; +import com.iab.openrtb.response.Bid; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.prebid.server.bidder.Bidder; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderCall; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpRequest; +import org.prebid.server.bidder.model.Result; +import org.prebid.server.exception.PreBidException; +import org.prebid.server.json.DecodeException; +import org.prebid.server.json.JacksonMapper; +import org.prebid.server.proto.openrtb.ext.ExtPrebid; +import org.prebid.server.proto.openrtb.ext.request.metax.ExtImpMetax; +import org.prebid.server.proto.openrtb.ext.response.BidType; +import org.prebid.server.util.BidderUtil; +import org.prebid.server.util.HttpUtil; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +public class MetaxBidder implements Bidder { + + private static final TypeReference> METAX_EXT_TYPE_REFERENCE = + new TypeReference<>() { + }; + private static final String PUBLISHER_ID_MACRO = "{{publisherId}}"; + private static final String AD_UNIT_MACRO = "{{adUnit}}"; + + private final String endpointUrl; + private final JacksonMapper mapper; + + public MetaxBidder(String endpointUrl, JacksonMapper mapper) { + this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); + this.mapper = Objects.requireNonNull(mapper); + } + + @Override + public Result>> makeHttpRequests(BidRequest request) { + final List errors = new ArrayList<>(); + final List> httpRequests = new ArrayList<>(); + + for (Imp imp : request.getImp()) { + try { + final ExtImpMetax extImpMetax = parseImpExt(imp); + httpRequests.add(BidderUtil.defaultRequest(prepareBidRequest(request, imp), + resolveEndpoint(extImpMetax), + mapper)); + } catch (PreBidException e) { + errors.add(BidderError.badInput(e.getMessage())); + } + } + + return Result.of(httpRequests, errors); + } + + private ExtImpMetax parseImpExt(Imp imp) { + try { + return mapper.mapper().convertValue(imp.getExt(), METAX_EXT_TYPE_REFERENCE).getBidder(); + } catch (IllegalArgumentException e) { + throw new PreBidException(e.getMessage()); + } + } + + private static BidRequest prepareBidRequest(BidRequest bidRequest, Imp imp) { + return bidRequest.toBuilder() + .imp(Collections.singletonList(modifyImp(imp))) + .build(); + } + + private static Imp modifyImp(Imp imp) { + final Banner banner = imp.getBanner(); + final Integer width = banner != null ? banner.getW() : null; + final Integer height = banner != null ? banner.getH() : null; + if (width != null && height != null) { + return imp; + } + + final List formats = banner != null ? banner.getFormat() : null; + if (CollectionUtils.isEmpty(formats)) { + return imp; + } + + final Format firstFormat = formats.getFirst(); + return imp.toBuilder() + .banner(banner.toBuilder() + .w(Optional.ofNullable(firstFormat).map(Format::getW).orElse(0)) + .h(Optional.ofNullable(firstFormat).map(Format::getH).orElse(0)) + .build()) + .build(); + } + + private String resolveEndpoint(ExtImpMetax extImpMetax) { + final String publisherIdAsString = Optional.ofNullable(extImpMetax.getPublisherId()) + .map(Object::toString) + .orElse(StringUtils.EMPTY); + final String adUnitAsString = Optional.ofNullable(extImpMetax.getAdUnit()) + .map(Object::toString) + .orElse(StringUtils.EMPTY); + + return endpointUrl + .replace(PUBLISHER_ID_MACRO, publisherIdAsString) + .replace(AD_UNIT_MACRO, adUnitAsString); + } + + @Override + public Result> makeBids(BidderCall httpCall, BidRequest bidRequest) { + try { + final BidResponse bidResponse = mapper.decodeValue(httpCall.getResponse().getBody(), BidResponse.class); + return Result.withValues(extractBids(bidResponse)); + } catch (DecodeException | PreBidException e) { + return Result.withError(BidderError.badServerResponse(e.getMessage())); + } + } + + private static List extractBids(BidResponse bidResponse) { + if (bidResponse == null || CollectionUtils.isEmpty(bidResponse.getSeatbid())) { + return Collections.emptyList(); + } + + return bidResponse.getSeatbid().stream() + .filter(Objects::nonNull) + .map(SeatBid::getBid).filter(Objects::nonNull) + .flatMap(Collection::stream) + .filter(Objects::nonNull) + .map(bid -> BidderBid.of(bid, getBidType(bid), bidResponse.getCur())) + .toList(); + } + + private static BidType getBidType(Bid bid) { + final Integer markupType = bid.getMtype(); + if (markupType == null) { + throw new PreBidException("Missing MType for bid: " + bid.getId()); + } + + return switch (markupType) { + case 1 -> BidType.banner; + case 2 -> BidType.video; + case 3 -> BidType.audio; + case 4 -> BidType.xNative; + default -> throw new PreBidException("Unsupported MType: %s" + .formatted(bid.getImpid())); + }; + } +} diff --git a/src/main/java/org/prebid/server/bidder/rubicon/RubiconBidder.java b/src/main/java/org/prebid/server/bidder/rubicon/RubiconBidder.java index e6f49dd6f43..675d5dd4bd5 100644 --- a/src/main/java/org/prebid/server/bidder/rubicon/RubiconBidder.java +++ b/src/main/java/org/prebid/server/bidder/rubicon/RubiconBidder.java @@ -618,7 +618,7 @@ private BigDecimal convertToXAPICurrency(BigDecimal value, private static BigDecimal resolveBidFloorPrice(Imp imp) { final BigDecimal bidFloor = imp.getBidfloor(); - return BidderUtil.isValidPrice(bidFloor) ? bidFloor : null; + return bidFloor != null && bidFloor.compareTo(BigDecimal.ZERO) >= 0 ? bidFloor : null; } private static String resolveBidFloorCurrency(Imp imp, BidRequest bidRequest, List errors) { diff --git a/src/main/java/org/prebid/server/bidder/liftoff/LiftoffBidder.java b/src/main/java/org/prebid/server/bidder/vungle/VungleBidder.java similarity index 86% rename from src/main/java/org/prebid/server/bidder/liftoff/LiftoffBidder.java rename to src/main/java/org/prebid/server/bidder/vungle/VungleBidder.java index bba94b55f9c..f2c87bc2583 100644 --- a/src/main/java/org/prebid/server/bidder/liftoff/LiftoffBidder.java +++ b/src/main/java/org/prebid/server/bidder/vungle/VungleBidder.java @@ -1,4 +1,4 @@ -package org.prebid.server.bidder.liftoff; +package org.prebid.server.bidder.vungle; import com.fasterxml.jackson.databind.node.ObjectNode; import com.iab.openrtb.request.App; @@ -13,18 +13,18 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.prebid.server.bidder.Bidder; -import org.prebid.server.bidder.liftoff.model.LiftoffImpressionExt; import org.prebid.server.bidder.model.BidderBid; import org.prebid.server.bidder.model.BidderCall; import org.prebid.server.bidder.model.BidderError; import org.prebid.server.bidder.model.HttpRequest; import org.prebid.server.bidder.model.Price; import org.prebid.server.bidder.model.Result; +import org.prebid.server.bidder.vungle.model.VungleImpressionExt; import org.prebid.server.currency.CurrencyConversionService; import org.prebid.server.exception.PreBidException; import org.prebid.server.json.DecodeException; import org.prebid.server.json.JacksonMapper; -import org.prebid.server.proto.openrtb.ext.request.liftoff.ExtImpLiftoff; +import org.prebid.server.proto.openrtb.ext.request.vungle.ExtImpVungle; import org.prebid.server.proto.openrtb.ext.response.BidType; import org.prebid.server.util.BidderUtil; import org.prebid.server.util.HttpUtil; @@ -37,7 +37,7 @@ import java.util.List; import java.util.Objects; -public class LiftoffBidder implements Bidder { +public class VungleBidder implements Bidder { private static final String BIDDER_CURRENCY = "USD"; private static final String X_OPENRTB_VERSION = "2.5"; @@ -46,9 +46,9 @@ public class LiftoffBidder implements Bidder { private final CurrencyConversionService currencyConversionService; private final JacksonMapper mapper; - public LiftoffBidder(String endpointUrl, - CurrencyConversionService currencyConversionService, - JacksonMapper mapper) { + public VungleBidder(String endpointUrl, + CurrencyConversionService currencyConversionService, + JacksonMapper mapper) { this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); this.currencyConversionService = Objects.requireNonNull(currencyConversionService); @@ -63,8 +63,8 @@ public Result>> makeHttpRequests(BidRequest bidRequ for (Imp imp : bidRequest.getImp()) { try { final Price price = resolveBidFloor(imp, bidRequest); - final LiftoffImpressionExt impExt = parseImpExt(imp); - final LiftoffImpressionExt modifiedImpExt = modifyImpExt(impExt, bidRequest); + final VungleImpressionExt impExt = parseImpExt(imp); + final VungleImpressionExt modifiedImpExt = modifyImpExt(impExt, bidRequest); final Imp modifiedImp = modifyImp(imp, modifiedImpExt, price); final BidRequest modifiedRequest = modifyBidRequest( bidRequest, @@ -92,14 +92,14 @@ private Price resolveBidFloor(Imp imp, BidRequest bidRequest) { return Price.of(BIDDER_CURRENCY, bigDecimal); } - private LiftoffImpressionExt parseImpExt(Imp imp) { - return mapper.mapper().convertValue(imp.getExt(), LiftoffImpressionExt.class); + private VungleImpressionExt parseImpExt(Imp imp) { + return mapper.mapper().convertValue(imp.getExt(), VungleImpressionExt.class); } - private static LiftoffImpressionExt modifyImpExt(LiftoffImpressionExt impExt, BidRequest bidRequest) { - final ExtImpLiftoff bidder = impExt.getBidder(); + private static VungleImpressionExt modifyImpExt(VungleImpressionExt impExt, BidRequest bidRequest) { + final ExtImpVungle bidder = impExt.getBidder(); final String buyerId = ObjectUtil.getIfNotNull(bidRequest.getUser(), User::getBuyeruid); - final ExtImpLiftoff vungle = ExtImpLiftoff.of( + final ExtImpVungle vungle = ExtImpVungle.of( buyerId, bidder.getAppStoreId(), bidder.getPlacementReferenceId()); @@ -107,7 +107,7 @@ private static LiftoffImpressionExt modifyImpExt(LiftoffImpressionExt impExt, Bi return impExt.toBuilder().vungle(vungle).build(); } - private Imp modifyImp(Imp imp, LiftoffImpressionExt modifiedImpExt, Price price) { + private Imp modifyImp(Imp imp, VungleImpressionExt modifiedImpExt, Price price) { return imp.toBuilder() .tagid(modifiedImpExt.getBidder().getPlacementReferenceId()) .ext(mapper.mapper().convertValue(modifiedImpExt, ObjectNode.class)) diff --git a/src/main/java/org/prebid/server/bidder/vungle/model/VungleImpressionExt.java b/src/main/java/org/prebid/server/bidder/vungle/model/VungleImpressionExt.java new file mode 100644 index 00000000000..267d7368768 --- /dev/null +++ b/src/main/java/org/prebid/server/bidder/vungle/model/VungleImpressionExt.java @@ -0,0 +1,17 @@ +package org.prebid.server.bidder.vungle.model; + +import lombok.Builder; +import lombok.Getter; +import org.prebid.server.proto.openrtb.ext.request.ExtImpPrebid; +import org.prebid.server.proto.openrtb.ext.request.vungle.ExtImpVungle; + +@Builder(toBuilder = true) +@Getter +public class VungleImpressionExt { + + ExtImpPrebid prebid; + + ExtImpVungle bidder; + + ExtImpVungle vungle; +} diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/metax/ExtImpMetax.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/metax/ExtImpMetax.java new file mode 100644 index 00000000000..3101cb8a214 --- /dev/null +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/metax/ExtImpMetax.java @@ -0,0 +1,14 @@ +package org.prebid.server.proto.openrtb.ext.request.metax; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Value; + +@Value(staticConstructor = "of") +public class ExtImpMetax { + + @JsonProperty("publisherId") + Integer publisherId; + + @JsonProperty("adunit") + Integer adUnit; +} diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/liftoff/ExtImpLiftoff.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/vungle/ExtImpVungle.java similarity index 60% rename from src/main/java/org/prebid/server/proto/openrtb/ext/request/liftoff/ExtImpLiftoff.java rename to src/main/java/org/prebid/server/proto/openrtb/ext/request/vungle/ExtImpVungle.java index 5232d38c985..2b6fdfadae4 100644 --- a/src/main/java/org/prebid/server/proto/openrtb/ext/request/liftoff/ExtImpLiftoff.java +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/vungle/ExtImpVungle.java @@ -1,9 +1,9 @@ -package org.prebid.server.proto.openrtb.ext.request.liftoff; +package org.prebid.server.proto.openrtb.ext.request.vungle; import lombok.Value; @Value(staticConstructor = "of") -public class ExtImpLiftoff { +public class ExtImpVungle { String bidToken; diff --git a/src/main/java/org/prebid/server/spring/config/bidder/MetaxConfiguration.java b/src/main/java/org/prebid/server/spring/config/bidder/MetaxConfiguration.java new file mode 100644 index 00000000000..df258ba30cd --- /dev/null +++ b/src/main/java/org/prebid/server/spring/config/bidder/MetaxConfiguration.java @@ -0,0 +1,41 @@ +package org.prebid.server.spring.config.bidder; + +import org.prebid.server.bidder.BidderDeps; +import org.prebid.server.bidder.metax.MetaxBidder; +import org.prebid.server.json.JacksonMapper; +import org.prebid.server.spring.config.bidder.model.BidderConfigurationProperties; +import org.prebid.server.spring.config.bidder.util.BidderDepsAssembler; +import org.prebid.server.spring.config.bidder.util.UsersyncerCreator; +import org.prebid.server.spring.env.YamlPropertySourceFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +import jakarta.validation.constraints.NotBlank; + +@Configuration +@PropertySource(value = "classpath:/bidder-config/metax.yaml", factory = YamlPropertySourceFactory.class) +public class MetaxConfiguration { + + private static final String BIDDER_NAME = "metax"; + + @Bean("metaxConfigurationProperties") + @ConfigurationProperties("adapters.metax") + BidderConfigurationProperties configurationProperties() { + return new BidderConfigurationProperties(); + } + + @Bean + BidderDeps metaxBidderDeps(BidderConfigurationProperties metaxConfigurationProperties, + @NotBlank @Value("${external-url}") String externalUrl, + JacksonMapper mapper) { + + return BidderDepsAssembler.forBidder(BIDDER_NAME) + .withConfig(metaxConfigurationProperties) + .usersyncerCreator(UsersyncerCreator.create(externalUrl)) + .bidderCreator(config -> new MetaxBidder(config.getEndpoint(), mapper)) + .assemble(); + } +} diff --git a/src/main/java/org/prebid/server/spring/config/bidder/LiftoffConfiguration.java b/src/main/java/org/prebid/server/spring/config/bidder/VungleConfiguration.java similarity index 57% rename from src/main/java/org/prebid/server/spring/config/bidder/LiftoffConfiguration.java rename to src/main/java/org/prebid/server/spring/config/bidder/VungleConfiguration.java index 0111858f8e5..a2bc6bd427e 100644 --- a/src/main/java/org/prebid/server/spring/config/bidder/LiftoffConfiguration.java +++ b/src/main/java/org/prebid/server/spring/config/bidder/VungleConfiguration.java @@ -1,7 +1,7 @@ package org.prebid.server.spring.config.bidder; import org.prebid.server.bidder.BidderDeps; -import org.prebid.server.bidder.liftoff.LiftoffBidder; +import org.prebid.server.bidder.vungle.VungleBidder; import org.prebid.server.currency.CurrencyConversionService; import org.prebid.server.json.JacksonMapper; import org.prebid.server.spring.config.bidder.model.BidderConfigurationProperties; @@ -17,27 +17,27 @@ import jakarta.validation.constraints.NotBlank; @Configuration -@PropertySource(value = "classpath:/bidder-config/liftoff.yaml", factory = YamlPropertySourceFactory.class) -public class LiftoffConfiguration { +@PropertySource(value = "classpath:/bidder-config/vungle.yaml", factory = YamlPropertySourceFactory.class) +public class VungleConfiguration { - private static final String BIDDER_NAME = "liftoff"; + private static final String BIDDER_NAME = "vungle"; - @Bean("liftoffConfigurationProperties") - @ConfigurationProperties("adapters.liftoff") + @Bean("vungleConfigurationProperties") + @ConfigurationProperties("adapters.vungle") BidderConfigurationProperties configurationProperties() { return new BidderConfigurationProperties(); } @Bean - BidderDeps liftoffBidderDeps(BidderConfigurationProperties liftoffConfigurationProperties, - @NotBlank @Value("${external-url}") String externalUrl, - CurrencyConversionService currencyConversionService, - JacksonMapper mapper) { + BidderDeps vungleBidderDeps(BidderConfigurationProperties vungleConfigurationProperties, + @NotBlank @Value("${external-url}") String externalUrl, + CurrencyConversionService currencyConversionService, + JacksonMapper mapper) { return BidderDepsAssembler.forBidder(BIDDER_NAME) - .withConfig(liftoffConfigurationProperties) + .withConfig(vungleConfigurationProperties) .usersyncerCreator(UsersyncerCreator.create(externalUrl)) - .bidderCreator(config -> new LiftoffBidder(config.getEndpoint(), currencyConversionService, mapper)) + .bidderCreator(config -> new VungleBidder(config.getEndpoint(), currencyConversionService, mapper)) .assemble(); } } diff --git a/src/main/resources/bidder-config/limelightDigital.yaml b/src/main/resources/bidder-config/limelightDigital.yaml index ab2336287e0..f13e008afd0 100644 --- a/src/main/resources/bidder-config/limelightDigital.yaml +++ b/src/main/resources/bidder-config/limelightDigital.yaml @@ -2,6 +2,8 @@ adapters: limelightDigital: endpoint: http://ads-pbs.ortb.net/openrtb/{{PublisherID}}?host={{Host}} aliases: + filmzie: + enabled: false iionads: enabled: false endpoint: http://ads-pbs.iionads.com/openrtb/{{PublisherID}}?host={{Host}} diff --git a/src/main/resources/bidder-config/metax.yaml b/src/main/resources/bidder-config/metax.yaml new file mode 100644 index 00000000000..7e87526ac0b --- /dev/null +++ b/src/main/resources/bidder-config/metax.yaml @@ -0,0 +1,18 @@ +# The MetaX Bidding adapter requires setup before beginning. Please contact us at +adapters: + metax: + endpoint: https://hb.metaxads.com/prebid?sid={{publisherId}}&adunit={{adUnit}}&source=prebid-server + meta-info: + maintainer-email: prebid@metaxsoft.com + app-media-types: + - banner + - video + - native + - audio + site-media-types: + - banner + - video + - native + - audio + supported-vendors: + vendor-id: 1301 diff --git a/src/main/resources/bidder-config/liftoff.yaml b/src/main/resources/bidder-config/vungle.yaml similarity index 83% rename from src/main/resources/bidder-config/liftoff.yaml rename to src/main/resources/bidder-config/vungle.yaml index 5b415c8b84a..0a9baf58403 100644 --- a/src/main/resources/bidder-config/liftoff.yaml +++ b/src/main/resources/bidder-config/vungle.yaml @@ -1,6 +1,9 @@ adapters: - liftoff: + vungle: endpoint: https://rtb.ads.vungle.com/bid/t/c770f32 + aliases: + liftoff: + enabled: false modifying-vast-xml-allowed: true endpoint-compression: gzip meta-info: diff --git a/src/main/resources/static/bidder-params/metax.json b/src/main/resources/static/bidder-params/metax.json new file mode 100644 index 00000000000..5e65b5c4e2b --- /dev/null +++ b/src/main/resources/static/bidder-params/metax.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MetaX Adapter Params", + "description": "A schema which validates params accepted by the MetaX adapter", + "type": "object", + "properties": { + "publisherId": { + "type": "integer", + "description": "An ID which identifies the publisher", + "minimum": 1 + }, + "adunit": { + "type": "integer", + "description": "An ID which identifies the adunit", + "minimum": 1 + } + }, + "required": [ + "publisherId", + "adunit" + ] +} diff --git a/src/main/resources/static/bidder-params/liftoff.json b/src/main/resources/static/bidder-params/vungle.json similarity index 89% rename from src/main/resources/static/bidder-params/liftoff.json rename to src/main/resources/static/bidder-params/vungle.json index 5664a883b9e..e2d4dddffdc 100644 --- a/src/main/resources/static/bidder-params/liftoff.json +++ b/src/main/resources/static/bidder-params/vungle.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Liftoff Adapter Params", - "description": "A schema which validates params accepted by the Liftoff adapter", + "title": "Vungle Adapter Params", + "description": "A schema which validates params accepted by the Vungle adapter", "type": "object", "properties": { "app_store_id": { diff --git a/src/test/groovy/org/prebid/server/functional/tests/ImpRequestSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/ImpRequestSpec.groovy index bf34515eb04..9071eea8194 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/ImpRequestSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/ImpRequestSpec.groovy @@ -13,6 +13,7 @@ import static org.prebid.server.functional.model.bidder.BidderName.ALIAS_CAMEL_C import static org.prebid.server.functional.model.bidder.BidderName.EMPTY import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.bidder.BidderName.GENERIC_CAMEL_CASE +import static org.prebid.server.functional.model.bidder.BidderName.RUBICON import static org.prebid.server.functional.model.bidder.BidderName.UNKNOWN import static org.prebid.server.functional.model.bidder.BidderName.WILDCARD import static org.prebid.server.functional.model.response.auction.ErrorType.PREBID @@ -156,6 +157,33 @@ class ImpRequestSpec extends BaseSpec { bidderName << [WILDCARD, UNKNOWN] } + def "PBS shouldn't update imp fields and without warning when imp.ext.prebid.imp contain not applicable bidder"() { + given: "Default basic BidRequest" + def impPmp = Pmp.defaultPmp + def bidRequest = BidRequest.defaultBidRequest.tap { + imp.first.tap { + pmp = impPmp + ext.prebid.imp = [(RUBICON): new Imp(pmp: Pmp.defaultPmp)] + } + } + + when: "Requesting PBS auction" + def response = defaultPbsServiceWithAlias.sendAuctionRequest(bidRequest) + + then: "Bid response should not contain warning" + assert !response?.ext?.warnings + + and: "BidderRequest should contain pmp from original imp" + def bidderRequest = bidder.getBidderRequest(bidRequest.id) + assert bidderRequest.imp.pmp == [impPmp] + + and: "PBS should remove imp.ext.prebid.imp from bidderRequest" + assert !bidderRequest?.imp?.first?.ext?.prebid?.imp + + and: "PBS should remove imp.ext.prebid.bidder from bidderRequest" + assert !bidderRequest?.imp?.first?.ext?.prebid?.bidder + } + def "PBS should validate imp and add proper warning when imp.ext.prebid.imp contain invalid ortb data"() { given: "BidRequest with invalid config for ext.prebid.imp" def impPmp = Pmp.defaultPmp diff --git a/src/test/java/org/prebid/server/auction/ImpAdjusterTest.java b/src/test/java/org/prebid/server/auction/ImpAdjusterTest.java index 4f8e069499c..717ca62dedd 100644 --- a/src/test/java/org/prebid/server/auction/ImpAdjusterTest.java +++ b/src/test/java/org/prebid/server/auction/ImpAdjusterTest.java @@ -78,24 +78,7 @@ public void adjustShouldReturnOriginalImpWhenImpExtPrebidImpIsAbsent() { } @Test - public void adjustShouldReturnOriginalImpWhenImpExtPrebidImpDoesNotHaveRequestedBidder() { - // given - final Imp givenImp = Imp.builder() - .ext(mapper.createObjectNode().set("prebid", mapper.createObjectNode() - .set("imp", mapper.createObjectNode().set("anotherBidder", mapper.createObjectNode())))) - .build(); - final List debugMessages = new ArrayList<>(); - - // when - final Imp result = target.adjust(givenImp, "someBidder", bidderAliases, debugMessages); - - // then - assertThat(result).isSameAs(givenImp); - assertThat(debugMessages).isEmpty(); - } - - @Test - public void adjustShouldReturnOriginalImpWhenImpExtPrebidImpHasEmptyBidder() { + public void adjustShouldRemoveExpImpFromOriginalImpWhenImpExtPrebidImpHasEmptyBidder() { // given final Imp givenImp = Imp.builder() .ext(mapper.createObjectNode().set("prebid", mapper.createObjectNode() @@ -107,24 +90,10 @@ public void adjustShouldReturnOriginalImpWhenImpExtPrebidImpHasEmptyBidder() { final Imp result = target.adjust(givenImp, "someBidder", bidderAliases, debugMessages); // then - assertThat(result).isSameAs(givenImp); - assertThat(debugMessages).isEmpty(); - } - - @Test - public void adjustShouldReturnOriginalImpWhenMergedImpNodeIsEmpty() { - // given - final Imp givenImp = Imp.builder() - .ext(mapper.createObjectNode().set("prebid", mapper.createObjectNode() - .set("imp", mapper.createObjectNode().set("someBidder", mapper.createObjectNode())))) - .build(); - final List debugMessages = new ArrayList<>(); - - // when - final Imp result = target.adjust(givenImp, "someBidder", bidderAliases, debugMessages); + final Imp expectedImp = givenImp.toBuilder() + .ext(mapper.createObjectNode().set("prebid", mapper.createObjectNode())).build(); - // then - assertThat(result).isSameAs(givenImp); + assertThat(result).isEqualTo(expectedImp); assertThat(debugMessages).isEmpty(); } @@ -214,7 +183,7 @@ public void resolveImpShouldMergeBidderSpecificImpIntoOriginalImpCaseAliasBidder } @Test - public void resolveImpShouldReturnOriginalImpWhenResultingImpValidationFailed() throws ValidationException { + public void resolveImpShouldReturnImpWithoutExpImpWhenResultingImpValidationFailed() throws ValidationException { // given doThrow(new ValidationException("imp validation failed")).when(impValidator).validateImp(any()); @@ -231,14 +200,19 @@ public void resolveImpShouldReturnOriginalImpWhenResultingImpValidationFailed() final Imp result = target.adjust(givenImp, "someBidder", bidderAliases, debugMessages); // then - assertThat(result).isSameAs(givenImp); + final Imp expectedImp = givenImp.toBuilder() + .ext(mapper.createObjectNode().put("originAttr", "originValue") + .set("prebid", mapper.createObjectNode().put("prebidOriginAttr", "prebidOriginValue"))) + .build(); + + assertThat(result).isEqualTo(expectedImp); assertThat(debugMessages).containsOnly( "imp.ext.prebid.imp.someBidder can not be merged into original imp [id=impId], " + "reason: imp validation failed"); } @Test - public void resolveImpShouldReturnOriginalImpWhenMergingFailed() { + public void resolveImpShouldReturnImpWithoutExpWhenMergingFailed() { // given final ObjectNode invalidBidderImp = mapper.createObjectNode() .put("bidfloor", "2.0") @@ -251,7 +225,12 @@ public void resolveImpShouldReturnOriginalImpWhenMergingFailed() { final Imp result = target.adjust(givenImp, "someBidder", bidderAliases, debugMessages); // then - assertThat(result).isSameAs(givenImp); + final Imp expectedImp = givenImp.toBuilder() + .ext(mapper.createObjectNode().put("originAttr", "originValue") + .set("prebid", mapper.createObjectNode().put("prebidOriginAttr", "prebidOriginValue"))) + .build(); + + assertThat(result).isEqualTo(expectedImp); assertThat(debugMessages).hasSize(1).first() .satisfies(message -> assertThat(message).startsWith( "imp.ext.prebid.imp.someBidder can not be merged into original imp [id=impId]," diff --git a/src/test/java/org/prebid/server/bidder/metax/MetaxBidderTest.java b/src/test/java/org/prebid/server/bidder/metax/MetaxBidderTest.java new file mode 100644 index 00000000000..605b56315da --- /dev/null +++ b/src/test/java/org/prebid/server/bidder/metax/MetaxBidderTest.java @@ -0,0 +1,371 @@ +package org.prebid.server.bidder.metax; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.iab.openrtb.request.Banner; +import com.iab.openrtb.request.BidRequest; +import com.iab.openrtb.request.Format; +import com.iab.openrtb.request.Imp; +import com.iab.openrtb.response.Bid; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import org.assertj.core.groups.Tuple; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; +import org.prebid.server.VertxTest; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderCall; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpRequest; +import org.prebid.server.bidder.model.HttpResponse; +import org.prebid.server.bidder.model.Result; +import org.prebid.server.proto.openrtb.ext.ExtPrebid; +import org.prebid.server.proto.openrtb.ext.request.metax.ExtImpMetax; + +import java.util.Collections; +import java.util.List; +import java.util.function.UnaryOperator; + +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; +import static java.util.function.UnaryOperator.identity; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; +import static org.prebid.server.proto.openrtb.ext.response.BidType.audio; +import static org.prebid.server.proto.openrtb.ext.response.BidType.banner; +import static org.prebid.server.proto.openrtb.ext.response.BidType.video; +import static org.prebid.server.proto.openrtb.ext.response.BidType.xNative; +import static org.prebid.server.util.HttpUtil.ACCEPT_HEADER; +import static org.prebid.server.util.HttpUtil.APPLICATION_JSON_CONTENT_TYPE; +import static org.prebid.server.util.HttpUtil.CONTENT_TYPE_HEADER; +import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE; + +@ExtendWith(MockitoExtension.class) +public class MetaxBidderTest extends VertxTest { + + private static final String ENDPOINT_URL = "https://test.endpoint.com?sid={{publisherId}}&adunit={{adUnit}}"; + + private MetaxBidder target; + + @BeforeEach + public void setUp() { + target = new MetaxBidder(ENDPOINT_URL, jacksonMapper); + } + + @Test + public void creationShouldFailOnInvalidEndpointUrl() { + assertThatIllegalArgumentException().isThrownBy( + () -> new MetaxBidder("invalid_url", jacksonMapper)); + } + + @Test + public void makeHttpRequestsShouldReturnExpectedHeaders() { + // given + final BidRequest bidRequest = givenBidRequest(identity()); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getValue()).hasSize(1).first() + .extracting(HttpRequest::getHeaders) + .satisfies(headers -> assertThat(headers.get(CONTENT_TYPE_HEADER)) + .isEqualTo(APPLICATION_JSON_CONTENT_TYPE)) + .satisfies(headers -> assertThat(headers.get(ACCEPT_HEADER)) + .isEqualTo(APPLICATION_JSON_VALUE)); + assertThat(result.getErrors()).isEmpty(); + } + + @Test + public void makeHttpRequestsShouldUseCorrectUri() { + // given + final BidRequest bidRequest = givenBidRequest(identity()); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .extracting(HttpRequest::getUri) + .containsExactly("https://test.endpoint.com?sid=123&adunit=456"); + } + + @Test + public void makeHttpRequestsShouldHaveImpIds() { + // given + final Imp givenImp1 = givenImp(imp -> imp.id("givenImp1")); + final Imp givenImp2 = givenImp(imp -> imp.id("givenImp2")); + final BidRequest bidRequest = BidRequest.builder().imp(List.of(givenImp1, givenImp2)).build(); + + //when + final Result>> result = target.makeHttpRequests(bidRequest); + + //then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).hasSize(2) + .extracting(HttpRequest::getImpIds) + .containsExactlyInAnyOrder(Collections.singleton("givenImp1"), Collections.singleton("givenImp2")); + } + + @Test + public void shouldMakeOneRequestWhenOneImpIsValidAndAnotherIsNot() { + // given + final Imp givenInvalidImp = givenImp(imp -> imp + .id("impIdCorrupted") + .ext(mapper.valueToTree(ExtPrebid.of(null, mapper.createArrayNode())))); + final Imp givenValidImp = givenImp(identity()); + + final BidRequest bidRequest = BidRequest.builder() + .imp(List.of(givenInvalidImp, givenValidImp)) + .build(); + + //when + final Result>> result = target.makeHttpRequests(bidRequest); + + //then + assertThat(result.getValue()).hasSize(1) + .extracting(HttpRequest::getPayload) + .flatExtracting(BidRequest::getImp) + .extracting(Imp::getId) + .containsExactly("123"); + } + + @Test + public void makeHttpRequestsShouldMakeOneRequestPerImp() { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(asList(givenImp(identity()), givenImp(identity()))) + .build(); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).hasSize(2) + .extracting(HttpRequest::getPayload) + .extracting(BidRequest::getImp) + .extracting(List::size) + .containsOnly(1); + } + + @Test + public void makeHttpRequestsShouldNotChangeBannerWidthAndHeightIfPresent() { + // given + final BidRequest bidRequest = givenBidRequest(impCustomizer -> impCustomizer + .banner(Banner.builder() + .w(12) + .h(34) + .format(singletonList(Format.builder().w(56).h(78).build())) + .build()) + ); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .extracting(HttpRequest::getPayload) + .flatExtracting(BidRequest::getImp) + .extracting(Imp::getBanner) + .extracting(Banner::getW, Banner::getH) + .containsExactly(Tuple.tuple(12, 34)); + } + + @Test + public void makeHttpRequestsShouldChangeBannerWidthAndHeightIfPresentInFormats() { + // given + final BidRequest bidRequest = givenBidRequest(impCustomizer -> impCustomizer + .banner(Banner.builder() + .w(null) + .h(null) + .format(singletonList(Format.builder().w(56).h(78).build())) + .build()) + ); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .extracting(HttpRequest::getPayload) + .flatExtracting(BidRequest::getImp) + .extracting(Imp::getBanner) + .extracting(Banner::getW, Banner::getH) + .containsExactly(Tuple.tuple(56, 78)); + } + + @Test + public void makeBidsShouldReturnEmptyListIfBidResponseIsNull() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall(mapper.writeValueAsString(null)); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { + // given + final BidderCall httpCall = givenHttpCall("invalid"); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token 'invalid':"); + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + }); + } + + @Test + public void makeBidsShouldReturnEmptyListIfBidResponseSeatBidIsNull() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall(mapper.writeValueAsString(BidResponse.builder().build())); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnxNativeBid() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.mtype(4).impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().impid("123").mtype(4).build(), xNative, "USD")); + } + + @Test + public void makeBidsShouldReturnBannerBid() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.mtype(1).impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().mtype(1).impid("123").build(), banner, "USD")); + } + + @Test + public void makeBidsShouldReturnVideoBid() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.mtype(2).impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().mtype(2).impid("123").build(), video, "USD")); + } + + @Test + public void makeBidsShouldReturnAudioBid() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.mtype(3).impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().mtype(3).impid("123").build(), audio, "USD")); + } + + @Test + public void makeBidsShouldThrowErrorWhenMediaTypeIsNotSupported() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.mtype(6).impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getMessage()).startsWith("Unsupported MType: 123"); + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + }); + } + + @Test + public void makeBidsShouldThrowErrorWhenMediaTypeIsMissing() throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidResponse(bidBuilder -> bidBuilder.impid("123"))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getMessage()).startsWith("Missing MType for bid: null"); + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + }); + } + + private static BidRequest givenBidRequest(UnaryOperator impCustomizer) { + + return BidRequest.builder() + .imp(singletonList(givenImp(impCustomizer))) + .build(); + } + + private static Imp givenImp(UnaryOperator impCustomizer) { + return impCustomizer.apply(Imp.builder() + .id("123") + .ext(mapper.valueToTree(ExtPrebid.of(null, + ExtImpMetax.of(123, 456))))) + .build(); + } + + private String givenBidResponse(UnaryOperator bidCustomizer) throws JsonProcessingException { + return mapper.writeValueAsString(BidResponse.builder() + .cur("USD") + .seatbid(singletonList(SeatBid.builder() + .bid(singletonList(bidCustomizer.apply(Bid.builder()).build())) + .build())) + .build()); + } + + private static BidderCall givenHttpCall(String body) { + return BidderCall.succeededHttp( + HttpRequest.builder().payload(null).build(), + HttpResponse.of(200, null, body), + null); + } +} diff --git a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java index d19933818ee..b7c2a053298 100644 --- a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java @@ -789,6 +789,31 @@ public void makeHttpRequestsShouldResolveImpBidFloorCurrencyIfNotUSDAndCallCurre .containsOnly(tuple(BigDecimal.TEN, "USD")); } + @Test + public void makeHttpRequestsShouldResolveImpBidFloorCurrencyIfNotUSDAndBidFloorIsZero() { + // given + final BidRequest bidRequest = givenBidRequest( + builder -> builder + .banner(Banner.builder().format(singletonList(Format.builder().w(300).h(250).build())).build()) + .bidfloor(BigDecimal.ZERO).bidfloorcur("EUR"), + identity()); + + given(currencyConversionService.convertCurrency(any(), any(), anyString(), anyString())) + .willReturn(BigDecimal.ZERO); + + // when + final Result>> result = target.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + verify(currencyConversionService).convertCurrency(eq(BigDecimal.ZERO), any(), eq("EUR"), eq("USD")); + assertThat(result.getValue()).hasSize(1).doesNotContainNull() + .extracting(httpRequest -> mapper.readValue(httpRequest.getBody(), BidRequest.class)) + .flatExtracting(BidRequest::getImp).doesNotContainNull() + .extracting(Imp::getBidfloor, Imp::getBidfloorcur) + .containsOnly(tuple(BigDecimal.ZERO, "USD")); + } + @Test public void makeHttpRequestsShouldNotSetBidFloorCurrencyToUSDIfNull() { // given diff --git a/src/test/java/org/prebid/server/bidder/liftoff/LiftoffBidderTest.java b/src/test/java/org/prebid/server/bidder/vungle/VungleBidderTest.java similarity index 91% rename from src/test/java/org/prebid/server/bidder/liftoff/LiftoffBidderTest.java rename to src/test/java/org/prebid/server/bidder/vungle/VungleBidderTest.java index 84e06443cad..e609e2055f8 100644 --- a/src/test/java/org/prebid/server/bidder/liftoff/LiftoffBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/vungle/VungleBidderTest.java @@ -1,4 +1,4 @@ -package org.prebid.server.bidder.liftoff; +package org.prebid.server.bidder.vungle; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -18,17 +18,17 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.prebid.server.VertxTest; -import org.prebid.server.bidder.liftoff.model.LiftoffImpressionExt; import org.prebid.server.bidder.model.BidderBid; import org.prebid.server.bidder.model.BidderCall; import org.prebid.server.bidder.model.BidderError; import org.prebid.server.bidder.model.HttpRequest; import org.prebid.server.bidder.model.HttpResponse; import org.prebid.server.bidder.model.Result; +import org.prebid.server.bidder.vungle.model.VungleImpressionExt; import org.prebid.server.currency.CurrencyConversionService; import org.prebid.server.exception.PreBidException; import org.prebid.server.proto.openrtb.ext.ExtPrebid; -import org.prebid.server.proto.openrtb.ext.request.liftoff.ExtImpLiftoff; +import org.prebid.server.proto.openrtb.ext.request.vungle.ExtImpVungle; import java.math.BigDecimal; import java.util.Arrays; @@ -48,23 +48,23 @@ import static org.prebid.server.proto.openrtb.ext.response.BidType.video; @ExtendWith(MockitoExtension.class) -public class LiftoffBidderTest extends VertxTest { +public class VungleBidderTest extends VertxTest { private static final String ENDPOINT_URL = "https://test.endpoint.com"; @Mock(strictness = LENIENT) private CurrencyConversionService currencyConversionService; - private LiftoffBidder target; + private VungleBidder target; @BeforeEach public void setUp() { - target = new LiftoffBidder(ENDPOINT_URL, currencyConversionService, jacksonMapper); + target = new VungleBidder(ENDPOINT_URL, currencyConversionService, jacksonMapper); } @Test public void creationShouldFailOnInvalidEndpointUrl() { - assertThatIllegalArgumentException().isThrownBy(() -> new LiftoffBidder( + assertThatIllegalArgumentException().isThrownBy(() -> new VungleBidder( "invalid_url", currencyConversionService, jacksonMapper)); @@ -176,7 +176,7 @@ public void makeHttpRequestsShouldThrowErrorWhenCurrencyConvertCannotConvertInAn } @Test - public void makeHttpRequestShouldUpdateExtImpLiftoffWhenUserBuyeruidPresent() { + public void makeHttpRequestShouldUpdateExtImpVungleWhenUserBuyeruidPresent() { // given final BidRequest bidRequest = givenBidRequest( bidRequestBuilder -> bidRequestBuilder.user(User.builder().buyeruid("123").build()), identity()); @@ -190,12 +190,12 @@ public void makeHttpRequestShouldUpdateExtImpLiftoffWhenUserBuyeruidPresent() { .extracting(HttpRequest::getPayload) .flatExtracting(BidRequest::getImp) .extracting(Imp::getExt) - .containsExactly(mapper.convertValue(LiftoffImpressionExt.builder() - .bidder(ExtImpLiftoff.of( + .containsExactly(mapper.convertValue(VungleImpressionExt.builder() + .bidder(ExtImpVungle.of( "any-bid-token", "any-app-store-id", "any-placement-reference-id")) - .vungle(ExtImpLiftoff.of( + .vungle(ExtImpVungle.of( "123", "any-app-store-id", "any-placement-reference-id")) @@ -203,7 +203,7 @@ public void makeHttpRequestShouldUpdateExtImpLiftoffWhenUserBuyeruidPresent() { } @Test - public void makeHttpRequestShouldUpdateAppIdWhenExtImpLiftoffContainAppStoreId() { + public void makeHttpRequestShouldUpdateAppIdWhenExtImpVungleContainAppStoreId() { // given final App givenApp = App.builder().name("appName").build(); final BidRequest bidRequest = givenBidRequest(bidRequestBuilder -> bidRequestBuilder.app(givenApp), identity()); @@ -220,7 +220,7 @@ public void makeHttpRequestShouldUpdateAppIdWhenExtImpLiftoffContainAppStoreId() } @Test - public void makeHttpRequestShouldCreateAppWithIdWhenExtImpLiftoffContainAppStoreIdAndAppIsAbsentAndSiteIsPresent() { + public void makeHttpRequestShouldCreateAppWithIdWhenExtImpVungleContainAppStoreIdAndAppIsAbsentAndSiteIsPresent() { // given final BidRequest bidRequest = givenBidRequest(bidRequestBuilder -> bidRequestBuilder .site(Site.builder().build()) @@ -258,7 +258,7 @@ public void makeHttpRequestShouldReturnErrorWhenAppAndSiteAreAbsent() { } @Test - public void makeHttpRequestShouldUpdateImpTagidWhenExtImpLiftoffContainPlacementReferenceId() { + public void makeHttpRequestShouldUpdateImpTagidWhenExtImpVungleContainPlacementReferenceId() { // given final BidRequest bidRequest = givenBidRequest(identity(), identity()); @@ -275,7 +275,7 @@ public void makeHttpRequestShouldUpdateImpTagidWhenExtImpLiftoffContainPlacement } @Test - public void makeHttpRequestShouldUpdateExtImpLiftoffBidTokenWhenInRequestPresentUserBuyeruid() { + public void makeHttpRequestShouldUpdateExtImpVungleBidTokenWhenInRequestPresentUserBuyeruid() { // given final BidRequest bidRequest = givenBidRequest(bidRequestBuilder -> bidRequestBuilder.user(User.builder().buyeruid("Came-from-request").build()), identity()); @@ -289,11 +289,11 @@ public void makeHttpRequestShouldUpdateExtImpLiftoffBidTokenWhenInRequestPresent .extracting(HttpRequest::getPayload) .flatExtracting(BidRequest::getImp) .extracting(Imp::getExt) - .containsExactly(mapper.convertValue(LiftoffImpressionExt.builder() - .bidder(ExtImpLiftoff.of("any-bid-token", + .containsExactly(mapper.convertValue(VungleImpressionExt.builder() + .bidder(ExtImpVungle.of("any-bid-token", "any-app-store-id", "any-placement-reference-id")) - .vungle(ExtImpLiftoff.of( + .vungle(ExtImpVungle.of( "Came-from-request", "any-app-store-id", "any-placement-reference-id")) @@ -386,7 +386,7 @@ private static BidRequest givenBidRequest( return bidRequestCustomizer.apply(BidRequest.builder() .app(App.builder().build()) - .imp(Arrays.stream(impCustomizer).map(LiftoffBidderTest::givenImp).toList())) + .imp(Arrays.stream(impCustomizer).map(VungleBidderTest::givenImp).toList())) .build(); } @@ -395,7 +395,7 @@ private static Imp givenImp(UnaryOperator impCustomizer) { .id("123") .banner(Banner.builder().w(23).h(25).build()) .ext(mapper.valueToTree(ExtPrebid.of(null, - ExtImpLiftoff.of("any-bid-token", + ExtImpVungle.of("any-bid-token", "any-app-store-id", "any-placement-reference-id"))))) .build(); diff --git a/src/test/java/org/prebid/server/it/FilmzieTest.java b/src/test/java/org/prebid/server/it/FilmzieTest.java new file mode 100644 index 00000000000..fefbffb6e74 --- /dev/null +++ b/src/test/java/org/prebid/server/it/FilmzieTest.java @@ -0,0 +1,35 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.jupiter.api.Test; +import org.prebid.server.model.Endpoint; + +import java.io.IOException; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static java.util.Collections.singletonList; + +public class FilmzieTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromTheFilmzieBidder() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/filmzie-exchange/test.host/123456")) + .withRequestBody(equalToJson( + jsonFrom("openrtb2/filmzie/test-filmzie-bid-request.json"))) + .willReturn(aResponse().withBody( + jsonFrom("openrtb2/filmzie/test-filmzie-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/filmzie/test-auction-filmzie-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/filmzie/test-auction-filmzie-response.json", response, + singletonList("filmzie")); + } +} diff --git a/src/test/java/org/prebid/server/it/LiftoffTest.java b/src/test/java/org/prebid/server/it/LiftoffTest.java index 83ce56922c0..921ce6806f2 100644 --- a/src/test/java/org/prebid/server/it/LiftoffTest.java +++ b/src/test/java/org/prebid/server/it/LiftoffTest.java @@ -13,7 +13,7 @@ public class LiftoffTest extends IntegrationTest { @Test - public void openrtb2AuctionShouldRespondWithBidsFromliftoff() throws IOException, JSONException { + public void openrtb2AuctionShouldRespondWithBidsFromLiftoff() throws IOException, JSONException { // given WIRE_MOCK_RULE.stubFor(WireMock.post(WireMock.urlPathEqualTo("/liftoff-exchange")) .withRequestBody(WireMock.equalToJson( diff --git a/src/test/java/org/prebid/server/it/MetaxTest.java b/src/test/java/org/prebid/server/it/MetaxTest.java new file mode 100644 index 00000000000..f51a55e55c2 --- /dev/null +++ b/src/test/java/org/prebid/server/it/MetaxTest.java @@ -0,0 +1,36 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.jupiter.api.Test; +import org.prebid.server.model.Endpoint; + +import java.io.IOException; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static java.util.Collections.singletonList; + +public class MetaxTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromMetax() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/metax-exchange")) + .withQueryParam("publisher_id", equalTo("123")) + .withQueryParam("adunit", equalTo("456")) + .withRequestBody(equalToJson(jsonFrom("openrtb2/metax/test-metax-bid-request.json"))) + .willReturn(aResponse().withBody(jsonFrom("openrtb2/metax/test-metax-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/metax/test-auction-metax-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/metax/test-auction-metax-response.json", response, + singletonList("metax")); + } +} diff --git a/src/test/java/org/prebid/server/it/VungleTest.java b/src/test/java/org/prebid/server/it/VungleTest.java new file mode 100644 index 00000000000..9cdd8511ce3 --- /dev/null +++ b/src/test/java/org/prebid/server/it/VungleTest.java @@ -0,0 +1,31 @@ +package org.prebid.server.it; + +import com.github.tomakehurst.wiremock.client.WireMock; +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.jupiter.api.Test; +import org.prebid.server.model.Endpoint; + +import java.io.IOException; + +import static java.util.Collections.singletonList; + +public class VungleTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromVungle() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(WireMock.post(WireMock.urlPathEqualTo("/vungle-exchange")) + .withRequestBody(WireMock.equalToJson( + jsonFrom("openrtb2/vungle/test-vungle-bid-request.json"))) + .willReturn(WireMock.aResponse().withBody( + jsonFrom("openrtb2/vungle/test-vungle-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/vungle/test-auction-vungle-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/vungle/test-auction-vungle-response.json", response, singletonList("vungle")); + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-request.json b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-request.json new file mode 100644 index 00000000000..00822b5da93 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-request.json @@ -0,0 +1,24 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "filmzie": { + "host": "test.host", + "publisherId": "123456" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-response.json b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-response.json new file mode 100644 index 00000000000..4a1aac1a8c5 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-auction-filmzie-response.json @@ -0,0 +1,33 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "crid": "creativeId", + "ext": { + "origbidcpm": 3.33, + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "filmzie", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "filmzie": "{{ filmzie.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-request.json new file mode 100644 index 00000000000..8e58e53ba4b --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-request.json @@ -0,0 +1,40 @@ +{ + "id": "request_id-imp_id", + "imp": [ + { + "id": "imp_id", + "secure": 1, + "banner": { + "w": 300, + "h": 250 + } + } + ], + "source": { + "tid": "${json-unit.any-string}" + }, + "site": { + "domain": "www.example.com", + "page": "http://www.example.com", + "publisher": { + "domain": "example.com" + }, + "ext": { + "amp": 0 + } + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": "${json-unit.any-number}", + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-response.json new file mode 100644 index 00000000000..04d26e04318 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/filmzie/test-filmzie-bid-response.json @@ -0,0 +1,15 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "crid": "creativeId" + } + ] + } + ] +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-request.json b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-request.json new file mode 100644 index 00000000000..d1393d6a4fa --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-request.json @@ -0,0 +1,27 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 800, + "h": 600 + }, + "ext": { + "metax": { + "publisherId": 123, + "adunit": 456 + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-response.json b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-response.json new file mode 100644 index 00000000000..b37ebc3ebea --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-auction-metax-response.json @@ -0,0 +1,37 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 1.25, + "adm": "adm001", + "crid": "crid", + "w": 800, + "h": 600, + "ext": { + "prebid": { + "type": "video" + }, + "origbidcpm": 1.25 + }, + "mtype": 2 + } + ], + "seat": "metax", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "metax": "{{ metax.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-request.json new file mode 100644 index 00000000000..eccf15de7bd --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-request.json @@ -0,0 +1,60 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "secure": 1, + "video": { + "mimes": [ + "video/mp4" + ], + "w": 800, + "h": 600 + }, + "ext": { + "tid": "${json-unit.any-string}", + "bidder": { + "publisherId": 123, + "adunit": 456 + } + } + } + ], + "source": { + "tid": "${json-unit.any-string}" + }, + "site": { + "domain": "www.example.com", + "page": "http://www.example.com", + "publisher": { + "domain": "example.com" + }, + "ext": { + "amp": 0 + } + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": "${json-unit.any-number}", + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + }, + "ext": { + "prebid": { + "server": { + "externalurl": "http://localhost:8080", + "gvlid": 1, + "datacenter": "local", + "endpoint": "/openrtb2/auction" + } + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-response.json new file mode 100644 index 00000000000..b00165a1652 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/metax/test-metax-bid-response.json @@ -0,0 +1,20 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 1.25, + "crid": "crid", + "adm": "adm001", + "h": 600, + "w": 800, + "mtype": 2 + } + ] + } + ], + "bidid": "bid001" +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-request.json b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-request.json new file mode 100644 index 00000000000..d4a33b89ed4 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-request.json @@ -0,0 +1,28 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 800, + "h": 600 + }, + "ext": { + "vungle": { + "bid_token": "bid_token", + "app_store_id": "app_store_id", + "placement_reference_id": "placement_reference_id" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-response.json b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-response.json new file mode 100644 index 00000000000..fa3a8579909 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-auction-vungle-response.json @@ -0,0 +1,38 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "adid": "adid001", + "adm": "", + "cid": "cid001", + "crid": "crid001", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "video" + }, + "origbidcpm": 3.33 + } + } + ], + "seat": "vungle", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "vungle": "{{ vungle.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-request.json new file mode 100644 index 00000000000..efaca813ee6 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-request.json @@ -0,0 +1,58 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "tagid" : "placement_reference_id", + "secure": 1, + "video": { + "mimes": [ + "video/mp4" + ], + "w": 800, + "h": 600 + }, + "ext": { + "bidder" : { + "bid_token" : "bid_token", + "app_store_id" : "app_store_id", + "placement_reference_id" : "placement_reference_id" + }, + "vungle" : { + "app_store_id" : "app_store_id", + "placement_reference_id" : "placement_reference_id" + } + } + } + ], + "source": { + "tid": "${json-unit.any-string}" + }, + "app": { + "id": "app_store_id" + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": "${json-unit.any-number}", + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + }, + "ext": { + "prebid": { + "server": { + "externalurl": "http://localhost:8080", + "gvlid": 1, + "datacenter": "local", + "endpoint": "/openrtb2/auction" + } + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-response.json new file mode 100644 index 00000000000..92033dd4355 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/vungle/test-vungle-bid-response.json @@ -0,0 +1,20 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "adid": "adid001", + "adm": "", + "crid": "crid001", + "cid": "cid001", + "h": 250, + "w": 300 + } + ] + } + ] +} diff --git a/src/test/resources/org/prebid/server/it/test-application.properties b/src/test/resources/org/prebid/server/it/test-application.properties index 96cff05e2da..8dbad3a1089 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -251,8 +251,10 @@ adapters.krushmedia.enabled=true adapters.krushmedia.endpoint=http://localhost:8090/krushmedia-exchange adapters.lemmadigital.enabled=true adapters.lemmadigital.endpoint=http://localhost:8090/lemmadigital-exchange/{{PublisherID}}/{{AdUnit}} -adapters.liftoff.enabled=true -adapters.liftoff.endpoint=http://localhost:8090/liftoff-exchange +adapters.vungle.enabled=true +adapters.vungle.endpoint=http://localhost:8090/vungle-exchange +adapters.vungle.aliases.liftoff.enabled=true +adapters.vungle.aliases.liftoff.endpoint=http://localhost:8090/liftoff-exchange adapters.kargo.enabled=true adapters.kargo.endpoint=http://localhost:8090/kargo-exchange adapters.kayzen.enabled=true @@ -269,6 +271,8 @@ adapters.limelightDigital.aliases.xtrmqb.enabled=true adapters.limelightDigital.aliases.xtrmqb.endpoint=http://localhost:8090/xtrmqb-exchange/{{Host}}/{{PublisherID}} adapters.limelightDigital.aliases.embimedia.enabled=true adapters.limelightDigital.aliases.embimedia.endpoint=http://localhost:8090/embimedia-exchange/{{Host}}/{{PublisherID}} +adapters.limelightDigital.aliases.filmzie.enabled=true +adapters.limelightDigital.aliases.filmzie.endpoint=http://localhost:8090/filmzie-exchange/{{Host}}/{{PublisherID}} adapters.lmkiviads.enabled=true adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}} adapters.lockerdome.enabled=true @@ -293,6 +297,8 @@ adapters.medianet.enabled=true adapters.medianet.endpoint=http://localhost:8090/medianet-exchange adapters.melozen.enabled=true adapters.melozen.endpoint=http://localhost:8090/melozen-exchange?pubId={{PublisherID}} +adapters.metax.enabled=true +adapters.metax.endpoint=http://localhost:8090/metax-exchange?publisher_id={{publisherId}}&adunit={{adUnit}} adapters.mgid.enabled=true adapters.mgid.endpoint=http://localhost:8090/mgid-exchange/ adapters.mgidX.enabled=true