From 3debe7b1799213b3c03d24cda3fd1358da87f4de Mon Sep 17 00:00:00 2001 From: Serhii Nahornyi Date: Thu, 24 Jun 2021 13:36:52 +0300 Subject: [PATCH] Criteo: Update Json validation schema and maintainer email --- .../openrtb/ext/request/ExtImpCriteo.java | 4 +- src/main/resources/bidder-config/criteo.yaml | 2 +- .../static/bidder-params/criteo.json | 52 +++++++++++++++---- .../criteo/test-auction-criteo-request.json | 4 +- 4 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtImpCriteo.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtImpCriteo.java index 60e738970c3..1a4b9c065b0 100644 --- a/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtImpCriteo.java +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtImpCriteo.java @@ -1,5 +1,6 @@ package org.prebid.server.proto.openrtb.ext.request; +import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Value; @@ -9,9 +10,10 @@ public class ExtImpCriteo { @JsonProperty("zoneId") + @JsonAlias({"zoneid"}) Integer zoneId; @JsonProperty("networkId") + @JsonAlias({"networkid"}) Integer networkId; - } diff --git a/src/main/resources/bidder-config/criteo.yaml b/src/main/resources/bidder-config/criteo.yaml index 1228447b18e..629b067af83 100644 --- a/src/main/resources/bidder-config/criteo.yaml +++ b/src/main/resources/bidder-config/criteo.yaml @@ -9,7 +9,7 @@ adapters: deprecated-names: aliases: {} meta-info: - maintainer-email: pi-direct@criteo.com + maintainer-email: prebid@criteo.com app-media-types: - banner site-media-types: diff --git a/src/main/resources/static/bidder-params/criteo.json b/src/main/resources/static/bidder-params/criteo.json index 4020e475649..a44c2ae1cf1 100644 --- a/src/main/resources/static/bidder-params/criteo.json +++ b/src/main/resources/static/bidder-params/criteo.json @@ -1,20 +1,50 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Criteo Adapter Params", - "description": "A schema which validates params accepted by the Criteo adapter", - + "title": "Criteo adapter params", + "description": "The schema to validate Criteo specific params accepted by Criteo adapter", "type": "object", "properties": { + "zoneid": { + "type": "integer", + "description": "Impression's zone ID.", + "minimum": 0 + }, "zoneId": { - "type": "number", - "description": "The zone ID from Criteo", - "pattern": "^[0-9]+$" + "type": "integer", + "description": "Impression's zone ID, preferred.", + "minimum": 0 + }, + "networkid": { + "type": "integer", + "description": "Impression's network ID.", + "minimum": 0 }, "networkId": { - "type": "number", - "description": "The network ID from Criteo", - "pattern": "^[0-9]+$" + "type": "integer", + "description": "Impression's network ID, preferred.", + "minimum": 0 } }, - "required": ["zoneId", "networkId"] -} \ No newline at end of file + "anyOf": [ + { + "required": [ + "zoneid" + ] + }, + { + "required": [ + "zoneId" + ] + }, + { + "required": [ + "networkid" + ] + }, + { + "required": [ + "networkId" + ] + } + ] +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/criteo/test-auction-criteo-request.json b/src/test/resources/org/prebid/server/it/openrtb2/criteo/test-auction-criteo-request.json index 91e888d5a86..286a5f030d1 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/criteo/test-auction-criteo-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/criteo/test-auction-criteo-request.json @@ -16,7 +16,7 @@ "ext": { "criteo": { "zoneId": 123456, - "networkId": 78910 + "networkid": 78910 } } } @@ -73,4 +73,4 @@ "us_privacy": "1YNN" } } -} \ No newline at end of file +}