Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Messages For Legacy Bidder Params Location #2460

Merged
merged 2 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adapters/33across/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/33across.json
//
// These also validate the format of the external API: request.imp[i].ext.33across
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.33across

// TestValidParams makes sure that the 33across schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adf/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/adf.json
//
// These also validate the format of the external API: request.imp[i].ext.adf
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adf

// TestValidParams makes sure that the adform schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions adapters/admixer/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package admixer

import (
"encoding/json"
"github.com/prebid/prebid-server/openrtb_ext"
"testing"

"github.com/prebid/prebid-server/openrtb_ext"
)

// This file actually intends to test static/bidder-params/admixer.json
//
// These also validate the format of the external API: request.imp[i].ext.admixer
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.admixer

// TestValidParams makes sure that the admixer schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adnuntius/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/adnuntius.json
// These also validate the format of the external API: request.imp[i].ext.adnuntius
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adnuntius
// TestValidParams makes sure that the adnuntius schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adot/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/adot.json
//
// These also validate the format of the external API: request.imp[i].ext.adot
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adot

// TestValidParams makes sure that the adot schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adtarget/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/adtarget.json
// These also validate the format of the external API: request.imp[i].ext.adtarget
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adtarget
// TestValidParams makes sure that the adtarget schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adtelligent/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/adtelligent.json
// These also validate the format of the external API: request.imp[i].ext.adtelligent
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adtelligent
// TestValidParams makes sure that the adtelligent schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/adyoulike/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/adyoulike.json
//
// These also validate the format of the external API: request.imp[i].ext.adyoulike
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.adyoulike

// TestValidParams makes sure that the adyoulike schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/apacdex/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/apacdex.json
// These also validate the format of the external API: request.imp[i].ext.apacdex
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.apacdex
// TestValidParams makes sure that the Apacdex schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/appnexus/appnexus.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E
thisURI = appendMemberId(thisURI, memberId)

if len(uniqueIds) > 1 {
errs = append(errs, fmt.Errorf("All request.imp[i].ext.appnexus.member params must match. Request contained: %v", uniqueIds))
errs = append(errs, fmt.Errorf("All request.imp[i].ext.prebid.bidder.appnexus.member params must match. Request contained: %v", uniqueIds))
}
}

Expand Down
2 changes: 1 addition & 1 deletion adapters/appnexus/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/appnexus.json
//
// These also validate the format of the external API: request.imp[i].ext.appnexus
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.appnexus

// TestValidParams makes sure that the appnexus schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/axonix/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/axonix.json
//
// These also validate the format of the external API: request.imp[i].ext.axonix
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.axonix

// TestValidParams makes sure that the Axonix schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/between/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/between.json
//
// These also validate the format of the external API: request.imp[i].ext.between
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.between

// TestValidParams makes sure that the between schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/brightroll/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/brightroll.json
//
// These also validate the format of the external API: request.imp[i].ext.brightroll
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.brightroll

// TestValidParams makes sure that the Brightroll schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/consumable/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/consumable.json
//
// These also validate the format of the external API: request.imp[i].ext.consumable
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.consumable

// TestValidParams makes sure that the 33across schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/cpmstar/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/cpmstar.json
// These also validate the format of the external API: request.imp[i].ext.cpmstar
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.cpmstar
// TestValidParams makes sure that the Cpmstar schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/criteo/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/criteo.json
//
// These also validate the format of the external API: request.imp[i].ext.criteo
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.criteo

// TestValidParams makes sure that the criteo schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/dianomi/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/dianomi.json
//
// These also validate the format of the external API: request.imp[i].ext.dianomi
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.dianomi

// TestValidParams makes sure that the dianomi schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/gamma/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/gamma.json
//
// These also validate the format of the external API: request.imp[i].ext.brightroll
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.brightroll

// TestValidParams makes sure that the Gamma schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/gamoshi/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/gamoshi.json
//
// These also validate the format of the external API: request.imp[i].ext.gamoshi
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.gamoshi

// TestValidParams makes sure that the Gamoshi schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/lockerdome/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file tests static/bidder-params/lockerdome.json
// and validates the format of the external API: request.imp[i].ext.lockerdome
// and validates the format of the external API: request.imp[i].ext.prebid.bidder.lockerdome

// TestValidParams makes sure that the LockerDome schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/madvertise/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/Madvertise.json
//
// These also validate the format of the external API: request.imp[i].ext.Madvertise
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.madvertise

// TestValidParams makes sure that the Madvertise schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/marsmedia/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/marsmedia.json
//
// These also validate the format of the external API: request.imp[i].ext.marsmedia
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.marsmedia

// TestValidParams makes sure that the Marsmedia schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/nanointeractive/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/nanointeractive.json
//
// These also validate the format of the external API: request.imp[i].ext.nanointeracive
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.nanointeracive

