From 83db0ba41275c7aacec7e36c5f08c3195fa7c8e6 Mon Sep 17 00:00:00 2001 From: Maxime Liege Date: Wed, 30 Aug 2023 11:04:01 +0200 Subject: [PATCH] Add data field for custom renderers --- .../exchangetest/request-ext-prebid-filtering.json | 10 ++++++++-- openrtb_ext/bid.go | 1 + openrtb_ext/request.go | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/exchange/exchangetest/request-ext-prebid-filtering.json b/exchange/exchangetest/request-ext-prebid-filtering.json index 4355f51762c..8e85d8edfdc 100644 --- a/exchange/exchangetest/request-ext-prebid-filtering.json +++ b/exchange/exchangetest/request-ext-prebid-filtering.json @@ -65,7 +65,10 @@ "renderers": [ { "name": "test-name", - "version": "test-version" + "version": "test-version", + "data" : { + "complex": "data" + } } ] } @@ -121,7 +124,10 @@ "renderers": [ { "name": "test-name", - "version": "test-version" + "version": "test-version", + "data": { + "complex": "data" + } } ] } diff --git a/openrtb_ext/bid.go b/openrtb_ext/bid.go index 7dc620d46d7..85cfed5cbe7 100644 --- a/openrtb_ext/bid.go +++ b/openrtb_ext/bid.go @@ -66,6 +66,7 @@ type ExtBidPrebidMeta struct { PrimaryCategoryID string `json:"primaryCatId,omitempty"` RendererName string `json:"rendererName,omitempty"` RendererVersion string `json:"rendererVersion,omitempty"` + RendererData json.RawMessage `json:"rendererData,omitempty"` SecondaryCategoryIDs []string `json:"secondaryCatIds,omitempty"` } diff --git a/openrtb_ext/request.go b/openrtb_ext/request.go index 6f39f0be288..f5418ba4d1f 100644 --- a/openrtb_ext/request.go +++ b/openrtb_ext/request.go @@ -352,8 +352,9 @@ type ExtRequestSdk struct { } type ExtRequestSdkRenderer struct { - Name string `json:"name,omitempty"` - Version string `json:"version,omitempty"` + Name string `json:"name,omitempty"` + Version string `json:"version,omitempty"` + Data json.RawMessage `json:"data,omitempty"` } type ExtMultiBid struct {