Skip to content
Open
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/ortbbidder/multi_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (rb *multiRequestBuilder) parseRequest(request *openrtb2.BidRequest) (err e
if rb.rawRequest, err = jsonutil.Marshal(request); err != nil {
return err
}
// request.Imp = tmpImp[0:] //resetting is not required
request.Imp = tmpImp[0:]

//cache impression from request
data, err := jsonutil.Marshal(tmpImp)
Expand Down
2 changes: 1 addition & 1 deletion adapters/ortbbidder/response_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (rb *responseBuilder) setPrebidBidderResponse(bidderResponseBytes json.RawM
// Returns the BidderResponse and any error encountered during the conversion.
func (rb *responseBuilder) buildAdapterResponse() (resp *adapters.BidderResponse, err error) {
var adapterResponeBytes json.RawMessage
adapterResponeBytes, err = jsonutil.Marshal(rb.adapterRespone)
adapterResponeBytes, err = json.Marshal(rb.adapterRespone)
if err != nil {
return nil, util.NewBadServerResponseError(err.Error())
}
Expand Down
3 changes: 1 addition & 2 deletions adapters/ortbbidder/response_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ func TestBuildAdapterResponse(t *testing.T) {
},
},
expectedResponse: nil,
expectedError: &errortypes.BadServerResponse{Message: "chan int is unsupported type"},
},
expectedError: &errortypes.BadServerResponse{Message: "json: unsupported type: chan int"}},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
Expand Down
146 changes: 105 additions & 41 deletions static/bidder-params/owortb_testbidder.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,128 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "testbidder (oRTB Integration) Adapter Params (single-request-type)",
"title": "testbidder (oRTB Integration) Adapter Params",
"description": "A schema which validates params accepted by the testbidder (oRTB Integration)",
"type": "object",
"properties": {
"adunit": {
"fledgeAuctionConfig": {
"type": "object",
"description": "Specifies fledge auction configurations",
"location": "ext.fledge"
},
"bidType": {
"type": "string",
"description": "adunitID param",
"location": "id"
"description": "type of the bid. banner, video, audio and native are the only supported values.",
"location": "seatbid.#.bid.#.ext.bidtype"
},
"bidDealPriority": {
"type": "integer",
"description": "priority of the deal bid",
"location": "seatbid.#.bid.#.ext.deal.priority"
},
"bidVideo": {
"type": "object",
"description": "Specifies primary category and duration of the video bid",
"location": "seatbid.#.bid.#.ext.video"
},
"bidVideoDuration": {
"type": "integer",
"description": "video duration of the bid",
"location": "seatbid.#.bid.#.ext.video.dur"
},
"tagid": {
"bidVideoPrimaryCategory": {
"type": "string",
"description": "tagid param",
"location": "imp.#.tagid"
"description": "primary IAB category of the bid",
"location": "seatbid.#.bid.#.ext.video.category"
},
"zone": {
"bidMeta": {
"type": "object",
"description": "meta information of the bid",
"location": "seatbid.#.bid.#.ext.metaobject"
},
"bidMetaAdvertiserDomains": {
"type": "string",
"description": "zone param",
"location": "appsite.id"
"description": "Domains for the landing page(s) aligning with the OpenRTB adomain field",
"location": "seatbid.#.bid.#.meta.domains"
},
"maxduration": {
"bidMetaAdvertiserId": {
"type": "integer",
"description": "maxduration param",
"location": "imp.#.video.maxduration"
"description": "Bidder-specific advertiser id",
"location": "seatbid.#.bid.#.ext.advID"
},
"bidMetaAdvertiserName" : {
"type": "string",
"description": "Bidder-specific advertiser name",
"location": "seatbid.#.bid.#.ext.advname"
},
"livestream": {
"bidMetaAgencyId" : {
"type": "integer",
"description": "livestream param",
"location": "appsite.cnt.livestream"
"description": "Bidder-specific agency id",
"location": "seatbid.#.bid.#.ext.agency.id"
},
"url": {
"bidMetaAgencyName" : {
"type": "string",
"description": "URL param setting in video-startdelay",
"location": "imp.#.video.startdelay"
"description": "Bidder-specific agency name",
"location": "seatbid.#.bid.#.ext.agency.name"
},
"randomKey": {
"bidMetaBrandId": {
"type": "integer",
"description": "Bidder-specific brand id for advertisers with multiple brands",
"location": "seatbid.#.bid.#.ext.brandid"
},
"bidMetaDchain": {
"type": "string",
"description": "randomKey param",
"location": "content.data"
"description": "Demand chain object",
"location": "seatbid.#.bid.#.ext.dchain"
},
"host": {
"bidMetaDemandSource": {
"type": "string",
"description": "host param",
"location": "ext.server.host"
"description": "Bidder-specific demand source",
"location": "seatbid.#.bid.#.ext.demand.source"
},
"wrapper": {
"type": "object",
"description": "Specifies configuration for a publisher",
"properties": {
"profile": {
"type": "integer",
"description": "An ID which identifies the openwrap profile of publisher"
},
"version": {
"type": "integer",
"description": "An ID which identifies version of the openwrap profile"
}
},
"location": "device.ext.publisherWrapper"
"bidMetaMediaType": {
"type": "string",
"description": "media type of bid, either banner, audio, video, or native",
"location": "seatbid.#.bid.#.ext.bidtype"
},
"bidMetaNetworkId": {
"type": "integer",
"description": "Bidder-specific network/DSP id",
"location": "seatbid.#.bid.#.ext.networkID"
},
"bidMetaNetworkName": {
"type": "string",
"description": "Bidder-specific network/DSP name",
"location": "seatbid.#.bid.#.ext.networkName"
},
"bidMetaPrimaryCatId": {
"type": "string",
"description": "Primary IAB category id",
"location": "seatbid.#.bid.#.cat.0"
},
"bidMetaRendererName": {
"type": "string",
"description": "Name of the desired renderer for the creative",
"location": "seatbid.#.bid.#.renderer.name"
},
"bidMetaRendererVersion": {
"type": "string",
"description": "Version of the desired renderer for the creative",
"location": "seatbid.#.bid.#.ext.renderer.version"
},
"bidMetaRendererData": {
"type": "string",
"description": "Data of the custom renderer",
"location": "seatbid.#.bid.#.ext.renderer.data"
},
"bidMetaRendererUrl": {
"type": "string",
"description": "Dynamic renderer URL for use in outstream rendering",
"location": "seatbid.#.bid.#.ext.renderer.url"
},
"bidMetaSecondaryCatIds": {
"type": "array",
"description": "Secondary IAB category ids",
"location": "seatbid.#.bid.#.ext.meta.categories"
}
},
"required": ["adunit"]
}
}
146 changes: 105 additions & 41 deletions static/bidder-params/owortb_testbidder_multi.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,128 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "testbidder (oRTB Integration) Adapter Params (multi-request-type)",
"title": "testbidder (oRTB Integration) Adapter Params",
"description": "A schema which validates params accepted by the testbidder (oRTB Integration)",
"type": "object",
"properties": {
"adunit": {
"fledgeAuctionConfig": {
"type": "object",
"description": "Specifies fledge auction configurations",
"location": "ext.fledge"
},
"bidType": {
"type": "string",
"description": "adunitID param",
"location": "id"
"description": "type of the bid. banner, video, audio and native are the only supported values.",
"location": "seatbid.#.bid.#.ext.bidtype"
},
"bidDealPriority": {
"type": "integer",
"description": "priority of the deal bid",
"location": "seatbid.#.bid.#.ext.deal.priority"
},
"bidVideo": {
"type": "object",
"description": "Specifies primary category and duration of the video bid",
"location": "seatbid.#.bid.#.ext.video"
},
"bidVideoDuration": {
"type": "integer",
"description": "video duration of the bid",
"location": "seatbid.#.bid.#.ext.video.dur"
},
"tagid": {
"bidVideoPrimaryCategory": {
"type": "string",
"description": "tagid param",
"location": "imp.#.tagid"
"description": "primary IAB category of the bid",
"location": "seatbid.#.bid.#.ext.video.category"
},
"zone": {
"bidMeta": {
"type": "object",
"description": "meta information of the bid",
"location": "seatbid.#.bid.#.ext.metaobject"
},
"bidMetaAdvertiserDomains": {
"type": "string",
"description": "zone param",
"location": "appsite.id"
"description": "Domains for the landing page(s) aligning with the OpenRTB adomain field",
"location": "seatbid.#.bid.#.meta.domains"
},
"maxduration": {
"bidMetaAdvertiserId": {
"type": "integer",
"description": "maxduration param",
"location": "imp.#.video.maxduration"
"description": "Bidder-specific advertiser id",
"location": "seatbid.#.bid.#.ext.advID"
},
"bidMetaAdvertiserName" : {
"type": "string",
"description": "Bidder-specific advertiser name",
"location": "seatbid.#.bid.#.ext.advname"
},
"livestream": {
"bidMetaAgencyId" : {
"type": "integer",
"description": "livestream param",
"location": "appsite.cnt.livestream"
"description": "Bidder-specific agency id",
"location": "seatbid.#.bid.#.ext.agency.id"
},
"url": {
"bidMetaAgencyName" : {
"type": "string",
"description": "URL param setting in video-startdelay",
"location": "imp.#.video.startdelay"
"description": "Bidder-specific agency name",
"location": "seatbid.#.bid.#.ext.agency.name"
},
"randomKey": {
"bidMetaBrandId": {
"type": "integer",
"description": "Bidder-specific brand id for advertisers with multiple brands",
"location": "seatbid.#.bid.#.ext.brandid"
},
"bidMetaDchain": {
"type": "string",
"description": "randomKey param",
"location": "content.data"
"description": "Demand chain object",
"location": "seatbid.#.bid.#.ext.dchain"
},
"host": {
"bidMetaDemandSource": {
"type": "string",
"description": "host param",
"location": "ext.server.host"
"description": "Bidder-specific demand source",
"location": "seatbid.#.bid.#.ext.demand.source"
},
"wrapper": {
"type": "object",
"description": "Specifies configuration for a publisher",
"properties": {
"profile": {
"type": "integer",
"description": "An ID which identifies the openwrap profile of publisher"
},
"version": {
"type": "integer",
"description": "An ID which identifies version of the openwrap profile"
}
},
"location": "device.ext.publisherWrapper"
"bidMetaMediaType": {
"type": "string",
"description": "media type of bid, either banner, audio, video, or native",
"location": "seatbid.#.bid.#.ext.bidtype"
},
"bidMetaNetworkId": {
"type": "integer",
"description": "Bidder-specific network/DSP id",
"location": "seatbid.#.bid.#.ext.networkID"
},
"bidMetaNetworkName": {
"type": "string",
"description": "Bidder-specific network/DSP name",
"location": "seatbid.#.bid.#.ext.networkName"
},
"bidMetaPrimaryCatId": {
"type": "string",
"description": "Primary IAB category id",
"location": "seatbid.#.bid.#.cat.0"
},
"bidMetaRendererName": {
"type": "string",
"description": "Name of the desired renderer for the creative",
"location": "seatbid.#.bid.#.renderer.name"
},
"bidMetaRendererVersion": {
"type": "string",
"description": "Version of the desired renderer for the creative",
"location": "seatbid.#.bid.#.ext.renderer.version"
},
"bidMetaRendererData": {
"type": "string",
"description": "Data of the custom renderer",
"location": "seatbid.#.bid.#.ext.renderer.data"
},
"bidMetaRendererUrl": {
"type": "string",
"description": "Dynamic renderer URL for use in outstream rendering",
"location": "seatbid.#.bid.#.ext.renderer.url"
},
"bidMetaSecondaryCatIds": {
"type": "array",
"description": "Secondary IAB category ids",
"location": "seatbid.#.bid.#.ext.meta.categories"
}
},
"required": ["adunit"]
}
}