// TestValidParams makes sure that the NanoInteractive schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/openweb/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// This file actually intends to test static/bidder-params/openweb.json
// These also validate the format of the external API: request.imp[i].ext.openweb
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.openweb
// TestValidParams makes sure that the openweb schema accepts all imp.ext fields which we intend to support.

func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/openx/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/openx.json
//
// These also validate the format of the external API: request.imp[i].ext.openx
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.openx

// TestValidParams makes sure that the openx schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/operaads/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/operaads.json
//
// These also validate the format of the external API: request.imp[i].ext.operaads
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.operaads

// TestValidParams makes sure that the operaads schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions adapters/orbidder/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package orbidder

import (
"encoding/json"
"github.com/prebid/prebid-server/openrtb_ext"
"testing"

"github.com/prebid/prebid-server/openrtb_ext"
)

// This file actually intends to test static/bidder-params/orbidder.json
//
// These also validate the format of the external API: request.imp[i].ext.orbidder
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.orbidder

// TestValidParams makes sure that the orbidder schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/pubmatic/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/pubmatic.json
//
// These also validate the format of the external API: request.imp[i].ext.pubmatic
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.pubmatic

// TestValidParams makes sure that the pubmatic schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/smartadserver/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/smartadserver.json
//
// These also validate the format of the external API: request.imp[i].ext.smartadserver
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.smartadserver

// TestValidParams makes sure that the smartadserver schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/smilewanted/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/smilewanted.json
//
// These also validate the format of the external API: request.imp[i].ext.smilewanted
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.smilewanted

// TestValidParams makes sure that the smilewanted schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions adapters/sonobi/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package sonobi

import (
"encoding/json"
"github.com/prebid/prebid-server/openrtb_ext"
"testing"

"github.com/prebid/prebid-server/openrtb_ext"
)

// This file actually intends to test static/bidder-params/sonobi.json
//
// These also validate the format of the external API: request.imp[i].ext.sonobi
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.sonobi

// TestValidParams makes sure that the sonobi schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/synacormedia/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/synacormedia.json
//
// These also validate the format of the external API: request.imp[i].ext.synacormedia
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.synacormedia

// TestValidParams makes sure that the synacormedia schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions adapters/telaria/telaria.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type TelariaAdapter struct {
URI string
}

// This will be part of Imp[i].Ext when this adapter calls out the Telaria Ad Server
// This will be part of imp[i].ext when this adapter calls out the Telaria Ad Server
type ImpressionExtOut struct {
OriginalTagID string `json:"originalTagid"`
OriginalPublisherID string `json:"originalPublisherid"`
Expand Down Expand Up @@ -186,15 +186,15 @@ func (a *TelariaAdapter) MakeRequests(requestIn *openrtb2.BidRequest, reqInfo *a
var err error

var imp = request.Imp[0]
// fetch adCode & seatCode from Imp[i].Ext
// fetch adCode & seatCode from imp[i].ext
telariaImpExt, err = a.FetchTelariaExtImpParams(&imp)
if err != nil {
return nil, []error{err}
}

seatCode = telariaImpExt.SeatCode

// move the original tagId and the original publisher.id into the Imp[i].Ext object
// move the original tagId and the original publisher.id into the imp[i].ext object
imp.Ext, err = json.Marshal(&ImpressionExtOut{imp.TagID, originalPublisherID})
if err != nil {
return nil, []error{err}
Expand Down
5 changes: 3 additions & 2 deletions adapters/ucfunnel/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package ucfunnel

import (
"encoding/json"
"github.com/prebid/prebid-server/openrtb_ext"
"testing"

"github.com/prebid/prebid-server/openrtb_ext"
)

// This file actually intends to test static/bidder-params/ucfunnel.json
//
// These also validate the format of the external API: request.imp[i].ext.ucfunnel
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.ucfunnel

// TestValidParams makes sure that the ucfunnel schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/videobyte/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/videobyte.json
//
// These also validate the format of the external API: request.imp[i].ext.videobyte
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.videobyte

// TestValidParams makes sure that the videobyte schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/vidoomy/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// This file actually intends to test static/bidder-params/vidoomy.json
//
// These also validate the format of the external API: request.imp[i].ext.vidoomy
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.vidoomy

// TestValidParams makes sure that the vidoomy schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/vrtcal/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// This file actually intends to test static/bidder-params/vrtcal.json
//
// These also validate the format of the external API: request.imp[i].ext.vrtcal
// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.vrtcal
// TestValidParams makes sure that the Vrtcal schema accepts all imp.ext fields which we intend to support.
func TestValidParams(t *testing.T) {
validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
Expand Down
Loading