From a790957cd7dee9e2bfef0434c6305a02d04cbb1b Mon Sep 17 00:00:00 2001 From: Alex Maltsev Date: Mon, 19 Jul 2021 20:21:26 +0300 Subject: [PATCH] Add Axonix bidder (#1376) * Add Axonix bidder * Add tests * Refactoring --- .../server/bidder/axonix/AxonixBidder.java | 117 +++++++++ .../ext/request/axonix/ExtImpAxonix.java | 13 + .../config/bidder/AxonixConfiguration.java | 52 ++++ src/main/resources/bidder-config/axonix.yaml | 27 ++ .../static/bidder-params/axonix.json | 14 + .../bidder/axonix/AxonixBidderTest.java | 241 ++++++++++++++++++ .../java/org/prebid/server/it/AxonixTest.java | 33 +++ .../axonix/test-auction-axonix-request.json | 23 ++ .../axonix/test-auction-axonix-response.json | 38 +++ .../axonix/test-axonix-bid-request.json | 42 +++ .../axonix/test-axonix-bid-response.json | 20 ++ .../server/it/test-application.properties | 2 + 12 files changed, 622 insertions(+) create mode 100644 src/main/java/org/prebid/server/bidder/axonix/AxonixBidder.java create mode 100644 src/main/java/org/prebid/server/proto/openrtb/ext/request/axonix/ExtImpAxonix.java create mode 100644 src/main/java/org/prebid/server/spring/config/bidder/AxonixConfiguration.java create mode 100644 src/main/resources/bidder-config/axonix.yaml create mode 100644 src/main/resources/static/bidder-params/axonix.json create mode 100644 src/test/java/org/prebid/server/bidder/axonix/AxonixBidderTest.java create mode 100644 src/test/java/org/prebid/server/it/AxonixTest.java create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-response.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-response.json diff --git a/src/main/java/org/prebid/server/bidder/axonix/AxonixBidder.java b/src/main/java/org/prebid/server/bidder/axonix/AxonixBidder.java new file mode 100644 index 00000000000..d8be9d14cf0 --- /dev/null +++ b/src/main/java/org/prebid/server/bidder/axonix/AxonixBidder.java @@ -0,0 +1,117 @@ +package org.prebid.server.bidder.axonix; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.iab.openrtb.request.BidRequest; +import com.iab.openrtb.request.Imp; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import io.vertx.core.http.HttpMethod; +import org.apache.commons.collections4.CollectionUtils; +import org.prebid.server.bidder.Bidder; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpCall; +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.axonix.ExtImpAxonix; +import org.prebid.server.proto.openrtb.ext.response.BidType; +import org.prebid.server.util.HttpUtil; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Axonix {@link Bidder} implementation. + */ +public class AxonixBidder implements Bidder { + + private static final TypeReference> AXONIX_EXT_TYPE_REFERENCE = + new TypeReference>() { + }; + public static final String URL_SUPPLY_ID_MACRO = "{{SupplyId}}"; + + private final JacksonMapper mapper; + private final String endpointUrl; + + public AxonixBidder(String endpointUrl, JacksonMapper mapper) { + this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); + this.mapper = Objects.requireNonNull(mapper); + } + + @Override + public Result>> makeHttpRequests(BidRequest request) { + final ExtImpAxonix extImpAxonix; + try { + extImpAxonix = parseImpExt(request.getImp().get(0)); + } catch (PreBidException e) { + return Result.withError(BidderError.badInput(e.getMessage())); + } + + return Result.withValue(HttpRequest.builder() + .method(HttpMethod.POST) + .uri(resolveEndpoint(extImpAxonix.getSupplyId())) + .headers(HttpUtil.headers()) + .payload(request) + .body(mapper.encode(request)) + .build()); + } + + private ExtImpAxonix parseImpExt(Imp imp) { + try { + return mapper.mapper().convertValue(imp.getExt(), AXONIX_EXT_TYPE_REFERENCE).getBidder(); + } catch (IllegalArgumentException e) { + throw new PreBidException("Imp.ext could not be parsed"); + } + } + + private String resolveEndpoint(String supplyId) { + return endpointUrl.replace(URL_SUPPLY_ID_MACRO, HttpUtil.encodeUrl(supplyId)); + } + + @Override + public Result> makeBids(HttpCall httpCall, BidRequest bidRequest) { + try { + final BidResponse bidResponse = mapper.decodeValue(httpCall.getResponse().getBody(), BidResponse.class); + return Result.of(extractBids(bidRequest, bidResponse), Collections.emptyList()); + } catch (DecodeException | PreBidException e) { + return Result.withError(BidderError.badServerResponse(e.getMessage())); + } + } + + private static List extractBids(BidRequest bidRequest, 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, getMediaType(bid.getImpid(), bidRequest.getImp()), bidResponse.getCur())) + .collect(Collectors.toList()); + } + + private static BidType getMediaType(String impId, List imps) { + for (Imp imp : imps) { + if (impId.equals(imp.getId())) { + if (imp.getXNative() != null) { + return BidType.xNative; + } else if (imp.getVideo() != null) { + return BidType.video; + } + return BidType.banner; + } + } + return BidType.banner; + } +} + diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/axonix/ExtImpAxonix.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/axonix/ExtImpAxonix.java new file mode 100644 index 00000000000..7ec0fbaf095 --- /dev/null +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/axonix/ExtImpAxonix.java @@ -0,0 +1,13 @@ +package org.prebid.server.proto.openrtb.ext.request.axonix; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Value; + +@Value +@AllArgsConstructor(staticName = "of") +public class ExtImpAxonix { + + @JsonProperty("supplyId") + String supplyId; +} diff --git a/src/main/java/org/prebid/server/spring/config/bidder/AxonixConfiguration.java b/src/main/java/org/prebid/server/spring/config/bidder/AxonixConfiguration.java new file mode 100644 index 00000000000..d0f4b6bcad5 --- /dev/null +++ b/src/main/java/org/prebid/server/spring/config/bidder/AxonixConfiguration.java @@ -0,0 +1,52 @@ +package org.prebid.server.spring.config.bidder; + +import org.prebid.server.bidder.BidderDeps; +import org.prebid.server.bidder.axonix.AxonixBidder; +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.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +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 javax.validation.constraints.NotBlank; + +@Configuration +@PropertySource(value = "classpath:/bidder-config/axonix.yaml", factory = YamlPropertySourceFactory.class) +public class AxonixConfiguration { + + private static final String BIDDER_NAME = "axonix"; + + @Value("${external-url}") + @NotBlank + private String externalUrl; + + @Autowired + private JacksonMapper mapper; + + @Autowired + @Qualifier("axonixConfigurationProperties") + private BidderConfigurationProperties configProperties; + + @Bean("axonixConfigurationProperties") + @ConfigurationProperties("adapters.axonix") + BidderConfigurationProperties configurationProperties() { + return new BidderConfigurationProperties(); + } + + @Bean + BidderDeps axonixBidderDeps() { + return BidderDepsAssembler.forBidder(BIDDER_NAME) + .withConfig(configProperties) + .usersyncerCreator(UsersyncerCreator.create(externalUrl)) + .bidderCreator(config -> new AxonixBidder(config.getEndpoint(), mapper)) + .assemble(); + } +} + diff --git a/src/main/resources/bidder-config/axonix.yaml b/src/main/resources/bidder-config/axonix.yaml new file mode 100644 index 00000000000..8aae123d675 --- /dev/null +++ b/src/main/resources/bidder-config/axonix.yaml @@ -0,0 +1,27 @@ +adapters: + axonix: + enabled: false + endpoint: https://openrtb-us-east-1.axonix.com/supply/prebid-server/{{SupplyId}} + pbs-enforces-gdpr: true + pbs-enforces-ccpa: true + modifying-vast-xml-allowed: true + deprecated-names: + aliases: {} + meta-info: + maintainer-email: support.axonix@emodoinc.com + app-media-types: + - banner + - video + - native + site-media-types: + - banner + - video + - native + supported-vendors: + vendor-id: 678 + usersync: + url: + redirect-url: + cookie-family-name: axonix + type: redirect + support-cors: false diff --git a/src/main/resources/static/bidder-params/axonix.json b/src/main/resources/static/bidder-params/axonix.json new file mode 100644 index 00000000000..7a3762ce5e2 --- /dev/null +++ b/src/main/resources/static/bidder-params/axonix.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Axonix Adapter Params", + "description": "A schema which validates params accepted by the Axonix adapter", + "type": "object", + "properties": { + "supplyId": { + "type": "string", + "minLength": 1, + "description": "Unique supply identifier" + } + }, + "required": ["supplyId"] +} diff --git a/src/test/java/org/prebid/server/bidder/axonix/AxonixBidderTest.java b/src/test/java/org/prebid/server/bidder/axonix/AxonixBidderTest.java new file mode 100644 index 00000000000..6ec80b06c91 --- /dev/null +++ b/src/test/java/org/prebid/server/bidder/axonix/AxonixBidderTest.java @@ -0,0 +1,241 @@ +package org.prebid.server.bidder.axonix; + +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.request.Native; +import com.iab.openrtb.request.Video; +import com.iab.openrtb.response.Bid; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import org.junit.Before; +import org.junit.Test; +import org.prebid.server.VertxTest; +import org.prebid.server.bidder.between.BetweenBidder; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpCall; +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.axonix.ExtImpAxonix; +import org.prebid.server.proto.openrtb.ext.request.between.ExtImpBetween; + +import java.util.List; +import java.util.function.Function; + +import static java.util.Collections.singletonList; +import static java.util.function.Function.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.banner; +import static org.prebid.server.proto.openrtb.ext.response.BidType.video; +import static org.prebid.server.proto.openrtb.ext.response.BidType.xNative; + +public class AxonixBidderTest extends VertxTest { + + private static final String ENDPOINT_URL = "https://randomurl.com/{{SupplyId}}"; + + private AxonixBidder axonixBidder; + + @Before + public void setUp() { + axonixBidder = new AxonixBidder(ENDPOINT_URL, jacksonMapper); + } + + @Test + public void creationShouldFailOnInvalidEndpointUrl() { + assertThatIllegalArgumentException().isThrownBy(() -> new BetweenBidder("invalid_url", jacksonMapper)); + } + + @Test + public void makeHttpRequestsShouldCreateCorrectURL() { + // given + final BidRequest bidRequest = givenBidRequest( + impBuilder -> impBuilder + .banner(Banner.builder().format(singletonList(Format.builder().w(300).h(500).build())).build()) + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpAxonix.of("someSupplyId"))))); + + // when + final Result>> result = axonixBidder.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).hasSize(1); + assertThat(result.getValue()) + .extracting(HttpRequest::getUri) + .containsExactly("https://randomurl.com/someSupplyId"); + } + + @Test + public void makeHttpRequestsShouldReturnErrorsOfNotValidImps() { + // given + final BidRequest bidRequest = givenBidRequest( + impBuilder -> impBuilder + .ext(mapper.valueToTree(ExtPrebid.of(null, mapper.createArrayNode())))); + // when + final Result>> result = axonixBidder.makeHttpRequests(bidRequest); + + // then + assertThat(result.getErrors()).hasSize(1); + assertThat(result.getErrors()).containsExactly(BidderError.badInput("Imp.ext could not be parsed")); + } + + @Test + public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { + // given + final HttpCall httpCall = givenHttpCall(null, "invalid"); + + // when + final Result> result = axonixBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); + }); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnEmptyListIfBidResponseIsNull() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(null, mapper.writeValueAsString(null)); + + // when + final Result> result = axonixBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnEmptyListIfBidResponseSeatBidIsNull() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(null, + mapper.writeValueAsString(BidResponse.builder().build())); + + // when + final Result> result = axonixBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnNativeBidIfNativeIsPresentInRequestImp() throws JsonProcessingException { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(singletonList(Imp.builder().id("123").xNative(Native.builder().build()).build())) + .build(); + + final HttpCall httpCall = givenHttpCall(bidRequest, mapper.writeValueAsString( + givenBidResponse(bidBuilder -> bidBuilder.impid("123")))); + + // when + final Result> result = axonixBidder.makeBids(httpCall, bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().impid("123").build(), xNative, null)); + } + + @Test + public void makeBidsShouldReturnVideoBidIfVideoIsPresentInRequestImp() throws JsonProcessingException { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(singletonList(Imp.builder().id("123").video(Video.builder().build()).build())) + .build(); + + final HttpCall httpCall = givenHttpCall(bidRequest, mapper.writeValueAsString( + givenBidResponse(bidBuilder -> bidBuilder.impid("123")))); + + // when + final Result> result = axonixBidder.makeBids(httpCall, bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().impid("123").build(), video, null)); + } + + @Test + public void makeBidsShouldReturnBannerBidIfBidHasNoCorrespondingImp() throws JsonProcessingException { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(singletonList(Imp.builder().id("123").build())) + .build(); + + final HttpCall httpCall = givenHttpCall(bidRequest, mapper.writeValueAsString( + givenBidResponse(bidBuilder -> bidBuilder.impid("33")))); + + // when + final Result> result = axonixBidder.makeBids(httpCall, bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().impid("33").build(), banner, null)); + } + + @Test + public void makeBidsShouldReturnBannerBidIfBannerAndVideoAbsentInRequestImp() throws JsonProcessingException { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(singletonList(Imp.builder().id("123").build())) + .build(); + + final HttpCall httpCall = givenHttpCall(bidRequest, mapper.writeValueAsString( + givenBidResponse(bidBuilder -> bidBuilder.impid("123")))); + + // when + final Result> result = axonixBidder.makeBids(httpCall, bidRequest); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(Bid.builder().impid("123").build(), banner, null)); + } + + private static BidRequest givenBidRequest( + Function bidRequestCustomizer, + Function impCustomizer) { + + return bidRequestCustomizer.apply(BidRequest.builder() + .imp(singletonList(givenImp(impCustomizer)))) + .build(); + } + + private static BidRequest givenBidRequest(Function impCustomizer) { + return givenBidRequest(identity(), impCustomizer); + } + + private static Imp givenImp(Function impCustomizer) { + return impCustomizer.apply(Imp.builder() + .id("123") + .banner(Banner.builder().w(23).h(25).build()) + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpBetween.of("127.0.0.1", "pubId"))))) + .build(); + } + + private static BidResponse givenBidResponse(Function bidCustomizer) { + return BidResponse.builder() + .seatbid(singletonList(SeatBid.builder().bid(singletonList(bidCustomizer.apply(Bid.builder()).build())) + .build())) + .build(); + } + + private static HttpCall givenHttpCall(BidRequest bidRequest, String body) { + return HttpCall.success( + HttpRequest.builder().payload(bidRequest).build(), + HttpResponse.of(200, null, body), + null); + } +} diff --git a/src/test/java/org/prebid/server/it/AxonixTest.java b/src/test/java/org/prebid/server/it/AxonixTest.java new file mode 100644 index 00000000000..21d1c12597d --- /dev/null +++ b/src/test/java/org/prebid/server/it/AxonixTest.java @@ -0,0 +1,33 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.prebid.server.model.Endpoint; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.IOException; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static java.util.Collections.singletonList; + +@RunWith(SpringRunner.class) +public class AxonixTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromAxonix() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/axonix-exchange")) + .willReturn(aResponse().withBody(jsonFrom("openrtb2/axonix/test-axonix-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/axonix/test-auction-axonix-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/axonix/test-auction-axonix-response.json", response, singletonList("axonix")); + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-request.json new file mode 100644 index 00000000000..dae37969b57 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-request.json @@ -0,0 +1,23 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "axonix": { + "supplyId": "someSupplyId" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-response.json b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-response.json new file mode 100644 index 00000000000..31a15adc1f9 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-auction-axonix-response.json @@ -0,0 +1,38 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "adm": "adm001", + "adid": "adid001", + "cid": "cid001", + "crid": "crid001", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + }, + "origbidcpm": 3.33 + } + } + ], + "seat": "axonix", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "axonix": "{{ axonix.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-request.json new file mode 100644 index 00000000000..0f5d0235a40 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-request.json @@ -0,0 +1,42 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "secure": 0, + "ext": { + "bidder": { + "supplyId": "someSupplyId" + } + } + } + ], + "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": 5000, + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-response.json new file mode 100644 index 00000000000..e291739474c --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/axonix/test-axonix-bid-response.json @@ -0,0 +1,20 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "adid": "adid001", + "crid": "crid001", + "cid": "cid001", + "adm": "adm001", + "h": 250, + "w": 300 + } + ] + } + ] +} \ No newline at end of file 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 6246204a513..273720360b5 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -77,6 +77,8 @@ adapters.applogy.usersync.url=//applogy-usersync adapters.avocet.enabled=true adapters.avocet.endpoint=http://localhost:8090/avocet-exchange adapters.avocet.usersync.url=//avocet-usersync +adapters.axonix.enabled=true +adapters.axonix.endpoint=http://localhost:8090/axonix-exchange adapters.beachfront.enabled=true adapters.beachfront.endpoint=http://localhost:8090/beachfront-exchange/banner adapters.beachfront.video-endpoint=http://localhost:8090/beachfront-exchange/video?exchange_id=