Skip to content

Commit d07733a

Browse files
PubMatic: Fix missing bid type in bid response (prebid#4417)
1 parent 8c04789 commit d07733a

22 files changed

+43
-18
lines changed

adapters/pubmatic/pubmatic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ func (a *PubmaticAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externa
470470
typedBid := &adapters.TypedBid{
471471
Bid: &bid,
472472
BidVideo: &openrtb_ext.ExtBidPrebidVideo{},
473+
BidType: mType,
473474
}
474475

475476
var bidExt *pubmaticBidExt

adapters/pubmatic/pubmatic_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ func TestPubmaticAdapter_MakeBids(t *testing.T) {
437437
Ext: json.RawMessage(`{"dspid": 6, "deal_channel": 1, "prebiddealpriority": 1}`),
438438
},
439439
DealPriority: 1,
440+
BidType: openrtb_ext.BidTypeBanner,
440441
BidVideo: &openrtb_ext.ExtBidPrebidVideo{},
441442
BidMeta: &openrtb_ext.ExtBidPrebidMeta{
442443
MediaType: "banner",
@@ -472,6 +473,7 @@ func TestPubmaticAdapter_MakeBids(t *testing.T) {
472473
MType: 1,
473474
Ext: json.RawMessage(`{"dspid": 6, "deal_channel": 1, "prebiddealpriority": -1}`),
474475
},
476+
BidType: openrtb_ext.BidTypeBanner,
475477
BidVideo: &openrtb_ext.ExtBidPrebidVideo{},
476478
BidMeta: &openrtb_ext.ExtBidPrebidMeta{
477479
MediaType: "banner",
@@ -507,6 +509,7 @@ func TestPubmaticAdapter_MakeBids(t *testing.T) {
507509
MType: 1,
508510
Ext: json.RawMessage(`{"dspid": 6, "deal_channel": 1, "prebiddealpriority": -1, "ibv": true}`),
509511
},
512+
BidType: openrtb_ext.BidTypeBanner,
510513
BidVideo: &openrtb_ext.ExtBidPrebidVideo{},
511514
BidMeta: &openrtb_ext.ExtBidPrebidMeta{
512515
MediaType: "video",

adapters/pubmatic/pubmatictest/exemplary/banner.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@
149149
"deal_channel": 1,
150150
"prebiddealpriority": 1
151151
}
152-
}
152+
},
153+
"type": "banner"
153154
}
154155
]
155156
}

adapters/pubmatic/pubmatictest/exemplary/fledge.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@
126126
"h": 90,
127127
"mtype": 1,
128128
"ext": {}
129-
}
129+
},
130+
"type": "banner"
130131
}
131132
],
132133
"fledgeauctionconfigs": [

adapters/pubmatic/pubmatictest/exemplary/native.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
"deal_channel": 1,
109109
"bidtype": 2
110110
}
111-
}
111+
},
112+
"type": "native"
112113
}
113114
]
114115
}

adapters/pubmatic/pubmatictest/exemplary/video.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
}
172172
}
173173
},
174+
"type": "video",
174175
"video" :{
175176
"duration" : 5,
176177
"primary_category": ""

adapters/pubmatic/pubmatictest/supplemental/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
"h": 250,
134134
"mtype": 1,
135135
"dealid":"test deal"
136-
}
136+
},
137+
"type": "banner"
137138
}
138139
]
139140
}

adapters/pubmatic/pubmatictest/supplemental/bid_ext_ibv_true.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
}
190190
}
191191
},
192+
"type": "banner",
192193
"video" :{
193194
"duration" : 5,
194195
"primary_category": ""

adapters/pubmatic/pubmatictest/supplemental/dctrAndPmZoneID.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@
156156
"dspid": 6,
157157
"deal_channel": 1
158158
}
159-
}
159+
},
160+
"type": "banner"
160161
}
161162
]
162163
}

adapters/pubmatic/pubmatictest/supplemental/displayManagerInAppExt.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@
168168
"dspid": 6,
169169
"deal_channel": 1
170170
}
171-
}
171+
},
172+
"type": "banner"
172173
}
173174
]
174175
}

0 commit comments

Comments
 (0)