From 4d58f1f822a1b74e9d3c94ce6aaac5e5a7c41be9 Mon Sep 17 00:00:00 2001 From: Ruslan Sibgatullin Date: Fri, 18 Oct 2024 16:12:49 +0200 Subject: [PATCH] PREB-42 Add GPID support --- adapters/smaato/smaato.go | 43 ++++----- .../exemplary/multiple-impressions-skadn.json | 4 +- .../exemplary/multiple-impressions.json | 4 +- .../exemplary/multiple-media-types-skadn.json | 4 +- .../exemplary/multiple-media-types.json | 4 +- .../smaato/smaatotest/exemplary/native.json | 2 +- .../exemplary/simple-banner-app.json | 2 +- .../exemplary/simple-banner-dooh.json | 2 +- .../exemplary/simple-banner-eids.json | 2 +- .../exemplary/simple-banner-skadn.json | 4 +- .../smaatotest/exemplary/simple-banner.json | 2 +- .../smaatotest/exemplary/video-app.json | 2 +- .../smaatotest/exemplary/video-dooh.json | 2 +- .../smaato/smaatotest/exemplary/video.json | 2 +- .../bad-adtype-header-response.json | 2 +- .../bad-expires-header-response.json | 2 +- .../bad-skadn-format-request.json | 59 ------------ .../bad-status-code-response.json | 2 +- .../supplemental/banner-w-and-h.json | 2 +- .../supplemental/curl-nil-response.json | 2 +- .../supplemental/expires-header-response.json | 2 +- .../supplemental/no-bid-response.json | 2 +- .../supplemental/no-consent-info-request.json | 2 +- .../outdated-expires-header-response.json | 2 +- .../video/multiple-adpods-skadn.json | 4 +- .../smaatotest/video/multiple-adpods.json | 4 +- .../smaatotest/video/single-adpod-skadn.json | 2 +- .../smaato/smaatotest/video/single-adpod.json | 2 +- .../bad-adtype-header-response.json | 2 +- .../bad-bid-ext-response.json | 2 +- .../bad-skadn-format-request.json | 89 ------------------- openrtb_ext/imp_smaato.go | 7 -- 32 files changed, 58 insertions(+), 210 deletions(-) delete mode 100644 adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json delete mode 100644 adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json diff --git a/adapters/smaato/smaato.go b/adapters/smaato/smaato.go index 2d1579c55bd..ffe1cddda7a 100644 --- a/adapters/smaato/smaato.go +++ b/adapters/smaato/smaato.go @@ -17,7 +17,7 @@ import ( "github.com/prebid/prebid-server/v2/util/timeutil" ) -const clientVersion = "prebid_server_1.1" +const clientVersion = "prebid_server_1.2" type adMarkupType string @@ -471,14 +471,13 @@ func setImpForAdspace(imp *openrtb2.Imp) error { return &errortypes.BadInput{Message: "Missing adspaceId parameter."} } - impExt, err := makeImpExt(&imp.Ext) + err = removeBidderNodeFromImpExt(imp) if err != nil { return err } if imp.Banner != nil || imp.Video != nil || imp.Native != nil { imp.TagID = adSpaceID - imp.Ext = impExt return nil } @@ -490,15 +489,17 @@ func setImpForAdBreak(imps []openrtb2.Imp) error { return &errortypes.BadInput{Message: "No impressions in bid request."} } - adBreakID, err := jsonparser.GetString(imps[0].Ext, "bidder", "adbreakId") + firstImp := imps[0] + adBreakID, err := jsonparser.GetString(firstImp.Ext, "bidder", "adbreakId") if err != nil { return &errortypes.BadInput{Message: "Missing adbreakId parameter."} } - impExt, err := makeImpExt(&imps[0].Ext) + err = removeBidderNodeFromImpExt(&firstImp) if err != nil { return err } + ext := firstImp.Ext for i := range imps { imps[i].TagID = adBreakID @@ -512,33 +513,33 @@ func setImpForAdBreak(imps []openrtb2.Imp) error { imps[i].Video = &videoCopy } - imps[0].Ext = impExt + imps[0].Ext = ext return nil } -func makeImpExt(impExtRaw *json.RawMessage) (json.RawMessage, error) { - var impExt openrtb_ext.ExtImpExtraDataSmaato - - if err := json.Unmarshal(*impExtRaw, &impExt); err != nil { - return nil, &errortypes.BadInput{Message: "Invalid imp.ext."} +func removeBidderNodeFromImpExt(imp *openrtb2.Imp) error { + if imp.Ext == nil { + return nil } + updatedExt := jsonparser.Delete(imp.Ext, "bidder") + isEmpty := true + err := jsonparser.ObjectEach(updatedExt, func(key []byte, value []byte, dataType jsonparser.ValueType, offset int) error { + isEmpty = false + return nil + }) - if impExtSkadnRaw := impExt.Skadn; impExtSkadnRaw != nil { - var impExtSkadn map[string]json.RawMessage - - if err := json.Unmarshal(impExtSkadnRaw, &impExtSkadn); err != nil { - return nil, &errortypes.BadInput{Message: "Invalid imp.ext.skadn."} - } + if err != nil { + return err } - if impExtJson, err := json.Marshal(impExt); string(impExtJson) != "{}" { - return impExtJson, err + if isEmpty { + imp.Ext = nil } else { - return nil, nil + imp.Ext = updatedExt } + return nil } - func groupImpressionsByPod(imps []openrtb2.Imp) (map[string]([]openrtb2.Imp), []string, []error) { pods := make(map[string][]openrtb2.Imp) orderKeys := make([]string, 0) diff --git a/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json b/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json index c817cd9543a..7580b00a15b 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json @@ -201,7 +201,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] @@ -350,7 +350,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/exemplary/multiple-impressions.json b/adapters/smaato/smaatotest/exemplary/multiple-impressions.json index 3fee0d654c3..fb123a580c8 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-impressions.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-impressions.json @@ -160,7 +160,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] @@ -270,7 +270,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json b/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json index c2b7bf97869..f48810d48d9 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json @@ -178,7 +178,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] @@ -327,7 +327,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/multiple-media-types.json b/adapters/smaato/smaatotest/exemplary/multiple-media-types.json index 4c6f031016a..8c63d37379f 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-media-types.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-media-types.json @@ -150,7 +150,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] @@ -260,7 +260,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/native.json b/adapters/smaato/smaatotest/exemplary/native.json index f229220180e..0dd42d00617 100644 --- a/adapters/smaato/smaatotest/exemplary/native.json +++ b/adapters/smaato/smaatotest/exemplary/native.json @@ -124,7 +124,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-app.json b/adapters/smaato/smaatotest/exemplary/simple-banner-app.json index d2c5f5453ed..7201888531a 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-app.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-app.json @@ -158,7 +158,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-dooh.json b/adapters/smaato/smaatotest/exemplary/simple-banner-dooh.json index d5fd7ef1f05..8bd316f1d00 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-dooh.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-dooh.json @@ -148,7 +148,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-eids.json b/adapters/smaato/smaatotest/exemplary/simple-banner-eids.json index ed0b61dcefa..a492f44b9db 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-eids.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-eids.json @@ -153,7 +153,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json b/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json index cab205f7334..d099d3a7a54 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json @@ -38,6 +38,7 @@ "publisherId": "1100042525", "adspaceId": "130563103" }, + "gpid": 1, "skadn": { "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], "sourceapp": "880047117", @@ -118,6 +119,7 @@ ] }, "ext": { + "gpid": 1, "skadn": { "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], "sourceapp": "880047117", @@ -167,7 +169,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner.json b/adapters/smaato/smaatotest/exemplary/simple-banner.json index 48ee26ebddc..4b8b0659d0e 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner.json @@ -153,7 +153,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/exemplary/video-app.json b/adapters/smaato/smaatotest/exemplary/video-app.json index cd074530838..a6b7911d742 100644 --- a/adapters/smaato/smaatotest/exemplary/video-app.json +++ b/adapters/smaato/smaatotest/exemplary/video-app.json @@ -165,7 +165,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/exemplary/video-dooh.json b/adapters/smaato/smaatotest/exemplary/video-dooh.json index 98d30df7774..85c78fec727 100644 --- a/adapters/smaato/smaatotest/exemplary/video-dooh.json +++ b/adapters/smaato/smaatotest/exemplary/video-dooh.json @@ -155,7 +155,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/exemplary/video.json b/adapters/smaato/smaatotest/exemplary/video.json index 2207c53cf53..271efa825e6 100644 --- a/adapters/smaato/smaatotest/exemplary/video.json +++ b/adapters/smaato/smaatotest/exemplary/video.json @@ -180,7 +180,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["postbid_iframe"] diff --git a/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json b/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json index af739711bf4..67c36465fd6 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json b/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json index 7368c666886..7224b87469a 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json b/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json deleted file mode 100644 index b996d0cf95e..00000000000 --- a/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "mockBidRequest": { - "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", - "site": { - "publisher": { - "id": "1100042525" - }, - "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder" - }, - "imp": [ - { - "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "1100042525", - "adspaceId": "130563103" - }, - "skadn": [] - } - }, - { - "id": "1C86242D-9535-47D6-9576-7B1FE87F282D", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "1100042525", - "adspaceId": "130563103" - }, - "skadn": "" - } - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid imp.ext.skadn.", - "comparison": "literal" - }, - { - "value": "Invalid imp.ext.skadn.", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json b/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json index c00518e096f..db1a3acaaee 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json b/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json index e3cc2174433..ee0fbc6ab3e 100644 --- a/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json +++ b/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json @@ -107,7 +107,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/curl-nil-response.json b/adapters/smaato/smaatotest/supplemental/curl-nil-response.json index 9f0f3359ea6..abf968bba28 100644 --- a/adapters/smaato/smaatotest/supplemental/curl-nil-response.json +++ b/adapters/smaato/smaatotest/supplemental/curl-nil-response.json @@ -131,7 +131,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/expires-header-response.json b/adapters/smaato/smaatotest/supplemental/expires-header-response.json index a063c7c1757..bee825e860a 100644 --- a/adapters/smaato/smaatotest/supplemental/expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/expires-header-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/no-bid-response.json b/adapters/smaato/smaatotest/supplemental/no-bid-response.json index be41b1f1c68..43c89baf598 100644 --- a/adapters/smaato/smaatotest/supplemental/no-bid-response.json +++ b/adapters/smaato/smaatotest/supplemental/no-bid-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json b/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json index 6be49b1b4fb..1920d456ebb 100644 --- a/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json +++ b/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json @@ -70,7 +70,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json b/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json index fd52751aae6..fb51102fed0 100644 --- a/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json @@ -123,7 +123,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1C86242D-9535-47D6-9576-7B1FE87F282C"] diff --git a/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json b/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json index a9942bcbd93..7084d55c09d 100644 --- a/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json +++ b/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json @@ -301,7 +301,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1_1","1_2"] @@ -516,7 +516,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["2_1","2_2"] diff --git a/adapters/smaato/smaatotest/video/multiple-adpods.json b/adapters/smaato/smaatotest/video/multiple-adpods.json index c2eac4dc65c..56a7e38f173 100644 --- a/adapters/smaato/smaatotest/video/multiple-adpods.json +++ b/adapters/smaato/smaatotest/video/multiple-adpods.json @@ -234,7 +234,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1_1","1_2"] @@ -390,7 +390,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["2_1","2_2"] diff --git a/adapters/smaato/smaatotest/video/single-adpod-skadn.json b/adapters/smaato/smaatotest/video/single-adpod-skadn.json index 3f2070a3021..4ae452baef6 100644 --- a/adapters/smaato/smaatotest/video/single-adpod-skadn.json +++ b/adapters/smaato/smaatotest/video/single-adpod-skadn.json @@ -221,7 +221,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1_1","1_2"] diff --git a/adapters/smaato/smaatotest/video/single-adpod.json b/adapters/smaato/smaatotest/video/single-adpod.json index 11e6ccf710d..44877f7fc26 100644 --- a/adapters/smaato/smaatotest/video/single-adpod.json +++ b/adapters/smaato/smaatotest/video/single-adpod.json @@ -180,7 +180,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1_1","1_2"] diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-adtype-header-response.json b/adapters/smaato/smaatotest/videosupplemental/bad-adtype-header-response.json index e831add95de..b58ad75d36b 100644 --- a/adapters/smaato/smaatotest/videosupplemental/bad-adtype-header-response.json +++ b/adapters/smaato/smaatotest/videosupplemental/bad-adtype-header-response.json @@ -176,7 +176,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs": [ diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json b/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json index 7fca5d38592..fcc6c1f64ec 100644 --- a/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json +++ b/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json @@ -176,7 +176,7 @@ } }, "ext": { - "client": "prebid_server_1.1" + "client": "prebid_server_1.2" } }, "impIDs":["1_1","1_2"] diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json b/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json deleted file mode 100644 index 35d33cf7fee..00000000000 --- a/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "mockBidRequest": { - "id": "447a0a1d-389d-4730-a418-3777e95de7bd", - "imp": [ - { - "id": "1_1", - "video": { - "mimes": [ - "video/mp4", - "video/3gpp" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 7 - ], - "w": 1024, - "h": 768, - "startdelay": 0, - "linearity": 1, - "skip": 1, - "skipmin": 5, - "api": [ - 7 - ] - }, - "bidfloor": 0.00123, - "ext": { - "bidder": { - "publisherId": "1100042525", - "adbreakId": "400000001" - }, - "skadn": [] - } - }, - { - "id": "1_2", - "video": { - "mimes": [ - "video/mp4", - "video/3gpp" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 7 - ], - "w": 1024, - "h": 768, - "startdelay": 0, - "linearity": 1, - "skip": 1, - "skipmin": 5, - "api": [ - 7 - ] - }, - "bidfloor": 0.00123 - } - ], - "site": { - "publisher": { - "id": "1100042525" - }, - "content": { - "title": "a-title", - "season": "a-season", - "series": "a-series", - "episode": 1, - "len": 900, - "livestream": 1 - } - }, - "device": { - "ua": "test-user-agent" - }, - "user": { - "ext": { - "data": {} - } - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid imp.ext.skadn.", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/openrtb_ext/imp_smaato.go b/openrtb_ext/imp_smaato.go index fb326100f8b..8d8bc857070 100644 --- a/openrtb_ext/imp_smaato.go +++ b/openrtb_ext/imp_smaato.go @@ -1,7 +1,5 @@ package openrtb_ext -import "encoding/json" - // ExtImpSmaato defines the contract for bidrequest.imp[i].ext.prebid.bidder.smaato // PublisherId and AdSpaceId are mandatory parameters for non adpod (long-form video) requests, others are optional parameters // PublisherId and AdBreakId are mandatory parameters for adpod (long-form video) requests, others are optional parameters @@ -12,8 +10,3 @@ type ExtImpSmaato struct { AdSpaceID string `json:"adspaceId"` AdBreakID string `json:"adbreakId"` } - -// ExtImpExtraDataSmaato defines extra properties from imp[i].ext object -type ExtImpExtraDataSmaato struct { - Skadn json.RawMessage `json:"skadn,omitempty"` -}