diff --git a/adapters/openx/openx.go b/adapters/openx/openx.go index ca88b18bdb8..c2a42adf295 100644 --- a/adapters/openx/openx.go +++ b/adapters/openx/openx.go @@ -22,7 +22,8 @@ type openxImpExt struct { } type openxReqExt struct { - DelDomain string `json:"delDomain"` + DelDomain string `json:"delDomain,omitempty"` + Platform string `json:"platform,omitempty"` BidderConfig string `json:"bc"` } @@ -125,6 +126,7 @@ func preprocess(imp *openrtb.Imp, reqExt *openxReqExt) error { } reqExt.DelDomain = openxExt.DelDomain + reqExt.Platform = openxExt.Platform imp.TagID = openxExt.Unit imp.BidFloor = openxExt.CustomFloor diff --git a/adapters/openx/openxtest/exemplary/optional-params.json b/adapters/openx/openxtest/exemplary/optional-params.json index 225559875a8..e8fcf394b8b 100644 --- a/adapters/openx/openxtest/exemplary/optional-params.json +++ b/adapters/openx/openxtest/exemplary/optional-params.json @@ -11,6 +11,7 @@ "bidder": { "unit": "539439964", "delDomain": "se-demo-d.openx.net", + "platform": "PLATFORM", "customFloor": 0.1, "customParams": {"foo": "bar"} } @@ -40,7 +41,8 @@ ], "ext": { "bc": "hb_pbs_1.0.0", - "delDomain": "se-demo-d.openx.net" + "delDomain": "se-demo-d.openx.net", + "platform": "PLATFORM" } } }, diff --git a/openrtb_ext/imp_openx.go b/openrtb_ext/imp_openx.go index e63595b0912..2625cb3802d 100644 --- a/openrtb_ext/imp_openx.go +++ b/openrtb_ext/imp_openx.go @@ -3,6 +3,7 @@ package openrtb_ext // ExtImpOpenx defines the contract for bidrequest.imp[i].ext.openx type ExtImpOpenx struct { Unit string `json:"unit"` + Platform string `json:"platform"` DelDomain string `json:"delDomain"` CustomFloor float64 `json:"customFloor"` CustomParams map[string]interface{} `json:"customParams"` diff --git a/static/bidder-params/openx.json b/static/bidder-params/openx.json index 93a672ed629..6dbd10178e4 100644 --- a/static/bidder-params/openx.json +++ b/static/bidder-params/openx.json @@ -16,6 +16,11 @@ "pattern": "\\.[a-zA-Z]{2,3}$", "format": "hostname" }, + "platform": { + "type": "string", + "description": "The platform id for the customer.", + "format": "uuid" + }, "customFloor": { "type": "number", "description": "The minimum CPM price in USD.", @@ -26,6 +31,19 @@ "description": "User-defined targeting key-value pairs." } }, - - "required": ["unit", "delDomain"] + "required": [ + "unit" + ], + "anyOf": [ + { + "required": [ + "delDomain" + ] + }, + { + "required": [ + "platform" + ] + } + ] }