From 982c31490645fbe163d13aeca777062f52403ebe Mon Sep 17 00:00:00 2001 From: Karim Mourra Date: Tue, 12 Aug 2025 15:22:58 -0300 Subject: [PATCH 1/3] supports gpid --- adapters/connatix/connatix.go | 1 + adapters/connatix/models.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/adapters/connatix/connatix.go b/adapters/connatix/connatix.go index 11cf7a146ab..6b80c895b71 100644 --- a/adapters/connatix/connatix.go +++ b/adapters/connatix/connatix.go @@ -227,6 +227,7 @@ func buildRequestImp(imp *openrtb2.Imp, ext impExtIncoming, displayManagerVer st PlacementId: ext.Bidder.PlacementId, ViewabilityPercentage: ext.Bidder.ViewabilityPercentage, }, + Gpid: ext.Gpid, } var err error diff --git a/adapters/connatix/models.go b/adapters/connatix/models.go index 95317d7e23a..ca06d8dce9c 100644 --- a/adapters/connatix/models.go +++ b/adapters/connatix/models.go @@ -10,10 +10,12 @@ type adapter struct { type impExtIncoming struct { Bidder openrtb_ext.ExtImpConnatix `json:"bidder"` + Gpid string `json:"gpid"` } type impExt struct { Connatix impExtConnatix `json:"connatix"` + Gpid string `json:"gpid"` } type impExtConnatix struct { From 218a6deac7140e732727fe4ac9882e81b1b49d03 Mon Sep 17 00:00:00 2001 From: Karim Mourra Date: Tue, 12 Aug 2025 16:18:16 -0300 Subject: [PATCH 2/3] adds tests --- .../connatixtest/exemplary/banner-app.json | 8 +++++--- .../connatixtest/exemplary/banner-web.json | 6 ++++-- .../connatixtest/exemplary/video-app.json | 6 ++++-- .../connatixtest/exemplary/video-web.json | 8 +++++--- .../supplemental/bad-request-no-ip.json | 5 +++-- .../supplemental/bid-request-eu-user.json | 8 +++++--- .../supplemental/bid-request-no-user.json | 8 +++++--- .../bid-request-us-east-user.json | 8 +++++--- .../bid-request-us-west-user.json | 8 +++++--- .../bid-response-400-status-code.json | 8 +++++--- .../supplemental/bid-response-no-content.json | 8 +++++--- .../fail-build-display-manager-version.json | 8 +++++--- .../fail-currency-conversion.json | 5 +++-- .../supplemental/invalid-bid-response.json | 8 +++++--- .../supplemental/multi-imp-request.json | 19 ++++++++++++------- .../non-usd-currency-converted.json | 8 +++++--- ...success-build-display-manager-version.json | 8 +++++--- adapters/connatix/models.go | 4 ++-- 18 files changed, 88 insertions(+), 53 deletions(-) diff --git a/adapters/connatix/connatixtest/exemplary/banner-app.json b/adapters/connatix/connatixtest/exemplary/banner-app.json index 823c439b086..5e33f107138 100644 --- a/adapters/connatix/connatixtest/exemplary/banner-app.json +++ b/adapters/connatix/connatixtest/exemplary/banner-app.json @@ -38,7 +38,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-banner-app" } } ] @@ -72,7 +73,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-banner-app" } } ], @@ -158,4 +160,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/adapters/connatix/connatixtest/exemplary/banner-web.json b/adapters/connatix/connatixtest/exemplary/banner-web.json index a48ef5b1be5..306e2c8d00a 100644 --- a/adapters/connatix/connatixtest/exemplary/banner-web.json +++ b/adapters/connatix/connatixtest/exemplary/banner-web.json @@ -28,7 +28,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-banner-web" } } ] @@ -62,7 +63,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-banner-web" } } ], diff --git a/adapters/connatix/connatixtest/exemplary/video-app.json b/adapters/connatix/connatixtest/exemplary/video-app.json index bff1f1b1362..06f5598d6d9 100644 --- a/adapters/connatix/connatixtest/exemplary/video-app.json +++ b/adapters/connatix/connatixtest/exemplary/video-app.json @@ -39,7 +39,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-video-app" } } ] @@ -72,7 +73,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-video-app" } } ], diff --git a/adapters/connatix/connatixtest/exemplary/video-web.json b/adapters/connatix/connatixtest/exemplary/video-web.json index b1ab16d0b9a..992f28e0b97 100644 --- a/adapters/connatix/connatixtest/exemplary/video-web.json +++ b/adapters/connatix/connatixtest/exemplary/video-web.json @@ -34,7 +34,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-video-web" } } ] @@ -68,7 +69,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid-video-web" } } ], @@ -150,4 +152,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/adapters/connatix/connatixtest/supplemental/bad-request-no-ip.json b/adapters/connatix/connatixtest/supplemental/bad-request-no-ip.json index 3f7dcbf064a..5a9a894805c 100644 --- a/adapters/connatix/connatixtest/supplemental/bad-request-no-ip.json +++ b/adapters/connatix/connatixtest/supplemental/bad-request-no-ip.json @@ -32,7 +32,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ] @@ -43,4 +44,4 @@ "comparison": "literal" } ] -} \ No newline at end of file +} diff --git a/adapters/connatix/connatixtest/supplemental/bid-request-eu-user.json b/adapters/connatix/connatixtest/supplemental/bid-request-eu-user.json index a5bb8550aba..9264a89610c 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-request-eu-user.json +++ b/adapters/connatix/connatixtest/supplemental/bid-request-eu-user.json @@ -45,7 +45,8 @@ "bidder": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ] @@ -81,7 +82,8 @@ "connatix": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ], @@ -173,4 +175,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/bid-request-no-user.json b/adapters/connatix/connatixtest/supplemental/bid-request-no-user.json index 75ddabdef7c..d822f434451 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-request-no-user.json +++ b/adapters/connatix/connatixtest/supplemental/bid-request-no-user.json @@ -42,7 +42,8 @@ "bidder": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ] @@ -78,7 +79,8 @@ "connatix": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ], @@ -167,4 +169,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/bid-request-us-east-user.json b/adapters/connatix/connatixtest/supplemental/bid-request-us-east-user.json index 279047b168e..dbb83d3114a 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-request-us-east-user.json +++ b/adapters/connatix/connatixtest/supplemental/bid-request-us-east-user.json @@ -45,7 +45,8 @@ "bidder": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ] @@ -81,7 +82,8 @@ "connatix": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ], @@ -173,4 +175,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/bid-request-us-west-user.json b/adapters/connatix/connatixtest/supplemental/bid-request-us-west-user.json index 6b12ebda6cf..0584caa87a7 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-request-us-west-user.json +++ b/adapters/connatix/connatixtest/supplemental/bid-request-us-west-user.json @@ -45,7 +45,8 @@ "bidder": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ] @@ -81,7 +82,8 @@ "connatix": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ], @@ -173,4 +175,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/bid-response-400-status-code.json b/adapters/connatix/connatixtest/supplemental/bid-response-400-status-code.json index 59b77c1dae5..ae820556e08 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-response-400-status-code.json +++ b/adapters/connatix/connatixtest/supplemental/bid-response-400-status-code.json @@ -38,7 +38,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ] @@ -72,7 +73,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -110,4 +112,4 @@ "comparison": "literal" } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/bid-response-no-content.json b/adapters/connatix/connatixtest/supplemental/bid-response-no-content.json index 6b17338d613..63f44dff39f 100644 --- a/adapters/connatix/connatixtest/supplemental/bid-response-no-content.json +++ b/adapters/connatix/connatixtest/supplemental/bid-response-no-content.json @@ -38,7 +38,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ] @@ -72,7 +73,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -104,4 +106,4 @@ } ], "expectedBidResponses": [] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/fail-build-display-manager-version.json b/adapters/connatix/connatixtest/supplemental/fail-build-display-manager-version.json index 69ba22a6e80..b308eaf5a2d 100644 --- a/adapters/connatix/connatixtest/supplemental/fail-build-display-manager-version.json +++ b/adapters/connatix/connatixtest/supplemental/fail-build-display-manager-version.json @@ -44,7 +44,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ] @@ -79,7 +80,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -170,4 +172,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/fail-currency-conversion.json b/adapters/connatix/connatixtest/supplemental/fail-currency-conversion.json index a2364eef6c5..0784579b45b 100644 --- a/adapters/connatix/connatixtest/supplemental/fail-currency-conversion.json +++ b/adapters/connatix/connatixtest/supplemental/fail-currency-conversion.json @@ -36,7 +36,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -61,4 +62,4 @@ "comparison": "literal" } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/invalid-bid-response.json b/adapters/connatix/connatixtest/supplemental/invalid-bid-response.json index 9fd9b448de0..20b18910d8a 100644 --- a/adapters/connatix/connatixtest/supplemental/invalid-bid-response.json +++ b/adapters/connatix/connatixtest/supplemental/invalid-bid-response.json @@ -38,7 +38,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ] @@ -72,7 +73,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -113,4 +115,4 @@ "comparison": "literal" } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/multi-imp-request.json b/adapters/connatix/connatixtest/supplemental/multi-imp-request.json index 08cf01fb8c6..a188706144f 100644 --- a/adapters/connatix/connatixtest/supplemental/multi-imp-request.json +++ b/adapters/connatix/connatixtest/supplemental/multi-imp-request.json @@ -38,7 +38,8 @@ "ext": { "bidder": { "placementId": "some-placement-id1" - } + }, + "gpid": "test-gpid" } }, { @@ -55,8 +56,9 @@ }, "ext": { "bidder": { - "placementId": "some-placement-id2" - } + "placementId": "some-placement-id2" + }, + "gpid": "test-gpid-2" } }, { @@ -74,7 +76,8 @@ "ext": { "bidder": { "placementId": 1 - } + }, + "gpid": "test-gpid-3" } } ] @@ -108,7 +111,8 @@ "ext": { "connatix": { "placementId": "some-placement-id1" - } + }, + "gpid": "test-gpid" } } ], @@ -193,7 +197,8 @@ "ext": { "connatix": { "placementId": "some-placement-id2" - } + }, + "gpid": "test-gpid-2" } } ], @@ -306,4 +311,4 @@ "comparison": "literal" } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/non-usd-currency-converted.json b/adapters/connatix/connatixtest/supplemental/non-usd-currency-converted.json index 9a37ce8f4ea..885354a838d 100644 --- a/adapters/connatix/connatixtest/supplemental/non-usd-currency-converted.json +++ b/adapters/connatix/connatixtest/supplemental/non-usd-currency-converted.json @@ -36,7 +36,8 @@ "ext": { "bidder": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -84,7 +85,8 @@ "ext": { "connatix": { "placementId": "some-placement-id" - } + }, + "gpid": "test-gpid" } } ], @@ -178,4 +180,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/connatixtest/supplemental/success-build-display-manager-version.json b/adapters/connatix/connatixtest/supplemental/success-build-display-manager-version.json index bf74b77a03a..4f38e6a4ccc 100644 --- a/adapters/connatix/connatixtest/supplemental/success-build-display-manager-version.json +++ b/adapters/connatix/connatixtest/supplemental/success-build-display-manager-version.json @@ -45,7 +45,8 @@ "bidder": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ] @@ -81,7 +82,8 @@ "connatix": { "placementId": "some-placement-id", "viewabilityPercentage": 0.6 - } + }, + "gpid": "test-gpid" } } ], @@ -173,4 +175,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/adapters/connatix/models.go b/adapters/connatix/models.go index ca06d8dce9c..8254646b66f 100644 --- a/adapters/connatix/models.go +++ b/adapters/connatix/models.go @@ -10,12 +10,12 @@ type adapter struct { type impExtIncoming struct { Bidder openrtb_ext.ExtImpConnatix `json:"bidder"` - Gpid string `json:"gpid"` + Gpid string `json:"gpid"` } type impExt struct { Connatix impExtConnatix `json:"connatix"` - Gpid string `json:"gpid"` + Gpid string `json:"gpid"` } type impExtConnatix struct { From 13eeb29fd8f9c0d3f3c059bf8602f119b1e91143 Mon Sep 17 00:00:00 2001 From: Karim Mourra Date: Thu, 4 Sep 2025 16:50:21 -0300 Subject: [PATCH 3/3] adds test case for missing gpid --- adapters/connatix/connatix.go | 2 +- .../supplemental/bid-response-no-gpid.json | 108 ++++++++++++++++++ adapters/connatix/models.go | 4 +- 3 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 adapters/connatix/connatixtest/supplemental/bid-response-no-gpid.json diff --git a/adapters/connatix/connatix.go b/adapters/connatix/connatix.go index 6b80c895b71..647b33b1e8a 100644 --- a/adapters/connatix/connatix.go +++ b/adapters/connatix/connatix.go @@ -227,7 +227,7 @@ func buildRequestImp(imp *openrtb2.Imp, ext impExtIncoming, displayManagerVer st PlacementId: ext.Bidder.PlacementId, ViewabilityPercentage: ext.Bidder.ViewabilityPercentage, }, - Gpid: ext.Gpid, + GPID: ext.GPID, } var err error diff --git a/adapters/connatix/connatixtest/supplemental/bid-response-no-gpid.json b/adapters/connatix/connatixtest/supplemental/bid-response-no-gpid.json new file mode 100644 index 00000000000..7148a36ef97 --- /dev/null +++ b/adapters/connatix/connatixtest/supplemental/bid-response-no-gpid.json @@ -0,0 +1,108 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 500, + "user": { + "buyeruid": "some-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-imp-id", + "tagid": "some-tag-id", + "banner": { + "format":[ + { + "w": 320, + "h": 50 + } + ] + }, + "ext": { + "bidder": { + "placementId": "some-placement-id" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://example.com", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-imp-id", + "tagid": "some-tag-id", + "banner": { + "w": 320, + "h": 50, + "format": [ + { + "w": 320, + "h": 50 + } + ] + }, + "ext": { + "connatix": { + "placementId": "some-placement-id" + }, + "gpid": "" + } + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "some-user" + }, + "tmax": 500 + }, + "impIDs": [ + "some-imp-id" + ] + }, + "mockResponse": { + "status": 204, + "body": null + } + } + ], + "expectedBidResponses": [] + } diff --git a/adapters/connatix/models.go b/adapters/connatix/models.go index 8254646b66f..691842264cb 100644 --- a/adapters/connatix/models.go +++ b/adapters/connatix/models.go @@ -10,12 +10,12 @@ type adapter struct { type impExtIncoming struct { Bidder openrtb_ext.ExtImpConnatix `json:"bidder"` - Gpid string `json:"gpid"` + GPID string `json:"gpid,omitempty"` } type impExt struct { Connatix impExtConnatix `json:"connatix"` - Gpid string `json:"gpid"` + GPID string `json:"gpid"` } type impExtConnatix struct {