diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 92c421b98c..1e17a21f4b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,7 @@ "dockerfile": "Dockerfile", "args": { // Update the VARIANT arg to pick a version of Go - "VARIANT": "1.26", + "VARIANT": "1.24", // Options "INSTALL_NODE": "false", "NODE_VERSION": "lts/*" diff --git a/.github/workflows/adapter-code-coverage-report.yml b/.github/workflows/adapter-code-coverage-report.yml deleted file mode 100644 index c286ee6c6b..0000000000 --- a/.github/workflows/adapter-code-coverage-report.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Adapter Code Coverage Report - -on: - workflow_run: - workflows: ["Adapter Code Coverage"] - types: [completed] - -permissions: - pull-requests: write - contents: write - -jobs: - report-coverage: - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Download Coverage Artifacts - uses: actions/download-artifact@v4 - with: - name: coverage-results - path: coverage-results - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - - - name: Read PR Metadata - id: pr_metadata - run: | - echo "pr_number=$(cat coverage-results/pr-metadata/pr_number)" >> $GITHUB_OUTPUT - echo "head_sha=$(cat coverage-results/pr-metadata/head_sha)" >> $GITHUB_OUTPUT - echo "directories=$(cat coverage-results/pr-metadata/directories.json)" >> $GITHUB_OUTPUT - echo "coverage_dir=$(pwd)/coverage-results" >> $GITHUB_OUTPUT - - - name: Checkout Coverage Preview Branch - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: coverage-preview - repository: prebid/prebid-server - path: preview-repo - - - name: Upload Coverage Results - id: commit_coverage - run: | - timestamp=$(date +%s) - directory=preview-repo/.github/preview/${{ github.event.workflow_run.id }}_${timestamp} - mkdir -p $directory - cp -r coverage-results/*.html $directory/ - cd preview-repo - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add .github/preview/* - git commit -m 'Add coverage files for run ${{ github.event.workflow_run.id }}' - git push origin coverage-preview - echo "remote_coverage_preview_dir=.github/preview/${{ github.event.workflow_run.id }}_${timestamp}" >> $GITHUB_OUTPUT - - - name: Add Coverage Summary To Pull Request - if: steps.commit_coverage.outputs.remote_coverage_preview_dir != '' - uses: actions/github-script@v7 - with: - script: | - const utils = require('./.github/workflows/helpers/pull-request-utils.js') - const helper = utils.coverageHelper({ - github, context, - headSha: '${{ steps.pr_metadata.outputs.head_sha }}', - tmpCoverageDir: '${{ steps.pr_metadata.outputs.coverage_dir }}', - remoteCoverageDir: '${{ steps.commit_coverage.outputs.remote_coverage_preview_dir }}', - prNumber: ${{ steps.pr_metadata.outputs.pr_number }} - }) - const adapterDirectories = JSON.parse('${{ steps.pr_metadata.outputs.directories }}') - await helper.AddCoverageSummary(adapterDirectories) diff --git a/.github/workflows/helpers/pull-request-utils.js b/.github/workflows/helpers/pull-request-utils.js index 70e8570e4b..73c8039647 100644 --- a/.github/workflows/helpers/pull-request-utils.js +++ b/.github/workflows/helpers/pull-request-utils.js @@ -361,7 +361,7 @@ class coverageHelper { this.owner = input.context.repo.owner this.repo = input.context.repo.repo this.github = input.github - this.pullRequestNumber = input.prNumber || input.context.payload.pull_request.number + this.pullRequestNumber = input.context.payload.pull_request.number this.headSha = input.headSha this.previewBaseURL = `https://htmlpreview.github.io/?https://github.com/${this.owner}/${this.repo}/coverage-preview/${input.remoteCoverageDir}` this.tmpCoverDir = input.tmpCoverageDir diff --git a/.github/workflows/scripts/codepath-notification b/.github/workflows/scripts/codepath-notification index b917c6d201..8a3bae8dac 100644 --- a/.github/workflows/scripts/codepath-notification +++ b/.github/workflows/scripts/codepath-notification @@ -19,4 +19,3 @@ adapters/ix|imp_ix|ix.json|ix.yaml: pdu-supply-prebid@indexexchange.com medianet: prebid@media.net gumgum: prebid@gumgum.com kargo: kraken@kargo.com -proxistore: proxistore-technics@proxistore.com diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index f0a4ac68d8..d3831d8044 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -20,7 +20,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Run Trivy - uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 + uses: aquasecurity/trivy-action@master with: scan-type: 'fs' ignore-unfixed: true diff --git a/.github/workflows/validate-merge.yml b/.github/workflows/validate-merge.yml index 64a611f537..ca633d4746 100644 --- a/.github/workflows/validate-merge.yml +++ b/.github/workflows/validate-merge.yml @@ -12,7 +12,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: 1.26.2 + go-version: 1.24.0 - name: Checkout Merged Branch uses: actions/checkout@v4 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b8d5ea7a55..df71d61612 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -10,7 +10,7 @@ jobs: validate: strategy: matrix: - go-version: [1.25.x, 1.26.x] + go-version: [1.23.x, 1.24.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -31,4 +31,3 @@ jobs: ./validate.sh --nofmt --cov --race 10 env: GO111MODULE: "on" - GOTOOLCHAIN: local diff --git a/Dockerfile b/Dockerfile index 4f0948351b..fe7cec5e16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,10 @@ -# BASE_IMAGE allows overriding the base image so the build can pull from an -# internal mirror when docker.io is unreachable. Defaults to upstream ubuntu:22.04. -ARG BASE_IMAGE=ubuntu:22.04 -FROM ${BASE_IMAGE} AS build +FROM ubuntu:22.04 AS build RUN apt-get update && \ apt-get -y upgrade && \ apt-get install -y --no-install-recommends wget ca-certificates WORKDIR /tmp -RUN wget https://dl.google.com/go/go1.26.2.linux-amd64.tar.gz && \ - tar -xf go1.26.2.linux-amd64.tar.gz && \ +RUN wget https://dl.google.com/go/go1.24.0.linux-amd64.tar.gz && \ + tar -xf go1.24.0.linux-amd64.tar.gz && \ mv go /usr/local RUN mkdir -p /app/prebid-server/ WORKDIR /app/prebid-server/ @@ -27,9 +24,9 @@ RUN go mod tidy RUN go mod vendor ARG TEST="true" RUN if [ "$TEST" != "false" ]; then ./validate.sh ; fi -RUN go build -mod=vendor -ldflags "-X github.com/prebid/prebid-server/v4/version.Ver=`git describe --tags | sed 's/^v//'` -X github.com/prebid/prebid-server/v4/version.Rev=`git rev-parse HEAD`" . +RUN go build -mod=vendor -ldflags "-X github.com/prebid/prebid-server/v3/version.Ver=`git describe --tags | sed 's/^v//'` -X github.com/prebid/prebid-server/v3/version.Rev=`git rev-parse HEAD`" . -FROM ${BASE_IMAGE} AS release +FROM ubuntu:22.04 AS release LABEL maintainer="hans.hjort@xandr.com" WORKDIR /usr/local/bin/ COPY --from=build /app/prebid-server . diff --git a/Makefile b/Makefile index 327a4acd23..8b68afe3be 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ test: deps ifeq "$(adapter)" "" ./validate.sh else - go test github.com/prebid/prebid-server/v4/adapters/$(adapter) -bench=. + go test github.com/prebid/prebid-server/v3/adapters/$(adapter) -bench=. endif # build-modules generates modules/builder.go file which provides a list of all available modules diff --git a/README.md b/README.md index 2323db2d09..0aa629ebc2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Ensure that you deploy the `/static` directory, as Prebid Server requires those ## Developing -Prebid Server requires [Go](https://go.dev) version 1.26.2 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash. +Prebid Server requires [Go](https://go.dev) version 1.23 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash. 1. Clone The Repository ``` bash diff --git a/account/account.go b/account/account.go index 87597e5fed..0087548cc7 100644 --- a/account/account.go +++ b/account/account.go @@ -6,13 +6,13 @@ import ( "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // GetAccount looks up the config.Account object referenced by the given accountID, with access rules applied diff --git a/account/account_test.go b/account/account_test.go index 15963e3d0b..c8b17b53ff 100644 --- a/account/account_test.go +++ b/account/account_test.go @@ -6,13 +6,13 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/adapters/33across/33across.go b/adapters/33across/33across.go index 100ada6691..45a7ea3656 100644 --- a/adapters/33across/33across.go +++ b/adapters/33across/33across.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type TtxAdapter struct { diff --git a/adapters/33across/33across_test.go b/adapters/33across/33across_test.go index 87880b0d99..3ed177deac 100644 --- a/adapters/33across/33across_test.go +++ b/adapters/33across/33across_test.go @@ -3,9 +3,9 @@ package ttx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/33across/params_test.go b/adapters/33across/params_test.go index dd05a28d77..8517c5939a 100644 --- a/adapters/33across/params_test.go +++ b/adapters/33across/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/33across.json diff --git a/adapters/aax/aax.go b/adapters/aax/aax.go index 8dae76f39d..1096955965 100644 --- a/adapters/aax/aax.go +++ b/adapters/aax/aax.go @@ -7,11 +7,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/aax/aax_test.go b/adapters/aax/aax_test.go index d1adbcb39f..ad24a2d62e 100644 --- a/adapters/aax/aax_test.go +++ b/adapters/aax/aax_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/aax/params_test.go b/adapters/aax/params_test.go index 8c652e2b4e..0f93a063e6 100644 --- a/adapters/aax/params_test.go +++ b/adapters/aax/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/aax.json diff --git a/adapters/aceex/aceex.go b/adapters/aceex/aceex.go index 202eb442ba..73a040bbe5 100644 --- a/adapters/aceex/aceex.go +++ b/adapters/aceex/aceex.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/aceex/aceex_test.go b/adapters/aceex/aceex_test.go index afa2a81c96..7aef7dd93f 100644 --- a/adapters/aceex/aceex_test.go +++ b/adapters/aceex/aceex_test.go @@ -3,9 +3,9 @@ package aceex import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/aceex/params_test.go b/adapters/aceex/params_test.go index 72a4bb238f..c09e268307 100644 --- a/adapters/aceex/params_test.go +++ b/adapters/aceex/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/acuityads/acuityads.go b/adapters/acuityads/acuityads.go index 4c945d236d..e05ded95e8 100644 --- a/adapters/acuityads/acuityads.go +++ b/adapters/acuityads/acuityads.go @@ -7,13 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AcuityAdsAdapter struct { @@ -108,9 +107,6 @@ func (a *AcuityAdsAdapter) getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.Ext } func (a *AcuityAdsAdapter) buildEndpointURL(params *openrtb_ext.ExtAcuityAds) (string, error) { - if !urlutil.IsSafeHost(params.Host) { - return "", &errortypes.BadInput{Message: "Invalid Host"} - } endpointParams := macros.EndpointTemplateParams{Host: params.Host, AccountID: params.AccountID} return macros.ResolveMacros(a.endpoint, endpointParams) } diff --git a/adapters/acuityads/acuityads_test.go b/adapters/acuityads/acuityads_test.go index 0997a6caff..b19abd3f7d 100644 --- a/adapters/acuityads/acuityads_test.go +++ b/adapters/acuityads/acuityads_test.go @@ -3,9 +3,9 @@ package acuityads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/acuityads/acuityadstest/supplemental/invalid-host.json b/adapters/acuityads/acuityadstest/supplemental/invalid-host.json deleted file mode 100644 index c74bf89dc1..0000000000 --- a/adapters/acuityads/acuityadstest/supplemental/invalid-host.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "some-impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "host": "evil.com/path?redirect=http://attacker.com#", - "accountid": "testaccount" - } - } - } - ], - "site": { - "page": "test.com" - } - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Invalid Host", - "comparison": "literal" - } - ] -} diff --git a/adapters/acuityads/params_test.go b/adapters/acuityads/params_test.go index cdd746eff6..756dda3ea1 100644 --- a/adapters/acuityads/params_test.go +++ b/adapters/acuityads/params_test.go @@ -4,16 +4,11 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ - `{ "host": "host", "accountid": "hash" }`, - `{ "host": "host.example.com", "accountid": "hash" }`, - `{ "host": "host.example.com:8080", "accountid": "hash" }`, - `{ "host": "host-example.test", "accountid": "hash" }`, - `{ "host": "Host.Example.com", "accountid": "hash" }`, - `{ "host": "localhost:3000", "accountid": "hash" }`, + `{ "host": "ep1", "accountid": "hash" }`, } func TestValidParams(t *testing.T) { @@ -40,15 +35,6 @@ var invalidParams = []string{ `{"adCode": "string", "seatCode": 5, "originalPublisherid": "string"}`, `{ "accountid": "hash" }`, `{ "host": "", "accountid": "" }`, - `{ "host": "/path", "accountid": "hash" }`, - `{ "host": "//evil.com", "accountid": "hash" }`, - `{ "host": "host/path", "accountid": "hash" }`, - `{ "host": "host?query=1", "accountid": "hash" }`, - `{ "host": "host#fragment", "accountid": "hash" }`, - `{ "host": "user@host", "accountid": "hash" }`, - `{ "host": "https://host.com", "accountid": "hash" }`, - `{ "host": "host:notaport", "accountid": "hash" }`, - `{ "host": "host:8080:extra", "accountid": "hash" }`, } func TestInvalidParams(t *testing.T) { diff --git a/adapters/adagio/adagio.go b/adapters/adagio/adagio.go index 1d3fd26a06..cf5819e978 100644 --- a/adapters/adagio/adagio.go +++ b/adapters/adagio/adagio.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adagio/adagio_test.go b/adapters/adagio/adagio_test.go index ef4e28916f..f006fe821d 100644 --- a/adapters/adagio/adagio_test.go +++ b/adapters/adagio/adagio_test.go @@ -3,9 +3,9 @@ package adagio import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adagio/params_test.go b/adapters/adagio/params_test.go index 7f974754ec..e7619b5298 100644 --- a/adapters/adagio/params_test.go +++ b/adapters/adagio/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adapterstest/adapter_test_util.go b/adapters/adapterstest/adapter_test_util.go index 7faecb8948..d58437b8fd 100644 --- a/adapters/adapterstest/adapter_test_util.go +++ b/adapters/adapterstest/adapter_test_util.go @@ -45,21 +45,21 @@ func SampleBid(width *int64, height *int64, impId string, index int) openrtb2.Bi // VerifyStringValue Helper function to assert string equals. func VerifyStringValue(value string, expected string, t *testing.T) { if value != expected { - t.Fatalf("%s expected, got %s", expected, value) + t.Fatalf(fmt.Sprintf("%s expected, got %s", expected, value)) } } // VerifyIntValue Helper function to assert Int equals. func VerifyIntValue(value int, expected int, t *testing.T) { if value != expected { - t.Fatalf("%d expected, got %d", expected, value) + t.Fatalf(fmt.Sprintf("%d expected, got %d", expected, value)) } } // VerifyBoolValue Helper function to assert bool equals. func VerifyBoolValue(value bool, expected bool, t *testing.T) { if value != expected { - t.Fatalf("%v expected, got %v", expected, value) + t.Fatalf(fmt.Sprintf("%v expected, got %v", expected, value)) } } diff --git a/adapters/adapterstest/test_json.go b/adapters/adapterstest/test_json.go index 911a5b408d..05312bf29b 100644 --- a/adapters/adapterstest/test_json.go +++ b/adapters/adapterstest/test_json.go @@ -15,9 +15,9 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/mitchellh/copystructure" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/yudai/gojsondiff" "github.com/yudai/gojsondiff/formatter" diff --git a/adapters/adelement/adelement.go b/adapters/adelement/adelement.go index 18f9533e95..11b79ad37b 100644 --- a/adapters/adelement/adelement.go +++ b/adapters/adelement/adelement.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adelement/adelement_test.go b/adapters/adelement/adelement_test.go index 77ee78196b..2cfa599f80 100644 --- a/adapters/adelement/adelement_test.go +++ b/adapters/adelement/adelement_test.go @@ -3,9 +3,9 @@ package adelement import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adf/adf.go b/adapters/adf/adf.go index a75de8f291..08fb9b8bb4 100644 --- a/adapters/adf/adf.go +++ b/adapters/adf/adf.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adf/adf_test.go b/adapters/adf/adf_test.go index e362c600da..21e8a769c1 100644 --- a/adapters/adf/adf_test.go +++ b/adapters/adf/adf_test.go @@ -3,9 +3,9 @@ package adf import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adf/params_test.go b/adapters/adf/params_test.go index f3b4ebfdf5..9b3fd7b3e3 100644 --- a/adapters/adf/params_test.go +++ b/adapters/adf/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adf.json diff --git a/adapters/adgeneration/adgeneration.go b/adapters/adgeneration/adgeneration.go index 89492eb7e0..31e27b862a 100644 --- a/adapters/adgeneration/adgeneration.go +++ b/adapters/adgeneration/adgeneration.go @@ -10,11 +10,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AdgenerationAdapter struct { diff --git a/adapters/adgeneration/adgeneration_test.go b/adapters/adgeneration/adgeneration_test.go index 14161750c7..e12ed431f0 100644 --- a/adapters/adgeneration/adgeneration_test.go +++ b/adapters/adgeneration/adgeneration_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adgeneration/params_test.go b/adapters/adgeneration/params_test.go index b343f079c5..bdef4ec1d0 100644 --- a/adapters/adgeneration/params_test.go +++ b/adapters/adgeneration/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adhese/adhese.go b/adapters/adhese/adhese.go index 27dd0140b8..9440a1f580 100644 --- a/adapters/adhese/adhese.go +++ b/adapters/adhese/adhese.go @@ -5,13 +5,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -67,10 +66,6 @@ func (a *adapter) MakeRequests( modifiedRequest := *request modifiedRequest.Imp[0].Ext = modifiedExt - if !urlutil.IsSafeHost(params.Account) { - return nil, []error{&errortypes.BadInput{Message: "Invalid account"}} - } - // create a map of macros to resolve endpointParams := macros.EndpointTemplateParams{AccountID: params.Account} diff --git a/adapters/adhese/adhese_test.go b/adapters/adhese/adhese_test.go index 3da9c74f2a..66ea75d865 100644 --- a/adapters/adhese/adhese_test.go +++ b/adapters/adhese/adhese_test.go @@ -4,9 +4,9 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adhese/adhesetest/supplemental/invalid-account.json b/adapters/adhese/adhesetest/supplemental/invalid-account.json deleted file mode 100644 index f833bf8965..0000000000 --- a/adapters/adhese/adhesetest/supplemental/invalid-account.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "account": "evil.com/path?redirect=http://attacker.com#", - "location": "loc1", - "format": "for1" - } - } - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid account", - "comparison": "literal" - } - ] -} diff --git a/adapters/adhese/params_test.go b/adapters/adhese/params_test.go index 5b9ce9e237..b8ca161d57 100644 --- a/adapters/adhese/params_test.go +++ b/adapters/adhese/params_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -38,11 +38,6 @@ func TestInvalidParams(t *testing.T) { var validParams = []string{ `{"account": "demo", "location": "loc1", "format": "for1"}`, `{"account": "demo", "location": "loc1", "format": "for1", "targets": { "ab": ["test", "test2"]}}`, - `{"account": "host", "location": "loc1", "format": "for1"}`, - `{"account": "host.example.com", "location": "loc1", "format": "for1"}`, - `{"account": "host-example.test", "location": "loc1", "format": "for1"}`, - `{"account": "Host.Example.com", "location": "loc1", "format": "for1"}`, - `{"account": "localhost", "location": "loc1", "format": "for1"}`, } var invalidParams = []string{ @@ -60,14 +55,4 @@ var invalidParams = []string{ `{"account": "demo", "location": "loc1", "format": 5}`, `{"account": "demo", "location": "loc1", "format": "for1", "targets": "test"}`, `{"account": "demo", "location": "loc1", "format": "for1", "targets": 5}`, - `{"account": "/path", "location": "loc1", "format": "for1"}`, - `{"account": "//evil.com", "location": "loc1", "format": "for1"}`, - `{"account": "host/path", "location": "loc1", "format": "for1"}`, - `{"account": "host?query=1", "location": "loc1", "format": "for1"}`, - `{"account": "host#fragment", "location": "loc1", "format": "for1"}`, - `{"account": "user@host", "location": "loc1", "format": "for1"}`, - `{"account": "https://host.com", "location": "loc1", "format": "for1"}`, - `{"account": "host:notaport", "location": "loc1", "format": "for1"}`, - `{"account": "host:8080:extra", "location": "loc1", "format": "for1"}`, - `{"account": "host:8080", "location": "loc1", "format": "for1"}`, } diff --git a/adapters/adkernel/adkernel.go b/adapters/adkernel/adkernel.go index d8c6290274..443da423fc 100644 --- a/adapters/adkernel/adkernel.go +++ b/adapters/adkernel/adkernel.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/adkernel/adkernel_test.go b/adapters/adkernel/adkernel_test.go index 8eb8e6bbfd..f874e92d57 100644 --- a/adapters/adkernel/adkernel_test.go +++ b/adapters/adkernel/adkernel_test.go @@ -3,9 +3,9 @@ package adkernel import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adkernelAdn/adkernelAdn.go b/adapters/adkernelAdn/adkernelAdn.go index e04d861858..ffee88250c 100644 --- a/adapters/adkernelAdn/adkernelAdn.go +++ b/adapters/adkernelAdn/adkernelAdn.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adkernelAdnAdapter struct { diff --git a/adapters/adkernelAdn/adkernelAdn_test.go b/adapters/adkernelAdn/adkernelAdn_test.go index 269bea8395..f99da32940 100644 --- a/adapters/adkernelAdn/adkernelAdn_test.go +++ b/adapters/adkernelAdn/adkernelAdn_test.go @@ -3,9 +3,9 @@ package adkernelAdn import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adman/adman.go b/adapters/adman/adman.go index 818f38b2ab..8f90a0fe5b 100644 --- a/adapters/adman/adman.go +++ b/adapters/adman/adman.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // AdmanAdapter struct diff --git a/adapters/adman/adman_test.go b/adapters/adman/adman_test.go index 04a6cea0e0..1a8eccca62 100644 --- a/adapters/adman/adman_test.go +++ b/adapters/adman/adman_test.go @@ -3,9 +3,9 @@ package adman import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adman/params_test.go b/adapters/adman/params_test.go index 0beac5f516..97b3d8f3f2 100644 --- a/adapters/adman/params_test.go +++ b/adapters/adman/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the adman schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/admatic/admatic.go b/adapters/admatic/admatic.go index e435a7b72a..435eaba09e 100644 --- a/adapters/admatic/admatic.go +++ b/adapters/admatic/admatic.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/admatic/admatic_test.go b/adapters/admatic/admatic_test.go index 26dd8090d5..c98f14e90a 100644 --- a/adapters/admatic/admatic_test.go +++ b/adapters/admatic/admatic_test.go @@ -3,9 +3,9 @@ package admatic import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/admatic/params_test.go b/adapters/admatic/params_test.go index 4d656957f7..fc92a1d779 100644 --- a/adapters/admatic/params_test.go +++ b/adapters/admatic/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/admixer/admixer.go b/adapters/admixer/admixer.go index 71765e5a79..726c2cb98c 100644 --- a/adapters/admixer/admixer.go +++ b/adapters/admixer/admixer.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AdmixerAdapter struct { diff --git a/adapters/admixer/admixer_test.go b/adapters/admixer/admixer_test.go index d092fbfc49..62615a63b3 100644 --- a/adapters/admixer/admixer_test.go +++ b/adapters/admixer/admixer_test.go @@ -3,9 +3,9 @@ package admixer import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/admixer/params_test.go b/adapters/admixer/params_test.go index 687cceb1b9..cdc8d56c77 100644 --- a/adapters/admixer/params_test.go +++ b/adapters/admixer/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/admixer.json diff --git a/adapters/adnuntius/adnuntius.go b/adapters/adnuntius/adnuntius.go index f5c55be74e..c1a929a784 100644 --- a/adapters/adnuntius/adnuntius.go +++ b/adapters/adnuntius/adnuntius.go @@ -10,12 +10,12 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) const defaultNetwork = "default" @@ -101,15 +101,8 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters } } - var extUser openrtb_ext.ExtUser - if ortbRequest.User != nil && ortbRequest.User.Ext != nil { - if err := jsonutil.Unmarshal(ortbRequest.User.Ext, &extUser); err != nil { - return nil, []error{fmt.Errorf("failed to parse Ext User: %w", err)} - } - } - - endpoint, err := makeEndpointUrl(ortbRequest, a, noCookies, extUser) + endpoint, err := makeEndpointUrl(ortbRequest, a, noCookies) if err != nil { return nil, []error{&errortypes.BadInput{ Message: fmt.Sprintf("failed to parse URL: %s", err), @@ -126,6 +119,13 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters return nil, []error{fmt.Errorf("failed to parse site Ext: %v", err)} } + var extUser openrtb_ext.ExtUser + if ortbRequest.User != nil && ortbRequest.User.Ext != nil { + if err := jsonutil.Unmarshal(ortbRequest.User.Ext, &extUser); err != nil { + return nil, []error{fmt.Errorf("failed to parse Ext User: %v", err)} + } + } + for _, networkAdunits := range networkAdunitMap { adnuntiusRequest := adnRequest{ @@ -134,6 +134,13 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters KeyValues: extSite.Data, } + // Will change when our adserver can accept multiple user IDS + if extUser.Eids != nil && len(extUser.Eids) > 0 { + if len(extUser.Eids[0].UIDs) > 0 { + adnuntiusRequest.MetaData.Usi = extUser.Eids[0].UIDs[0].ID + } + } + ortbUser := ortbRequest.User if ortbUser != nil { ortbUserId := ortbRequest.User.ID diff --git a/adapters/adnuntius/adnuntius_test.go b/adapters/adnuntius/adnuntius_test.go index b2f78475eb..8b048f7996 100644 --- a/adapters/adnuntius/adnuntius_test.go +++ b/adapters/adnuntius/adnuntius_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adnuntius/adnuntius_types.go b/adapters/adnuntius/adnuntius_types.go index f218a85e95..e65a4ddb0b 100644 --- a/adapters/adnuntius/adnuntius_types.go +++ b/adapters/adnuntius/adnuntius_types.go @@ -3,7 +3,7 @@ package adnuntius import ( "encoding/json" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) type QueryString map[string]string diff --git a/adapters/adnuntius/adnuntius_utils.go b/adapters/adnuntius/adnuntius_utils.go index 4a2d234ba2..47e25bee6b 100644 --- a/adapters/adnuntius/adnuntius_utils.go +++ b/adapters/adnuntius/adnuntius_utils.go @@ -8,8 +8,8 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type RequestExt struct { @@ -32,7 +32,7 @@ func setHeaders(ortbRequest openrtb2.BidRequest) http.Header { return headers } -func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter, noCookies bool, extUser openrtb_ext.ExtUser) (string, []error) { +func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter, noCookies bool) (string, []error) { uri, err := url.Parse(a.endpoint) if err != nil { return "", []error{fmt.Errorf("failed to parse Adnuntius endpoint: %v", err)} @@ -80,22 +80,6 @@ func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter, noCookies bool q.Set("noCookies", "true") } - if len(extUser.Eids) > 0 { - hasValidEid := false - for _, eid := range extUser.Eids { - if len(eid.UIDs) > 0 { - hasValidEid = true - break - } - } - if hasValidEid { - eidsJSON, err := jsonutil.Marshal(extUser.Eids) - if err == nil { - q.Set("eids", string(eidsJSON)) - } - } - } - q.Set("tzo", strconv.Itoa(tzo)) q.Set("format", "prebidServer") diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter-and-userId.json b/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter-and-userId.json deleted file mode 100644 index 2c9e41ae66..0000000000 --- a/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter-and-userId.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "user": { - "id": "1kjh3429kjh295jkl", - "ext":{ - "eids" : [ - { - "source": "adserver.org", - "uids": [ - { "id": "111111111111", "atype": 1, "ext": { "rtiPartner": "TDID" } } - ] - }, - { - "source": "pubcid.org", - "uids": [ - { "id": "22222222-2222-2222-2222-222222222222", "atype": 1 } - ] - } - ] - } - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "auId": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://whatever.url?eids=%5B%7B%22source%22%3A%22adserver.org%22%2C%22uids%22%3A%5B%7B%22id%22%3A%22111111111111%22%2C%22atype%22%3A1%2C%22ext%22%3A%7B+%22rtiPartner%22%3A+%22TDID%22+%7D%7D%5D%7D%2C%7B%22source%22%3A%22pubcid.org%22%2C%22uids%22%3A%5B%7B%22id%22%3A%2222222222-2222-2222-2222-222222222222%22%2C%22atype%22%3A1%7D%5D%7D%5D&format=prebidServer&tzo=0", - "body": { - "adUnits": [ - { - "auId": "123", - "targetId": "123-test-imp-id:banner", - "nativeRequest": {}, - "dimensions": [[300,250],[300,600]] - } - ], - "metaData": { - "usi": "1kjh3429kjh295jkl" - }, - "context": "unknown" - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "adUnits": [ - { - "auId": "0000000000000123", - "targetId": "123-test-imp-id:banner", - "matchedAdCount": 1, - "html": "", - "responseId": "adn-rsp-900646517", - "ads": [ - { - "destinationUrls": { - "url": "http://www.google.com" - }, - "advertiserDomains": ["google.com"], - "bid": { - "amount": 20.0, - "currency": "NOK" - }, - "adId": "adn-id-1559784094", - "creativeWidth": "980", - "creativeHeight": "240", - "creativeId": "jn9hpzvlsf8cpdmm", - "lineItemId": "q7y9qm5b0xt9htrv" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "adn-id-1559784094", - "impid": "test-imp-id", - "price": 20000, - "adm": "", - "adid": "adn-id-1559784094", - "adomain": [ - "google.com" - ], - "cid": "q7y9qm5b0xt9htrv", - "crid": "jn9hpzvlsf8cpdmm", - "mtype": 1, - "w": 980, - "h": 240 - }, - "type": "banner" - } - ], - "currency": "NOK" - } - ] -} - diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter.json b/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter.json deleted file mode 100644 index 484b0637b2..0000000000 --- a/adapters/adnuntius/adnuntiustest/supplemental/check-eids-parameter.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "user": { - "ext":{ - "eids" : [ - { - "source": "adserver.org", - "uids": [ - { "id": "111111111111", "atype": 1, "ext": { "rtiPartner": "TDID" } } - ] - }, - { - "source": "pubcid.org", - "uids": [ - { "id": "22222222-2222-2222-2222-222222222222", "atype": 1 } - ] - } - ] - } - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "auId": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://whatever.url?eids=%5B%7B%22source%22%3A%22adserver.org%22%2C%22uids%22%3A%5B%7B%22id%22%3A%22111111111111%22%2C%22atype%22%3A1%2C%22ext%22%3A%7B+%22rtiPartner%22%3A+%22TDID%22+%7D%7D%5D%7D%2C%7B%22source%22%3A%22pubcid.org%22%2C%22uids%22%3A%5B%7B%22id%22%3A%2222222222-2222-2222-2222-222222222222%22%2C%22atype%22%3A1%7D%5D%7D%5D&format=prebidServer&tzo=0", - "body": { - "adUnits": [ - { - "auId": "123", - "targetId": "123-test-imp-id:banner", - "nativeRequest": {}, - "dimensions": [[300,250],[300,600]] - } - ], - "metaData": {}, - "context": "unknown" - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "adUnits": [ - { - "auId": "0000000000000123", - "targetId": "123-test-imp-id:banner", - "matchedAdCount": 1, - "html": "", - "responseId": "adn-rsp-900646517", - "ads": [ - { - "destinationUrls": { - "url": "http://www.google.com" - }, - "advertiserDomains": ["google.com"], - "bid": { - "amount": 20.0, - "currency": "NOK" - }, - "adId": "adn-id-1559784094", - "creativeWidth": "980", - "creativeHeight": "240", - "creativeId": "jn9hpzvlsf8cpdmm", - "lineItemId": "q7y9qm5b0xt9htrv" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "adn-id-1559784094", - "impid": "test-imp-id", - "price": 20000, - "adm": "", - "adid": "adn-id-1559784094", - "adomain": [ - "google.com" - ], - "cid": "q7y9qm5b0xt9htrv", - "crid": "jn9hpzvlsf8cpdmm", - "mtype": 1, - "w": 980, - "h": 240 - }, - "type": "banner" - } - ], - "currency": "NOK" - } - ] -} - diff --git a/adapters/adnuntius/adnuntiustest/supplemental/user-ext-invalid.json b/adapters/adnuntius/adnuntiustest/supplemental/user-ext-invalid.json index 1867dd3306..3e71a4f1ac 100644 --- a/adapters/adnuntius/adnuntiustest/supplemental/user-ext-invalid.json +++ b/adapters/adnuntius/adnuntiustest/supplemental/user-ext-invalid.json @@ -29,7 +29,7 @@ }, "expectedMakeRequestsErrors": [ { - "value": "failed to parse Ext User: expect { or n, but found \"", + "value": "failed to parse URL: [failed to parse GDPR information: failed to parse ExtUser in Adnuntius GDPR check: expect { or n, but found \"]", "comparison": "literal" } ] diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-empty-eids-parameter.json b/adapters/adnuntius/adnuntiustest/supplemental/user-ext.json similarity index 90% rename from adapters/adnuntius/adnuntiustest/supplemental/check-empty-eids-parameter.json rename to adapters/adnuntius/adnuntiustest/supplemental/user-ext.json index 379a77b9f8..4d3ccb1373 100644 --- a/adapters/adnuntius/adnuntiustest/supplemental/check-empty-eids-parameter.json +++ b/adapters/adnuntius/adnuntiustest/supplemental/user-ext.json @@ -4,6 +4,12 @@ "user": { "ext":{ "eids" : [ + { + "source": "idProvider", + "uids": [ + { "id": "userId", "atype": 1, "ext": { "stype": "ppuid" } } + ] + } ] } }, @@ -42,8 +48,10 @@ "nativeRequest": {}, "dimensions": [[300,250],[300,600]] } - ], - "metaData": {}, + ], + "metaData": { + "usi": "userId" + }, "context": "unknown" }, "impIDs":["test-imp-id"] @@ -107,4 +115,3 @@ } ] } - diff --git a/adapters/adnuntius/params_test.go b/adapters/adnuntius/params_test.go index 9ecae3ef5a..92db0b9e5a 100644 --- a/adapters/adnuntius/params_test.go +++ b/adapters/adnuntius/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adnuntius.json diff --git a/adapters/adocean/adocean.go b/adapters/adocean/adocean.go new file mode 100644 index 0000000000..82f3200159 --- /dev/null +++ b/adapters/adocean/adocean.go @@ -0,0 +1,408 @@ +package adocean + +import ( + "errors" + "fmt" + "math/rand" + "net/http" + "net/url" + "regexp" + "sort" + "strconv" + "strings" + "text/template" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +const adapterVersion = "1.3.0" +const maxUriLength = 8000 +const measurementCode = ` + +` + +type ResponseAdUnit struct { + ID string `json:"id"` + CrID string `json:"crid"` + Currency string `json:"currency"` + Price string `json:"price"` + Width string `json:"width"` + Height string `json:"height"` + Code string `json:"code"` + WinURL string `json:"winUrl"` + StatsURL string `json:"statsUrl"` + Error string `json:"error"` +} + +type requestData struct { + Url *url.URL + Headers *http.Header + SlaveSizes map[string]string + ImpIDs []string +} + +// Builder builds a new instance of the AdOcean adapter for the given bidder with the given config. +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + endpointTemplate, err := template.New("endpointTemplate").Parse(config.Endpoint) + if err != nil { + return nil, errors.New("Unable to parse endpoint template") + } + + whiteSpace := regexp.MustCompile(`\s+`) + + bidder := &AdOceanAdapter{ + endpointTemplate: endpointTemplate, + measurementCode: whiteSpace.ReplaceAllString(measurementCode, " "), + } + return bidder, nil +} + +type AdOceanAdapter struct { + endpointTemplate *template.Template + measurementCode string +} + +func (a *AdOceanAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + if len(request.Imp) == 0 { + return nil, []error{&errortypes.BadInput{ + Message: "No impression in the bid request", + }} + } + + consentString := "" + if request.User != nil { + var extUser openrtb_ext.ExtUser + if err := jsonutil.Unmarshal(request.User.Ext, &extUser); err == nil { + consentString = extUser.Consent + } + } + + var reqCreationErrors []error + var err error + requestsData := make([]*requestData, 0, len(request.Imp)) + for _, auction := range request.Imp { + requestsData, err = a.addNewBid(requestsData, &auction, request, consentString) + if err != nil { + reqCreationErrors = append(reqCreationErrors, err) + } + } + + httpRequests := make([]*adapters.RequestData, 0, len(requestsData)) + for _, requestData := range requestsData { + httpRequests = append(httpRequests, &adapters.RequestData{ + Method: "GET", + Uri: requestData.Url.String(), + Headers: *requestData.Headers, + ImpIDs: requestData.ImpIDs, + }) + } + + return httpRequests, reqCreationErrors +} + +func (a *AdOceanAdapter) addNewBid( + requestsData []*requestData, + imp *openrtb2.Imp, + request *openrtb2.BidRequest, + consentString string, +) ([]*requestData, error) { + var bidderExt adapters.ExtImpBidder + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { + return requestsData, &errortypes.BadInput{ + Message: "Error parsing bidderExt object", + } + } + + var adOceanExt openrtb_ext.ExtImpAdOcean + if err := jsonutil.Unmarshal(bidderExt.Bidder, &adOceanExt); err != nil { + return requestsData, &errortypes.BadInput{ + Message: "Error parsing adOceanExt parameters", + } + } + + if adOceanExt.EmitterPrefix == "" { + return requestsData, &errortypes.BadInput{ + Message: "No emitterPrefix param", + } + } + + addedToExistingRequest := addToExistingRequest(requestsData, &adOceanExt, imp, (request.Test == 1)) + if addedToExistingRequest { + return requestsData, nil + } + + slaveSizes := map[string]string{} + slaveSizes[adOceanExt.SlaveID] = getImpSizes(imp) + + url, err := a.makeURL(&adOceanExt, imp, request, slaveSizes, consentString) + if err != nil { + return requestsData, err + } + + requestsData = append(requestsData, &requestData{ + Url: url, + Headers: a.formHeaders(request), + SlaveSizes: slaveSizes, + ImpIDs: []string{imp.ID}, + }) + + return requestsData, nil +} + +func addToExistingRequest(requestsData []*requestData, newParams *openrtb_ext.ExtImpAdOcean, imp *openrtb2.Imp, testImp bool) bool { + auctionID := imp.ID + + for _, requestData := range requestsData { + queryParams := requestData.Url.Query() + masterID := queryParams["id"][0] + + if masterID == newParams.MasterID { + if _, has := requestData.SlaveSizes[newParams.SlaveID]; has { + continue + } + + queryParams.Add("aid", newParams.SlaveID+":"+auctionID) + requestData.SlaveSizes[newParams.SlaveID] = getImpSizes(imp) + setSlaveSizesParam(&queryParams, requestData.SlaveSizes, testImp) + + newUrl := *(requestData.Url) + newUrl.RawQuery = queryParams.Encode() + if len(newUrl.String()) < maxUriLength { + requestData.Url = &newUrl + requestData.ImpIDs = append(requestData.ImpIDs, auctionID) + return true + } + + delete(requestData.SlaveSizes, newParams.SlaveID) + } + } + + return false +} + +func (a *AdOceanAdapter) makeURL( + params *openrtb_ext.ExtImpAdOcean, + imp *openrtb2.Imp, + request *openrtb2.BidRequest, + slaveSizes map[string]string, + consentString string, +) (*url.URL, error) { + endpointParams := macros.EndpointTemplateParams{Host: params.EmitterPrefix} + host, err := macros.ResolveMacros(a.endpointTemplate, endpointParams) + if err != nil { + return nil, &errortypes.BadInput{ + Message: "Unable to parse endpoint url template: " + err.Error(), + } + } + + endpointURL, err := url.Parse(host) + if err != nil { + return nil, &errortypes.BadInput{ + Message: "Malformed URL: " + err.Error(), + } + } + + randomizedPart := 10000000 + rand.Intn(99999999-10000000) + if request.Test == 1 { + randomizedPart = 10000000 + } + endpointURL.Path = "/_" + strconv.Itoa(randomizedPart) + "/ad.json" + + auctionID := imp.ID + queryParams := url.Values{} + queryParams.Add("pbsrv_v", adapterVersion) + queryParams.Add("id", params.MasterID) + queryParams.Add("nc", "1") + queryParams.Add("nosecure", "1") + queryParams.Add("aid", params.SlaveID+":"+auctionID) + if consentString != "" { + queryParams.Add("gdpr_consent", consentString) + queryParams.Add("gdpr", "1") + } + if request.User != nil && request.User.BuyerUID != "" { + queryParams.Add("hcuserid", request.User.BuyerUID) + } + if request.App != nil { + queryParams.Add("app", "1") + queryParams.Add("appname", request.App.Name) + queryParams.Add("appbundle", request.App.Bundle) + queryParams.Add("appdomain", request.App.Domain) + } + if request.Device != nil { + if request.Device.IFA != "" { + queryParams.Add("ifa", request.Device.IFA) + } else { + queryParams.Add("dpidmd5", request.Device.DPIDMD5) + } + + queryParams.Add("devos", request.Device.OS) + queryParams.Add("devosv", request.Device.OSV) + queryParams.Add("devmodel", request.Device.Model) + queryParams.Add("devmake", request.Device.Make) + } + + setSlaveSizesParam(&queryParams, slaveSizes, (request.Test == 1)) + endpointURL.RawQuery = queryParams.Encode() + + return endpointURL, nil +} + +func (a *AdOceanAdapter) formHeaders(req *openrtb2.BidRequest) *http.Header { + headers := make(http.Header) + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + + if req.Device != nil { + headers.Add("User-Agent", req.Device.UA) + + if req.Device.IP != "" { + headers.Add("X-Forwarded-For", req.Device.IP) + } else if req.Device.IPv6 != "" { + headers.Add("X-Forwarded-For", req.Device.IPv6) + } + } + + if req.Site != nil { + headers.Add("Referer", req.Site.Page) + } + + return &headers +} + +func getImpSizes(imp *openrtb2.Imp) string { + if imp.Banner == nil { + return "" + } + + if len(imp.Banner.Format) > 0 { + sizes := make([]string, len(imp.Banner.Format)) + for i, format := range imp.Banner.Format { + sizes[i] = strconv.FormatInt(format.W, 10) + "x" + strconv.FormatInt(format.H, 10) + } + + return strings.Join(sizes, "_") + } + + if imp.Banner.W != nil && imp.Banner.H != nil { + return strconv.FormatInt(*imp.Banner.W, 10) + "x" + strconv.FormatInt(*imp.Banner.H, 10) + } + + return "" +} + +func setSlaveSizesParam(queryParams *url.Values, slaveSizes map[string]string, orderByKey bool) { + sizeValues := make([]string, 0, len(slaveSizes)) + slaveIDs := make([]string, 0, len(slaveSizes)) + for k := range slaveSizes { + slaveIDs = append(slaveIDs, k) + } + + if orderByKey { + sort.Strings(slaveIDs) + } + + for _, slaveID := range slaveIDs { + sizes := slaveSizes[slaveID] + if sizes == "" { + continue + } + + rawSlaveID := strings.Replace(slaveID, "adocean", "", 1) + sizeValues = append(sizeValues, rawSlaveID+"~"+sizes) + } + + if len(sizeValues) > 0 { + queryParams.Set("aosspsizes", strings.Join(sizeValues, "-")) + } +} + +func (a *AdOceanAdapter) MakeBids( + internalRequest *openrtb2.BidRequest, + externalRequest *adapters.RequestData, + response *adapters.ResponseData, +) (*adapters.BidderResponse, []error) { + if response.StatusCode != http.StatusOK { + return nil, []error{fmt.Errorf("Unexpected status code: %d. Network error?", response.StatusCode)} + } + + requestURL, _ := url.Parse(externalRequest.Uri) + queryParams := requestURL.Query() + auctionIDs := queryParams["aid"] + + bidResponses := make([]ResponseAdUnit, 0) + if err := jsonutil.Unmarshal(response.Body, &bidResponses); err != nil { + return nil, []error{err} + } + + var parsedResponses = adapters.NewBidderResponseWithBidsCapacity(len(auctionIDs)) + var parsingErrors []error + var slaveToAuctionIDMap = make(map[string]string, len(auctionIDs)) + + for _, auctionFullID := range auctionIDs { + auctionIDsSlice := strings.SplitN(auctionFullID, ":", 2) + slaveToAuctionIDMap[auctionIDsSlice[0]] = auctionIDsSlice[1] + } + + for _, bid := range bidResponses { + if auctionID, found := slaveToAuctionIDMap[bid.ID]; found { + if bid.Error == "true" { + continue + } + + price, _ := strconv.ParseFloat(bid.Price, 64) + width, _ := strconv.ParseInt(bid.Width, 10, 64) + height, _ := strconv.ParseInt(bid.Height, 10, 64) + adCode, err := a.prepareAdCodeForBid(bid) + if err != nil { + parsingErrors = append(parsingErrors, err) + continue + } + + parsedResponses.Bids = append(parsedResponses.Bids, &adapters.TypedBid{ + Bid: &openrtb2.Bid{ + ID: bid.ID, + ImpID: auctionID, + Price: price, + AdM: adCode, + CrID: bid.CrID, + W: width, + H: height, + }, + BidType: openrtb_ext.BidTypeBanner, + }) + parsedResponses.Currency = bid.Currency + } + } + + return parsedResponses, parsingErrors +} + +func (a *AdOceanAdapter) prepareAdCodeForBid(bid ResponseAdUnit) (string, error) { + sspCode, err := url.QueryUnescape(bid.Code) + if err != nil { + return "", err + } + + adCode := fmt.Sprintf(a.measurementCode, bid.WinURL, bid.StatsURL) + sspCode + + return adCode, nil +} diff --git a/adapters/adocean/adocean_test.go b/adapters/adocean/adocean_test.go new file mode 100644 index 0000000000..4fb784bfc0 --- /dev/null +++ b/adapters/adocean/adocean_test.go @@ -0,0 +1,28 @@ +package adocean + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/stretchr/testify/assert" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderAdOcean, config.Adapter{ + Endpoint: "https://{{.Host}}.adocean.pl"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "adoceantest", bidder) +} + +func TestEndpointTemplateMalformed(t *testing.T) { + _, buildErr := Builder(openrtb_ext.BidderAdOcean, config.Adapter{ + Endpoint: "{{Malformed}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + assert.Error(t, buildErr) +} diff --git a/adapters/adocean/adoceantest/exemplary/multi-banner-impression.json b/adapters/adocean/adoceantest/exemplary/multi-banner-impression.json new file mode 100644 index 0000000000..6eac26e0d0 --- /dev/null +++ b/adapters/adocean/adoceantest/exemplary/multi-banner-impression.json @@ -0,0 +1,135 @@ +{ + "mockBidRequest": { + "id": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b", + "source": { + "tid": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b" + }, + "tmax": 1000, + "imp": [{ + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }, { + "w": 320, + "h": 600 + }] + } + }, { + "id": "secod-twelve", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://192.168.100.203/testing/prebid_server/test.html" + }, + "device": { + "w": 418, + "h": 961, + "dpidmd5": "f2ba45ece57cff9477d5a8083b138c9g" + }, + "regs": { + "ext": { + "gdpr": 1 + } + }, + "user": { + "ext": { + "consent": "COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw" + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aid=adoceanmyaowafpdwlrks%3Asecod-twelve&aosspsizes=myaowafpdwlrks~300x250-myaozpniqismex~300x250_320x600&devmake=&devmodel=&devos=&devosv=&dpidmd5=f2ba45ece57cff9477d5a8083b138c9g&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test","secod-twelve"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaozpniqismex", + "price": "1", + "winurl": "https://win-url.com", + "statsUrl": "https://stats-url.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }, + { + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url2.com", + "statsUrl": "https://stats-url2.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + }], + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaozpniqismex", + "impid": "ao-test", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + },{ + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "secod-twelve", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/adocean/adoceantest/exemplary/single-banner-impression.json b/adapters/adocean/adoceantest/exemplary/single-banner-impression.json new file mode 100644 index 0000000000..9f5fa2a349 --- /dev/null +++ b/adapters/adocean/adoceantest/exemplary/single-banner-impression.json @@ -0,0 +1,118 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1", + "ifa": "f2ba45ece57cff9477d5a8083b138c9a" + }, + "regs": { + "ext": { + "gdpr": 1 + } + }, + "user": { + "ext": { + "consent": "COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aosspsizes=myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&ifa=f2ba45ece57cff9477d5a8083b138c9a&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test"] + }, + "mockResponse": { + "status": 200, + "body": [ + { + "id": "adoceanmyaozpniqismex", + "price": "1", + "winurl": "https://win-url.com", + "statsUrl": "https://stats-url.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }, + { + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "", + "statsUrl": "", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + } + ], + "expectedBidResponses": [ + { + "currency": "EUR", + "bids": [ + { + "bid": { + "id": "adoceanmyaozpniqismex", + "impid": "ao-test", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/app.json b/adapters/adocean/adoceantest/supplemental/app.json new file mode 100644 index 0000000000..28c67bdf81 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/app.json @@ -0,0 +1,72 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "app": { + "id": "ktdf45k34h53k5hjh5k3", + "name": "Weather App", + "cat": ["IAB15","IAB15-10"], + "ver": "1.0.2", + "bundle": "12345", + "domain": "example.com" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1", + "os": "iOS", + "devicetype": 4, + "ifa": "f2ba45ece57cff9477d5a8083b138c9a" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aosspsizes=myaozpniqismex~300x250&app=1&appbundle=12345&appdomain=example.com&appname=Weather+App&devmake=&devmodel=&devos=iOS&devosv=&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&ifa=f2ba45ece57cff9477d5a8083b138c9a&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test"] + }, + "mockResponse": { + "status": 200, + "body": "{ key: nil }" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "decode slice: expect [ or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/bad-response.json b/adapters/adocean/adoceantest/supplemental/bad-response.json new file mode 100644 index 0000000000..eb1bcb6ef0 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/bad-response.json @@ -0,0 +1,67 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aosspsizes=myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test"] + }, + "mockResponse": { + "status": 200, + "body": "{ key: nil }" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "decode slice: expect [ or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/emiter-param-error.json b/adapters/adocean/adoceantest/supplemental/emiter-param-error.json new file mode 100644 index 0000000000..154c92e851 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/emiter-param-error.json @@ -0,0 +1,55 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emiter": "myao.adocean.pl", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1" + } + }, + "expectedMakeRequestsErrors": [ + { + "value": "No emitterPrefix param", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/encode-error.json b/adapters/adocean/adoceantest/supplemental/encode-error.json new file mode 100644 index 0000000000..32a0565da2 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/encode-error.json @@ -0,0 +1,82 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aosspsizes=myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test"] + }, + "mockResponse": { + "status": 200, + "body": [ + { + "id": "adoceanmyaozpniqismex", + "price": "1", + "winurl": "", + "statsUrl": "", + "code": " %a", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + } + ], + "expectedBidResponses": [{"currency":"USD","bids":[]}], + "expectedMakeBidsErrors": [ + { + "value": "invalid URL escape \"%a\"", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/network-error.json b/adapters/adocean/adoceantest/supplemental/network-error.json new file mode 100644 index 0000000000..5910a5626b --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/network-error.json @@ -0,0 +1,67 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [ + { + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + } + } + ], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aosspsizes=myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test"] + }, + "mockResponse": { + "status": 500, + "body": {} + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 500. Network error?", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/no-bid.json b/adapters/adocean/adoceantest/supplemental/no-bid.json new file mode 100644 index 0000000000..a2c9b9c7ef --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/no-bid.json @@ -0,0 +1,161 @@ +{ + "mockBidRequest": { + "id": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b", + "source": { + "tid": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b" + }, + "tmax": 1000, + "imp": [{ + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }, { + "id": "ao-test-two", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }, { + "id": "ao-test-three", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://localhost/prebid_server/test.html" + }, + "device": { + "w": 418, + "h": 961 + }, + "regs": { + "ext": { + "gdpr": 1 + } + }, + "user": { + "ext": { + "consent": "COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw" + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aid=adoceanmyaowafpdwlrks%3Aao-test-two&aosspsizes=myaowafpdwlrks~300x250-myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test","ao-test-two"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaozpniqismex", + "error": "true" + }, + { + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url2.com", + "statsUrl": "https://stats-url2.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + }, { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaowafpdwlrks%3Aao-test-three&aosspsizes=myaowafpdwlrks~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test-three"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url3.com", + "statsUrl": "https://stats-url3.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }] + } + }], + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-two", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }, { + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-three", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/adocean/adoceantest/supplemental/no-impression.json b/adapters/adocean/adoceantest/supplemental/no-impression.json new file mode 100644 index 0000000000..8f2a8eef35 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/no-impression.json @@ -0,0 +1,36 @@ +{ + "mockBidRequest": { + "id": "9ed903f4-383d-406b-8011-4f06526cb02c", + "source": { + "tid": "9ed903f4-383d-406b-8011-4f06526cb02c" + }, + "tmax": 1000, + "imp": [], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://example.com/test.html" + }, + "device": { + "w": 1280, + "h": 720, + "ip": "192.168.1.1" + } + }, + "expectedMakeRequestsErrors": [ + { + "value": "No impression in the bid request", + "comparison": "literal" + } + ] +} diff --git a/adapters/adocean/adoceantest/supplemental/no-sizes.json b/adapters/adocean/adoceantest/supplemental/no-sizes.json new file mode 100644 index 0000000000..c469f5e095 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/no-sizes.json @@ -0,0 +1,170 @@ +{ + "mockBidRequest": { + "id": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b", + "source": { + "tid": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b" + }, + "tmax": 1000, + "imp": [{ + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + } + }, { + "id": "ao-test-two", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [] + } + }, { + "id": "ao-test-three", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "w": 300, + "h": 250 + } + }], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://localhost/prebid_server/test.html" + }, + "device": { + "w": 418, + "h": 961 + }, + "regs": { + "ext": { + "gdpr": 1 + } + }, + "user": { + "ext": { + "consent": "COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw" + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aid=adoceanmyaowafpdwlrks%3Aao-test-two&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test","ao-test-two"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaozpniqismex", + "price": "1", + "winurl": "https://win-url.com", + "statsUrl": "https://stats-url.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }, + { + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url2.com", + "statsUrl": "https://stats-url2.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + }, { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaowafpdwlrks%3Aao-test-three&aosspsizes=myaowafpdwlrks~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test-three"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url3.com", + "statsUrl": "https://stats-url3.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }] + } + }], + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaozpniqismex", + "impid": "ao-test", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }, { + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-two", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }, { + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-three", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/adocean/adoceantest/supplemental/requests-merge.json b/adapters/adocean/adoceantest/supplemental/requests-merge.json new file mode 100644 index 0000000000..240c74bc77 --- /dev/null +++ b/adapters/adocean/adoceantest/supplemental/requests-merge.json @@ -0,0 +1,181 @@ +{ + "mockBidRequest": { + "id": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b", + "source": { + "tid": "b5300274-a7ec-4cdb-bf5b-d75eeb481a6b" + }, + "tmax": 1000, + "imp": [{ + "id": "ao-test", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaozpniqismex" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }, { + "id": "ao-test-two", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }, { + "id": "ao-test-three", + "ext": { + "bidder": { + "emitterPrefix": "myao", + "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", + "slaveId": "adoceanmyaowafpdwlrks" + } + }, + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + } + }], + "test": 1, + "ext": { + "prebid": { + "targeting": { + "includewinners": true, + "includebidderkeys": false + } + } + }, + "site": { + "publisher": { + "id": "1" + }, + "page": "http://localhost/prebid_server/test.html" + }, + "device": { + "w": 418, + "h": 961 + }, + "regs": { + "ext": { + "gdpr": 1 + } + }, + "user": { + "ext": { + "consent": "COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw" + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaozpniqismex%3Aao-test&aid=adoceanmyaowafpdwlrks%3Aao-test-two&aosspsizes=myaowafpdwlrks~300x250-myaozpniqismex~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test","ao-test-two"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaozpniqismex", + "price": "1", + "winurl": "https://win-url.com", + "statsUrl": "https://stats-url.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }, + { + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url2.com", + "statsUrl": "https://stats-url2.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + } + ] + } + }, { + "expectedRequest": { + "uri": "https://myao.adocean.pl/_10000000/ad.json?aid=adoceanmyaowafpdwlrks%3Aao-test-three&aosspsizes=myaowafpdwlrks~300x250&devmake=&devmodel=&devos=&devosv=&dpidmd5=&gdpr=1&gdpr_consent=COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw&id=tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7&nc=1&nosecure=1&pbsrv_v=1.3.0", + "impIDs":["ao-test-three"] + }, + "mockResponse": { + "status": 200, + "body": [{ + "id": "adoceanmyaowafpdwlrks", + "price": "1", + "winurl": "https://win-url3.com", + "statsUrl": "https://stats-url3.com", + "code": " ", + "currency": "EUR", + "minFloorPrice": "0.01", + "width": "300", + "height": "250", + "crid": "0af345b42983cc4bc0", + "ttl": "300" + }] + } + }], + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaozpniqismex", + "impid": "ao-test", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }, { + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-two", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }, { + "currency": "EUR", + "bids": [{ + "bid": { + "id": "adoceanmyaowafpdwlrks", + "impid": "ao-test-three", + "price": 1, + "adm": " ", + "crid": "0af345b42983cc4bc0", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/adocean/params_test.go b/adapters/adocean/params_test.go new file mode 100644 index 0000000000..0840d10847 --- /dev/null +++ b/adapters/adocean/params_test.go @@ -0,0 +1,53 @@ +package adocean + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderAdOcean, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected adocean params: %s", validParam) + } + } +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderAdOcean, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} + +var validParams = []string{ + `{"emitterPrefix": "myao", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emiter": "myao.adocean.pl", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, +} + +var invalidParams = []string{ + `{}`, + `{"emitterPrefix": "myao", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emitterPrefix": "myao", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7"}`, + `{"emitterPrefix": "", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emitterPrefix": "myao", "", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emitterPrefix": "myao", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": ""}`, + `{"emitterPrefix": "myao", "masterId": "tmYF.DMl7Z utQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emitterPrefix": "myao", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmy iqismex"}`, + `{"emitterPrefix": "myao.adocean.pl", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emiter": "myao.adocean.pl", "slaveId": "adoceanmyaozpniqismex"}`, + `{"emiter": "", "masterId": "tmYF.DMl7ZBq.Nqt2Bq4FutQTJfTpxCOmtNPZoQUDcL.G7", "slaveId": "adoceanmyaozpniqismex"}`, +} diff --git a/adapters/elementaltv/elementaltv.go b/adapters/adoppler/adoppler.go similarity index 82% rename from adapters/elementaltv/elementaltv.go rename to adapters/adoppler/adoppler.go index 4d84037b5c..ace52b93b1 100644 --- a/adapters/elementaltv/elementaltv.go +++ b/adapters/adoppler/adoppler.go @@ -1,25 +1,28 @@ -package elementaltv +package adoppler import ( "encoding/json" + "errors" "fmt" "net/http" "net/url" "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) +const DefaultClient = "app" + var bidHeaders http.Header = map[string][]string{ "Accept": {"application/json"}, "Content-Type": {"application/json;charset=utf-8"}, - "X-OpenRTB-Version": {"2.6"}, + "X-OpenRTB-Version": {"2.5"}, } type adsVideoExt struct { @@ -30,24 +33,24 @@ type adsImpExt struct { Video *adsVideoExt `json:"video"` } -type adapter struct { +type AdopplerAdapter struct { endpoint *template.Template } -// Builder builds a new instance of the ElementalTV adapter for the given bidder with the given config. +// Builder builds a new instance of the Adoppler adapter for the given bidder with the given config. func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { template, err := template.New("endpointTemplate").Parse(config.Endpoint) if err != nil { - return nil, fmt.Errorf("unable to parse endpoint url template: %w", err) + return nil, fmt.Errorf("unable to parse endpoint url template: %v", err) } - bidder := &adapter{ + bidder := &AdopplerAdapter{ endpoint: template, } return bidder, nil } -func (ads *adapter) MakeRequests( +func (ads *AdopplerAdapter) MakeRequests( req *openrtb2.BidRequest, info *adapters.ExtraRequestInfo, ) ( @@ -71,7 +74,7 @@ func (ads *adapter) MakeRequests( r.ID = req.ID + "-" + ext.AdUnit r.Imp = []openrtb2.Imp{imp} - body, err := jsonutil.Marshal(r) + body, err := json.Marshal(r) if err != nil { errs = append(errs, err) continue @@ -97,7 +100,7 @@ func (ads *adapter) MakeRequests( return datas, errs } -func (ads *adapter) MakeBids( +func (ads *AdopplerAdapter) MakeBids( intReq *openrtb2.BidRequest, extReq *adapters.RequestData, resp *adapters.ResponseData, @@ -190,29 +193,33 @@ func (ads *adapter) MakeBids( return adsResp, nil } -func (ads *adapter) bidUri(ext *openrtb_ext.ExtImpElementalTV) (string, error) { +func (ads *AdopplerAdapter) bidUri(ext *openrtb_ext.ExtImpAdoppler) (string, error) { params := macros.EndpointTemplateParams{} params.AdUnit = url.PathEscape(ext.AdUnit) + if ext.Client == "" { + params.AccountID = DefaultClient + } else { + params.AccountID = url.PathEscape(ext.Client) + } + return macros.ResolveMacros(ads.endpoint, params) } -func unmarshalExt(ext json.RawMessage) (*openrtb_ext.ExtImpElementalTV, error) { +func unmarshalExt(ext json.RawMessage) (*openrtb_ext.ExtImpAdoppler, error) { var bext adapters.ExtImpBidder err := jsonutil.Unmarshal(ext, &bext) if err != nil { return nil, err } - var adsExt openrtb_ext.ExtImpElementalTV + var adsExt openrtb_ext.ExtImpAdoppler err = jsonutil.Unmarshal(bext.Bidder, &adsExt) if err != nil { return nil, err } if adsExt.AdUnit == "" { - return nil, &errortypes.BadInput{ - Message: "$.imp.ext.bidder.adunit required", - } + return nil, errors.New("$.imp.ext.adoppler.adunit required") } return &adsExt, nil diff --git a/adapters/adoppler/adoppler_test.go b/adapters/adoppler/adoppler_test.go new file mode 100644 index 0000000000..3c6888f312 --- /dev/null +++ b/adapters/adoppler/adoppler_test.go @@ -0,0 +1,20 @@ +package adoppler + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderAdoppler, config.Adapter{ + Endpoint: "http://{{.AccountID}}.trustedmarketplace.com/processHeaderBid/{{.AdUnit}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "adopplertest", bidder) +} diff --git a/adapters/adoppler/adopplertest/exemplary/custom-client.json b/adapters/adoppler/adopplertest/exemplary/custom-client.json new file mode 100644 index 0000000000..fe92c36390 --- /dev/null +++ b/adapters/adoppler/adopplertest/exemplary/custom-client.json @@ -0,0 +1,81 @@ +{ + "mockBidRequest":{ + "id":"req1", + "imp":[ + { + "id":"imp1", + "banner":{ + "w":100, + "h":200 + }, + "ext":{ + "bidder":{ + "adunit":"unit1", + "client":"client1" + } + } + } + ] + }, + "httpCalls":[ + { + "expectedRequest":{ + "uri":"http://client1.trustedmarketplace.com/processHeaderBid/unit1", + "body":{ + "id":"req1-unit1", + "imp":[ + { + "id":"imp1", + "banner":{ + "w":100, + "h":200 + }, + "ext":{ + "bidder":{ + "adunit":"unit1", + "client":"client1" + } + } + } + ] + }, + "impIDs":["imp1"] + }, + "mockResponse":{ + "status":200, + "body":{ + "id":"req1-unit1", + "seatbid":[ + { + "bid":[ + { + "id":"req1-unit1-bid1", + "impid":"imp1", + "price":0.12, + "adm":"An ad" + } + ] + } + ], + "cur":"USD" + } + } + } + ], + "expectedBidResponses":[ + { + "currency":"USD", + "bids":[ + { + "bid":{ + "id":"req1-unit1-bid1", + "impid":"imp1", + "price":0.12, + "adm":"An ad" + }, + "type":"banner" + } + ] + } + ] +} diff --git a/adapters/elementaltv/elementaltvtest/exemplary/base.json b/adapters/adoppler/adopplertest/exemplary/default-client.json similarity index 95% rename from adapters/elementaltv/elementaltvtest/exemplary/base.json rename to adapters/adoppler/adopplertest/exemplary/default-client.json index b7913c6597..dd53208f7d 100644 --- a/adapters/elementaltv/elementaltvtest/exemplary/base.json +++ b/adapters/adoppler/adopplertest/exemplary/default-client.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/exemplary/multiimp.json b/adapters/adoppler/adopplertest/exemplary/multiimp.json similarity index 95% rename from adapters/elementaltv/elementaltvtest/exemplary/multiimp.json rename to adapters/adoppler/adopplertest/exemplary/multiimp.json index 6575a50300..bdbef5a4af 100644 --- a/adapters/elementaltv/elementaltvtest/exemplary/multiimp.json +++ b/adapters/adoppler/adopplertest/exemplary/multiimp.json @@ -44,7 +44,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ @@ -86,7 +86,7 @@ }, { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit2", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit2", "body":{ "id":"req1-unit2", "imp":[ @@ -141,7 +141,7 @@ }, { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit3", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit3", "body":{ "id":"req1-unit3", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/bad-request.json b/adapters/adoppler/adopplertest/supplemental/bad-request.json similarity index 92% rename from adapters/elementaltv/elementaltvtest/supplemental/bad-request.json rename to adapters/adoppler/adopplertest/supplemental/bad-request.json index 3fac885c8a..c2e3846020 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/bad-request.json +++ b/adapters/adoppler/adopplertest/supplemental/bad-request.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/duplicate-imp.json b/adapters/adoppler/adopplertest/supplemental/duplicate-imp.json similarity index 94% rename from adapters/elementaltv/elementaltvtest/supplemental/duplicate-imp.json rename to adapters/adoppler/adopplertest/supplemental/duplicate-imp.json index 137997c2ce..cc24ae03a2 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/duplicate-imp.json +++ b/adapters/adoppler/adopplertest/supplemental/duplicate-imp.json @@ -31,7 +31,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ @@ -73,7 +73,7 @@ }, { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit2", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit2", "body":{ "id":"req1-unit2", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/invalid-impid.json b/adapters/adoppler/adopplertest/supplemental/invalid-impid.json similarity index 94% rename from adapters/elementaltv/elementaltvtest/supplemental/invalid-impid.json rename to adapters/adoppler/adopplertest/supplemental/invalid-impid.json index 2ea9ed4c32..e94a0e0c40 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/invalid-impid.json +++ b/adapters/adoppler/adopplertest/supplemental/invalid-impid.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/invalid-response.json b/adapters/adoppler/adopplertest/supplemental/invalid-response.json similarity index 92% rename from adapters/elementaltv/elementaltvtest/supplemental/invalid-response.json rename to adapters/adoppler/adopplertest/supplemental/invalid-response.json index 81c9ba5968..84342feaa0 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/invalid-response.json +++ b/adapters/adoppler/adopplertest/supplemental/invalid-response.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/invalid-video-ext.json b/adapters/adoppler/adopplertest/supplemental/invalid-video-ext.json similarity index 95% rename from adapters/elementaltv/elementaltvtest/supplemental/invalid-video-ext.json rename to adapters/adoppler/adopplertest/supplemental/invalid-video-ext.json index 8f3386c138..6bab4036c5 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/invalid-video-ext.json +++ b/adapters/adoppler/adopplertest/supplemental/invalid-video-ext.json @@ -35,7 +35,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ @@ -86,7 +86,7 @@ }, { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit2", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit2", "body":{ "id":"req1-unit2", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/missing-adunit.json b/adapters/adoppler/adopplertest/supplemental/missing-adunit.json similarity index 87% rename from adapters/elementaltv/elementaltvtest/supplemental/missing-adunit.json rename to adapters/adoppler/adopplertest/supplemental/missing-adunit.json index 92ff8a25eb..df9bbe5771 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/missing-adunit.json +++ b/adapters/adoppler/adopplertest/supplemental/missing-adunit.json @@ -24,7 +24,7 @@ ], "expectedMakeRequestsErrors":[ { - "value":"$.imp.ext.bidder.adunit required", + "value":"$.imp.ext.adoppler.adunit required", "comparison":"literal" } ] diff --git a/adapters/elementaltv/elementaltvtest/supplemental/no-bid.json b/adapters/adoppler/adopplertest/supplemental/no-bid.json similarity index 91% rename from adapters/elementaltv/elementaltvtest/supplemental/no-bid.json rename to adapters/adoppler/adopplertest/supplemental/no-bid.json index 6f8099516b..9135b4c5f2 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/no-bid.json +++ b/adapters/adoppler/adopplertest/supplemental/no-bid.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/elementaltv/elementaltvtest/supplemental/server-error.json b/adapters/adoppler/adopplertest/supplemental/server-error.json similarity index 92% rename from adapters/elementaltv/elementaltvtest/supplemental/server-error.json rename to adapters/adoppler/adopplertest/supplemental/server-error.json index 5341d2473a..dcd45e3718 100644 --- a/adapters/elementaltv/elementaltvtest/supplemental/server-error.json +++ b/adapters/adoppler/adopplertest/supplemental/server-error.json @@ -19,7 +19,7 @@ "httpCalls":[ { "expectedRequest":{ - "uri":"https://pbs.elementaltv.io/processHeaderBid/unit1", + "uri":"http://app.trustedmarketplace.com/processHeaderBid/unit1", "body":{ "id":"req1-unit1", "imp":[ diff --git a/adapters/adot/adot.go b/adapters/adot/adot.go index d0c8d8dd92..fc32ef6cae 100644 --- a/adapters/adot/adot.go +++ b/adapters/adot/adot.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adot/adot_test.go b/adapters/adot/adot_test.go index f25379b8d3..d5d5afc6c4 100644 --- a/adapters/adot/adot_test.go +++ b/adapters/adot/adot_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adot/params_test.go b/adapters/adot/params_test.go index 2c2b4baa7a..99f8c9d932 100644 --- a/adapters/adot/params_test.go +++ b/adapters/adot/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adot.json @@ -44,6 +44,7 @@ var validParams = []string{ `{"placementId": "test-113", "parallax": true}`, `{"placementId": "test-113", "parallax": false}`, `{"placementId": "test-113", "parallax": false, "publisherPath": "/hubvisor"}`, + `{"placementId": "test-113", "parallax": false, "publisherPath": ""}`, } var invalidParams = []string{ @@ -54,5 +55,4 @@ var invalidParams = []string{ `{"placementId": 142, "parallax": true}`, `{"placementId": "test-114", "parallax": 1}`, `{"placementId": "test-114", "parallax": true, "publisherPath": 111}`, - `{"placementId": "test-113", "parallax": false, "publisherPath": ""}`, } diff --git a/adapters/adpone/adpone.go b/adapters/adpone/adpone.go index 944238767d..bdf7239889 100644 --- a/adapters/adpone/adpone.go +++ b/adapters/adpone/adpone.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Builder builds a new instance of the Adpone adapter for the given bidder with the given config. diff --git a/adapters/adpone/adpone_test.go b/adapters/adpone/adpone_test.go index 418574cdcb..e90055b2e6 100644 --- a/adapters/adpone/adpone_test.go +++ b/adapters/adpone/adpone_test.go @@ -3,9 +3,9 @@ package adpone import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "adponetest" diff --git a/adapters/adprime/adprime.go b/adapters/adprime/adprime.go index 517ddca7a7..a4c041ae32 100644 --- a/adapters/adprime/adprime.go +++ b/adapters/adprime/adprime.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // AdprimeAdapter struct diff --git a/adapters/adprime/adprime_test.go b/adapters/adprime/adprime_test.go index 091c6ee7d2..0b238b5bee 100644 --- a/adapters/adprime/adprime_test.go +++ b/adapters/adprime/adprime_test.go @@ -3,9 +3,9 @@ package adprime import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adprime/params_test.go b/adapters/adprime/params_test.go index ea05776e2a..18556d990e 100644 --- a/adapters/adprime/params_test.go +++ b/adapters/adprime/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the adprime schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/adquery/adquery.go b/adapters/adquery/adquery.go index f730bc9cd7..4181370005 100644 --- a/adapters/adquery/adquery.go +++ b/adapters/adquery/adquery.go @@ -9,11 +9,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/adquery/adquery_test.go b/adapters/adquery/adquery_test.go index d06f077729..913e578195 100644 --- a/adapters/adquery/adquery_test.go +++ b/adapters/adquery/adquery_test.go @@ -3,9 +3,9 @@ package adquery import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adquery/params_test.go b/adapters/adquery/params_test.go index b88b54d8a3..5619f59cb5 100644 --- a/adapters/adquery/params_test.go +++ b/adapters/adquery/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adquery/types.go b/adapters/adquery/types.go index db173ed408..62692bb0d0 100644 --- a/adapters/adquery/types.go +++ b/adapters/adquery/types.go @@ -1,6 +1,6 @@ package adquery -import "github.com/prebid/prebid-server/v4/openrtb_ext" +import "github.com/prebid/prebid-server/v3/openrtb_ext" type BidderRequest struct { V string `json:"v"` diff --git a/adapters/adrino/adrino.go b/adapters/adrino/adrino.go index 545956383e..9139d01789 100644 --- a/adapters/adrino/adrino.go +++ b/adapters/adrino/adrino.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adrino/adrino_test.go b/adapters/adrino/adrino_test.go index fe481dc7f9..48875bed7c 100644 --- a/adapters/adrino/adrino_test.go +++ b/adapters/adrino/adrino_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adrino/params_test.go b/adapters/adrino/params_test.go index 43d9ae9249..a160113fbd 100644 --- a/adapters/adrino/params_test.go +++ b/adapters/adrino/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adrino.json diff --git a/adapters/ads_interactive/ads_interactive.go b/adapters/ads_interactive/ads_interactive.go new file mode 100644 index 0000000000..5b46ec5248 --- /dev/null +++ b/adapters/ads_interactive/ads_interactive.go @@ -0,0 +1,158 @@ +package ads_interactive + +import ( + "encoding/json" + "fmt" + "net/http" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint string +} + +type reqBodyExt struct { + AdsInteractiveBidderExt reqBodyExtBidder `json:"bidder"` +} + +type reqBodyExtBidder struct { + Type string `json:"type"` + PlacementID string `json:"placementId,omitempty"` + EndpointID string `json:"endpointId,omitempty"` +} + +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + var errs []error + var adapterRequests []*adapters.RequestData + + for _, imp := range request.Imp { + reqCopy := *request + reqCopy.Imp = []openrtb2.Imp{imp} + + var bidderExt adapters.ExtImpBidder + var adsInteractiveExt openrtb_ext.ImpExtAdsInteractive + + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { + errs = append(errs, err) + continue + } + if err := jsonutil.Unmarshal(bidderExt.Bidder, &adsInteractiveExt); err != nil { + errs = append(errs, err) + continue + } + + impExt := reqBodyExt{AdsInteractiveBidderExt: reqBodyExtBidder{}} + + if adsInteractiveExt.PlacementID != "" { + impExt.AdsInteractiveBidderExt.PlacementID = adsInteractiveExt.PlacementID + impExt.AdsInteractiveBidderExt.Type = "publisher" + } else if adsInteractiveExt.EndpointID != "" { + impExt.AdsInteractiveBidderExt.EndpointID = adsInteractiveExt.EndpointID + impExt.AdsInteractiveBidderExt.Type = "network" + } + + finalImpExt, err := json.Marshal(impExt) + if err != nil { + errs = append(errs, err) + continue + } + + reqCopy.Imp[0].Ext = finalImpExt + + adapterReq, err := a.makeRequest(&reqCopy) + if err != nil { + errs = append(errs, err) + continue + } + + if adapterReq != nil { + adapterRequests = append(adapterRequests, adapterReq) + } + } + + if len(adapterRequests) == 0 { + return nil, errs + } + + return adapterRequests, nil +} + +func (a *adapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestData, error) { + reqJSON, err := json.Marshal(request) + if err != nil { + return nil, err + } + + headers := http.Header{} + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + return &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: reqJSON, + Headers: headers, + ImpIDs: openrtb_ext.GetImpIDs(request.Imp), + }, nil +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(responseData) { + return nil, nil + } + + if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { + return nil, []error{err} + } + + var response openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + if len(response.Cur) != 0 { + bidResponse.Currency = response.Cur + } + + for _, seatBid := range response.SeatBid { + for i := range seatBid.Bid { + bidType, err := getBidType(seatBid.Bid[i]) + if err != nil { + return nil, []error{err} + } + + b := &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + return bidResponse, nil +} + +func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) { + // determinate media type by bid response field mtype + switch bid.MType { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupVideo: + return openrtb_ext.BidTypeVideo, nil + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + } + + return "", fmt.Errorf("could not define media type for impression: %s", bid.ImpID) +} diff --git a/adapters/ads_interactive/ads_interactive_test.go b/adapters/ads_interactive/ads_interactive_test.go new file mode 100644 index 0000000000..f8a16d50a1 --- /dev/null +++ b/adapters/ads_interactive/ads_interactive_test.go @@ -0,0 +1,20 @@ +package ads_interactive + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderAdsInteractive, config.Adapter{ + Endpoint: "https://example.com"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "ads_interactivetest", bidder) +} diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/endpointId.json b/adapters/ads_interactive/ads_interactivetest/exemplary/endpointId.json new file mode 100644 index 0000000000..14aa475656 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/endpointId.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test", + "type": "network" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/multi-format.json b/adapters/ads_interactive/ads_interactivetest/exemplary/multi-format.json new file mode 100644 index 0000000000..9e897a9a1b --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/multi-format.json @@ -0,0 +1,105 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "endpointId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "endpointId": "test", + "type": "network" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204 + } + } + ], + "expectedBidResponses": [] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/multi-imp.json b/adapters/ads_interactive/ads_interactivetest/exemplary/multi-imp.json new file mode 100644 index 0000000000..dbba92907d --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/multi-imp.json @@ -0,0 +1,253 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test" + } + } + }, + { + "id": "test-imp-id2", + "tagid": "test2", + "banner": { + "format": [ + { + "w": 3000, + "h": 2500 + }, + { + "w": 3000, + "h": 6000 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test2" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test", + "type": "network" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + }, + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id2", + "tagid": "test2", + "banner": { + "format": [ + { + "w": 3000, + "h": 2500 + }, + { + "w": 3000, + "h": 6000 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test2", + "type": "network" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id2"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id2", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 3000, + "h": 2500, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + }, + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id2", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 3000, + "h": 2500, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/simple-banner.json b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-banner.json new file mode 100644 index 0000000000..f28f425623 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-banner.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/simple-native.json b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-native.json new file mode 100644 index 0000000000..b46c8a3961 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-native.json @@ -0,0 +1,120 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "native": { + "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", + "ver": "1.1" + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "native": { + "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", + "ver": "1.1" + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 4, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "native" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 4, + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "native" + } + } + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/simple-video.json b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-video.json new file mode 100644 index 0000000000..8d6475b7b9 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-video.json @@ -0,0 +1,131 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ] + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "00:01:00", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 2, + "ext": { + "prebid": { + "type": "video" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "00:01:00", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 2, + "ext": { + "prebid": { + "type": "video" + } + } + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/exemplary/simple-web-banner.json b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-web-banner.json new file mode 100644 index 0000000000..4f973035ed --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/exemplary/simple-web-banner.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "site": { + "id": "1", + "domain": "test.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Ubuntu" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "site": { + "id": "1", + "domain": "test.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Ubuntu" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 468, + "h": 60, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "mtype": 1, + "w": 468, + "h": 60, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/bad_media_type.json b/adapters/ads_interactive/ads_interactivetest/supplemental/bad_media_type.json new file mode 100644 index 0000000000..ca500d19a5 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/bad_media_type.json @@ -0,0 +1,83 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": {} + } + ], + "seat": "ads_interactive" + } + ], + "cur": "USD" + } + } + }], + "expectedMakeBidsErrors": [ + { + "value": "could not define media type for impression: test-imp-id", + "comparison": "literal" + } + ] +} diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/bad_response.json b/adapters/ads_interactive/ads_interactivetest/supplemental/bad_response.json new file mode 100644 index 0000000000..476058ed62 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/bad_response.json @@ -0,0 +1,85 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": "" + } + }], + "expectedMakeBidsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-bidder-param.json b/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-bidder-param.json new file mode 100644 index 0000000000..fe0631c032 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-bidder-param.json @@ -0,0 +1,42 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": [] + } + } + } + ] + }, + "expectedMakeRequestsErrors": [ + { + "value": "cannot unmarshal openrtb_ext.ImpExtAdsInteractive.EndpointID: expects \" or n, but found [", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-imp-ext.json b/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-imp-ext.json new file mode 100644 index 0000000000..09108b2d84 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/no-valid-imp-ext.json @@ -0,0 +1,38 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": "invalid" + } + ] + }, + "expectedMakeRequestsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/status-204.json b/adapters/ads_interactive/ads_interactivetest/supplemental/status-204.json new file mode 100644 index 0000000000..7dd1c65fd3 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/status-204.json @@ -0,0 +1,80 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + }], + "expectedBidResponses": [] +} diff --git a/adapters/ads_interactive/ads_interactivetest/supplemental/status-not-200.json b/adapters/ads_interactive/ads_interactivetest/supplemental/status-not-200.json new file mode 100644 index 0000000000..743f299626 --- /dev/null +++ b/adapters/ads_interactive/ads_interactivetest/supplemental/status-not-200.json @@ -0,0 +1,85 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 404, + "body": {} + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 404. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} diff --git a/adapters/ads_interactive/params_test.go b/adapters/ads_interactive/params_test.go new file mode 100644 index 0000000000..ec7dc6302e --- /dev/null +++ b/adapters/ads_interactive/params_test.go @@ -0,0 +1,52 @@ +package ads_interactive + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json schema. %v", err) + } + + for _, p := range validParams { + if err := validator.Validate(openrtb_ext.BidderAdsInteractive, json.RawMessage(p)); err != nil { + t.Errorf("Schema rejected valid params: %s", p) + } + } +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json schema. %v", err) + } + + for _, p := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderAdsInteractive, json.RawMessage(p)); err == nil { + t.Errorf("Schema allowed invalid params: %s", p) + } + } +} + +var validParams = []string{ + `{"placementId": "test"}`, + `{"placementId": "1"}`, + `{"endpointId": "test"}`, + `{"endpointId": "1"}`, + `{"placementId": "test", "unknownField": "value"}`, +} + +var invalidParams = []string{ + `{}`, + `{"placementId": 42}`, + `{"endpointId": 42}`, + `{"placementId": "1", "endpointId": "1"}`, + `{"placementId": ""}`, + `{"endpointId": ""}`, + `{"randomField": "value"}`, +} diff --git a/adapters/adsinteractive/adsinteractive.go b/adapters/adsinteractive/adsinteractive.go new file mode 100644 index 0000000000..1969ceb7cc --- /dev/null +++ b/adapters/adsinteractive/adsinteractive.go @@ -0,0 +1,80 @@ +package adsinteractive + +import ( + "encoding/json" + "fmt" + "net/http" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint string +} + +// Builder builds a new instance of the Adsinteractive adapter for the given bidder with the given config. +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + requestJSON, err := json.Marshal(request) + if err != nil { + return nil, []error{err} + } + + requestData := &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: requestJSON, + ImpIDs: openrtb_ext.GetImpIDs(request.Imp), + } + + return []*adapters.RequestData{requestData}, nil +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if responseData.StatusCode == http.StatusNoContent { + return nil, nil + } + + if responseData.StatusCode == http.StatusBadRequest { + err := &errortypes.BadInput{ + Message: "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", + } + return nil, []error{err} + } + + if responseData.StatusCode != http.StatusOK { + err := &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), + } + return nil, []error{err} + } + + var response openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + bidResponse.Currency = response.Cur + for _, seatBid := range response.SeatBid { + for i := range seatBid.Bid { + b := &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: "banner", + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + return bidResponse, nil +} diff --git a/adapters/adsinteractive/adsinteractive_test.go b/adapters/adsinteractive/adsinteractive_test.go new file mode 100644 index 0000000000..ae83c615fe --- /dev/null +++ b/adapters/adsinteractive/adsinteractive_test.go @@ -0,0 +1,23 @@ +package adsinteractive + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +const testsDir = "adsinteractivetest" +const testsBidderEndpoint = "http://bid.adsinteractive.com/prebid" + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderAdsinteractive, config.Adapter{ + Endpoint: testsBidderEndpoint}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, testsDir, bidder) +} diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-preservation-existing.json b/adapters/adsinteractive/adsinteractivetest/exemplary/banner.json similarity index 54% rename from adapters/rtbhouse/rtbhousetest/exemplary/tagid-preservation-existing.json rename to adapters/adsinteractive/adsinteractivetest/exemplary/banner.json index 785991f05b..bc4d4c7091 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-preservation-existing.json +++ b/adapters/adsinteractive/adsinteractivetest/exemplary/banner.json @@ -1,116 +1,90 @@ { "mockBidRequest": { "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, "imp": [ { "id": "test-imp-id", - "tagid": "existing_tag", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, "ext": { - "gpid": "gpid_value", "bidder": { - "publisherId": "12345" + "adUnit": "fake-adunit-name" } } } ] }, + "httpCalls": [ { "expectedRequest": { - "uri": "http://localhost/prebid_server", + "uri": "http://bid.adsinteractive.com/prebid", "body": { "id": "test-request-id", - "cur": [ - "USD" - ], + "site": { + "page": "https://good.site/url" + }, "imp": [ { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345" - }, - "gpid": "gpid_value" - }, "id": "test-imp-id", - "tagid": "existing_tag" - } - ], - "site": { - "publisher": { "ext": { - "prebid": { - "publisherId": "12345" + "bidder": { + "adUnit": "fake-adunit-name" } } } - } + ] }, - "impIDs": ["test-imp-id"] + "impIDs":["test-imp-id"] }, "mockResponse": { "status": 200, "body": { - "id": "test-response-id", - "cur": "USD", + "id": "test-request-id", "seatbid": [ { - "seat": "rtbhouse", + "seat": "adsinteractive", "bid": [ { "id": "randomid", "impid": "test-imp-id", - "price": 300, + "price": 0.72, "adid": "12345678", "adm": "some-test-ad", "cid": "987", "crid": "12345678", "h": 250, - "w": 300, - "mtype": 1 + "w": 300 } ] } - ] + ], + "cur": "EUR" } } } ], + "expectedBidResponses": [ { - "currency": "USD", + "currency": "EUR", "bids": [ { "bid": { "id": "randomid", "impid": "test-imp-id", - "price": 300, - "adid": "12345678", + "price": 0.72, "adm": "some-test-ad", + "adid": "12345678", "cid": "987", "crid": "12345678", - "h": 250, "w": 300, - "mtype": 1 + "h": 250 }, "type": "banner" } ] } ] -} \ No newline at end of file +} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/status-400.json b/adapters/adsinteractive/adsinteractivetest/supplemental/bad-request-400.json similarity index 65% rename from adapters/resetdigital/resetdigitaltest/supplemental/status-400.json rename to adapters/adsinteractive/adsinteractivetest/supplemental/bad-request-400.json index 435182924d..d584c81144 100644 --- a/adapters/resetdigital/resetdigitaltest/supplemental/status-400.json +++ b/adapters/adsinteractive/adsinteractivetest/supplemental/bad-request-400.json @@ -14,19 +14,18 @@ }, "ext": { "bidder": { - "placement_id": "test-placement" + "adUnit": "fake-adunit-name" } } } - ], - "site": { - "page": "https://example.com" - } + ] }, + "httpCalls": [ { + "expectedRequest": { - "uri": "https://example.com?pid=test-placement", + "uri": "http://bid.adsinteractive.com/prebid", "body": { "id": "test-request-id", "imp": [ @@ -40,22 +39,15 @@ } ] }, - "tagid": "test-placement", "ext": { "bidder": { - "placement_id": "test-placement" + "adUnit": "fake-adunit-name" } } } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" ] }, - "impIDs": ["test-imp-id"] + "impIDs":["test-imp-id"] }, "mockResponse": { "status": 400, @@ -63,9 +55,10 @@ } } ], + "expectedMakeBidsErrors": [ { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "value": "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", "comparison": "literal" } ] diff --git a/adapters/nativo/nativotest/supplemental/malformed-response-body.json b/adapters/adsinteractive/adsinteractivetest/supplemental/bad-response.json similarity index 70% rename from adapters/nativo/nativotest/supplemental/malformed-response-body.json rename to adapters/adsinteractive/adsinteractivetest/supplemental/bad-response.json index c49a72cb1e..3f40cfa351 100644 --- a/adapters/nativo/nativotest/supplemental/malformed-response-body.json +++ b/adapters/adsinteractive/adsinteractivetest/supplemental/bad-response.json @@ -3,59 +3,61 @@ "id": "test-request-id", "imp": [ { - "id": "nativo-id", + "id": "test-imp-id", "banner": { "format": [ { "w": 300, - "h": 50 + "h": 250 } ] }, "ext": { "bidder": { - "placementId": 12345678 + "adUnit": "fake-adunit-name" } } } ] }, + "httpCalls": [ { "expectedRequest": { - "uri": "https://foo.io/?src=prebid", + "uri": "http://bid.adsinteractive.com/prebid", "body": { "id": "test-request-id", "imp": [ { - "id": "nativo-id", + "id": "test-imp-id", "banner": { "format": [ { "w": 300, - "h": 50 + "h": 250 } ] }, "ext": { "bidder": { - "placementId": 12345678 + "adUnit": "fake-adunit-name" } } } ] }, - "impIDs": ["nativo-id"] + "impIDs":["test-imp-id"] }, "mockResponse": { "status": 200, - "body": "invalid-body" + "body": "" } } ], + "expectedMakeBidsErrors": [ { - "value": "Bad Server Response", + "value": "expect { or n, but found \"", "comparison": "literal" } ] diff --git a/adapters/ezoic/ezoictest/supplemental/status-204.json b/adapters/adsinteractive/adsinteractivetest/supplemental/no-content-204.json similarity index 63% rename from adapters/ezoic/ezoictest/supplemental/status-204.json rename to adapters/adsinteractive/adsinteractivetest/supplemental/no-content-204.json index 2c60ef485a..ee5adb9193 100644 --- a/adapters/ezoic/ezoictest/supplemental/status-204.json +++ b/adapters/adsinteractive/adsinteractivetest/supplemental/no-content-204.json @@ -1,13 +1,9 @@ { "mockBidRequest": { "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, "imp": [ { - "id": "test-imp-id", + "id": "fake-imp-id", "banner": { "format": [ { @@ -17,24 +13,22 @@ ] }, "ext": { - "bidder": {} + "bidder": { + } } } ] }, + "httpCalls": [ { "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", + "uri": "http://bid.adsinteractive.com/prebid", "body": { "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, "imp": [ { - "id": "test-imp-id", + "id": "fake-imp-id", "banner": { "format": [ { @@ -44,14 +38,13 @@ ] }, "ext": { - "bidder": {} + "bidder": { + } } } ] }, - "impIDs": [ - "test-imp-id" - ] + "impIDs":["fake-imp-id"] }, "mockResponse": { "status": 204, @@ -59,5 +52,6 @@ } } ], + "expectedBidResponses": [] } diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/status-500.json b/adapters/adsinteractive/adsinteractivetest/supplemental/service-unavailable-503.json similarity index 64% rename from adapters/resetdigital/resetdigitaltest/supplemental/status-500.json rename to adapters/adsinteractive/adsinteractivetest/supplemental/service-unavailable-503.json index e151f38500..2800076417 100644 --- a/adapters/resetdigital/resetdigitaltest/supplemental/status-500.json +++ b/adapters/adsinteractive/adsinteractivetest/supplemental/service-unavailable-503.json @@ -14,19 +14,17 @@ }, "ext": { "bidder": { - "placement_id": "test-placement" + "adUnit": "fake-adunit-name" } } } - ], - "site": { - "page": "https://example.com" - } + ] }, + "httpCalls": [ { "expectedRequest": { - "uri": "https://example.com?pid=test-placement", + "uri": "http://bid.adsinteractive.com/prebid", "body": { "id": "test-request-id", "imp": [ @@ -40,32 +38,26 @@ } ] }, - "tagid": "test-placement", "ext": { "bidder": { - "placement_id": "test-placement" + "adUnit": "fake-adunit-name" } } } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" ] }, - "impIDs": ["test-imp-id"] + "impIDs":["test-imp-id"] }, "mockResponse": { - "status": 500, + "status": 503, "body": {} } } ], + "expectedMakeBidsErrors": [ { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", + "value": "Unexpected status code: 503. Run with request.debug = 1 for more info.", "comparison": "literal" } ] diff --git a/adapters/adsinteractive/params_test.go b/adapters/adsinteractive/params_test.go new file mode 100644 index 0000000000..6b377d6aa3 --- /dev/null +++ b/adapters/adsinteractive/params_test.go @@ -0,0 +1,55 @@ +package adsinteractive + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +// This file actually intends to test static/bidder-params/adsinteractive.json + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderAdsinteractive, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected adsinteractive params: %s", validParam) + } + } +} + +// TestInvalidParams makes sure that the Adsinteractive schema rejects all the imp.ext fields we don't support. +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderAdsinteractive, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} + +var validParams = []string{ + `{"adUnit": "Example_ad_unit_1"}`, +} + +var invalidParams = []string{ + `{"adunit": "Example_ad_unit_1"}`, + `{"AdUnit": "Example_ad_unit_1"}`, + `{"ad_unit": Example_ad_unit_1}`, + ``, + `null`, + `true`, + `[]`, + `{}`, + `nil`, + `53`, + `9.1`, +} diff --git a/adapters/adtarget/adtarget.go b/adapters/adtarget/adtarget.go index 1e5820d639..c78ffe830f 100644 --- a/adapters/adtarget/adtarget.go +++ b/adapters/adtarget/adtarget.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AdtargetAdapter struct { diff --git a/adapters/adtarget/adtarget_test.go b/adapters/adtarget/adtarget_test.go index 57d9f74b96..23cb51fdfa 100644 --- a/adapters/adtarget/adtarget_test.go +++ b/adapters/adtarget/adtarget_test.go @@ -3,9 +3,9 @@ package adtarget import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adtarget/params_test.go b/adapters/adtarget/params_test.go index aace4e61ad..cb5a8c9479 100644 --- a/adapters/adtarget/params_test.go +++ b/adapters/adtarget/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adtarget.json diff --git a/adapters/adtelligent/adtelligent.go b/adapters/adtelligent/adtelligent.go index b10b35b2f2..f56a39736a 100644 --- a/adapters/adtelligent/adtelligent.go +++ b/adapters/adtelligent/adtelligent.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AdtelligentAdapter struct { diff --git a/adapters/adtelligent/adtelligent_test.go b/adapters/adtelligent/adtelligent_test.go index 5e3b8d163f..64a4573ac1 100644 --- a/adapters/adtelligent/adtelligent_test.go +++ b/adapters/adtelligent/adtelligent_test.go @@ -3,9 +3,9 @@ package adtelligent import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adtelligent/params_test.go b/adapters/adtelligent/params_test.go index e9fc435525..bd3a2b8583 100644 --- a/adapters/adtelligent/params_test.go +++ b/adapters/adtelligent/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adtelligent.json diff --git a/adapters/adtonos/adtonos.go b/adapters/adtonos/adtonos.go index a15918b99e..e3c20cd932 100644 --- a/adapters/adtonos/adtonos.go +++ b/adapters/adtonos/adtonos.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adtonos/adtonos_test.go b/adapters/adtonos/adtonos_test.go index ff2709547c..683ce3e445 100644 --- a/adapters/adtonos/adtonos_test.go +++ b/adapters/adtonos/adtonos_test.go @@ -3,9 +3,9 @@ package adtonos import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adtonos/params_test.go b/adapters/adtonos/params_test.go index b3401fc88a..703446c9de 100644 --- a/adapters/adtonos/params_test.go +++ b/adapters/adtonos/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adtrgtme/adtrgtme.go b/adapters/adtrgtme/adtrgtme.go index 977a5a57ad..a592cfc7c4 100644 --- a/adapters/adtrgtme/adtrgtme.go +++ b/adapters/adtrgtme/adtrgtme.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adtrgtme/adtrgtme_test.go b/adapters/adtrgtme/adtrgtme_test.go index 6d9ae7f5a7..d57b5943af 100644 --- a/adapters/adtrgtme/adtrgtme_test.go +++ b/adapters/adtrgtme/adtrgtme_test.go @@ -3,9 +3,9 @@ package adtrgtme import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/adtrgtme/params_test.go b/adapters/adtrgtme/params_test.go index bedd06ba05..19acaedc88 100644 --- a/adapters/adtrgtme/params_test.go +++ b/adapters/adtrgtme/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/aduptech/aduptech.go b/adapters/aduptech/aduptech.go index 574afe45fd..dee3e679ef 100644 --- a/adapters/aduptech/aduptech.go +++ b/adapters/aduptech/aduptech.go @@ -7,12 +7,12 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - prebidcurrency "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + prebidcurrency "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "golang.org/x/text/currency" ) diff --git a/adapters/aduptech/aduptech_test.go b/adapters/aduptech/aduptech_test.go index 26a59c0226..64dc6b3d41 100644 --- a/adapters/aduptech/aduptech_test.go +++ b/adapters/aduptech/aduptech_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/aduptech/params_test.go b/adapters/aduptech/params_test.go index 2899d0ee5f..ce0ae7d126 100644 --- a/adapters/aduptech/params_test.go +++ b/adapters/aduptech/params_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/advangelists/advangelists.go b/adapters/advangelists/advangelists.go index 677d46e0aa..1d4cd4fb64 100644 --- a/adapters/advangelists/advangelists.go +++ b/adapters/advangelists/advangelists.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AdvangelistsAdapter struct { diff --git a/adapters/advangelists/advangelists_test.go b/adapters/advangelists/advangelists_test.go index bfebf98c68..64ae4c89fa 100644 --- a/adapters/advangelists/advangelists_test.go +++ b/adapters/advangelists/advangelists_test.go @@ -3,9 +3,9 @@ package advangelists import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/advangelists/params_test.go b/adapters/advangelists/params_test.go index 349f8ea95e..8286f7f84a 100644 --- a/adapters/advangelists/params_test.go +++ b/adapters/advangelists/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adverxo/adverxo.go b/adapters/adverxo/adverxo.go index f0f784d71b..c76038ebde 100644 --- a/adapters/adverxo/adverxo.go +++ b/adapters/adverxo/adverxo.go @@ -11,11 +11,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type adapter struct { diff --git a/adapters/adverxo/adverxo_test.go b/adapters/adverxo/adverxo_test.go index 6194208dd7..ca32d50bc3 100644 --- a/adapters/adverxo/adverxo_test.go +++ b/adapters/adverxo/adverxo_test.go @@ -3,9 +3,9 @@ package adverxo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adverxo/params_test.go b/adapters/adverxo/params_test.go index f18aea3d94..a871a03c6e 100644 --- a/adapters/adverxo/params_test.go +++ b/adapters/adverxo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adview/adview.go b/adapters/adview/adview.go index 8ea0009d53..55bf228450 100644 --- a/adapters/adview/adview.go +++ b/adapters/adview/adview.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/adview/adview_test.go b/adapters/adview/adview_test.go index 3d9b8a531b..08e824a097 100644 --- a/adapters/adview/adview_test.go +++ b/adapters/adview/adview_test.go @@ -3,9 +3,9 @@ package adview import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/adview/params_test.go b/adapters/adview/params_test.go index 748572f1c0..9dd1c57c2a 100644 --- a/adapters/adview/params_test.go +++ b/adapters/adview/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/adxcg/adxcg.go b/adapters/adxcg/adxcg.go index 355b685147..3b5e290ca3 100644 --- a/adapters/adxcg/adxcg.go +++ b/adapters/adxcg/adxcg.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Builder builds a new instance of the Adxcg adapter for the given bidder with the given config. diff --git a/adapters/adxcg/adxcg_test.go b/adapters/adxcg/adxcg_test.go index 3e21e82941..0d94721392 100644 --- a/adapters/adxcg/adxcg_test.go +++ b/adapters/adxcg/adxcg_test.go @@ -3,9 +3,9 @@ package adxcg import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "adxcgtest" diff --git a/adapters/adyoulike/adyoulike.go b/adapters/adyoulike/adyoulike.go index 49118a8068..dbc76f3f75 100644 --- a/adapters/adyoulike/adyoulike.go +++ b/adapters/adyoulike/adyoulike.go @@ -8,11 +8,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { diff --git a/adapters/adyoulike/adyoulike_test.go b/adapters/adyoulike/adyoulike_test.go index 80b4d8e9f4..5a6c91b1c8 100644 --- a/adapters/adyoulike/adyoulike_test.go +++ b/adapters/adyoulike/adyoulike_test.go @@ -3,9 +3,9 @@ package adyoulike import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsBidderEndpoint = "https://localhost/bid/4" diff --git a/adapters/adyoulike/params_test.go b/adapters/adyoulike/params_test.go index f76a9bf456..7c6630fbef 100644 --- a/adapters/adyoulike/params_test.go +++ b/adapters/adyoulike/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/adyoulike.json diff --git a/adapters/afront/afront.go b/adapters/afront/afront.go index 5d69bd0130..f9c41b6a1b 100644 --- a/adapters/afront/afront.go +++ b/adapters/afront/afront.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/afront/afront_test.go b/adapters/afront/afront_test.go index 2472f62968..8a2fde9523 100644 --- a/adapters/afront/afront_test.go +++ b/adapters/afront/afront_test.go @@ -3,9 +3,9 @@ package afront import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/afront/params_test.go b/adapters/afront/params_test.go index 252c8ce043..b50ff16425 100644 --- a/adapters/afront/params_test.go +++ b/adapters/afront/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/aidem/aidem.go b/adapters/aidem/aidem.go index 7486e37981..6e8a740959 100644 --- a/adapters/aidem/aidem.go +++ b/adapters/aidem/aidem.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/aidem/aidem_test.go b/adapters/aidem/aidem_test.go index 8224cb7a05..395bd2ca78 100644 --- a/adapters/aidem/aidem_test.go +++ b/adapters/aidem/aidem_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/aidem/params_test.go b/adapters/aidem/params_test.go index 933df84581..bea1d26e3d 100644 --- a/adapters/aidem/params_test.go +++ b/adapters/aidem/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/aidem.json TODO: MUST BE CREATED diff --git a/adapters/aja/aja.go b/adapters/aja/aja.go index 2ed1306c7b..82007b02d0 100644 --- a/adapters/aja/aja.go +++ b/adapters/aja/aja.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type AJAAdapter struct { diff --git a/adapters/aja/aja_test.go b/adapters/aja/aja_test.go index 6de57ef680..ab4165d09a 100644 --- a/adapters/aja/aja_test.go +++ b/adapters/aja/aja_test.go @@ -3,9 +3,9 @@ package aja import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsBidderEndpoint = "https://localhost/bid/4" diff --git a/adapters/akcelo/akcelo.go b/adapters/akcelo/akcelo.go index 78f99bca6c..4abb4c9ef9 100644 --- a/adapters/akcelo/akcelo.go +++ b/adapters/akcelo/akcelo.go @@ -5,12 +5,12 @@ import ( "fmt" "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "net/http" "net/url" ) diff --git a/adapters/akcelo/akcelo_test.go b/adapters/akcelo/akcelo_test.go index 1b2cf90d6d..a67a31efce 100644 --- a/adapters/akcelo/akcelo_test.go +++ b/adapters/akcelo/akcelo_test.go @@ -1,9 +1,9 @@ package akcelo import ( - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" "testing" ) diff --git a/adapters/akcelo/params_test.go b/adapters/akcelo/params_test.go index 2b61d9fbf2..0ff4d9e01f 100644 --- a/adapters/akcelo/params_test.go +++ b/adapters/akcelo/params_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/algorix/algorix.go b/adapters/algorix/algorix.go index 2e1ee250b1..f6848e58e3 100644 --- a/adapters/algorix/algorix.go +++ b/adapters/algorix/algorix.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/algorix/algorix_test.go b/adapters/algorix/algorix_test.go index 575e7fdef1..6b6d21e4d1 100644 --- a/adapters/algorix/algorix_test.go +++ b/adapters/algorix/algorix_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/algorix/params_test.go b/adapters/algorix/params_test.go index e5d48cfc3d..6b5570c9ad 100644 --- a/adapters/algorix/params_test.go +++ b/adapters/algorix/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/alkimi/alkimi.go b/adapters/alkimi/alkimi.go index a207c37ace..c85b793315 100644 --- a/adapters/alkimi/alkimi.go +++ b/adapters/alkimi/alkimi.go @@ -8,14 +8,14 @@ import ( "strconv" "strings" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/floors" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/floors" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const price_macro = "${AUCTION_PRICE}" diff --git a/adapters/alkimi/alkimi_test.go b/adapters/alkimi/alkimi_test.go index 292f2ea1e4..65f296a58e 100644 --- a/adapters/alkimi/alkimi_test.go +++ b/adapters/alkimi/alkimi_test.go @@ -3,10 +3,10 @@ package alkimi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/alkimi/params_test.go b/adapters/alkimi/params_test.go index 0d92aab620..0ed0be05c6 100644 --- a/adapters/alkimi/params_test.go +++ b/adapters/alkimi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/alliance_gravity/alliance_gravity.go b/adapters/alliance_gravity/alliance_gravity.go deleted file mode 100644 index 73aec9b047..0000000000 --- a/adapters/alliance_gravity/alliance_gravity.go +++ /dev/null @@ -1,181 +0,0 @@ -package alliance_gravity - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} - -func generateImps(imps []openrtb2.Imp) ([]openrtb2.Imp, error) { - var generatedImps []openrtb2.Imp - for _, imp := range imps { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return nil, &errortypes.BadInput{ - Message: err.Error(), - } - } - - var allianceGravityExt openrtb_ext.ExtImpAllianceGravity - if err := jsonutil.Unmarshal(bidderExt.Bidder, &allianceGravityExt); err != nil { - return nil, &errortypes.BadInput{ - Message: err.Error(), - } - } - - bidderExt.Bidder = json.RawMessage(`{}`) - bidderExt.Prebid = &openrtb_ext.ExtImpPrebid{ - StoredRequest: &openrtb_ext.ExtStoredRequest{ - ID: allianceGravityExt.SrId, - }, - } - - bidderExtJSON, err := jsonutil.Marshal(bidderExt) - if err != nil { - return nil, &errortypes.BadInput{ - Message: err.Error(), - } - } - - impCopy := imp - impCopy.Ext = bidderExtJSON - - generatedImps = append(generatedImps, impCopy) - } - return generatedImps, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var generatedImps, err = generateImps(request.Imp) - if err != nil { - return nil, []error{err} - } - - request.Imp = generatedImps - - requestJSON, err := jsonutil.Marshal(request) - - if err != nil { - return nil, []error{err} - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - if request.Device != nil { - if request.Device.UA != "" { - headers.Add("User-Agent", request.Device.UA) - } - if request.Device.IP != "" { - headers.Add("X-Forwarded-For", request.Device.IP) - } else if request.Device.IPv6 != "" { - headers.Add("X-Forwarded-For", request.Device.IPv6) - } - } - if request.Site != nil { - if request.Site.Page != "" { - headers.Add("Referer", request.Site.Page) - } - } - - if request.User != nil && request.User.BuyerUID != "" { - headers.Add("Cookie", "uids="+request.User.BuyerUID) - } - - requestData := &adapters.RequestData{ - Method: "POST", - Uri: a.endpoint, - Body: requestJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - - return []*adapters.RequestData{requestData}, nil -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if responseData.StatusCode == http.StatusNoContent { - return nil, nil - } - - if responseData.StatusCode == http.StatusBadRequest { - err := &errortypes.BadInput{ - Message: "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", - } - return nil, []error{err} - } - - if responseData.StatusCode != http.StatusOK { - err := &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), - } - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - var bids []*adapters.TypedBid - var errors []error - for _, seatBid := range response.SeatBid { - for i, bid := range seatBid.Bid { - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errors = append(errors, err) - continue - } - bids = append(bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - }) - } - } - - if len(bids) == 0 { - return nil, nil - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(bids)) - - if response.Cur != "" { - bidResponse.Currency = response.Cur - } - bidResponse.Bids = bids - - return bidResponse, errors -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - if bid.Ext != nil { - var bidExt openrtb_ext.ExtBid - err := jsonutil.Unmarshal(bid.Ext, &bidExt) - if err == nil && bidExt.Prebid != nil { - return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type)) - } - } - - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Failed to parse impression \"%s\" mediatype", bid.ImpID), - } -} diff --git a/adapters/alliance_gravity/alliance_gravity_test.go b/adapters/alliance_gravity/alliance_gravity_test.go deleted file mode 100644 index 7378ec06d5..0000000000 --- a/adapters/alliance_gravity/alliance_gravity_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package alliance_gravity - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderAllianceGravity, config.Adapter{ - Endpoint: "http://endpoint"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "alliance_gravitytest", bidder) -} diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-audio.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-audio.json deleted file mode 100644 index e0aad7ec9d..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-audio.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "audio": { - "mimes": ["audio/mp3"], - "protocols": [2, 5], - "minduration": 10, - "maxduration": 30 - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "audio": { - "mimes": ["audio/mp3"], - "protocols": [2, 5], - "minduration": 10, - "maxduration": 30 - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs": ["imp-id-123"] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "ext": { - "prebid": { - "type": "audio" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "ext": { - "prebid": { - "type": "audio" - } - } - }, - "type": "audio" - } - ] - } - ] -} - diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-inapp.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-inapp.json deleted file mode 100755 index 7748fbf6f6..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-inapp.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "bundle": "test.app.bundle" - }, - "device": { - "ifa": "test-ifa-123456", - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id", - "app": { - "bundle": "test.app.bundle" - }, - "device": { - "ifa": "test-ifa-123456", - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs": [ - "imp-id-123" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "

test ad

", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "

test ad

", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-multiple-bids.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-multiple-bids.json deleted file mode 100644 index db68c93272..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-multiple-bids.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-multiple-bids", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "srid": "abc" - } - } - }, - { - "id": "imp-id-456", - "banner": { - "format": [ - { - "w": 160, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "srid": "def" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id-multiple-bids", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "abc" - } - } - } - }, - { - "id": "imp-id-456", - "banner": { - "format": [ - { - "w": 160, - "h": 600 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "def" - } - } - } - } - ] - }, - "impIDs": [ - "imp-id-123", - "imp-id-456" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "
Test Ad
", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - }, - { - "bid": [ - { - "id": "test-slot-id2", - "impid": "imp-id-1232", - "price": 0.5, - "crid": "creative-123", - "adm": "
Test Ad
", - "w": 160, - "h": 600, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "
Test Ad
", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - }, - { - "bid": { - "id": "test-slot-id2", - "impid": "imp-id-1232", - "price": 0.5, - "crid": "creative-123", - "adm": "
Test Ad
", - "w": 160, - "h": 600, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-with-uid.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-with-uid.json deleted file mode 100755 index ffee3a656e..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner-with-uid.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "user": { - "buyeruid": "grvt-id" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ], - "Cookie": [ - "uids=grvt-id" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "user": { - "buyeruid": "grvt-id" - }, - "imp": [ - { - "id": "imp-id-123", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs": [ - "imp-id-123" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "test-ad", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "test-ad", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner.json deleted file mode 100644 index 55b2dc5183..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-banner.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-id-123", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ], - "site": {} - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id":"imp-id-123", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ], - "site": {} - }, - "impIDs":["imp-id-123"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "EUR", - "seatbid": [ - { - "seat": "testalias", - "bid": [{ - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "imp-id-123", - "price": 0.500000, - "adm": "some-banner", - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - "prebid": { - "type": "banner" - } - } - }] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "imp-id-123", - "price": 0.5, - "adm": "some-banner", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-banner.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-banner.json deleted file mode 100644 index b51482b54d..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-banner.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs":["imp-id-123"] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "

test ad

", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "

test ad

", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} - diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-video.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-video.json deleted file mode 100644 index 6b382ede2d..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-multi-type-video.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs":["imp-id-123"] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "video" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} - diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-native.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-native.json deleted file mode 100644 index ca9dc94649..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-native.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "imp-id-123", - "native": { - "ver": "1.2", - "request": "{\"ver\":\"1.2\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":60,\"hmin\":60,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":75}},{\"id\":4,\"required\":0,\"data\":{\"type\":6,\"len\":1000}},{\"id\":5,\"required\":0,\"data\":{\"type\":7,\"len\":1000}},{\"id\":6,\"required\":0,\"data\":{\"type\":11,\"len\":1000}}]}" - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "https://good.site/url" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "page": "https://good.site/url" - }, - "imp": [ - { - "id": "imp-id-123", - "native": { - "ver": "1.2", - "request": "{\"ver\":\"1.2\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":60,\"hmin\":60,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":75}},{\"id\":4,\"required\":0,\"data\":{\"type\":6,\"len\":1000}},{\"id\":5,\"required\":0,\"data\":{\"type\":7,\"len\":1000}},{\"id\":6,\"required\":0,\"data\":{\"type\":11,\"len\":1000}}]}" - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs": [ - "imp-id-123" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "EUR", - "seatbid": [ - { - "seat": "grid", - "bid": [ - { - "id": "randomid", - "impid": "imp-id-123", - "price": 0.5, - "adid": "12345678", - "adm": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":60,\"hmin\":60,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":75}},{\"id\":4,\"required\":0,\"data\":{\"type\":6,\"len\":1000}},{\"id\":5,\"required\":0,\"data\":{\"type\":7,\"len\":1000}},{\"id\":6,\"required\":0,\"data\":{\"type\":11,\"len\":1000}}]}", - "ext": { - "prebid": { - "type": "native" - } - }, - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "imp-id-123", - "price": 0.5, - "adm": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":60,\"hmin\":60,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":75}},{\"id\":4,\"required\":0,\"data\":{\"type\":6,\"len\":1000}},{\"id\":5,\"required\":0,\"data\":{\"type\":7,\"len\":1000}},{\"id\":6,\"required\":0,\"data\":{\"type\":11,\"len\":1000}}]}", - "adid": "12345678", - "cid": "987", - "crid": "12345678", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "native" - } - } - }, - "type": "native" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-video.json b/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-video.json deleted file mode 100644 index cffc45e5f8..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/exemplary/simple-video.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "srid": "12341234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Referer": [ - "criteo.com" - ], - "User-Agent": [ - "random user agent" - ], - "X-Forwarded-For": [ - "1.2.3.4" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "criteo.com" - }, - "device": { - "os": "android", - "ip": "1.2.3.4", - "ua": "random user agent" - }, - "imp": [ - { - "id": "imp-id-123", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 5], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "12341234" - } - } - } - } - ] - }, - "impIDs":["imp-id-123"] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "EUR", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "video" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "imp-id-123", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-vast", - "h": 250, - "w": 300, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} - diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/400-response.json b/adapters/alliance_gravity/alliance_gravitytest/supplemental/400-response.json deleted file mode 100644 index 15df859102..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/400-response.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "mockBidRequest": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "tmax": 1000, - "user": { - "buyeruid": "awesome-user" - }, - "app": { - "publisher": { - "id": "123456789" - }, - "cat": [ - "IAB22-1" - ], - "bundle": "com.app.awesome", - "name": "Awesome App", - "domain": "awesomeapp.com", - "id": "123456789" - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480, - "minduration": 120, - "maxduration": 150 - }, - "ext": { - "bidder": { - "srid": "abcdefgh" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "test-user-agent" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ], - "Cookie": [ - "uids=awesome-user" - ] - }, - "uri": "http://endpoint", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 - }, - "tagid": "ogTAGID", - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "abcdefgh" - } - } - } - } - ], - "app": { - "id": "123456789", - "name": "Awesome App", - "bundle": "com.app.awesome", - "domain": "awesomeapp.com", - "cat": [ - "IAB22-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "some-impression-id" - ] - }, - "mockResponse": { - "status": 400 - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/500-response.json b/adapters/alliance_gravity/alliance_gravitytest/supplemental/500-response.json deleted file mode 100644 index adde21aeac..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/500-response.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "mockBidRequest": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "tmax": 1000, - "user": { - "buyeruid": "awesome-user" - }, - "app": { - "publisher": { - "id": "123456789" - }, - "cat": [ - "IAB22-1" - ], - "bundle": "com.app.awesome", - "name": "Awesome App", - "domain": "awesomeapp.com", - "id": "123456789" - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480, - "minduration": 120, - "maxduration": 150 - }, - "ext": { - "bidder": { - "srid": "abcdefgh" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "test-user-agent" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ], - "Cookie": [ - "uids=awesome-user" - ] - }, - "uri": "http://endpoint", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 - }, - "tagid": "ogTAGID", - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "abcdefgh" - } - } - } - } - ], - "app": { - "id": "123456789", - "name": "Awesome App", - "bundle": "com.app.awesome", - "domain": "awesomeapp.com", - "cat": [ - "IAB22-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "some-impression-id" - ] - }, - "mockResponse": { - "status": 500 - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info.", - "comparison": "literal" - } - ] -} diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/ext.json b/adapters/alliance_gravity/alliance_gravitytest/supplemental/ext.json deleted file mode 100644 index 6858423661..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/ext.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "mockBidRequest": { - "id": "testid", - "imp": [ - { - "id": "testimpid", - "banner": { - "format": [ - { - "w": 320, - "h": 250 - }, - { - "w": 320, - "h": 300 - } - ], - "w": 320, - "h": 250 - }, - "ext": { - "placement_id": "1265" - } - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "expect { or n, but found", - "comparison": "startswith" - } - ] -} diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/invalid-bid-response.json b/adapters/alliance_gravity/alliance_gravitytest/supplemental/invalid-bid-response.json deleted file mode 100644 index bb6aeaf44c..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/invalid-bid-response.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "srid": "1234" - } - } - } - ], - "site": {} - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "1234" - } - } - } - } - ], - "site": {} - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": {}, - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "cannot unmarshal openrtb2.BidResponse.SeatBid: decode slice: expect [ or n, but found {", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/wrong-payload.json b/adapters/alliance_gravity/alliance_gravitytest/supplemental/wrong-payload.json deleted file mode 100644 index cac99ad7b9..0000000000 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/wrong-payload.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "srid": "1234" - } - } - } - ], - "site": {} - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://endpoint", - "body": { - "id": "test-request-id", - "imp": [ - { - "id":"test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "1234" - } - } - } - } - ], - "site": {} - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "testalias", - "bid": [{ - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.500000, - "adm": "some-banner", - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - } - }] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/amx/amx.go b/adapters/amx/amx.go index 112717cad0..38e0f4512e 100644 --- a/adapters/amx/amx.go +++ b/adapters/amx/amx.go @@ -5,19 +5,17 @@ import ( "fmt" "net/http" "net/url" - "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const nbrHeaderName = "x-nbr" -const adapterVersion = "pbs1.3" -const bidderCurrency = "USD" +const adapterVersion = "pbs1.2" // AMXAdapter is the AMX bid adapter type AMXAdapter struct { @@ -59,41 +57,12 @@ func ensurePublisherWithID(pub *openrtb2.Publisher, publisherID string) openrtb2 return pubCopy } -func resolveBidFloor(imp *openrtb2.Imp, reqInfo *adapters.ExtraRequestInfo) error { - if imp.BidFloor <= 0 || imp.BidFloorCur == "" || strings.EqualFold(imp.BidFloorCur, bidderCurrency) { - return nil - } - - if reqInfo == nil { - return fmt.Errorf("cannot convert bid floor currency %s: reqInfo is nil", imp.BidFloorCur) - } - - convertedValue, err := reqInfo.ConvertCurrency(imp.BidFloor, imp.BidFloorCur, bidderCurrency) - if err != nil { - return err - } - - imp.BidFloor = convertedValue - imp.BidFloorCur = bidderCurrency - return nil -} - // MakeRequests creates AMX adapter requests func (adapter *AMXAdapter) MakeRequests(request *openrtb2.BidRequest, req *adapters.ExtraRequestInfo) (reqsBidder []*adapters.RequestData, errs []error) { reqCopy := *request var publisherID string - hasBidFloor := false - validImps := make([]openrtb2.Imp, 0, len(reqCopy.Imp)) - for _, imp := range reqCopy.Imp { - if err := resolveBidFloor(&imp, req); err != nil { - errs = append(errs, err) - continue - } - if imp.BidFloor > 0 { - hasBidFloor = true - } - + for idx, imp := range reqCopy.Imp { var params amxExt if err := jsonutil.Unmarshal(imp.Ext, ¶ms); err == nil { if params.Bidder.TagID != "" { @@ -103,21 +72,9 @@ func (adapter *AMXAdapter) MakeRequests(request *openrtb2.BidRequest, req *adapt // if it has an adUnitId, set as the tagid if params.Bidder.AdUnitID != "" { imp.TagID = params.Bidder.AdUnitID + reqCopy.Imp[idx] = imp } } - - validImps = append(validImps, imp) - } - - if len(validImps) == 0 { - return nil, errs - } - reqCopy.Imp = validImps - - // bid floors are normalized to USD, so request USD bids to keep the - // response currency consistent with the floors - if hasBidFloor { - reqCopy.Cur = []string{bidderCurrency} } if publisherID != "" { @@ -190,9 +147,6 @@ func (adapter *AMXAdapter) MakeBids(request *openrtb2.BidRequest, externalReques } bidResponse := adapters.NewBidderResponseWithBidsCapacity(5) - if bidResp.Cur != "" { - bidResponse.Currency = bidResp.Cur - } for _, sb := range bidResp.SeatBid { for _, bid := range sb.Bid { diff --git a/adapters/amx/amx_test.go b/adapters/amx/amx_test.go index e1522a88a1..152fcf2b40 100644 --- a/adapters/amx/amx_test.go +++ b/adapters/amx/amx_test.go @@ -6,12 +6,12 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" ) const ( diff --git a/adapters/amx/amxtest/exemplary/app-simple.json b/adapters/amx/amxtest/exemplary/app-simple.json index 81c3216246..1bc205e510 100644 --- a/adapters/amx/amxtest/exemplary/app-simple.json +++ b/adapters/amx/amxtest/exemplary/app-simple.json @@ -64,11 +64,8 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { - "cur": [ - "USD" - ], "app": { "bundle": "639881495", "name": "Imgur (iOS)", diff --git a/adapters/amx/amxtest/exemplary/display-multiple.json b/adapters/amx/amxtest/exemplary/display-multiple.json index a14cfcb45c..76d97b1704 100644 --- a/adapters/amx/amxtest/exemplary/display-multiple.json +++ b/adapters/amx/amxtest/exemplary/display-multiple.json @@ -98,7 +98,7 @@ }, "httpCalls": [{ "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, @@ -294,4 +294,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/amx/amxtest/exemplary/simple-native.json b/adapters/amx/amxtest/exemplary/simple-native.json index a9b23519fa..dc158c1a74 100644 --- a/adapters/amx/amxtest/exemplary/simple-native.json +++ b/adapters/amx/amxtest/exemplary/simple-native.json @@ -19,7 +19,7 @@ "httpcalls": [ { "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "id": "req_id", "imp": [ diff --git a/adapters/amx/amxtest/exemplary/video-simple.json b/adapters/amx/amxtest/exemplary/video-simple.json index e19a1df15c..45e57bf39b 100644 --- a/adapters/amx/amxtest/exemplary/video-simple.json +++ b/adapters/amx/amxtest/exemplary/video-simple.json @@ -94,7 +94,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, diff --git a/adapters/amx/amxtest/exemplary/web-simple.json b/adapters/amx/amxtest/exemplary/web-simple.json index 23d5ccc214..6067243f12 100644 --- a/adapters/amx/amxtest/exemplary/web-simple.json +++ b/adapters/amx/amxtest/exemplary/web-simple.json @@ -98,7 +98,7 @@ }, "httpCalls": [{ "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, @@ -244,4 +244,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/amx/amxtest/supplemental/204-response.json b/adapters/amx/amxtest/supplemental/204-response.json index bdf0d48472..cc5eea2416 100644 --- a/adapters/amx/amxtest/supplemental/204-response.json +++ b/adapters/amx/amxtest/supplemental/204-response.json @@ -48,7 +48,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, diff --git a/adapters/amx/amxtest/supplemental/400-response.json b/adapters/amx/amxtest/supplemental/400-response.json index 25695233fe..683bdb8c06 100644 --- a/adapters/amx/amxtest/supplemental/400-response.json +++ b/adapters/amx/amxtest/supplemental/400-response.json @@ -48,7 +48,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, diff --git a/adapters/amx/amxtest/supplemental/500-response.json b/adapters/amx/amxtest/supplemental/500-response.json index d66466de8d..6beefe80b7 100644 --- a/adapters/amx/amxtest/supplemental/500-response.json +++ b/adapters/amx/amxtest/supplemental/500-response.json @@ -47,7 +47,7 @@ }, "httpCalls": [{ "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", + "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.2", "body": { "device": { "dnt": 0, diff --git a/adapters/amx/amxtest/supplemental/bid-floor-no-currency.json b/adapters/amx/amxtest/supplemental/bid-floor-no-currency.json deleted file mode 100644 index 33c0bb1dcf..0000000000 --- a/adapters/amx/amxtest/supplemental/bid-floor-no-currency.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "mockBidRequest": { - "id": "no-floor-currency-request-id", - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 1.5, - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "unused_publisher_id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", - "body": { - "id": "no-floor-currency-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 1.5, - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "cHJlYmlkLm9yZw" - } - } - }, - "impIDs": [ - "1" - ] - }, - "mockResponse": { - "status": 204, - "headers": { - "X-Nbr": ["3b"] - }, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [] -} diff --git a/adapters/amx/amxtest/supplemental/currency-conversion-error.json b/adapters/amx/amxtest/supplemental/currency-conversion-error.json deleted file mode 100644 index 48fc3e5daf..0000000000 --- a/adapters/amx/amxtest/supplemental/currency-conversion-error.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "mockBidRequest": { - "id": "currency-error-request-id", - "cur": [ - "EUR" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 100, - "bidfloorcur": "JPY", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - }, - { - "id": "2", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 1, - "bidfloorcur": "GBP", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "unused_publisher_id" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "Currency conversion rate not found: 'JPY' => 'USD'", - "comparison": "literal" - } - ], - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", - "body": { - "id": "currency-error-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "2", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 2, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "cHJlYmlkLm9yZw" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "impIDs": [ - "2" - ] - }, - "mockResponse": { - "status": 204, - "headers": { - "X-Nbr": ["3b"] - }, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [] -} diff --git a/adapters/amx/amxtest/supplemental/currency-conversion-no-cur.json b/adapters/amx/amxtest/supplemental/currency-conversion-no-cur.json deleted file mode 100644 index 8b0796817e..0000000000 --- a/adapters/amx/amxtest/supplemental/currency-conversion-no-cur.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "mockBidRequest": { - "id": "currency-no-cur-request-id", - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 1, - "bidfloorcur": "GBP", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "unused_publisher_id" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", - "body": { - "id": "currency-no-cur-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 2, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "cHJlYmlkLm9yZw" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "impIDs": [ - "1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "currency-no-cur-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "TEST", - "impid": "1", - "price": 10, - "adid": "1", - "adm": "", - "adomain": [ - "amxrtb.com" - ], - "cid": "1", - "crid": "1", - "h": 250, - "w": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "TEST", - "impid": "1", - "price": 10, - "adid": "1", - "adm": "", - "adomain": [ - "amxrtb.com" - ], - "cid": "1", - "crid": "1", - "h": 250, - "w": 300 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/amx/amxtest/supplemental/currency-conversion.json b/adapters/amx/amxtest/supplemental/currency-conversion.json deleted file mode 100644 index 2bb59ca963..0000000000 --- a/adapters/amx/amxtest/supplemental/currency-conversion.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "mockBidRequest": { - "id": "currency-request-id", - "cur": [ - "EUR" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 1, - "bidfloorcur": "GBP", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "unused_publisher_id" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://pbs-dev.amxrtb.com/auction/openrtb?v=pbs1.3", - "body": { - "id": "currency-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "bidfloor": 2, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "tagId": "cHJlYmlkLm9yZw" - } - } - } - ], - "site": { - "domain": "www.example.com", - "publisher": { - "id": "cHJlYmlkLm9yZw" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "impIDs": [ - "1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "currency-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "TEST", - "impid": "1", - "price": 10, - "adid": "1", - "adm": "", - "adomain": [ - "amxrtb.com" - ], - "cid": "1", - "crid": "1", - "h": 250, - "w": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "TEST", - "impid": "1", - "price": 10, - "adid": "1", - "adm": "", - "adomain": [ - "amxrtb.com" - ], - "cid": "1", - "crid": "1", - "h": 250, - "w": 300 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/amx/params_test.go b/adapters/amx/params_test.go index 9b6f56178d..e44f8a7bbf 100644 --- a/adapters/amx/params_test.go +++ b/adapters/amx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/apacdex/apacdex.go b/adapters/apacdex/apacdex.go index fbcff9ee6d..698c204e25 100644 --- a/adapters/apacdex/apacdex.go +++ b/adapters/apacdex/apacdex.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/apacdex/apacdex_test.go b/adapters/apacdex/apacdex_test.go index 3fde5068e5..4e9e2f4b0e 100644 --- a/adapters/apacdex/apacdex_test.go +++ b/adapters/apacdex/apacdex_test.go @@ -3,9 +3,9 @@ package apacdex import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/apacdex/params_test.go b/adapters/apacdex/params_test.go index 37140f7825..ba680ea681 100644 --- a/adapters/apacdex/params_test.go +++ b/adapters/apacdex/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/apacdex.json diff --git a/adapters/appnexus/appnexus.go b/adapters/appnexus/appnexus.go index 457ffa642b..a25f3f3164 100644 --- a/adapters/appnexus/appnexus.go +++ b/adapters/appnexus/appnexus.go @@ -13,15 +13,15 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/randomutil" - - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/randomutil" + + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/appnexus/appnexus_test.go b/adapters/appnexus/appnexus_test.go index 0772026190..63973c6dc3 100644 --- a/adapters/appnexus/appnexus_test.go +++ b/adapters/appnexus/appnexus_test.go @@ -4,9 +4,9 @@ import ( "net/url" "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/appnexus/params_test.go b/adapters/appnexus/params_test.go index 6ac1ddc426..225b1ac323 100644 --- a/adapters/appnexus/params_test.go +++ b/adapters/appnexus/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/appnexus.json diff --git a/adapters/appush/appush.go b/adapters/appush/appush.go index f6fa89e100..c78e0b872c 100644 --- a/adapters/appush/appush.go +++ b/adapters/appush/appush.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/appush/appush_test.go b/adapters/appush/appush_test.go index d0c8799436..1fe49f87d1 100644 --- a/adapters/appush/appush_test.go +++ b/adapters/appush/appush_test.go @@ -3,9 +3,9 @@ package appush import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/appush/params_test.go b/adapters/appush/params_test.go index 21809cd04b..b877eb7bfd 100644 --- a/adapters/appush/params_test.go +++ b/adapters/appush/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/aso/aso.go b/adapters/aso/aso.go index c73616bc91..6df776949a 100644 --- a/adapters/aso/aso.go +++ b/adapters/aso/aso.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/aso/aso_test.go b/adapters/aso/aso_test.go index c18ac4efbb..41d8e65048 100644 --- a/adapters/aso/aso_test.go +++ b/adapters/aso/aso_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/aso/params_test.go b/adapters/aso/params_test.go index 71ba371f54..4d303220d1 100644 --- a/adapters/aso/params_test.go +++ b/adapters/aso/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-prebid-ext.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-prebid-ext.json deleted file mode 100644 index b708c8d40d..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-prebid-ext.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - }, - "prebid": { - "is_rewarded_inventory": 1 - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0, - "ext": { - "videotype": "rewarded" - } - }, - "rwdd": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-rwdd.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-rwdd.json deleted file mode 100644 index 1fcbc2f0a9..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded-video-rwdd.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "rwdd": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0, - "ext": { - "videotype": "rewarded" - } - }, - "rwdd": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial.json deleted file mode 100644 index e6f5fc7d4b..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "rwdd": 1, - "instl": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0, - "ext": { - "videotype": "rewarded_interstitial" - } - }, - "instl": 1, - "rwdd": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial_ortb_25.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial_ortb_25.json deleted file mode 100644 index 670988dd05..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/rewarded_video_interstitial_ortb_25.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "instl": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - }, - "prebid": { - "is_rewarded_inventory": 1 - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0, - "ext": { - "videotype": "rewarded_interstitial" - } - }, - "instl": 1, - "rwdd": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":400,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/video-interstitial.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/video-interstitial.json deleted file mode 100644 index fc8d7ab825..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/video-interstitial.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "instl": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 0, - "h": 0 - }, - "instl": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/video-non-rewarded.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/video-non-rewarded.json deleted file mode 100644 index eaf4f614ab..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/video-non-rewarded.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - }, - "prebid": { - "is_rewarded_inventory": 0 - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0 - }, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987", - "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}&app_version=iOS-1.0", - "burl": "https://www.facebook.com/audiencenetwork/burl/?partner=test-platform-id&app=def&placement=456&auction=123&impression=123&request=123478&bid=987&clearing_price=${AUCTION_PRICE}" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/bid-impid-mismatch.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/bid-impid-mismatch.json deleted file mode 100644 index c289f8d627..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/bid-impid-mismatch.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [{ - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "w": -1, - "h": 250 - }, - "tagid": "123_456" - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [{ - "bid": [{ - "id": "987", - "impid": "unknown-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - }] - }], - "bidid": "654", - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [] - }], - "expectedMakeBidsErrors": [{ - "value": "bid 987 'impid' unknown-imp-id does not match any imp in the bid request", - "comparison": "literal" - }] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/currency-from-response.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/currency-from-response.json deleted file mode 100644 index 17bfbfc021..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/currency-from-response.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [{ - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "w": -1, - "h": 250 - }, - "tagid": "123_456" - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [{ - "bid": [{ - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - }] - }], - "bidid": "654", - "cur": "EUR" - } - } - }], - "expectedBidResponses": [{ - "currency": "EUR", - "bids": [{ - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "banner" - }] - }] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial-native.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial.json similarity index 72% rename from adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial-native.json rename to adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial.json index c23f0cf9c4..68ca804481 100644 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial-native.json +++ b/adapters/audienceNetwork/audienceNetworktest/supplemental/invalid-interstitial.json @@ -3,9 +3,14 @@ "id": "test-req-id", "imp": [{ "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}}]}", - "ver": "1.1" + "video": { + "mimes": ["video/mp4"], + "minduration": 15, + "maxduration": 30, + "protocols": [2, 3, 5, 6, 7, 8], + "linearity": 1, + "w": 940, + "h": 560 }, "instl": 1, "ext": { @@ -29,7 +34,7 @@ "tmax": 500 }, "expectedMakeRequestsErrors": [{ - "value": "imp #test-imp-id: interstitial imps are only supported for banner and video", + "value": "imp #test-imp-id: interstitial imps are only supported for banner", "comparison": "literal" }] -} +} \ No newline at end of file diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-seat-mixed-bids.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-seat-mixed-bids.json deleted file mode 100644 index abe8e07fed..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-seat-mixed-bids.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": -1, - "h": 250 - }, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "invalid-bid", - "impid": "test-imp-id", - "price": 0.500000 - } - ] - }, - { - "bid": [ - { - "id": "valid-bid", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"valid-bid\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "valid-bid", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"valid-bid\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "valid-bid", - "crid": "valid-bid" - }, - "type": "banner" - } - ] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Bid invalid-bid missing 'adm'", - "comparison": "literal" - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-native.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-native.json deleted file mode 100644 index 4990791d1c..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-native.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "w": -1, - "h": -1 - }, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-video.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-video.json deleted file mode 100644 index f527699c6b..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-banner-video.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }], - "w": 300, - "h": 250 - }, - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [{ - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [{ - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0 - }, - "tagid": "123_456" - }], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [{ - "bid": [{ - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - }] - }], - "bidid": "654", - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":1,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "video" - }] - }] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-banner-video.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-banner-video.json deleted file mode 100644 index 57f58b2a0d..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-banner-video.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "w": 300, - "h": 250 - }, - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "instl": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 0, - "h": 0 - }, - "instl": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-video-native.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-video-native.json deleted file mode 100644 index 596ce2b5cb..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-interstitial-video-native.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}}]}", - "ver": "1.1" - }, - "instl": 1, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 0, - "h": 0 - }, - "instl": 1, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":101,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-video-native.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-video-native.json deleted file mode 100644 index c652bb4edb..0000000000 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multiformat-video-native.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 940, - "h": 560 - }, - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherid": "123", - "placementid": "456" - } - } - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid" - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500 - }, - "httpcalls": [ - { - "expectedRequest": { - "uri": "https://an.facebook.com/placementbid.ortb", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Fb-Pool-Routing-Token": [ - "v4_bidder_token" - ] - }, - "body": { - "id": "test-imp-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "linearity": 1, - "w": 0, - "h": 0 - }, - "tagid": "123_456" - } - ], - "app": { - "id": "app-abc", - "bundle": "com.prebid", - "publisher": { - "id": "123" - } - }, - "device": { - "ip": "152.193.6.74" - }, - "user": { - "id": "db089de9-a62e-4861-a881-0ff15e052516", - "buyeruid": "v4_bidder_token" - }, - "tmax": 500, - "ext": { - "authentication_id": "4e24a2b23fbfb5e41a9093b921d6cddf497c24dd5f63879038cec2ab2f27d174", - "platformid": "test-platform-id" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-imp-id", - "seatbid": [ - { - "bid": [ - { - "id": "987", - "impid": "test-imp-id", - "price": 1.000000, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":7,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}" - } - ] - } - ], - "bidid": "654", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "987", - "impid": "test-imp-id", - "price": 1, - "adm": "{\"type\":\"ID\",\"bid_id\":\"987\",\"placement_id\":\"123_456\",\"resolved_placement_id\":\"123_456\",\"sdk_version\":\"5.5.0\",\"device_id\":\"abc\",\"template\":7,\"payload\":null,\"bid_time_token\":\"v4_bidder_token=\"}", - "adid": "987", - "crid": "987" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/audienceNetwork/facebook.go b/adapters/audienceNetwork/facebook.go index 14316d27dd..50804a862b 100644 --- a/adapters/audienceNetwork/facebook.go +++ b/adapters/audienceNetwork/facebook.go @@ -13,13 +13,13 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/maputil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/maputil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) var supportedBannerHeights = map[int64]struct{}{ @@ -175,40 +175,6 @@ func (a *adapter) modifyRequest(out *openrtb2.BidRequest) error { return err } - // Preserve rewarded signal before clearing ext. For ORTB 2.5 adapters, - // PBS moves imp.rwdd to imp.ext.prebid.is_rewarded_inventory via ConvertDownTo25. - // Since we clear imp.Ext below, the signal would be lost. Extract it now and - // restore it on the struct field so it serializes as imp.rwdd for Meta. - if imp.Rwdd != 1 && imp.Ext != nil { - if val, err := jsonparser.GetInt(imp.Ext, "prebid", "is_rewarded_inventory"); err == nil && val == 1 { - imp.Rwdd = 1 - } - } - if imp.Rwdd == 1 && imp.Video != nil { - videoCopy := *imp.Video - var extMap map[string]interface{} - if videoCopy.Ext != nil { - if err := jsonutil.Unmarshal(videoCopy.Ext, &extMap); err != nil { - return err - } - } else { - extMap = make(map[string]interface{}) - } - // Derive videotype from standard OpenRTB signals. Meta documents - // "rewarded" and "rewarded_interstitial" as distinct rewarded videotypes. - // Use instl to distinguish: rwdd+instl → rewarded_interstitial, rwdd alone → rewarded. - if imp.Instl == 1 { - extMap["videotype"] = "rewarded_interstitial" - } else { - extMap["videotype"] = "rewarded" - } - videoCopy.Ext, err = jsonutil.Marshal(extMap) - if err != nil { - return err - } - imp.Video = &videoCopy - } - imp.TagID = pubId + "_" + plmtId imp.Ext = nil @@ -230,38 +196,12 @@ func (a *adapter) modifyRequest(out *openrtb2.BidRequest) error { func modifyImp(out *openrtb2.Imp) error { impType := resolveImpType(out) - if out.Instl == 1 && !isValidInterstitial(impType) { + if out.Instl == 1 && impType != openrtb_ext.BidTypeBanner { return &errortypes.BadInput{ - Message: fmt.Sprintf("imp #%s: interstitial imps are only supported for banner and video", out.ID), + Message: fmt.Sprintf("imp #%s: interstitial imps are only supported for banner", out.ID), } } - // Meta's only non-rewarded interstitial request shape is banner{0,0}+instl:1, which - // renders display or video client-side (per Meta's Audience Network server-to-server - // spec). Map a non-rewarded video interstitial to that shape instead of rejecting it. - // Rewarded video interstitials keep their video imp so Meta receives videotype "rewarded_interstitial". - if out.Instl == 1 && impType == openrtb_ext.BidTypeVideo && out.Rwdd != 1 { - out.Banner = &openrtb2.Banner{} - impType = openrtb_ext.BidTypeBanner - } - - // Audience Network placements are single-format, so send Meta only the resolved - // media object and drop any other media carried by a multi-format impression. - switch impType { - case openrtb_ext.BidTypeBanner: - out.Video = nil - out.Audio = nil - out.Native = nil - case openrtb_ext.BidTypeVideo: - out.Banner = nil - out.Audio = nil - out.Native = nil - case openrtb_ext.BidTypeNative: - out.Banner = nil - out.Video = nil - out.Audio = nil - } - if impType == openrtb_ext.BidTypeBanner { bannerCopy := *out.Banner out.Banner = &bannerCopy @@ -301,10 +241,6 @@ func modifyImp(out *openrtb2.Imp) error { return nil } -func isValidInterstitial(impType openrtb_ext.BidType) bool { - return impType == openrtb_ext.BidTypeBanner || impType == openrtb_ext.BidTypeVideo -} - func extractPlacementAndPublisher(out *openrtb2.Imp) (string, string, error) { var bidderExt adapters.ExtImpBidder if err := jsonutil.Unmarshal(out.Ext, &bidderExt); err != nil { @@ -393,7 +329,7 @@ func modifyImpCustom(jsonData []byte, imp *openrtb2.Imp) ([]byte, error) { case openrtb_ext.BidTypeNative: nativeMap, ok := maputil.ReadEmbeddedMap(impMap, "native") if !ok { - return jsonData, errors.New("unable to find imp[0].native in json data") + return jsonData, errors.New("unable to find imp[0].video in json data") } // Set w/h to -1 for native impressions based on the facebook native spec. @@ -434,9 +370,6 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, adapterRequest *adapter } out := adapters.NewBidderResponseWithBidsCapacity(4) - if bidResp.Cur != "" { - out.Currency = bidResp.Cur - } var errs []error for _, seatbid := range bidResp.SeatBid { @@ -480,15 +413,9 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, adapterRequest *adapter bid.AdID = obj.BidID bid.CrID = obj.BidID - bidType, err := resolveBidType(&bid, request) - if err != nil { - errs = append(errs, err) - continue - } - out.Bids = append(out.Bids, &adapters.TypedBid{ Bid: &bid, - BidType: bidType, + BidType: resolveBidType(&bid, request), }) } } @@ -496,56 +423,33 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, adapterRequest *adapter return out, errs } -// resolveBidType reports a bid's media type from the ORIGINAL request imp it fills, -// not from the Meta-facing transformed copy. This is deliberate: a non-rewarded -// video interstitial is sent to Meta as banner{0,0}+instl (see modifyImp), but the -// bid still fills the publisher's video interstitial slot, so it is reported as -// video. Meta's interstitial creative is a deferred token whose display-vs-video -// form is resolved client-side at render — the bid carries no media type — so the -// slot type is the most specific media classification the adapter can assert, and -// bid.MType is intentionally left unset rather than claiming an unverifiable form. -func resolveBidType(bid *openrtb2.Bid, req *openrtb2.BidRequest) (openrtb_ext.BidType, error) { +func resolveBidType(bid *openrtb2.Bid, req *openrtb2.BidRequest) openrtb_ext.BidType { for _, imp := range req.Imp { if bid.ImpID == imp.ID { - return resolveImpType(&imp), nil + return resolveImpType(&imp) } } - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("bid %s 'impid' %s does not match any imp in the bid request", bid.ID, bid.ImpID), - } + panic(fmt.Sprintf("Invalid bid imp ID %s does not match any imp IDs from the original bid request", bid.ImpID)) } func resolveImpType(imp *openrtb2.Imp) openrtb_ext.BidType { - // Preserve interstitial semantics before applying the general expected-yield - // priority. Meta accepts banner and video interstitials, but not native or audio. - if imp.Instl == 1 { - if imp.Video != nil { - return openrtb_ext.BidTypeVideo - } - if imp.Banner != nil { - return openrtb_ext.BidTypeBanner - } + if imp.Banner != nil { + return openrtb_ext.BidTypeBanner } - // Audience Network placements are single-format. For an ordinary multi-format - // impression, prefer the formats with the highest likely yield. if imp.Video != nil { return openrtb_ext.BidTypeVideo } - if imp.Native != nil { - return openrtb_ext.BidTypeNative - } - - if imp.Banner != nil { - return openrtb_ext.BidTypeBanner - } - if imp.Audio != nil { return openrtb_ext.BidTypeAudio } + if imp.Native != nil { + return openrtb_ext.BidTypeNative + } + // Required to satisfy compiler. Not reachable in practice due to validations performed in PBS-Core. return openrtb_ext.BidTypeBanner } diff --git a/adapters/audienceNetwork/facebook_test.go b/adapters/audienceNetwork/facebook_test.go index ed1a1866fa..6fdc121f94 100644 --- a/adapters/audienceNetwork/facebook_test.go +++ b/adapters/audienceNetwork/facebook_test.go @@ -4,11 +4,10 @@ import ( "testing" "time" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -56,51 +55,6 @@ func TestJsonSamples(t *testing.T) { adapterstest.RunJSONBidderTest(t, "audienceNetworktest", bidder) } -func TestResolveImpTypePriority(t *testing.T) { - tests := []struct { - name string - imp openrtb2.Imp - expected openrtb_ext.BidType - }{ - { - name: "video over banner", - imp: openrtb2.Imp{Banner: &openrtb2.Banner{}, Video: &openrtb2.Video{}}, - expected: openrtb_ext.BidTypeVideo, - }, - { - name: "native over banner", - imp: openrtb2.Imp{Banner: &openrtb2.Banner{}, Native: &openrtb2.Native{}}, - expected: openrtb_ext.BidTypeNative, - }, - { - name: "video over native and banner", - imp: openrtb2.Imp{Banner: &openrtb2.Banner{}, Video: &openrtb2.Video{}, Native: &openrtb2.Native{}}, - expected: openrtb_ext.BidTypeVideo, - }, - { - name: "interstitial banner over unsupported native", - imp: openrtb2.Imp{Banner: &openrtb2.Banner{}, Native: &openrtb2.Native{}, Instl: 1}, - expected: openrtb_ext.BidTypeBanner, - }, - { - name: "interstitial video over native", - imp: openrtb2.Imp{Video: &openrtb2.Video{}, Native: &openrtb2.Native{}, Instl: 1}, - expected: openrtb_ext.BidTypeVideo, - }, - { - name: "banner over unsupported audio", - imp: openrtb2.Imp{Banner: &openrtb2.Banner{}, Audio: &openrtb2.Audio{}}, - expected: openrtb_ext.BidTypeBanner, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - assert.Equal(t, test.expected, resolveImpType(&test.imp)) - }) - } -} - func TestMakeTimeoutNoticeApp(t *testing.T) { req := adapters.RequestData{ Body: []byte(`{"id":"1234","imp":[{"id":"1234"}],"app":{"publisher":{"id":"5678"}}}`), diff --git a/adapters/automatad/automatad.go b/adapters/automatad/automatad.go index 6ce0602fb7..cfe5f5089b 100644 --- a/adapters/automatad/automatad.go +++ b/adapters/automatad/automatad.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/automatad/automatad_test.go b/adapters/automatad/automatad_test.go index faa3431e8e..515025c862 100644 --- a/adapters/automatad/automatad_test.go +++ b/adapters/automatad/automatad_test.go @@ -3,9 +3,9 @@ package automatad import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/automatad/params_test.go b/adapters/automatad/params_test.go index ec3a42e5fd..7f8d6e789e 100644 --- a/adapters/automatad/params_test.go +++ b/adapters/automatad/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/avocet/avocet.go b/adapters/avocet/avocet.go index a18bc4ed9e..8bf2b7d89a 100644 --- a/adapters/avocet/avocet.go +++ b/adapters/avocet/avocet.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // AvocetAdapter implements a adapters.Bidder compatible with the Avocet advertising platform. diff --git a/adapters/avocet/avocet_test.go b/adapters/avocet/avocet_test.go index 42a417acaa..082a7c1ee6 100644 --- a/adapters/avocet/avocet_test.go +++ b/adapters/avocet/avocet_test.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/axis/axis.go b/adapters/axis/axis.go index 3f104c75e7..d28eca6a8a 100644 --- a/adapters/axis/axis.go +++ b/adapters/axis/axis.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/axis/axis_test.go b/adapters/axis/axis_test.go index 42481f0e40..24048f1856 100644 --- a/adapters/axis/axis_test.go +++ b/adapters/axis/axis_test.go @@ -3,9 +3,9 @@ package axis import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/axis/params_test.go b/adapters/axis/params_test.go index aa5b82f5d9..ad5cec52fd 100644 --- a/adapters/axis/params_test.go +++ b/adapters/axis/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/axonix/axonix.go b/adapters/axonix/axonix.go index 33b19e14f8..81e5937a14 100644 --- a/adapters/axonix/axonix.go +++ b/adapters/axonix/axonix.go @@ -10,12 +10,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/axonix/axonix_test.go b/adapters/axonix/axonix_test.go index 73ac0d981d..1d398c5351 100644 --- a/adapters/axonix/axonix_test.go +++ b/adapters/axonix/axonix_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/axonix/params_test.go b/adapters/axonix/params_test.go index 645a72338d..b839bcb20f 100644 --- a/adapters/axonix/params_test.go +++ b/adapters/axonix/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/axonix.json diff --git a/adapters/beachfront/beachfront.go b/adapters/beachfront/beachfront.go index 869451c98e..8e293837f1 100644 --- a/adapters/beachfront/beachfront.go +++ b/adapters/beachfront/beachfront.go @@ -10,12 +10,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const Seat = "beachfront" diff --git a/adapters/beachfront/beachfront_test.go b/adapters/beachfront/beachfront_test.go index b2beadce3f..304747503f 100644 --- a/adapters/beachfront/beachfront_test.go +++ b/adapters/beachfront/beachfront_test.go @@ -3,9 +3,9 @@ package beachfront import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/beachfront/params_test.go b/adapters/beachfront/params_test.go index 13e341b5b7..3bfbeba635 100644 --- a/adapters/beachfront/params_test.go +++ b/adapters/beachfront/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/beintoo/beintoo.go b/adapters/beintoo/beintoo.go index a76d57966c..18290e6df4 100644 --- a/adapters/beintoo/beintoo.go +++ b/adapters/beintoo/beintoo.go @@ -8,11 +8,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type BeintooAdapter struct { diff --git a/adapters/beintoo/beintoo_test.go b/adapters/beintoo/beintoo_test.go index d6ca33bf19..8dfb257b3d 100644 --- a/adapters/beintoo/beintoo_test.go +++ b/adapters/beintoo/beintoo_test.go @@ -3,9 +3,9 @@ package beintoo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/beintoo/params_test.go b/adapters/beintoo/params_test.go index f9c4e8f344..211912a8cb 100644 --- a/adapters/beintoo/params_test.go +++ b/adapters/beintoo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/bematterfull/bematterfull.go b/adapters/bematterfull/bematterfull.go index 3c9c16d6b3..89b984c5eb 100644 --- a/adapters/bematterfull/bematterfull.go +++ b/adapters/bematterfull/bematterfull.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/bematterfull/bematterfulltest_test.go b/adapters/bematterfull/bematterfulltest_test.go index 9789cccae0..92296231b0 100644 --- a/adapters/bematterfull/bematterfulltest_test.go +++ b/adapters/bematterfull/bematterfulltest_test.go @@ -3,9 +3,9 @@ package bematterfull import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/bematterfull/params_test.go b/adapters/bematterfull/params_test.go index bd7478c4e5..769195f6f0 100644 --- a/adapters/bematterfull/params_test.go +++ b/adapters/bematterfull/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/beop/beop.go b/adapters/beop/beop.go deleted file mode 100644 index bb4f862a5d..0000000000 --- a/adapters/beop/beop.go +++ /dev/null @@ -1,172 +0,0 @@ -package beop - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder( - bidderName openrtb_ext.BidderName, - config config.Adapter, - server config.Server) ( - adapters.Bidder, error, -) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} - -func (a *adapter) getRequestExtImpBeop(imp *openrtb2.Imp) (*openrtb_ext.ExtImpBeop, error) { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return nil, &errortypes.BadInput{ - Message: "ext.bidder not provided", - } - } - var beopExt openrtb_ext.ExtImpBeop - if err := jsonutil.Unmarshal(bidderExt.Bidder, &beopExt); err != nil { - return nil, &errortypes.BadInput{ - Message: "ext.bidder not provided", - } - } - return &beopExt, nil -} - -func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtImpBeop) (string, error) { - url, _ := url.Parse(a.endpoint) - query := url.Query() - if pid := params.BeopPublisherID; len(pid) != 0 { - query.Set("pid", pid) - } - if nid := params.BeopNetworkID; len(nid) != 0 { - query.Set("nid", nid) - } - if nptnid := params.BeopNetworkPartnerID; len(nptnid) != 0 { - query.Set("nptnid", nptnid) - } - url.RawQuery = query.Encode() - return url.String(), nil -} - -func (a *adapter) MakeRequests( - request *openrtb2.BidRequest, - requestInfo *adapters.ExtraRequestInfo) ( - []*adapters.RequestData, []error, -) { - var beopExt *openrtb_ext.ExtImpBeop - var err error - - beopExt, err = a.getRequestExtImpBeop(&request.Imp[0]) - if err != nil { - return nil, []error{err} - } - - requestJSON, err := json.Marshal(request) - if err != nil { - return nil, []error{err} - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - url, err := a.buildEndpointURL(beopExt) - if err != nil { - return nil, []error{err} - } - - requestData := &adapters.RequestData{ - Method: "POST", - Uri: url, - Body: requestJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - - return []*adapters.RequestData{requestData}, nil -} - -func getMediaTypeForBid(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { - mType := bid.MType - var bidType openrtb_ext.BidType - switch mType { - case openrtb2.MarkupBanner: - bidType = openrtb_ext.BidTypeBanner - case openrtb2.MarkupVideo: - bidType = openrtb_ext.BidTypeVideo - default: - return bidType, fmt.Errorf("Failed to parse bid mType for impression \"%s\"", bid.ImpID) - } - return bidType, nil -} - -func (a *adapter) MakeBids( - request *openrtb2.BidRequest, - requestData *adapters.RequestData, - responseData *adapters.ResponseData) ( - *adapters.BidderResponse, []error, -) { - if responseData.StatusCode == http.StatusNoContent { - return nil, nil - } - - if responseData.StatusCode == http.StatusServiceUnavailable { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Service Unavailable. Status Code: [ %d ] ", responseData.StatusCode), - }} - } - - if responseData.StatusCode == http.StatusBadRequest { - err := &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), - } - return nil, []error{err} - } - - var responseBody openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &responseBody); err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: "Bad Server Response", - }} - } - - if len(responseBody.SeatBid) == 0 { - return nil, []error{&errortypes.BadServerResponse{ - Message: "Empty SeatBid array", - }} - } - - bidResponseFinal := adapters.NewBidderResponseWithBidsCapacity(len(responseBody.SeatBid[0].Bid)) - seatBid := responseBody.SeatBid[0] - var errors []error - for i := range seatBid.Bid { - bid := &seatBid.Bid[i] - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errors = append(errors, err) - continue - } - bidResponseFinal.Bids = append(bidResponseFinal.Bids, &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - }) - } - if len(bidResponseFinal.Bids) == 0 { - return nil, errors - } - return bidResponseFinal, errors -} diff --git a/adapters/beop/beop_test.go b/adapters/beop/beop_test.go deleted file mode 100644 index 4be3022496..0000000000 --- a/adapters/beop/beop_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package beop - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderBeop, config.Adapter{ - Endpoint: "http://hb-test.collectiveaudience.co/rtb/bid"}, - config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "beoptest", bidder) -} diff --git a/adapters/beop/beoptest/exemplary/banner-web-with-nid.json b/adapters/beop/beoptest/exemplary/banner-web-with-nid.json deleted file mode 100644 index e0c6f9a880..0000000000 --- a/adapters/beop/beoptest/exemplary/banner-web-with-nid.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "nid": "aaaaaaaaaaaaaaaaaaaaaaaa", - "nptnid": "1234" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?nid=aaaaaaaaaaaaaaaaaaaaaaaa&nptnid=1234", - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "nid": "aaaaaaaaaaaaaaaaaaaaaaaa", - "nptnid": "1234" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 320, - "h": 50, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 320, - "h": 50, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/beop/beoptest/exemplary/banner-web.json b/adapters/beop/beoptest/exemplary/banner-web.json deleted file mode 100644 index a757171e34..0000000000 --- a/adapters/beop/beoptest/exemplary/banner-web.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 320, - "h": 50, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 320, - "h": 50, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/beop/beoptest/exemplary/video-web.json b/adapters/beop/beoptest/exemplary/video-web.json deleted file mode 100644 index bd4ff7acfe..0000000000 --- a/adapters/beop/beoptest/exemplary/video-web.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480, - "minduration": 30, - "maxduration": 150 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 30, - "maxduration": 150, - "w": 640, - "h": 480 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 1280, - "h": 720, - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 1280, - "h": 720, - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/empty-seatbid-array.json b/adapters/beop/beoptest/supplemental/empty-seatbid-array.json deleted file mode 100644 index 0b709b2b93..0000000000 --- a/adapters/beop/beoptest/supplemental/empty-seatbid-array.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "resp-id", - "seatbid": [] - } - } - } - ], - "mockResponse": { - "status": 200, - "body": "invalid response" - }, - "expectedMakeBidsErrors": [ - { - "value": "Empty SeatBid array", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/invalid-bid-type.json b/adapters/beop/beoptest/supplemental/invalid-bid-type.json deleted file mode 100644 index d0a8580963..0000000000 --- a/adapters/beop/beoptest/supplemental/invalid-bid-type.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "123456789", - "impid": "impression-id", - "price": 2, - "adm": "adm code", - "adomain": [ - "testdomain.com" - ], - "crid": "100", - "w": 320, - "h": 50, - "mtype": 3, - "ext": { - "prebid": { - "type": "audio" - } - } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Failed to parse bid mType for impression \"impression-id\"", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/invalid-response.json b/adapters/beop/beoptest/supplemental/invalid-response.json deleted file mode 100644 index 8c5537acef..0000000000 --- a/adapters/beop/beoptest/supplemental/invalid-response.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 200, - "body": "invalid response" - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Bad Server Response", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/missing-bidder-params.json b/adapters/beop/beoptest/supplemental/missing-bidder-params.json deleted file mode 100644 index 4c2de07072..0000000000 --- a/adapters/beop/beoptest/supplemental/missing-bidder-params.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": {} - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "ext.bidder not provided", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/status-code-bad-request.json b/adapters/beop/beoptest/supplemental/status-code-bad-request.json deleted file mode 100644 index f8c0eb2d56..0000000000 --- a/adapters/beop/beoptest/supplemental/status-code-bad-request.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 400 - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info.", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/beoptest/supplemental/status-code-no-content.json b/adapters/beop/beoptest/supplemental/status-code-no-content.json deleted file mode 100644 index 25280c2395..0000000000 --- a/adapters/beop/beoptest/supplemental/status-code-no-content.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/beop/beoptest/supplemental/status-code-service-unavailable.json b/adapters/beop/beoptest/supplemental/status-code-service-unavailable.json deleted file mode 100644 index ce3742ab85..0000000000 --- a/adapters/beop/beoptest/supplemental/status-code-service-unavailable.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "tmax": 1000, - "user": { - "id": "some-user" - }, - "imp": [ - { - "id": "impression-id", - "tagid": "tid", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "uri": "http://hb-test.collectiveaudience.co/rtb/bid?pid=aaaaaaaaaaaaaaaaaaaaaaaa", - "body": { - "id": "request-id", - "device": { - "ua": "useragent", - "ip": "100.100.100.100", - "language": "en" - }, - "imp": [ - { - "id": "impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "tagid": "tid", - "ext": { - "bidder": { - "pid": "aaaaaaaaaaaaaaaaaaaaaaaa" - } - } - } - ], - "site": { - "page": "test.com/page", - "domain": "test.com", - "cat": [ - "IAB9-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "id": "some-user" - }, - "tmax": 1000 - }, - "impIDs": [ - "impression-id" - ] - }, - "mockResponse": { - "status": 503 - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Service Unavailable. Status Code: [ 503 ] ", - "comparison": "literal" - } - ] -} diff --git a/adapters/beop/params_test.go b/adapters/beop/params_test.go deleted file mode 100644 index 63ba18c9b0..0000000000 --- a/adapters/beop/params_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package beop - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderBeop, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected adverxo params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderBeop, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{ "pid": "aaaaaaaaaaaaaaaaaaaaaaaa"}`, - `{ "nid": "aaaaaaaaaaaaaaaaaaaaaaaa", "ntpnid": "1234"}`, -} - -var invalidParams = []string{ - ``, - `null`, - `{}`, - `{ "fid": 5 }`, - `{ "pid": 5 }`, - `{ "pid": 5 }`, - `{ "nid": "", "nptnid": "" }`, -} diff --git a/adapters/between/between.go b/adapters/between/between.go index 6cbb88ca16..fe20978285 100644 --- a/adapters/between/between.go +++ b/adapters/between/between.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type BetweenAdapter struct { diff --git a/adapters/between/between_test.go b/adapters/between/between_test.go index 1a33e77102..61f759126b 100644 --- a/adapters/between/between_test.go +++ b/adapters/between/between_test.go @@ -3,9 +3,9 @@ package between import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/between/params_test.go b/adapters/between/params_test.go index 7d16056f55..5e30dba116 100644 --- a/adapters/between/params_test.go +++ b/adapters/between/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/between.json diff --git a/adapters/beyondmedia/beyondmedia.go b/adapters/beyondmedia/beyondmedia.go index 4e026aa0f4..bafa5791d8 100644 --- a/adapters/beyondmedia/beyondmedia.go +++ b/adapters/beyondmedia/beyondmedia.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/beyondmedia/beyondmedia_test.go b/adapters/beyondmedia/beyondmedia_test.go index 6050f70488..94eb5bd741 100644 --- a/adapters/beyondmedia/beyondmedia_test.go +++ b/adapters/beyondmedia/beyondmedia_test.go @@ -3,9 +3,9 @@ package beyondmedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/beyondmedia/params_test.go b/adapters/beyondmedia/params_test.go index 9804f12bde..2f6d969f1a 100644 --- a/adapters/beyondmedia/params_test.go +++ b/adapters/beyondmedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/bidder.go b/adapters/bidder.go index 0be99b0080..fb0ec07e03 100644 --- a/adapters/bidder.go +++ b/adapters/bidder.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Bidder describes how to connect to external demand. diff --git a/adapters/bidmachine/bidmachine.go b/adapters/bidmachine/bidmachine.go index 47fd8b90f1..81a72cdac5 100644 --- a/adapters/bidmachine/bidmachine.go +++ b/adapters/bidmachine/bidmachine.go @@ -12,13 +12,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -185,9 +184,6 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co const UndefinedMediaType = openrtb_ext.BidType("") func (a *adapter) buildEndpointURL(params openrtb_ext.ExtImpBidmachine) (string, error) { - if !urlutil.IsSafeHost(params.Host) { - return "", &errortypes.BadInput{Message: "Failed to create final URL with provided host"} - } endpointParams := macros.EndpointTemplateParams{Host: params.Host} uriString, errMacros := macros.ResolveMacros(a.endpoint, endpointParams) if errMacros != nil { diff --git a/adapters/bidmachine/bidmachine_test.go b/adapters/bidmachine/bidmachine_test.go index f303e49cde..dc26633c4f 100644 --- a/adapters/bidmachine/bidmachine_test.go +++ b/adapters/bidmachine/bidmachine_test.go @@ -3,9 +3,9 @@ package bidmachine import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/bidmachine/bidmachinetest/supplemental/invalid-host.json b/adapters/bidmachine/bidmachinetest/supplemental/invalid-host.json deleted file mode 100644 index 3182d6bf4a..0000000000 --- a/adapters/bidmachine/bidmachinetest/supplemental/invalid-host.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id-1", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "host": "evil.com/path?redirect=http://attacker.com#", - "path": "auction/rtb/v2", - "seller_id": "1" - } - } - } - ] - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Failed to create final URL with provided host", - "comparison": "literal" - } - ] -} diff --git a/adapters/bidmachine/params_test.go b/adapters/bidmachine/params_test.go index 1f51f92a75..319fef8902 100644 --- a/adapters/bidmachine/params_test.go +++ b/adapters/bidmachine/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -34,12 +34,8 @@ func TestInvalidParams(t *testing.T) { } var validParams = []string{ - `{"seller_id":"1", "host":"host", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host.example.com", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host.example.com:8080", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host-example.test", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"Host.Example.com", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"localhost:3000", "path":"auction/rtb/v2"}`, + `{"seller_id":"1", "host":"api-eu", "path":"auction/rtb/v2"}`, + `{"seller_id":"1", "host":"api-us", "path":"auction/rtb/v2"}`, } var invalidParams = []string{ @@ -51,19 +47,32 @@ var invalidParams = []string{ `[]`, `{}`, `{"some_random_field":""}`, - `{"seller_id":"", "host":"host", "path":"auction/rtb/v2"}`, - `{"host":"host", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host", "path":""}`, - `{"seller_id":"1", "host":"host"}`, - `{"seller_id":"1", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"/path", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"//evil.com", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host/path", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host?query=1", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host#fragment", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"user@host", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"https://host.com", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host:notaport", "path":"auction/rtb/v2"}`, - `{"seller_id":"1", "host":"host:8080:extra", "path":"auction/rtb/v2"}`, + `{"seller_id":""}`, + `{"seller_id": 1}`, + `{"seller_id": 1.2}`, + `{"seller_id": null}`, + `{"seller_id": true}`, + `{"seller_id": []}`, + `{"seller_id": {}}`, + `{"host":""}`, + `{"host": 1}`, + `{"host": 1.2}`, + `{"host": null}`, + `{"host": true}`, + `{"host": []}`, + `{"host": {}}`, + `{"path":""}`, + `{"path": 1}`, + `{"path": 1.2}`, + `{"path": null}`, + `{"path": true}`, + `{"path": []}`, + `{"path": {}}`, + `{"seller_id":"", "path": "", host: ""}`, + `{"seller_id": 1, "path": 2, host: 3}`, + `{"seller_id": 1.2}, "path": 5.5, host: 3.3`, + `{"seller_id": null, "path": null, host: null}`, + `{"seller_id": true, "path": false, host: true}`, + `{"seller_id": [], "path": [], host: []}`, + `{"seller_id": {}, "path": {}, host: {}}`, } diff --git a/adapters/bidmatic/bidmatic.go b/adapters/bidmatic/bidmatic.go index 06678021dc..32b7a2ee88 100644 --- a/adapters/bidmatic/bidmatic.go +++ b/adapters/bidmatic/bidmatic.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bidmatic/bidmatic_test.go b/adapters/bidmatic/bidmatic_test.go index f803c898ad..b546eca545 100644 --- a/adapters/bidmatic/bidmatic_test.go +++ b/adapters/bidmatic/bidmatic_test.go @@ -3,9 +3,9 @@ package bidmatic import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bidmatic/params_test.go b/adapters/bidmatic/params_test.go index cc13f7b979..bfea9fddae 100644 --- a/adapters/bidmatic/params_test.go +++ b/adapters/bidmatic/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/bidmatic.json diff --git a/adapters/bidmyadz/bidmyadz.go b/adapters/bidmyadz/bidmyadz.go index 87c92eb3bb..b2f8cda564 100644 --- a/adapters/bidmyadz/bidmyadz.go +++ b/adapters/bidmyadz/bidmyadz.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bidmyadz/bidmyadz_test.go b/adapters/bidmyadz/bidmyadz_test.go index 53b4bcc592..f01af44cff 100644 --- a/adapters/bidmyadz/bidmyadz_test.go +++ b/adapters/bidmyadz/bidmyadz_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bidmyadz/params_test.go b/adapters/bidmyadz/params_test.go index e8a50bd7ee..fca34b1024 100644 --- a/adapters/bidmyadz/params_test.go +++ b/adapters/bidmyadz/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/bidscube/bidscube.go b/adapters/bidscube/bidscube.go index 2bb9dc25c7..8ccd794f86 100644 --- a/adapters/bidscube/bidscube.go +++ b/adapters/bidscube/bidscube.go @@ -9,11 +9,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bidscube/bidscube_test.go b/adapters/bidscube/bidscube_test.go index aec8219b84..5396ccd426 100644 --- a/adapters/bidscube/bidscube_test.go +++ b/adapters/bidscube/bidscube_test.go @@ -3,9 +3,9 @@ package bidscube import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bidscube/params_test.go b/adapters/bidscube/params_test.go index 00bc51dd1e..9f368f939a 100644 --- a/adapters/bidscube/params_test.go +++ b/adapters/bidscube/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the bidscube schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/bidstack/bidstack.go b/adapters/bidstack/bidstack.go index 5172db1bb8..555abff0c7 100644 --- a/adapters/bidstack/bidstack.go +++ b/adapters/bidstack/bidstack.go @@ -9,10 +9,10 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/bidstack/bidstack_test.go b/adapters/bidstack/bidstack_test.go index 14d506497b..9010ce5014 100644 --- a/adapters/bidstack/bidstack_test.go +++ b/adapters/bidstack/bidstack_test.go @@ -7,9 +7,9 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bidstack/params_test.go b/adapters/bidstack/params_test.go index cc24029280..3cca0f447b 100644 --- a/adapters/bidstack/params_test.go +++ b/adapters/bidstack/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/bidtheatre/bidtheatre.go b/adapters/bidtheatre/bidtheatre.go index 6e56171b2d..8d3b149c7e 100644 --- a/adapters/bidtheatre/bidtheatre.go +++ b/adapters/bidtheatre/bidtheatre.go @@ -6,11 +6,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bidtheatre/bidtheatre_test.go b/adapters/bidtheatre/bidtheatre_test.go index ca78a03f27..8a4daf5fbe 100644 --- a/adapters/bidtheatre/bidtheatre_test.go +++ b/adapters/bidtheatre/bidtheatre_test.go @@ -2,9 +2,9 @@ package bidtheatre import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "strings" "testing" ) diff --git a/adapters/bidtheatre/params_test.go b/adapters/bidtheatre/params_test.go index 51caec5f94..64870afcba 100644 --- a/adapters/bidtheatre/params_test.go +++ b/adapters/bidtheatre/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/bigoad/bigoad.go b/adapters/bigoad/bigoad.go index 7e4edd51fc..e968139d59 100644 --- a/adapters/bigoad/bigoad.go +++ b/adapters/bigoad/bigoad.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bigoad/bigoad_test.go b/adapters/bigoad/bigoad_test.go index a171d66dc9..7c51c8f80d 100644 --- a/adapters/bigoad/bigoad_test.go +++ b/adapters/bigoad/bigoad_test.go @@ -3,9 +3,9 @@ package bigoad import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/bigoad/param_test.go b/adapters/bigoad/param_test.go index 9f456f65df..772bcb7721 100644 --- a/adapters/bigoad/param_test.go +++ b/adapters/bigoad/param_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/blasto/blasto.go b/adapters/blasto/blasto.go index c02c4a1ce7..e9917d0885 100644 --- a/adapters/blasto/blasto.go +++ b/adapters/blasto/blasto.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/blasto/blasto_test.go b/adapters/blasto/blasto_test.go index 4bce53bcde..9b09c19ae6 100644 --- a/adapters/blasto/blasto_test.go +++ b/adapters/blasto/blasto_test.go @@ -3,9 +3,9 @@ package blasto import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/blasto/params_test.go b/adapters/blasto/params_test.go index 762b51185d..c23f162d03 100644 --- a/adapters/blasto/params_test.go +++ b/adapters/blasto/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/bliink/bliink.go b/adapters/bliink/bliink.go index d5ce144c8c..900c1de7ee 100644 --- a/adapters/bliink/bliink.go +++ b/adapters/bliink/bliink.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bliink/bliink_test.go b/adapters/bliink/bliink_test.go index 404f90127b..d5fa3aa58e 100644 --- a/adapters/bliink/bliink_test.go +++ b/adapters/bliink/bliink_test.go @@ -3,9 +3,9 @@ package bliink import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bliink/params_test.go b/adapters/bliink/params_test.go index 8b3620e962..646ab96e4c 100644 --- a/adapters/bliink/params_test.go +++ b/adapters/bliink/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/blis/blis.go b/adapters/blis/blis.go index 617c6b82e6..ed701a2241 100644 --- a/adapters/blis/blis.go +++ b/adapters/blis/blis.go @@ -8,13 +8,13 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iterutil" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/iterutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/blis/blis_test.go b/adapters/blis/blis_test.go index 7ae808d8e8..b9fcc9836a 100644 --- a/adapters/blis/blis_test.go +++ b/adapters/blis/blis_test.go @@ -4,9 +4,9 @@ import ( "github.com/stretchr/testify/assert" "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" ) diff --git a/adapters/blis/params_test.go b/adapters/blis/params_test.go index b1535e8844..2a62836a06 100644 --- a/adapters/blis/params_test.go +++ b/adapters/blis/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/blue/blue.go b/adapters/blue/blue.go index 6f9537507f..08b5167dd0 100644 --- a/adapters/blue/blue.go +++ b/adapters/blue/blue.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/blue/blue_test.go b/adapters/blue/blue_test.go index 815cbaf561..696d855d6a 100644 --- a/adapters/blue/blue_test.go +++ b/adapters/blue/blue_test.go @@ -3,9 +3,9 @@ package blue import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestBidderBlue(t *testing.T) { diff --git a/adapters/blue/params_test.go b/adapters/blue/params_test.go index aac600299c..27b1e02ea8 100644 --- a/adapters/blue/params_test.go +++ b/adapters/blue/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/bluesea/bluesea.go b/adapters/bluesea/bluesea.go index 835f98c48e..0428b22b6c 100644 --- a/adapters/bluesea/bluesea.go +++ b/adapters/bluesea/bluesea.go @@ -7,11 +7,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bluesea/bluesea_test.go b/adapters/bluesea/bluesea_test.go index df4ed7d6ec..2d0b5bdaca 100644 --- a/adapters/bluesea/bluesea_test.go +++ b/adapters/bluesea/bluesea_test.go @@ -3,9 +3,9 @@ package bluesea import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bluesea/params_test.go b/adapters/bluesea/params_test.go index f9f7ee5b90..79d15d0baa 100644 --- a/adapters/bluesea/params_test.go +++ b/adapters/bluesea/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the bluesea schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/bmtm/brightmountainmedia.go b/adapters/bmtm/brightmountainmedia.go index f1c8fd9719..6f48df6d4d 100644 --- a/adapters/bmtm/brightmountainmedia.go +++ b/adapters/bmtm/brightmountainmedia.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/bmtm/brightmountainmedia_test.go b/adapters/bmtm/brightmountainmedia_test.go index 51ec50e6cd..28af575c57 100644 --- a/adapters/bmtm/brightmountainmedia_test.go +++ b/adapters/bmtm/brightmountainmedia_test.go @@ -3,9 +3,9 @@ package bmtm import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/bmtm/params_test.go b/adapters/bmtm/params_test.go index a2ff1104c0..f6f8b6105e 100644 --- a/adapters/bmtm/params_test.go +++ b/adapters/bmtm/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/boldwin/boldwin.go b/adapters/boldwin/boldwin.go index 52f545086e..2dbb145428 100644 --- a/adapters/boldwin/boldwin.go +++ b/adapters/boldwin/boldwin.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/boldwin/boldwin_test.go b/adapters/boldwin/boldwin_test.go index a6d3e3238e..1a270fcfe9 100644 --- a/adapters/boldwin/boldwin_test.go +++ b/adapters/boldwin/boldwin_test.go @@ -3,9 +3,9 @@ package boldwin import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/boldwin/params_test.go b/adapters/boldwin/params_test.go index b122376848..627af2418f 100644 --- a/adapters/boldwin/params_test.go +++ b/adapters/boldwin/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/boldwin_rapid/boldwin_rapid.go b/adapters/boldwin_rapid/boldwin_rapid.go index 62d2131fea..1904cd8aca 100644 --- a/adapters/boldwin_rapid/boldwin_rapid.go +++ b/adapters/boldwin_rapid/boldwin_rapid.go @@ -8,11 +8,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/boldwin_rapid/boldwin_rapid_test.go b/adapters/boldwin_rapid/boldwin_rapid_test.go index da55e420ae..58e03ca2aa 100644 --- a/adapters/boldwin_rapid/boldwin_rapid_test.go +++ b/adapters/boldwin_rapid/boldwin_rapid_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/boldwin_rapid/params_test.go b/adapters/boldwin_rapid/params_test.go index eef731350d..d43843271a 100644 --- a/adapters/boldwin_rapid/params_test.go +++ b/adapters/boldwin_rapid/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/brave/brave.go b/adapters/brave/brave.go index 595df0ea0d..4cca024f43 100755 --- a/adapters/brave/brave.go +++ b/adapters/brave/brave.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/brave/brave_test.go b/adapters/brave/brave_test.go index aceebd3a56..a1ea0cd70d 100644 --- a/adapters/brave/brave_test.go +++ b/adapters/brave/brave_test.go @@ -3,9 +3,9 @@ package brave import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/brave/params_test.go b/adapters/brave/params_test.go index 06ec9f5f55..fd0a6f8c63 100644 --- a/adapters/brave/params_test.go +++ b/adapters/brave/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/bwx/bwx.go b/adapters/bwx/bwx.go index 22b9451934..55e64a05c2 100644 --- a/adapters/bwx/bwx.go +++ b/adapters/bwx/bwx.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/bwx/bwx_test.go b/adapters/bwx/bwx_test.go index edd87acf62..10246ee8a8 100644 --- a/adapters/bwx/bwx_test.go +++ b/adapters/bwx/bwx_test.go @@ -3,9 +3,9 @@ package bwx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/bwx/params_test.go b/adapters/bwx/params_test.go index cd5d969bbf..515fbd5073 100644 --- a/adapters/bwx/params_test.go +++ b/adapters/bwx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/cadent_aperture_mx/cadentaperturemx.go b/adapters/cadent_aperture_mx/cadentaperturemx.go index 9d62c1a5e6..58902bad55 100644 --- a/adapters/cadent_aperture_mx/cadentaperturemx.go +++ b/adapters/cadent_aperture_mx/cadentaperturemx.go @@ -11,11 +11,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/cadent_aperture_mx/cadentaperturemx_test.go b/adapters/cadent_aperture_mx/cadentaperturemx_test.go index a17eac4b66..7a951555d0 100644 --- a/adapters/cadent_aperture_mx/cadentaperturemx_test.go +++ b/adapters/cadent_aperture_mx/cadentaperturemx_test.go @@ -3,10 +3,10 @@ package cadentaperturemx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/cadent_aperture_mx/params_test.go b/adapters/cadent_aperture_mx/params_test.go index 8fc1377c6a..d505bd8329 100644 --- a/adapters/cadent_aperture_mx/params_test.go +++ b/adapters/cadent_aperture_mx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/ccx/ccx.go b/adapters/ccx/ccx.go index 7685e624a6..64bb599afd 100644 --- a/adapters/ccx/ccx.go +++ b/adapters/ccx/ccx.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/ccx/ccx_test.go b/adapters/ccx/ccx_test.go index 3c68e9ccc0..de095d7259 100644 --- a/adapters/ccx/ccx_test.go +++ b/adapters/ccx/ccx_test.go @@ -3,9 +3,9 @@ package ccx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/ccx/params_test.go b/adapters/ccx/params_test.go index 2d296bc883..ff600fada1 100644 --- a/adapters/ccx/params_test.go +++ b/adapters/ccx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/clydo/clydo.go b/adapters/clydo/clydo.go index 967aab5682..0b06bd74d8 100644 --- a/adapters/clydo/clydo.go +++ b/adapters/clydo/clydo.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/clydo/clydo_test.go b/adapters/clydo/clydo_test.go index c381fc6adc..ef21d1e486 100644 --- a/adapters/clydo/clydo_test.go +++ b/adapters/clydo/clydo_test.go @@ -3,9 +3,9 @@ package clydo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/clydo/params_test.go b/adapters/clydo/params_test.go index f3172f83b7..779c7eeadd 100644 --- a/adapters/clydo/params_test.go +++ b/adapters/clydo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/cointraffic/cointraffic.go b/adapters/cointraffic/cointraffic.go index d5aff00551..781d8def81 100644 --- a/adapters/cointraffic/cointraffic.go +++ b/adapters/cointraffic/cointraffic.go @@ -5,10 +5,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/cointraffic/cointraffic_test.go b/adapters/cointraffic/cointraffic_test.go index c73d8d6b3a..133dfd2af2 100644 --- a/adapters/cointraffic/cointraffic_test.go +++ b/adapters/cointraffic/cointraffic_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "cointraffictest" diff --git a/adapters/cointraffic/params_test.go b/adapters/cointraffic/params_test.go index 3d0044d94b..484a72c66b 100644 --- a/adapters/cointraffic/params_test.go +++ b/adapters/cointraffic/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/cointraffic.json diff --git a/adapters/coinzilla/coinzilla.go b/adapters/coinzilla/coinzilla.go index eeec012a34..21e321406c 100644 --- a/adapters/coinzilla/coinzilla.go +++ b/adapters/coinzilla/coinzilla.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { diff --git a/adapters/coinzilla/coinzilla_test.go b/adapters/coinzilla/coinzilla_test.go index fff81adf18..830028f24f 100644 --- a/adapters/coinzilla/coinzilla_test.go +++ b/adapters/coinzilla/coinzilla_test.go @@ -3,9 +3,9 @@ package coinzilla import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "coinzillatest" diff --git a/adapters/coinzilla/params_test.go b/adapters/coinzilla/params_test.go index 61586a8910..d174b1441a 100644 --- a/adapters/coinzilla/params_test.go +++ b/adapters/coinzilla/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/colossus/colossus.go b/adapters/colossus/colossus.go index 5f3b2d1c7b..0fc1e50a29 100644 --- a/adapters/colossus/colossus.go +++ b/adapters/colossus/colossus.go @@ -7,11 +7,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ColossusAdapter struct { diff --git a/adapters/colossus/colossus_test.go b/adapters/colossus/colossus_test.go index 903cd2ec65..227bd635ae 100644 --- a/adapters/colossus/colossus_test.go +++ b/adapters/colossus/colossus_test.go @@ -3,9 +3,9 @@ package colossus import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/colossus/params_test.go b/adapters/colossus/params_test.go index d4e80e4679..bf924e4eae 100644 --- a/adapters/colossus/params_test.go +++ b/adapters/colossus/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the colossus schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/compass/compass.go b/adapters/compass/compass.go index 0ab775a513..28f46bc7e2 100644 --- a/adapters/compass/compass.go +++ b/adapters/compass/compass.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/compass/compass_test.go b/adapters/compass/compass_test.go index 9e043d1c60..7aed7616de 100644 --- a/adapters/compass/compass_test.go +++ b/adapters/compass/compass_test.go @@ -3,9 +3,9 @@ package compass import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/compass/params_test.go b/adapters/compass/params_test.go index 6de87dfe03..edabac2975 100644 --- a/adapters/compass/params_test.go +++ b/adapters/compass/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/concert/concert.go b/adapters/concert/concert.go index 5ac3269006..adf7144274 100644 --- a/adapters/concert/concert.go +++ b/adapters/concert/concert.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/concert/concert_test.go b/adapters/concert/concert_test.go index 397043b3da..d6cea80fb9 100644 --- a/adapters/concert/concert_test.go +++ b/adapters/concert/concert_test.go @@ -3,9 +3,9 @@ package concert import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/concert/params_test.go b/adapters/concert/params_test.go index 512f016482..b8ec65bda8 100644 --- a/adapters/concert/params_test.go +++ b/adapters/concert/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/connatix/connatix.go b/adapters/connatix/connatix.go index fbd1af35e9..c479a2892f 100644 --- a/adapters/connatix/connatix.go +++ b/adapters/connatix/connatix.go @@ -9,11 +9,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/connatix/connatix_test.go b/adapters/connatix/connatix_test.go index fdaa76beef..018926ef25 100644 --- a/adapters/connatix/connatix_test.go +++ b/adapters/connatix/connatix_test.go @@ -3,9 +3,9 @@ package connatix import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/connatix/models.go b/adapters/connatix/models.go index 3462829eae..aebd51d097 100644 --- a/adapters/connatix/models.go +++ b/adapters/connatix/models.go @@ -1,7 +1,7 @@ package connatix import ( - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type adapter struct { diff --git a/adapters/connatix/params_test.go b/adapters/connatix/params_test.go index beb681aa7c..254f660c1b 100644 --- a/adapters/connatix/params_test.go +++ b/adapters/connatix/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/connatix.json diff --git a/adapters/connectad/connectad.go b/adapters/connectad/connectad.go index 146e583eaf..dd13bc3764 100644 --- a/adapters/connectad/connectad.go +++ b/adapters/connectad/connectad.go @@ -8,11 +8,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ConnectAdAdapter struct { diff --git a/adapters/connectad/connectad_test.go b/adapters/connectad/connectad_test.go index ac876a7a67..4563e0045f 100644 --- a/adapters/connectad/connectad_test.go +++ b/adapters/connectad/connectad_test.go @@ -3,9 +3,9 @@ package connectad import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/connectad/params_test.go b/adapters/connectad/params_test.go index 12dd9c7be9..dc7c40be72 100644 --- a/adapters/connectad/params_test.go +++ b/adapters/connectad/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/consumable/consumable.go b/adapters/consumable/consumable.go index 47d1ba3ea0..9b80fb1459 100644 --- a/adapters/consumable/consumable.go +++ b/adapters/consumable/consumable.go @@ -5,11 +5,11 @@ import ( "fmt" "net/http" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/consumable/consumable_test.go b/adapters/consumable/consumable_test.go index 76a28d40d1..200d6159ea 100644 --- a/adapters/consumable/consumable_test.go +++ b/adapters/consumable/consumable_test.go @@ -6,11 +6,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/consumable/params_test.go b/adapters/consumable/params_test.go index 6584982d81..3820acc737 100644 --- a/adapters/consumable/params_test.go +++ b/adapters/consumable/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/consumable.json diff --git a/adapters/contxtful/contxtful.go b/adapters/contxtful/contxtful.go index 3513579ffe..3dd8b5b2b9 100644 --- a/adapters/contxtful/contxtful.go +++ b/adapters/contxtful/contxtful.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // ContxtfulRequestPayload represents the complete request payload structure diff --git a/adapters/contxtful/contxtful_relay_test.go b/adapters/contxtful/contxtful_relay_test.go index c668047c1f..61f9773ab5 100644 --- a/adapters/contxtful/contxtful_relay_test.go +++ b/adapters/contxtful/contxtful_relay_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/contxtful/contxtful_test.go b/adapters/contxtful/contxtful_test.go index 846144e9b4..b1fa229b6d 100644 --- a/adapters/contxtful/contxtful_test.go +++ b/adapters/contxtful/contxtful_test.go @@ -9,11 +9,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/adapters/contxtful/params_test.go b/adapters/contxtful/params_test.go index 34831e1616..bc7321f892 100644 --- a/adapters/contxtful/params_test.go +++ b/adapters/contxtful/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/conversant/conversant.go b/adapters/conversant/conversant.go index f5db218286..035ee14bae 100644 --- a/adapters/conversant/conversant.go +++ b/adapters/conversant/conversant.go @@ -8,12 +8,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ConversantAdapter struct { @@ -85,10 +84,7 @@ func (c *ConversantAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo * func parseCnvrParams(imp *openrtb2.Imp, cnvrExt openrtb_ext.ExtImpConversant, reqInfo *adapters.ExtraRequestInfo) []error { imp.DisplayManager = "prebid-s2s" - - if version.Ver != "" { - imp.DisplayManagerVer = version.Ver - } + imp.DisplayManagerVer = "2.0.0" if imp.BidFloor <= 0 && cnvrExt.BidFloor > 0 { imp.BidFloor = cnvrExt.BidFloor diff --git a/adapters/conversant/conversant_test.go b/adapters/conversant/conversant_test.go index 563b229997..eeb5756471 100644 --- a/adapters/conversant/conversant_test.go +++ b/adapters/conversant/conversant_test.go @@ -3,9 +3,9 @@ package conversant import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/conversant/conversanttest/exemplary/banner.json b/adapters/conversant/conversanttest/exemplary/banner.json index c84c9405db..8523bb671d 100644 --- a/adapters/conversant/conversanttest/exemplary/banner.json +++ b/adapters/conversant/conversanttest/exemplary/banner.json @@ -42,6 +42,7 @@ "secure": 1, "bidfloor": 0.01, "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "banner": { "format": [{"w": 300, "h": 250}] }, diff --git a/adapters/conversant/conversanttest/exemplary/simple-native.json b/adapters/conversant/conversanttest/exemplary/simple-native.json index e32dad2f08..f1c67e548a 100644 --- a/adapters/conversant/conversanttest/exemplary/simple-native.json +++ b/adapters/conversant/conversanttest/exemplary/simple-native.json @@ -35,6 +35,7 @@ "secure": 1, "bidfloor": 0.01, "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "ext": { "bidder": { "site_id": "108060", @@ -96,4 +97,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/conversant/conversanttest/exemplary/simple_app.json b/adapters/conversant/conversanttest/exemplary/simple_app.json index e3ef3db1c2..a4c825e1f6 100644 --- a/adapters/conversant/conversanttest/exemplary/simple_app.json +++ b/adapters/conversant/conversanttest/exemplary/simple_app.json @@ -46,6 +46,7 @@ "secure": 1, "bidfloor": 0.01, "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "banner": { "format": [{"w": 300, "h": 250}] }, diff --git a/adapters/conversant/conversanttest/exemplary/simple_audio_app.json b/adapters/conversant/conversanttest/exemplary/simple_audio_app.json index 64ae162520..fd0b091085 100644 --- a/adapters/conversant/conversanttest/exemplary/simple_audio_app.json +++ b/adapters/conversant/conversanttest/exemplary/simple_audio_app.json @@ -42,6 +42,7 @@ "secure": 1, "bidfloor": 0.01, "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "audio": { "mimes": [ "audio/vnd.wav", "audio/mpeg", "audio/mp4" ], "protocols": [3,6,7,8] diff --git a/adapters/conversant/conversanttest/exemplary/simple_audio_site.json b/adapters/conversant/conversanttest/exemplary/simple_audio_site.json index d2b4f849c3..fb74e0b673 100644 --- a/adapters/conversant/conversanttest/exemplary/simple_audio_site.json +++ b/adapters/conversant/conversanttest/exemplary/simple_audio_site.json @@ -44,6 +44,7 @@ "secure": 1, "bidfloor": 0.01, "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "audio": { "mimes": [ "audio/vnd.wav", "audio/mpeg", "audio/mp4" ], "protocols": [3,6,7,8] diff --git a/adapters/conversant/conversanttest/exemplary/video.json b/adapters/conversant/conversanttest/exemplary/video.json index 023b159cd9..322e28ad51 100644 --- a/adapters/conversant/conversanttest/exemplary/video.json +++ b/adapters/conversant/conversanttest/exemplary/video.json @@ -63,6 +63,7 @@ "bidfloor": 25.0, "bidfloorcur": "USD", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "video": { "w": 300, "h": 250, diff --git a/adapters/conversant/conversanttest/supplemental/server_badresponse.json b/adapters/conversant/conversanttest/supplemental/server_badresponse.json index 60e9b78bf3..26c74eaa66 100644 --- a/adapters/conversant/conversanttest/supplemental/server_badresponse.json +++ b/adapters/conversant/conversanttest/supplemental/server_badresponse.json @@ -31,6 +31,7 @@ { "id": "1", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "banner": { "format": [{"w": 300, "h": 250}] }, diff --git a/adapters/conversant/conversanttest/supplemental/server_nocontent.json b/adapters/conversant/conversanttest/supplemental/server_nocontent.json index 4faff08b96..ca33f470a5 100644 --- a/adapters/conversant/conversanttest/supplemental/server_nocontent.json +++ b/adapters/conversant/conversanttest/supplemental/server_nocontent.json @@ -31,6 +31,7 @@ { "id": "1", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "banner": { "format": [{"w": 300, "h": 250}] }, diff --git a/adapters/conversant/conversanttest/supplemental/server_unknownstatus.json b/adapters/conversant/conversanttest/supplemental/server_unknownstatus.json index acb9741435..129b6fba02 100644 --- a/adapters/conversant/conversanttest/supplemental/server_unknownstatus.json +++ b/adapters/conversant/conversanttest/supplemental/server_unknownstatus.json @@ -31,6 +31,7 @@ { "id": "1", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "banner": { "format": [{"w": 300, "h": 250}] }, diff --git a/adapters/conversant/conversanttest/supplemental/test_params.json b/adapters/conversant/conversanttest/supplemental/test_params.json index ce3efc35d0..41366dbe19 100644 --- a/adapters/conversant/conversanttest/supplemental/test_params.json +++ b/adapters/conversant/conversanttest/supplemental/test_params.json @@ -108,6 +108,7 @@ "secure": 1, "tagid": "mytag", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "video": { "api": [1,2], "maxduration": 60, @@ -126,6 +127,7 @@ "secure": 1, "tagid": "mytag", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "video": { "api": [1,2], "maxduration": 60, @@ -153,6 +155,7 @@ "secure": 1, "tagid": "mytag", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "video": { "api": [1,2], "maxduration": 60, @@ -180,6 +183,7 @@ "secure": 1, "tagid": "mytag", "displaymanager": "prebid-s2s", + "displaymanagerver": "2.0.0", "video": { "api": [1,2], "maxduration": 60, diff --git a/adapters/copper6ssp/copper6ssp.go b/adapters/copper6ssp/copper6ssp.go index 85f4674858..77154dd686 100644 --- a/adapters/copper6ssp/copper6ssp.go +++ b/adapters/copper6ssp/copper6ssp.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/copper6ssp/copper6ssp_test.go b/adapters/copper6ssp/copper6ssp_test.go index 9f98ce4ede..75ca8ee404 100644 --- a/adapters/copper6ssp/copper6ssp_test.go +++ b/adapters/copper6ssp/copper6ssp_test.go @@ -3,9 +3,9 @@ package copper6ssp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/copper6ssp/params_test.go b/adapters/copper6ssp/params_test.go index bd9d84ee3d..427cf63b26 100644 --- a/adapters/copper6ssp/params_test.go +++ b/adapters/copper6ssp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/cpmstar/cpmstar.go b/adapters/cpmstar/cpmstar.go index 67a94ac239..9aa3026c77 100644 --- a/adapters/cpmstar/cpmstar.go +++ b/adapters/cpmstar/cpmstar.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type Adapter struct { diff --git a/adapters/cpmstar/cpmstar_test.go b/adapters/cpmstar/cpmstar_test.go index e007583af1..478b898943 100644 --- a/adapters/cpmstar/cpmstar_test.go +++ b/adapters/cpmstar/cpmstar_test.go @@ -3,9 +3,9 @@ package cpmstar import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/cpmstar/params_test.go b/adapters/cpmstar/params_test.go index 0fbb0d2530..aea148c82f 100644 --- a/adapters/cpmstar/params_test.go +++ b/adapters/cpmstar/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/cpmstar.json diff --git a/adapters/criteo/criteo.go b/adapters/criteo/criteo.go index 6779a20f87..2bfa35ade0 100644 --- a/adapters/criteo/criteo.go +++ b/adapters/criteo/criteo.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/criteo/criteo_test.go b/adapters/criteo/criteo_test.go index f3fd11ba01..70392c6cd5 100644 --- a/adapters/criteo/criteo_test.go +++ b/adapters/criteo/criteo_test.go @@ -7,9 +7,9 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/criteo/params_test.go b/adapters/criteo/params_test.go index 98f5f77f38..240eeea43a 100644 --- a/adapters/criteo/params_test.go +++ b/adapters/criteo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/criteo.json diff --git a/adapters/cwire/cwire.go b/adapters/cwire/cwire.go index 99deac6b7c..2d297f78e9 100644 --- a/adapters/cwire/cwire.go +++ b/adapters/cwire/cwire.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) /* @@ -91,28 +91,12 @@ func (a *adapter) MakeBids(bidReq *openrtb2.BidRequest, unused *adapters.Request bidderResponse.Currency = resp.Cur for _, sb := range resp.SeatBid { for i := range sb.Bid { - bidType, err := getBidType(sb.Bid[i]) - if err != nil { - return nil, []error{err} - } bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ Bid: &sb.Bid[i], - BidType: bidType, + BidType: openrtb_ext.BidTypeBanner, }) } } return bidderResponse, nil } - -func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - // determinate media type by bid response field mtype - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - } - - return "", fmt.Errorf("could not define media type for C Wire impression: %s", bid.ImpID) -} diff --git a/adapters/cwire/cwire_test.go b/adapters/cwire/cwire_test.go index 2e21ef3c6e..726c3caf09 100644 --- a/adapters/cwire/cwire_test.go +++ b/adapters/cwire/cwire_test.go @@ -1,17 +1,11 @@ package cwire import ( - "math" - "net/http" "testing" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { @@ -33,30 +27,3 @@ func TestJsonSamples(t *testing.T) { adapterstest.RunJSONBidderTest(t, "cwiretest", bidder) } - -func TestMakeRequestsMarshalError(t *testing.T) { - bidder := &adapter{} - request := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{BidFloor: math.NaN()}}, - } - - requests, errs := bidder.MakeRequests(request, nil) - - assert.Nil(t, requests) - require.Len(t, errs, 1) - assert.EqualError(t, errs[0], "Error while encoding OpenRTB BidRequest: json: unsupported value: NaN") -} - -func TestMakeBidsUnknownMarkupType(t *testing.T) { - bidder := &adapter{} - httpResponse := &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{"seatbid":[{"bid":[{"impid":"imp-1","mtype":0}]}]}`), - } - - response, errs := bidder.MakeBids(nil, nil, httpResponse) - - assert.Nil(t, response) - require.Len(t, errs, 1) - assert.EqualError(t, errs[0], "could not define media type for C Wire impression: imp-1") -} diff --git a/adapters/cwire/cwiretest/exemplary/video.json b/adapters/cwire/cwiretest/exemplary/video.json deleted file mode 100644 index 980522c090..0000000000 --- a/adapters/cwire/cwiretest/exemplary/video.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "mockBidRequest": { - "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", - "cur": [ - "CHF" - ], - "imp": [ - { - "id": "103", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placementId": 15, - "domainId": 42 - } - } - } - ], - "site": { - "page": "http://www.foobar.com/1234.html" - }, - "device": { - "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" - }, - "user": { - "id": "55816b39711f9b5acf3b90e313ed29e51665623f", - "geo": { - "country": "ch", - "region": "basel-stadt", - "city": "basel" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://cwi.re/prebid/adapter-endpoint", - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", - "cur": [ - "CHF" - ], - "imp": [ - { - "id": "103", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placementId": 15, - "domainId": 42 - } - } - } - ], - "site": { - "page": "http://www.foobar.com/1234.html" - }, - "device": { - "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" - }, - "user": { - "id": "55816b39711f9b5acf3b90e313ed29e51665623f", - "geo": { - "country": "ch", - "region": "basel-stadt", - "city": "basel" - } - } - }, - "impIDs": [ - "103" - ] - }, - "mockResponse": { - "status": 200, - "headers": {}, - "body": { - "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", - "cur": "CHF", - "seatbid": [ - { - "seat": "cwire", - "group": 0, - "bid": [ - { - "id": "334", - "impid": "103", - "price": 8.00, - "crid": "9999", - "adm": "", - "w": 640, - "h": 480, - "nurl": "https://embed.cwi.re/delivery/prebid-server/win/334", - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "CHF", - "bids": [ - { - "bid": { - "id": "334", - "impid": "103", - "price": 8.00, - "crid": "9999", - "adm": "", - "w": 640, - "h": 480, - "nurl": "https://embed.cwi.re/delivery/prebid-server/win/334", - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/cwire/params_test.go b/adapters/cwire/params_test.go index b1577f86be..534a9c0923 100644 --- a/adapters/cwire/params_test.go +++ b/adapters/cwire/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/cwire.json diff --git a/adapters/datablocks/datablocks.go b/adapters/datablocks/datablocks.go index 7d911d98c0..a0e318524d 100644 --- a/adapters/datablocks/datablocks.go +++ b/adapters/datablocks/datablocks.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type DatablocksAdapter struct { diff --git a/adapters/datablocks/datablocks_test.go b/adapters/datablocks/datablocks_test.go index 762bf6cc0f..f44204c7c5 100644 --- a/adapters/datablocks/datablocks_test.go +++ b/adapters/datablocks/datablocks_test.go @@ -3,9 +3,9 @@ package datablocks import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/decenterads/decenterads.go b/adapters/decenterads/decenterads.go index 26dd5634fb..7981f60c97 100644 --- a/adapters/decenterads/decenterads.go +++ b/adapters/decenterads/decenterads.go @@ -8,11 +8,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/decenterads/decenterads_test.go b/adapters/decenterads/decenterads_test.go index 97d72fba62..ba3cefa989 100644 --- a/adapters/decenterads/decenterads_test.go +++ b/adapters/decenterads/decenterads_test.go @@ -3,9 +3,9 @@ package decenterads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/decenterads/params_test.go b/adapters/decenterads/params_test.go index 5e08265528..7672892ed0 100644 --- a/adapters/decenterads/params_test.go +++ b/adapters/decenterads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the decenterads schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/deepintent/deepintent.go b/adapters/deepintent/deepintent.go index cb83e1ead7..a1867cdadc 100644 --- a/adapters/deepintent/deepintent.go +++ b/adapters/deepintent/deepintent.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const displayManager string = "di_prebid" diff --git a/adapters/deepintent/deepintent_test.go b/adapters/deepintent/deepintent_test.go index 4f8c2219b1..6b2d216db3 100644 --- a/adapters/deepintent/deepintent_test.go +++ b/adapters/deepintent/deepintent_test.go @@ -3,10 +3,10 @@ package deepintent import ( "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/deepintent/params_test.go b/adapters/deepintent/params_test.go index e1f8cc1f8e..b45eaa67a8 100644 --- a/adapters/deepintent/params_test.go +++ b/adapters/deepintent/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the deepintent schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/definemedia/definemedia.go b/adapters/definemedia/definemedia.go index fcfef769e0..7f775b88c3 100644 --- a/adapters/definemedia/definemedia.go +++ b/adapters/definemedia/definemedia.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/definemedia/definemedia_test.go b/adapters/definemedia/definemedia_test.go index 377c491041..9d5b39b5b7 100644 --- a/adapters/definemedia/definemedia_test.go +++ b/adapters/definemedia/definemedia_test.go @@ -3,9 +3,9 @@ package definemedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/definemedia/params_test.go b/adapters/definemedia/params_test.go index 9af4ba1b20..bd3912719b 100644 --- a/adapters/definemedia/params_test.go +++ b/adapters/definemedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/dianomi/dianomi.go b/adapters/dianomi/dianomi.go index 315a030a07..5f16547de1 100644 --- a/adapters/dianomi/dianomi.go +++ b/adapters/dianomi/dianomi.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/dianomi/dianomi_test.go b/adapters/dianomi/dianomi_test.go index da4a0d6644..23a42fa69c 100644 --- a/adapters/dianomi/dianomi_test.go +++ b/adapters/dianomi/dianomi_test.go @@ -3,9 +3,9 @@ package dianomi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/dianomi/params_test.go b/adapters/dianomi/params_test.go index dd9aeb1449..294bfa977f 100644 --- a/adapters/dianomi/params_test.go +++ b/adapters/dianomi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/dianomi.json diff --git a/adapters/displayio/displayio.go b/adapters/displayio/displayio.go index 4868777bd5..5e63fe2b5a 100644 --- a/adapters/displayio/displayio.go +++ b/adapters/displayio/displayio.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -130,7 +130,7 @@ func (adapter *adapter) MakeBids(bidReq *openrtb2.BidRequest, _ *adapters.Reques var bidResp openrtb2.BidResponse if err := jsonutil.Unmarshal(responseData.Body, &bidResp); err != nil { - msg := fmt.Sprintf("Bad server response: %v", err) + msg := fmt.Sprintf("Bad server response: %d", err) return nil, []error{&errortypes.BadServerResponse{Message: msg}} } @@ -194,14 +194,8 @@ func getBidMediaTypeFromMtype(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { return openrtb_ext.BidTypeBanner, nil case openrtb2.MarkupVideo: return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported MType %d", bid.MType), - } + return "", fmt.Errorf("unexpected media type for bid: %s", bid.ImpID) } } diff --git a/adapters/displayio/displayio_test.go b/adapters/displayio/displayio_test.go index f7f32c8a8a..b591abeb42 100644 --- a/adapters/displayio/displayio_test.go +++ b/adapters/displayio/displayio_test.go @@ -3,9 +3,9 @@ package displayio import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/displayio/displayiotest/exemplary/simple-audio.json b/adapters/displayio/displayiotest/exemplary/simple-audio.json deleted file mode 100644 index e531760064..0000000000 --- a/adapters/displayio/displayiotest/exemplary/simple-audio.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "mockBidRequest": { - "app": { - "id": "1011" - }, - "id": "requestId10111011101110111011", - "imp": [ - { - "audio": { - "mimes": [ - "audio/mpeg" - ] - }, - "bidfloor": 0.5, - "bidfloorcur": "USD", - "id": "impId10111011101110111011", - "ext": { - "bidder": { - "placementId": "1011", - "publisherId": "101", - "inventoryId": "1011" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://adapter.endpoint/?macro=101", - "body": { - "app": { - "id": "1011" - }, - "id": "requestId10111011101110111011", - "imp": [ - { - "audio": { - "mimes": [ - "audio/mpeg" - ] - }, - "bidfloor": 0.5, - "bidfloorcur": "USD", - "id": "impId10111011101110111011", - "ext": { - "bidder": { - "placementId": "1011", - "publisherId": "101", - "inventoryId": "1011" - } - } - } - ], - "ext": { - "displayio": { - "placementId": "1011", - "inventoryId": "1011" - } - } - }, - "impIDs": [ - "impId10111011101110111011" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "requestId10111011101110111011", - "seatbid": [ - { - "bid": [ - { - "id": "12345", - "impid": "impId10111011101110111011", - "price": 2, - "adm": "", - "adid": "12235", - "adomain": [ - "domain.test" - ], - "mtype": 3 - } - ], - "seat": "displayio123", - "group": 1 - } - ], - "bidid": "test123", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "12345", - "impid": "impId10111011101110111011", - "price": 2, - "adm": "", - "adid": "12235", - "adomain": [ - "domain.test" - ], - "mtype": 3 - }, - "type": "audio" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/displayio/displayiotest/exemplary/simple-native.json b/adapters/displayio/displayiotest/exemplary/simple-native.json deleted file mode 100644 index 47a13e57e5..0000000000 --- a/adapters/displayio/displayiotest/exemplary/simple-native.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "mockBidRequest": { - "app": { - "id": "1011" - }, - "id": "requestId10111011101110111011", - "imp": [ - { - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":0,\"data\":{\"type\":2,\"len\":100}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"w\":480,\"h\":320}}]}", - "ver": "1.1" - }, - "bidfloor": 0.5, - "bidfloorcur": "USD", - "id": "impId10111011101110111011", - "ext": { - "bidder": { - "placementId": "1011", - "publisherId": "101", - "inventoryId": "1011" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://adapter.endpoint/?macro=101", - "body": { - "app": { - "id": "1011" - }, - "id": "requestId10111011101110111011", - "imp": [ - { - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":0,\"data\":{\"type\":2,\"len\":100}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"w\":480,\"h\":320}}]}", - "ver": "1.1" - }, - "bidfloor": 0.5, - "bidfloorcur": "USD", - "id": "impId10111011101110111011", - "ext": { - "bidder": { - "placementId": "1011", - "publisherId": "101", - "inventoryId": "1011" - } - } - } - ], - "ext": { - "displayio": { - "placementId": "1011", - "inventoryId": "1011" - } - } - }, - "impIDs": [ - "impId10111011101110111011" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "requestId10111011101110111011", - "seatbid": [ - { - "bid": [ - { - "id": "12345", - "impid": "impId10111011101110111011", - "price": 2, - "adm": "{}", - "adid": "12235", - "adomain": [ - "domain.test" - ], - "mtype": 4 - } - ], - "seat": "displayio123", - "group": 1 - } - ], - "bidid": "test123", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "12345", - "impid": "impId10111011101110111011", - "price": 2, - "adm": "{}", - "adid": "12235", - "adomain": [ - "domain.test" - ], - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/displayio/displayiotest/supplemental/unexpected-media-type.json b/adapters/displayio/displayiotest/supplemental/unexpected-media-type.json index 6b14653264..be66747a4c 100644 --- a/adapters/displayio/displayiotest/supplemental/unexpected-media-type.json +++ b/adapters/displayio/displayiotest/supplemental/unexpected-media-type.json @@ -98,7 +98,7 @@ ], "expectedMakeBidsErrors": [ { - "value": "unsupported MType .*", + "value": "unexpected media type for bid: .*", "comparison": "regex" } ] diff --git a/adapters/displayio/params_test.go b/adapters/displayio/params_test.go index e11f1fadbc..2e44954072 100644 --- a/adapters/displayio/params_test.go +++ b/adapters/displayio/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/dmx/dmx.go b/adapters/dmx/dmx.go index e2389146d0..458b497826 100644 --- a/adapters/dmx/dmx.go +++ b/adapters/dmx/dmx.go @@ -10,11 +10,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type DmxAdapter struct { diff --git a/adapters/dmx/dmx_test.go b/adapters/dmx/dmx_test.go index 9e37d0e345..cc46d28f31 100644 --- a/adapters/dmx/dmx_test.go +++ b/adapters/dmx/dmx_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" ) func TestFetchParams(t *testing.T) { diff --git a/adapters/dmx/params_test.go b/adapters/dmx/params_test.go index 6e2e2ba071..49d89b330f 100644 --- a/adapters/dmx/params_test.go +++ b/adapters/dmx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/driftpixel/driftpixel.go b/adapters/driftpixel/driftpixel.go index e62303ed8a..65532a786c 100644 --- a/adapters/driftpixel/driftpixel.go +++ b/adapters/driftpixel/driftpixel.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/driftpixel/driftpixel_test.go b/adapters/driftpixel/driftpixel_test.go index 11d5d604f9..24bf8b1506 100644 --- a/adapters/driftpixel/driftpixel_test.go +++ b/adapters/driftpixel/driftpixel_test.go @@ -3,9 +3,9 @@ package driftpixel import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/driftpixel/params_test.go b/adapters/driftpixel/params_test.go index 225d949162..e8153f054c 100644 --- a/adapters/driftpixel/params_test.go +++ b/adapters/driftpixel/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/dxkulture/dxkulture.go b/adapters/dxkulture/dxkulture.go new file mode 100644 index 0000000000..6b4bfa4003 --- /dev/null +++ b/adapters/dxkulture/dxkulture.go @@ -0,0 +1,172 @@ +package dxkulture + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + + "github.com/prebid/openrtb/v20/openrtb2" +) + +var markupTypeToBidType = map[openrtb2.MarkupType]openrtb_ext.BidType{ + openrtb2.MarkupBanner: openrtb_ext.BidTypeBanner, + openrtb2.MarkupVideo: openrtb_ext.BidTypeVideo, +} + +type adapter struct { + endpoint string +} + +// Builder builds a new instance of the DXKulture adapter for the given bidder with the given config. +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + impressions := request.Imp + + adapterRequests := make([]*adapters.RequestData, 0, len(impressions)) + var errs []error + + for _, impression := range impressions { + impExt, err := parseExt(&impression) + if err != nil { + errs = append(errs, err) + continue + } + + request.Imp = []openrtb2.Imp{impression} + body, err := json.Marshal(request) + if err != nil { + errs = append(errs, err) + continue + } + + if request.Test == 1 { + impExt.PublisherId = "test" + } + + params := url.Values{} + params.Add("publisher_id", impExt.PublisherId) + params.Add("placement_id", impExt.PlacementId) + + adapterRequests = append(adapterRequests, &adapters.RequestData{ + Method: http.MethodPost, + Uri: a.endpoint + "?" + params.Encode(), + Body: body, + Headers: getHeaders(request), + ImpIDs: openrtb_ext.GetImpIDs(request.Imp), + }) + } + + request.Imp = impressions + return adapterRequests, errs +} + +func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(response) { + return nil, nil + } + if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil { + return nil, []error{err} + } + + var ortbResponse openrtb2.BidResponse + err := jsonutil.Unmarshal(response.Body, &ortbResponse) + if err != nil { + return nil, []error{&errortypes.BadServerResponse{ + Message: "Bad Server Response", + }} + } + + var bidErrors []error + + bidderResponse := adapters.NewBidderResponseWithBidsCapacity(1) + for _, seatBid := range ortbResponse.SeatBid { + for i := range seatBid.Bid { + bid := seatBid.Bid[i] + bidType, err := getBidType(&bid) + if err != nil { + bidErrors = append(bidErrors, err) + continue + } + + bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ + Bid: &bid, + BidType: bidType, + }) + } + } + + return bidderResponse, bidErrors +} + +func getBidType(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { + if bidType, ok := markupTypeToBidType[bid.MType]; ok { + return bidType, nil + } + return "", &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Unsupported MType %d", bid.MType), + } +} + +func parseExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpDXKulture, error) { + var bidderExt adapters.ExtImpBidder + + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { + return nil, &errortypes.BadInput{ + Message: fmt.Sprintf("Ignoring imp id=%s, error while decoding extImpBidder, err: %s", imp.ID, err), + } + } + + impExt := openrtb_ext.ExtImpDXKulture{} + err := jsonutil.Unmarshal(bidderExt.Bidder, &impExt) + if err != nil { + return nil, &errortypes.BadInput{ + Message: fmt.Sprintf("Ignoring imp id=%s, error while decoding impExt, err: %s", imp.ID, err), + } + } + + return &impExt, nil +} + +func getHeaders(request *openrtb2.BidRequest) http.Header { + headers := http.Header{} + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + headers.Add("X-Openrtb-Version", "2.5") + + if request.Site != nil { + if request.Site.Ref != "" { + headers.Set("Referer", request.Site.Ref) + } + if request.Site.Domain != "" { + headers.Add("Origin", request.Site.Domain) + } + } + + if request.Device != nil { + if len(request.Device.UA) > 0 { + headers.Add("User-Agent", request.Device.UA) + } + + if len(request.Device.IPv6) > 0 { + headers.Add("X-Forwarded-For", request.Device.IPv6) + } + + if len(request.Device.IP) > 0 { + headers.Add("X-Forwarded-For", request.Device.IP) + } + } + return headers +} diff --git a/adapters/dxkulture/dxkulture_test.go b/adapters/dxkulture/dxkulture_test.go new file mode 100644 index 0000000000..2ee176968b --- /dev/null +++ b/adapters/dxkulture/dxkulture_test.go @@ -0,0 +1,17 @@ +package dxkulture + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/config" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder("dxkulture", config.Adapter{Endpoint: "https://ads.dxkulture.com/pbs"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + adapterstest.RunJSONBidderTest(t, "dxkulturetest", bidder) +} diff --git a/adapters/dxkulture/dxkulturetest/exemplary/banner.json b/adapters/dxkulture/dxkulturetest/exemplary/banner.json new file mode 100644 index 0000000000..6ae690bece --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/exemplary/banner.json @@ -0,0 +1,145 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 1 + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/exemplary/empty-site-domain-ref.json b/adapters/dxkulture/dxkulturetest/exemplary/empty-site-domain-ref.json new file mode 100644 index 0000000000..8c2408b291 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/exemplary/empty-site-domain-ref.json @@ -0,0 +1,143 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "page": "http://site.com/page" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "page": "http://site.com/page" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/exemplary/ipv6.json b/adapters/dxkulture/dxkulturetest/exemplary/ipv6.json new file mode 100644 index 0000000000..ca23591b92 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/exemplary/ipv6.json @@ -0,0 +1,143 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ipv6": "2001:0000:130F:0000:0000:09C0:876A:130B" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "page": "http://site.com/page" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "2001:0000:130F:0000:0000:09C0:876A:130B" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ipv6": "2001:0000:130F:0000:0000:09C0:876A:130B" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "page": "http://site.com/page" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/exemplary/video-test-request.json b/adapters/dxkulture/dxkulturetest/exemplary/video-test-request.json new file mode 100644 index 0000000000..2b3599f942 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/exemplary/video-test-request.json @@ -0,0 +1,155 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "test": 1, + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=test", + "body": { + "id": "test-request-id", + "test": 1, + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/exemplary/video.json b/adapters/dxkulture/dxkulturetest/exemplary/video.json new file mode 100644 index 0000000000..b96fb107e3 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/exemplary/video.json @@ -0,0 +1,153 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "", + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext-bidder.json b/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext-bidder.json new file mode 100644 index 0000000000..c60c608057 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext-bidder.json @@ -0,0 +1,40 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": "not_json" + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "expectedMakeRequestsErrors": [ + { + "value": "Ignoring imp id=test-imp-id, error while decoding impExt, err: expect { or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext.json b/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext.json new file mode 100644 index 0000000000..379acd586c --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/supplemental/invalid-imp-ext.json @@ -0,0 +1,38 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": "not_json" + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "expectedMakeRequestsErrors": [ + { + "value": "Ignoring imp id=test-imp-id, error while decoding extImpBidder, err: expect { or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/supplemental/invalid-response.json b/adapters/dxkulture/dxkulturetest/supplemental/invalid-response.json new file mode 100644 index 0000000000..40d18e6343 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/supplemental/invalid-response.json @@ -0,0 +1,114 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": "body" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Bad Server Response", + "comparison": "literal" + } + ] +} diff --git a/adapters/dxkulture/dxkulturetest/supplemental/no-mtype.json b/adapters/dxkulture/dxkulturetest/supplemental/no-mtype.json new file mode 100644 index 0000000000..fe0f8a1202 --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/supplemental/no-mtype.json @@ -0,0 +1,143 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "cur": "USD", + "seatbid": [ + { + "bid": [ + { + "id": "43271b2d-41c0-4093-8ba1-2105d9658e80", + "crid": "16329", + "adomain": [ + "adomain.com" + ], + "price": 3, + "impid": "test-imp-id", + "adid": "2422", + "adm": "" + } + ], + "seat": "dxkulture" + } + ], + "bidid": "test-request-id", + "id": "test-request-id" + } + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unsupported MType 0", + "comparison": "literal" + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [] + } + ] + +} diff --git a/adapters/trustx/trustxtest/supplemental/bad-status-400.json b/adapters/dxkulture/dxkulturetest/supplemental/status-code-bad-request.json similarity index 53% rename from adapters/trustx/trustxtest/supplemental/bad-status-400.json rename to adapters/dxkulture/dxkulturetest/supplemental/status-code-bad-request.json index 0786d48891..f152bb9ecf 100644 --- a/adapters/trustx/trustxtest/supplemental/bad-status-400.json +++ b/adapters/dxkulture/dxkulturetest/supplemental/status-code-bad-request.json @@ -1,88 +1,103 @@ { "mockBidRequest": { - "id": "test-request", + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, "imp": [ { - "id": "test-imp", + "id": "test-imp-id", "video": { "w": 1920, "h": 1080, "mimes": [ + "video/x-flv", "video/mp4" ] }, "ext": { "bidder": { - "uid": 1234 + "publisherId": "pub123", + "placementId": "placement123" } } } ], "site": { - "domain": "test-domain.com", - "page": "http://test-domain.org/index" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" } }, "httpCalls": [ { "expectedRequest": { - "method": "POST", + "method": "GET", "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], "Accept": [ "application/json" ], "Content-Type": [ "application/json;charset=utf-8" ], - "Origin": [ - "test-domain.com" - ], - "X-Openrtb-Version": [ - "2.6" - ], "User-Agent": [ - "ua" + "user-agent" ], "X-Forwarded-For": [ - "123.123.123.123" + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" ] }, - "uri": "https://test.localhost.com", + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", "body": { - "id": "test-request", + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, "imp": [ { - "id": "test-imp", + "id": "test-imp-id", "video": { "w": 1920, "h": 1080, "mimes": [ + "video/x-flv", "video/mp4" ] }, "ext": { "bidder": { - "uid": 1234 + "publisherId": "pub123", + "placementId": "placement123" } } } ], "site": { - "domain": "test-domain.com", - "page": "http://test-domain.org/index" - }, - "device": { - "ua": "ua", - "ip": "123.123.123.123" + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" } }, - "impIDs": [ - "test-imp" - ] + "impIDs":["test-imp-id"] }, "mockResponse": { "status": 400 diff --git a/adapters/dxkulture/dxkulturetest/supplemental/status-code-no-content.json b/adapters/dxkulture/dxkulturetest/supplemental/status-code-no-content.json new file mode 100644 index 0000000000..75bae07d4f --- /dev/null +++ b/adapters/dxkulture/dxkulturetest/supplemental/status-code-no-content.json @@ -0,0 +1,109 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "GET", + "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json;charset=utf-8" + ], + "User-Agent": [ + "user-agent" + ], + "X-Forwarded-For": [ + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" + ] + }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", + "body": { + "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 1920, + "h": 1080, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "publisherId": "pub123", + "placementId": "placement123" + } + } + } + ], + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} diff --git a/adapters/trustx/trustxtest/supplemental/bad-status-500.json b/adapters/dxkulture/dxkulturetest/supplemental/status-code-other-error.json similarity index 50% rename from adapters/trustx/trustxtest/supplemental/bad-status-500.json rename to adapters/dxkulture/dxkulturetest/supplemental/status-code-other-error.json index 53e49da220..a568c3910b 100644 --- a/adapters/trustx/trustxtest/supplemental/bad-status-500.json +++ b/adapters/dxkulture/dxkulturetest/supplemental/status-code-other-error.json @@ -1,94 +1,113 @@ { "mockBidRequest": { "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, "imp": [ { "id": "test-imp-id", "video": { + "w": 1920, + "h": 1080, "mimes": [ + "video/x-flv", "video/mp4" - ], - "w": 1920, - "h": 1080 + ] }, "ext": { "bidder": { - "uid": 1234 + "publisherId": "pub123", + "placementId": "placement123" } } } ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" } }, "httpCalls": [ { "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", + "method": "GET", "headers": { + "Referer": [ + "http://site.com/ref" + ], + "Origin": [ + "site.com" + ], "Accept": [ "application/json" ], "Content-Type": [ "application/json;charset=utf-8" ], - "X-Openrtb-Version": [ - "2.6" - ], "User-Agent": [ - "ua" + "user-agent" ], "X-Forwarded-For": [ - "123.123.123.123" + "1.2.3.4" + ], + "X-Openrtb-Version": [ + "2.5" ] }, + "uri": "https://ads.dxkulture.com/pbs?placement_id=placement123&publisher_id=pub123", "body": { "id": "test-request-id", + "user": { + "buyeruid": "userId", + "yob": 1990 + }, + "device": { + "ua": "user-agent", + "ip": "1.2.3.4" + }, "imp": [ { "id": "test-imp-id", "video": { + "w": 1920, + "h": 1080, "mimes": [ + "video/x-flv", "video/mp4" - ], - "w": 1920, - "h": 1080 + ] }, "ext": { "bidder": { - "uid": 1234 + "publisherId": "pub123", + "placementId": "placement123" } } } ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" + "site": { + "domain": "site.com", + "page": "http://site.com/page", + "ref": "http://site.com/ref" } }, - "impIDs": [ - "test-imp-id" - ] + "impIDs":["test-imp-id"] }, "mockResponse": { - "status": 500 + "status": 505 } } ], "expectedMakeBidsErrors": [ { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", + "value": "Unexpected status code: 505. Run with request.debug = 1 for more info", "comparison": "literal" } ] } - diff --git a/adapters/dxkulture/params_test.go b/adapters/dxkulture/params_test.go new file mode 100644 index 0000000000..c7997f1862 --- /dev/null +++ b/adapters/dxkulture/params_test.go @@ -0,0 +1,53 @@ +package dxkulture + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +// This file actually intends to test static/bidder-params/dxkulture.json +// +// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.dxkulture + +// TestValidParams makes sure that the dxkulture schema accepts all imp.ext fields which we intend to support. +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderDXKulture, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected dxkulture params: %s", validParam) + } + } +} + +// TestInvalidParams makes sure that the dxkulture schema rejects all the imp.ext fields we don't support. +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderDXKulture, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} + +var validParams = []string{ + `{"publisherId": "pub", "placementId": "plac"}`, + `{"publisherId": "pub", "placementId": "plac", "a":1}`, +} + +var invalidParams = []string{ + `{"publisherId": "pub"}`, + `{"placementId": "plac"}`, + //malformed + `{"ub", "placementId": "plac"}`, + `{}`, +} diff --git a/adapters/e_volution/evolution.go b/adapters/e_volution/evolution.go index 3db5173ca6..1b781c7405 100644 --- a/adapters/e_volution/evolution.go +++ b/adapters/e_volution/evolution.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/e_volution/evolution_test.go b/adapters/e_volution/evolution_test.go index 3a16856945..6a3dbe671e 100644 --- a/adapters/e_volution/evolution_test.go +++ b/adapters/e_volution/evolution_test.go @@ -3,9 +3,9 @@ package evolution import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/e_volution/params_test.go b/adapters/e_volution/params_test.go index ace2e32927..98558f88ab 100644 --- a/adapters/e_volution/params_test.go +++ b/adapters/e_volution/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/edge226/edge226.go b/adapters/edge226/edge226.go index 69f2b34646..19804c8843 100644 --- a/adapters/edge226/edge226.go +++ b/adapters/edge226/edge226.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/edge226/edge226_test.go b/adapters/edge226/edge226_test.go index 97927ef4c0..cd3d9385ab 100644 --- a/adapters/edge226/edge226_test.go +++ b/adapters/edge226/edge226_test.go @@ -3,9 +3,9 @@ package edge226 import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/edge226/params_test.go b/adapters/edge226/params_test.go index 9b5c210522..5161c349d7 100644 --- a/adapters/edge226/params_test.go +++ b/adapters/edge226/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/elementaltv/elementaltv_test.go b/adapters/elementaltv/elementaltv_test.go deleted file mode 100644 index c54c8c1570..0000000000 --- a/adapters/elementaltv/elementaltv_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package elementaltv - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderElementalTV, config.Adapter{ - Endpoint: "https://pbs.elementaltv.io/processHeaderBid/{{.AdUnit}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - require.NoError(t, buildErr, "Builder returned unexpected error") - - adapterstest.RunJSONBidderTest(t, "elementaltvtest", bidder) -} diff --git a/adapters/elementaltv/params_test.go b/adapters/elementaltv/params_test.go deleted file mode 100644 index 0c49095ca1..0000000000 --- a/adapters/elementaltv/params_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package elementaltv - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoErrorf(t, err, "Failed to fetch the json schema: %v", err) - for _, p := range validParams { - err := validator.Validate(openrtb_ext.BidderElementalTV, json.RawMessage(p)) - require.NoError(t, err, "Schema rejected valid params: %s", p) - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoErrorf(t, err, "Failed to fetch the json schema: %v", err) - - for _, p := range invalidParams { - err := validator.Validate(openrtb_ext.BidderElementalTV, json.RawMessage(p)) - require.Error(t, err, "Schema allowed invalid params: %s", p) - } -} - -var validParams = []string{ - `{"adunit":"123"}`, - `{"adunit":"SSP:123"}`, - `{"adunit":"5346"}`} - -var invalidParams = []string{ - `{}`, - `{"adunitt":"123"}`, -} diff --git a/adapters/emtv/emtv.go b/adapters/emtv/emtv.go index 678c4bddca..c8814f8065 100644 --- a/adapters/emtv/emtv.go +++ b/adapters/emtv/emtv.go @@ -7,11 +7,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/emtv/emtv_test.go b/adapters/emtv/emtv_test.go index d2c36b2ae8..0dd4196af4 100644 --- a/adapters/emtv/emtv_test.go +++ b/adapters/emtv/emtv_test.go @@ -3,9 +3,9 @@ package emtv import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/emtv/params_test.go b/adapters/emtv/params_test.go index 13631f3bb1..cdea31b075 100644 --- a/adapters/emtv/params_test.go +++ b/adapters/emtv/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/eplanning/eplanning.go b/adapters/eplanning/eplanning.go index c7ba971586..fe05fee008 100644 --- a/adapters/eplanning/eplanning.go +++ b/adapters/eplanning/eplanning.go @@ -12,11 +12,11 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "strconv" ) diff --git a/adapters/eplanning/eplanning_test.go b/adapters/eplanning/eplanning_test.go index 3457b0023c..1d220184c6 100644 --- a/adapters/eplanning/eplanning_test.go +++ b/adapters/eplanning/eplanning_test.go @@ -3,10 +3,10 @@ package eplanning import ( "testing" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/epom/epom.go b/adapters/epom/epom.go index 077cd2ba93..82e44b409e 100644 --- a/adapters/epom/epom.go +++ b/adapters/epom/epom.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/epom/epom_test.go b/adapters/epom/epom_test.go index 78f8ba428e..f90f2189d5 100644 --- a/adapters/epom/epom_test.go +++ b/adapters/epom/epom_test.go @@ -3,9 +3,9 @@ package epom import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/escalax/escalax.go b/adapters/escalax/escalax.go index d11eea8f27..867524a922 100644 --- a/adapters/escalax/escalax.go +++ b/adapters/escalax/escalax.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/escalax/escalax_test.go b/adapters/escalax/escalax_test.go index 8d7ffcd0ee..c4424bb10a 100644 --- a/adapters/escalax/escalax_test.go +++ b/adapters/escalax/escalax_test.go @@ -3,9 +3,9 @@ package escalax import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/escalax/params_test.go b/adapters/escalax/params_test.go index 93e605612e..6e6036721a 100644 --- a/adapters/escalax/params_test.go +++ b/adapters/escalax/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/eskimi/eskimi.go b/adapters/eskimi/eskimi.go deleted file mode 100644 index 0f6b3e7fd0..0000000000 --- a/adapters/eskimi/eskimi.go +++ /dev/null @@ -1,259 +0,0 @@ -package eskimi - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -// Builder builds a new instance of the Eskimi adapter for the given bidder with the given config. -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - return &adapter{endpoint: config.Endpoint}, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - if len(request.Imp) == 0 { - return nil, []error{&errortypes.BadInput{Message: "no impressions in the bid request"}} - } - - outgoing := *request - outgoing.Imp = append([]openrtb2.Imp(nil), request.Imp...) - - first, err := parseImpExt(outgoing.Imp[0]) - if err != nil { - return nil, []error{err} - } - - if err := setPlacementID(&outgoing, first.PlacementID); err != nil { - return nil, []error{err} - } - - applyRequestParams(&outgoing, first) - - // Imps whose ext fails to parse are dropped so malformed data is never - // forwarded upstream; the parse error is still reported to the caller. - imps := make([]openrtb2.Imp, 0, len(outgoing.Imp)) - impExts := make([]*openrtb_ext.ExtImpEskimi, 0, len(outgoing.Imp)) - imps = append(imps, outgoing.Imp[0]) - impExts = append(impExts, &first) - var errs []error - for i := 1; i < len(outgoing.Imp); i++ { - ext, perr := parseImpExt(outgoing.Imp[i]) - if perr != nil { - errs = append(errs, perr) - continue - } - imps = append(imps, outgoing.Imp[i]) - impExts = append(impExts, &ext) - } - outgoing.Imp = imps - - applyImpParams(&outgoing, impExts) - - body, err := jsonutil.Marshal(&outgoing) - if err != nil { - return nil, append(errs, err) - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - return []*adapters.RequestData{{ - Method: "POST", - Uri: a.endpoint, - Body: body, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(outgoing.Imp), - }}, errs -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - var errs []error - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - if response.Cur != "" { - bidResponse.Currency = response.Cur - } - for _, seatBid := range response.SeatBid { - for i := range seatBid.Bid { - bidType, typeErr := getMediaTypeForBid(request.Imp, seatBid.Bid[i]) - if typeErr != nil { - errs = append(errs, typeErr) - continue - } - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - }) - } - } - return bidResponse, errs -} - -func parseImpExt(imp openrtb2.Imp) (openrtb_ext.ExtImpEskimi, error) { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return openrtb_ext.ExtImpEskimi{}, &errortypes.BadInput{Message: fmt.Sprintf("invalid imp.ext for imp %s: %s", imp.ID, err)} - } - var eskimiExt openrtb_ext.ExtImpEskimi - if err := jsonutil.Unmarshal(bidderExt.Bidder, &eskimiExt); err != nil { - return openrtb_ext.ExtImpEskimi{}, &errortypes.BadInput{Message: fmt.Sprintf("invalid imp.ext.bidder for imp %s: %s", imp.ID, err)} - } - return eskimiExt, nil -} - -// setPlacementID writes the placement ID to site.ext.placementId or app.ext.placementId, -// preserving any other existing keys in the ext object. -func setPlacementID(request *openrtb2.BidRequest, placementID int64) error { - patch := func(ext json.RawMessage) (json.RawMessage, error) { - fields := map[string]json.RawMessage{} - if len(ext) > 0 { - if err := jsonutil.Unmarshal(ext, &fields); err != nil { - return nil, err - } - } - id, err := jsonutil.Marshal(placementID) - if err != nil { - return nil, err - } - fields["placementId"] = id - return jsonutil.Marshal(fields) - } - - switch { - case request.Site != nil: - site := *request.Site - ext, err := patch(site.Ext) - if err != nil { - return &errortypes.BadInput{Message: fmt.Sprintf("failed to set placementId on site.ext: %s", err)} - } - site.Ext = ext - request.Site = &site - case request.App != nil: - app := *request.App - ext, err := patch(app.Ext) - if err != nil { - return &errortypes.BadInput{Message: fmt.Sprintf("failed to set placementId on app.ext: %s", err)} - } - app.Ext = ext - request.App = &app - default: - return &errortypes.BadInput{Message: "request must contain either site or app"} - } - return nil -} - -// applyRequestParams promotes request-level blocklists from the first imp's bidder ext -// when the request doesn't already set them. Existing publisher/wrapper values win. -func applyRequestParams(request *openrtb2.BidRequest, ext openrtb_ext.ExtImpEskimi) { - if len(request.BCat) == 0 && len(ext.Bcat) > 0 { - request.BCat = ext.Bcat - } - if len(request.BAdv) == 0 && len(ext.Badv) > 0 { - request.BAdv = ext.Badv - } - if len(request.BApp) == 0 && len(ext.Bapp) > 0 { - request.BApp = ext.Bapp - } -} - -// applyImpParams applies per-imp params from the bidder ext: defaults imp.secure to 1, -// fills bid floor when unset, and fans out battr to both banner.battr and video.battr. -func applyImpParams(request *openrtb2.BidRequest, exts []*openrtb_ext.ExtImpEskimi) { - for i := range request.Imp { - if request.Imp[i].Secure == nil { - s := int8(1) - request.Imp[i].Secure = &s - } - ext := exts[i] - if ext == nil { - continue - } - if request.Imp[i].BidFloor == 0 && ext.BidFloor > 0 { - request.Imp[i].BidFloor = ext.BidFloor - if ext.BidFloorCur != "" { - request.Imp[i].BidFloorCur = ext.BidFloorCur - } - } - if len(ext.Battr) > 0 { - attrs := make([]adcom1.CreativeAttribute, len(ext.Battr)) - for j, v := range ext.Battr { - attrs[j] = adcom1.CreativeAttribute(v) - } - if request.Imp[i].Banner != nil && len(request.Imp[i].Banner.BAttr) == 0 { - banner := *request.Imp[i].Banner - banner.BAttr = attrs - request.Imp[i].Banner = &banner - } - if request.Imp[i].Video != nil && len(request.Imp[i].Video.BAttr) == 0 { - video := *request.Imp[i].Video - video.BAttr = attrs - request.Imp[i].Video = &video - } - } - } -} - -// getMediaTypeForBid resolves the bid's media type. When bid.mtype is set it is treated -// as authoritative; an unsupported value returns an error rather than falling back to -// imp inference. When bid.mtype is unset, the imp's media type is used; multi-format -// imps without mtype cannot be disambiguated and return an error. -func getMediaTypeForBid(imps []openrtb2.Imp, bid openrtb2.Bid) (openrtb_ext.BidType, error) { - if bid.MType != 0 { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported bid.mtype %d for impression %s (banner and video only)", bid.MType, bid.ImpID), - } - } - } - for _, imp := range imps { - if imp.ID != bid.ImpID { - continue - } - switch { - case imp.Banner != nil && imp.Video == nil: - return openrtb_ext.BidTypeBanner, nil - case imp.Video != nil && imp.Banner == nil: - return openrtb_ext.BidTypeVideo, nil - case imp.Banner != nil && imp.Video != nil: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("bid for multi-format imp %s requires bid.mtype to disambiguate", bid.ImpID), - } - } - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported media type for impression %s (banner and video only)", bid.ImpID), - } - } - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unable to resolve media type for impression %s", bid.ImpID), - } -} diff --git a/adapters/eskimi/eskimi_test.go b/adapters/eskimi/eskimi_test.go deleted file mode 100644 index c40f0bff3b..0000000000 --- a/adapters/eskimi/eskimi_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package eskimi - -import ( - "encoding/json" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" -) - -const testEndpoint = "https://ittr.eskimi.com/prebidjs" - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderEskimi, config.Adapter{ - Endpoint: testEndpoint}, - config.Server{ExternalUrl: "http://hosturl.com", GvlID: 814, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "eskimitest", bidder) -} - -func newAdapter() *adapter { - return &adapter{endpoint: testEndpoint} -} - -func bannerImp(ext string) openrtb2.Imp { - return openrtb2.Imp{ - ID: "imp-1", - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Ext: json.RawMessage(ext), - } -} - -func TestMalformedSiteExt(t *testing.T) { - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{bannerImp(`{"bidder":{"placementId":625}}`)}, - Site: &openrtb2.Site{ID: "271", Ext: json.RawMessage(`{invalid`)}, - } - _, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "site.ext") -} - -func TestMalformedAppExt(t *testing.T) { - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{bannerImp(`{"bidder":{"placementId":625}}`)}, - App: &openrtb2.App{ID: "app-1", Ext: json.RawMessage(`{invalid`)}, - } - _, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "app.ext") -} - -func TestImpSecureDefaultedToOne(t *testing.T) { - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{bannerImp(`{"bidder":{"placementId":625}}`)}, - Site: &openrtb2.Site{ID: "271"}, - } - reqData, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Empty(t, errs) - var out openrtb2.BidRequest - assert.NoError(t, json.Unmarshal(reqData[0].Body, &out)) - assert.NotNil(t, out.Imp[0].Secure) - assert.EqualValues(t, 1, *out.Imp[0].Secure) -} - -func TestImpSecureNotOverridden(t *testing.T) { - zero := int8(0) - imp := bannerImp(`{"bidder":{"placementId":625}}`) - imp.Secure = &zero - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{imp}, - Site: &openrtb2.Site{ID: "271"}, - } - reqData, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Empty(t, errs) - var out openrtb2.BidRequest - assert.NoError(t, json.Unmarshal(reqData[0].Body, &out)) - assert.EqualValues(t, 0, *out.Imp[0].Secure) -} - -// TestCallerRequestNotMutated asserts every copy-on-write surface in MakeRequests: -// request.{BCat,BAdv,BApp}, request.{Site,App}.Ext, request.Imp[i].Secure, -// request.Imp[i].{Banner,Video}.BAttr, and request.Imp[i].{BidFloor,BidFloorCur}. -func TestCallerRequestNotMutated(t *testing.T) { - imp := openrtb2.Imp{ - ID: "imp-1", - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Video: &openrtb2.Video{MIMEs: []string{"video/mp4"}, W: openrtb2.Int64Ptr(640), H: openrtb2.Int64Ptr(480)}, - Ext: json.RawMessage(`{"bidder":{ - "placementId":625, - "bcat":["IAB1"],"badv":["bad.com"],"bapp":["com.bad"], - "bidFloor":1.5,"bidFloorCur":"EUR", - "battr":[1,2] - }}`), - } - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{imp}, - Site: &openrtb2.Site{ID: "271", Ext: json.RawMessage(`{"amp":0}`)}, - } - - _, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Empty(t, errs) - - assert.Empty(t, req.BCat, "caller's request.BCat must not be mutated") - assert.Empty(t, req.BAdv, "caller's request.BAdv must not be mutated") - assert.Empty(t, req.BApp, "caller's request.BApp must not be mutated") - assert.JSONEq(t, `{"amp":0}`, string(req.Site.Ext), "caller's request.Site.Ext must not be mutated") - assert.Nil(t, req.Imp[0].Secure, "caller's imp[0].Secure must not be mutated") - assert.EqualValues(t, 0, req.Imp[0].BidFloor, "caller's imp[0].BidFloor must not be mutated") - assert.Empty(t, req.Imp[0].BidFloorCur, "caller's imp[0].BidFloorCur must not be mutated") - assert.Empty(t, req.Imp[0].Banner.BAttr, "caller's imp[0].Banner.BAttr must not be mutated") - assert.Empty(t, req.Imp[0].Video.BAttr, "caller's imp[0].Video.BAttr must not be mutated") -} - -func TestCallerAppRequestNotMutated(t *testing.T) { - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{bannerImp(`{"bidder":{"placementId":625}}`)}, - App: &openrtb2.App{ID: "app-1", Ext: json.RawMessage(`{"installed":1}`)}, - } - _, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Empty(t, errs) - assert.JSONEq(t, `{"installed":1}`, string(req.App.Ext), "caller's request.App.Ext must not be mutated") -} - -func TestLaterImpWithInvalidExtSurfacesError(t *testing.T) { - req := &openrtb2.BidRequest{ - ID: "req-1", - Imp: []openrtb2.Imp{ - bannerImp(`{"bidder":{"placementId":625,"bidFloor":1.5,"bidFloorCur":"EUR"}}`), - {ID: "imp-2", Banner: &openrtb2.Banner{}, Ext: json.RawMessage(`"not-an-object"`)}, - }, - Site: &openrtb2.Site{ID: "271"}, - } - reqData, errs := newAdapter().MakeRequests(req, &adapters.ExtraRequestInfo{}) - // First-imp request still goes out, but the bad later imp surfaces an error. - assert.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "imp.ext") - assert.Len(t, reqData, 1) - - var out openrtb2.BidRequest - assert.NoError(t, json.Unmarshal(reqData[0].Body, &out)) - assert.EqualValues(t, 1.5, out.Imp[0].BidFloor) -} diff --git a/adapters/eskimi/eskimitest/exemplary/banner-web-with-buyeruid.json b/adapters/eskimi/eskimitest/exemplary/banner-web-with-buyeruid.json deleted file mode 100644 index f8a3421e8b..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/banner-web-with-buyeruid.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com" - }, - "user": { - "buyeruid": "eskimi-dmp-id-abc-123" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - }, - "user": { - "buyeruid": "eskimi-dmp-id-abc-123" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/exemplary/multi-imp-web.json b/adapters/eskimi/eskimitest/exemplary/multi-imp-web.json deleted file mode 100644 index f782fb730f..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/multi-imp-web.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { "w": 300, "h": 250 } - ] - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - }, - { - "id": "imp-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 999 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "headers": { - "Content-Type": ["application/json;charset=utf-8"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-banner", - "secure": 1, - "banner": { - "format": [ - { "w": 300, "h": 250 } - ] - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - }, - { - "id": "imp-video", - "secure": 1, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 999 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/", - "ext": { - "placementId": 625 - } - } - }, - "impIDs": ["imp-banner", "imp-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "imp-banner", - "price": 1.25, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - { - "id": "2", - "impid": "imp-video", - "price": 4.5, - "adm": "00:00:15", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "imp-banner", - "price": 1.25, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "2", - "impid": "imp-video", - "price": 4.5, - "adm": "00:00:15", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/exemplary/optional-params.json b/adapters/eskimi/eskimitest/exemplary/optional-params.json deleted file mode 100644 index 350900008c..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/optional-params.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { "w": 300, "h": 250 } - ] - }, - "ext": { - "bidder": { - "placementId": 625, - "bidFloor": 1.5, - "bidFloorCur": "EUR", - "bcat": ["IAB1"], - "badv": ["bad.com"], - "bapp": ["com.bad.app"], - "battr": [1, 2] - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "bcat": ["IAB1"], - "badv": ["bad.com"], - "bapp": ["com.bad.app"], - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "bidfloor": 1.5, - "bidfloorcur": "EUR", - "banner": { - "format": [ - { "w": 300, "h": 250 } - ], - "battr": [1, 2] - }, - "ext": { - "bidder": { - "placementId": 625, - "bidFloor": 1.5, - "bidFloorCur": "EUR", - "bcat": ["IAB1"], - "badv": ["bad.com"], - "bapp": ["com.bad.app"], - "battr": [1, 2] - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { - "placementId": 625 - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 2.0, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 2.0, - "adm": "
ad
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/exemplary/simple-banner-app.json b/adapters/eskimi/eskimitest/exemplary/simple-banner-app.json deleted file mode 100644 index b8a209f2c0..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/simple-banner-app.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { "w": 320, "h": 50 } - ] - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "name": "Example App" - }, - "device": { - "ifa": "00000000-0000-0000-0000-000000000000", - "os": "Android" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { - "format": [ - { "w": 320, "h": 50 } - ] - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "name": "Example App", - "ext": { - "placementId": 625 - } - }, - "device": { - "ifa": "00000000-0000-0000-0000-000000000000", - "os": "Android" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 0.9, - "adm": "
ad
", - "crid": "creative-1", - "w": 320, - "h": 50, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 0.9, - "adm": "
ad
", - "crid": "creative-1", - "w": 320, - "h": 50, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/exemplary/simple-video-app.json b/adapters/eskimi/eskimitest/exemplary/simple-video-app.json deleted file mode 100644 index cafcbde9cc..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/simple-video-app.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "name": "Example App" - }, - "device": { - "ifa": "00000000-0000-0000-0000-000000000000", - "os": "Android" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "name": "Example App", - "ext": { - "placementId": 625 - } - }, - "device": { - "ifa": "00000000-0000-0000-0000-000000000000", - "os": "Android" - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 5.25, - "nurl": "https://eskimi.com/win?bid=abc", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 5.25, - "nurl": "https://eskimi.com/win?bid=abc", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/exemplary/simple-video-web.json b/adapters/eskimi/eskimitest/exemplary/simple-video-web.json deleted file mode 100644 index 1dff5d1adc..0000000000 --- a/adapters/eskimi/eskimitest/exemplary/simple-video-web.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 1 - }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/", - "ext": { - "placementId": 625 - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 4.5, - "adm": "00:00:15", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 4.5, - "adm": "00:00:15", - "crid": "video-creative-1", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/app-ext-merge.json b/adapters/eskimi/eskimitest/supplemental/app-ext-merge.json deleted file mode 100644 index 6c80e89ea3..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/app-ext-merge.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 320, "h": 50 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "ext": { - "installed": 1, - "data": { "category": "games" } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 320, "h": 50 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "app": { - "id": "app-1", - "bundle": "com.eskimi.example", - "ext": { - "installed": 1, - "data": { "category": "games" }, - "placementId": 625 - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 320, "h": 50, "mtype": 1 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 320, "h": 50, "mtype": 1 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/invalid-bidder-params.json b/adapters/eskimi/eskimitest/supplemental/invalid-bidder-params.json deleted file mode 100644 index 8d491d5ec3..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/invalid-bidder-params.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "expectedMakeRequestsErrors": [ - { - "value": "invalid imp.ext.bidder for imp test-imp-id:.*", - "comparison": "regex" - } - ], - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": "not-an-object" } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [] -} diff --git a/adapters/eskimi/eskimitest/supplemental/invalid-imp-ext.json b/adapters/eskimi/eskimitest/supplemental/invalid-imp-ext.json deleted file mode 100644 index 126d58f573..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/invalid-imp-ext.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "expectedMakeRequestsErrors": [ - { - "value": "invalid imp.ext for imp test-imp-id:.*", - "comparison": "regex" - } - ], - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": "not-an-object" - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [] -} diff --git a/adapters/eskimi/eskimitest/supplemental/invalid-response-body.json b/adapters/eskimi/eskimitest/supplemental/invalid-response-body.json deleted file mode 100644 index 8b7a807ddd..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/invalid-response-body.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": "this-should-be-an-array" - } - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": ".*", - "comparison": "regex" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-battr-dual-write.json b/adapters/eskimi/eskimitest/supplemental/multi-format-imp-battr-dual-write.json deleted file mode 100644 index ab2959397a..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-battr-dual-write.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { - "bidder": { - "placementId": 625, - "battr": [13, 14] - } - } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { - "format": [{ "w": 300, "h": 250 }], - "battr": [13, 14] - }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8], - "battr": [13, 14] - }, - "ext": { - "bidder": { - "placementId": 625, - "battr": [13, 14] - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 2.5, "adm": "", "crid": "v-1", "w": 640, "h": 480, "mtype": 2 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 2.5, "adm": "", "crid": "v-1", "w": 640, "h": 480, "mtype": 2 }, "type": "video" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-uses-mtype.json b/adapters/eskimi/eskimitest/supplemental/multi-format-imp-uses-mtype.json deleted file mode 100644 index 81389b712c..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-uses-mtype.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "video-bid", "impid": "test-imp-id", "price": 4.0, "adm": "", "crid": "v-1", "w": 640, "h": 480, "mtype": 2 }, - { "id": "banner-bid", "impid": "test-imp-id", "price": 1.5, "adm": "
ad
", "crid": "b-1", "w": 300, "h": 250, "mtype": 1 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "video-bid", "impid": "test-imp-id", "price": 4.0, "adm": "", "crid": "v-1", "w": 640, "h": 480, "mtype": 2 }, "type": "video" }, - { "bid": { "id": "banner-bid", "impid": "test-imp-id", "price": 1.5, "adm": "
ad
", "crid": "b-1", "w": 300, "h": 250, "mtype": 1 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-without-mtype-errors.json b/adapters/eskimi/eskimitest/supplemental/multi-format-imp-without-mtype-errors.json deleted file mode 100644 index 312f0f06b2..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/multi-format-imp-without-mtype-errors.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "ambiguous", "impid": "test-imp-id", "price": 2.0, "adm": "
?
", "crid": "c-1" } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "bid for multi-format imp test-imp-id requires bid.mtype to disambiguate", - "comparison": "literal" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/multi-imp-asymmetry.json b/adapters/eskimi/eskimitest/supplemental/multi-imp-asymmetry.json deleted file mode 100644 index c712c0783e..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/multi-imp-asymmetry.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-1", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { - "bidder": { - "placementId": 625, - "bcat": ["IAB-FROM-IMP-0"], - "bidFloor": 1.0 - } - } - }, - { - "id": "imp-2", - "banner": { "format": [{ "w": 728, "h": 90 }] }, - "ext": { - "bidder": { - "placementId": 999, - "bcat": ["IAB-FROM-IMP-1"], - "bidFloor": 2.0, - "bidFloorCur": "EUR" - } - } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "bcat": ["IAB-FROM-IMP-0"], - "imp": [ - { - "id": "imp-1", - "secure": 1, - "bidfloor": 1.0, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { - "bidder": { - "placementId": 625, - "bcat": ["IAB-FROM-IMP-0"], - "bidFloor": 1.0 - } - } - }, - { - "id": "imp-2", - "secure": 1, - "bidfloor": 2.0, - "bidfloorcur": "EUR", - "banner": { "format": [{ "w": 728, "h": 90 }] }, - "ext": { - "bidder": { - "placementId": 999, - "bcat": ["IAB-FROM-IMP-1"], - "bidFloor": 2.0, - "bidFloorCur": "EUR" - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["imp-1", "imp-2"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "imp-1", "price": 1.5, "crid": "c1", "w": 300, "h": 250 }, - { "id": "2", "impid": "imp-2", "price": 2.5, "crid": "c2", "w": 728, "h": 90 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "imp-1", "price": 1.5, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" }, - { "bid": { "id": "2", "impid": "imp-2", "price": 2.5, "crid": "c2", "w": 728, "h": 90 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/multi-imp-invalid-second-dropped.json b/adapters/eskimi/eskimitest/supplemental/multi-imp-invalid-second-dropped.json deleted file mode 100644 index da98bbb32d..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/multi-imp-invalid-second-dropped.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "expectedMakeRequestsErrors": [ - { - "value": "invalid imp.ext.bidder for imp imp-2:.*", - "comparison": "regex" - } - ], - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-1", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { - "bidder": { - "placementId": 625 - } - } - }, - { - "id": "imp-2", - "banner": { "format": [{ "w": 728, "h": 90 }] }, - "ext": { "bidder": "not-an-object" } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp-1", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { - "bidder": { - "placementId": 625 - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["imp-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "imp-1", "price": 1.5, "crid": "c1", "w": 300, "h": 250, "mtype": 1 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "imp-1", "price": 1.5, "crid": "c1", "w": 300, "h": 250, "mtype": 1 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/no-site-or-app.json b/adapters/eskimi/eskimitest/supplemental/no-site-or-app.json deleted file mode 100644 index 6456b473b8..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/no-site-or-app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "expectedMakeRequestsErrors": [ - { - "value": "request must contain either site or app", - "comparison": "literal" - } - ], - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ] - }, - "httpCalls": [] -} diff --git a/adapters/eskimi/eskimitest/supplemental/pre-set-overrides-not-clobbered.json b/adapters/eskimi/eskimitest/supplemental/pre-set-overrides-not-clobbered.json deleted file mode 100644 index c0cddb72de..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/pre-set-overrides-not-clobbered.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "bcat": ["IAB-EXISTING"], - "badv": ["existing-blocked.com"], - "bapp": ["com.existing.blocked"], - "imp": [ - { - "id": "test-imp-id", - "bidfloor": 5.0, - "bidfloorcur": "USD", - "banner": { - "format": [{ "w": 300, "h": 250 }], - "battr": [3] - }, - "ext": { - "bidder": { - "placementId": 625, - "bcat": ["IAB-FROM-EXT"], - "badv": ["ext-blocked.com"], - "bapp": ["com.ext.blocked"], - "bidFloor": 1.0, - "bidFloorCur": "EUR", - "battr": [1, 2] - } - } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "bcat": ["IAB-EXISTING"], - "badv": ["existing-blocked.com"], - "bapp": ["com.existing.blocked"], - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "bidfloor": 5.0, - "bidfloorcur": "USD", - "banner": { - "format": [{ "w": 300, "h": 250 }], - "battr": [3] - }, - "ext": { - "bidder": { - "placementId": 625, - "bcat": ["IAB-FROM-EXT"], - "badv": ["ext-blocked.com"], - "bapp": ["com.ext.blocked"], - "bidFloor": 1.0, - "bidFloorCur": "EUR", - "battr": [1, 2] - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 6.0, "crid": "c1", "w": 300, "h": 250 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 6.0, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/privacy-signals-pass-through.json b/adapters/eskimi/eskimitest/supplemental/privacy-signals-pass-through.json deleted file mode 100644 index 16f6f440bf..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/privacy-signals-pass-through.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" }, - "user": { - "ext": { - "consent": "CO12345abcdefghijklmnopqrstuvwxyz" - } - }, - "regs": { - "coppa": 1, - "us_privacy": "1YYY", - "gpp": "DBABMA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA", - "gpp_sid": [7, 8], - "ext": { - "gdpr": 1 - } - }, - "device": { - "lmt": 1, - "dnt": 1 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - }, - "user": { - "ext": { "consent": "CO12345abcdefghijklmnopqrstuvwxyz" } - }, - "regs": { - "coppa": 1, - "us_privacy": "1YYY", - "gpp": "DBABMA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA", - "gpp_sid": [7, 8], - "ext": { "gdpr": 1 } - }, - "device": { "lmt": 1, "dnt": 1 } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/response-204.json b/adapters/eskimi/eskimitest/supplemental/response-204.json deleted file mode 100644 index b82f4f1ff8..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/response-204.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/eskimi/eskimitest/supplemental/response-400.json b/adapters/eskimi/eskimitest/supplemental/response-400.json deleted file mode 100644 index 81d636608c..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/response-400.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 400 - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/response-500.json b/adapters/eskimi/eskimitest/supplemental/response-500.json deleted file mode 100644 index daf7265354..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/response-500.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 500 - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/response-no-cur.json b/adapters/eskimi/eskimitest/supplemental/response-no-cur.json deleted file mode 100644 index 43a8eae814..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/response-no-cur.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/schain-pass-through.json b/adapters/eskimi/eskimitest/supplemental/schain-pass-through.json deleted file mode 100644 index fc3b0d5841..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/schain-pass-through.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" }, - "source": { - "schain": { - "complete": 1, - "ver": "1.0", - "nodes": [ - { "asi": "publisher.com", "sid": "pub-sid-1", "hp": 1 }, - { "asi": "ssp.example", "sid": "ssp-sid-2", "hp": 1 } - ] - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - }, - "source": { - "schain": { - "complete": 1, - "ver": "1.0", - "nodes": [ - { "asi": "publisher.com", "sid": "pub-sid-1", "hp": 1 }, - { "asi": "ssp.example", "sid": "ssp-sid-2", "hp": 1 } - ] - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/site-ext-merge.json b/adapters/eskimi/eskimitest/supplemental/site-ext-merge.json deleted file mode 100644 index a6cfa15fe3..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/site-ext-merge.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { - "amp": 0, - "data": { "category": "news" } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { - "amp": 0, - "data": { "category": "news" }, - "placementId": 625 - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 1.0, "crid": "c1", "w": 300, "h": 250 }, "type": "banner" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/unmatched-bid-impid.json b/adapters/eskimi/eskimitest/supplemental/unmatched-bid-impid.json deleted file mode 100644 index 0675afde99..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/unmatched-bid-impid.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "b1", "impid": "unknown-imp", "price": 1.0, "crid": "c1" } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unable to resolve media type for impression unknown-imp", - "comparison": "literal" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/unsupported-bid-media-type.json b/adapters/eskimi/eskimitest/supplemental/unsupported-bid-media-type.json deleted file mode 100644 index 4fd0906dfd..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/unsupported-bid-media-type.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - }, - { - "id": "native-imp", - "native": { "request": "{}" }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "ext": { "bidder": { "placementId": 625 } } - }, - { - "id": "native-imp", - "secure": 1, - "native": { "request": "{}" }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id", "native-imp"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "native-imp", "price": 1.0, "crid": "c1" } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unsupported media type for impression native-imp (banner and video only)", - "comparison": "literal" - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/video-no-mtype-inferred.json b/adapters/eskimi/eskimitest/supplemental/video-no-mtype-inferred.json deleted file mode 100644 index 28200c899c..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/video-no-mtype-inferred.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "protocols": [2, 3, 5, 6, 7, 8] - }, - "ext": { "bidder": { "placementId": 625 } } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { "id": "1", "impid": "test-imp-id", "price": 3.0, "adm": "", "crid": "v-1", "w": 640, "h": 480 } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { "bid": { "id": "1", "impid": "test-imp-id", "price": 3.0, "adm": "", "crid": "v-1", "w": 640, "h": 480 }, "type": "video" } - ] - } - ] -} diff --git a/adapters/eskimi/eskimitest/supplemental/video-outstream-web.json b/adapters/eskimi/eskimitest/supplemental/video-outstream-web.json deleted file mode 100644 index 0d6ab19885..0000000000 --- a/adapters/eskimi/eskimitest/supplemental/video-outstream-web.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 4 - }, - "ext": { - "bidder": { - "placementId": 625, - "battr": [13, 14] - } - } - } - ], - "site": { "id": "271", "domain": "display.eskimi-creatives.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "secure": 1, - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360, - "protocols": [2, 3, 5, 6, 7, 8], - "plcmt": 4, - "battr": [13, 14] - }, - "ext": { - "bidder": { - "placementId": 625, - "battr": [13, 14] - } - } - } - ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "ext": { "placementId": 625 } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "eskimi", - "bid": [ - { - "id": "1", - "impid": "test-imp-id", - "price": 3.5, - "adm": "", - "crid": "outstream-1", - "w": 640, - "h": 360, - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "test-imp-id", - "price": 3.5, - "adm": "", - "crid": "outstream-1", - "w": 640, - "h": 360, - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/eskimi/params_test.go b/adapters/eskimi/params_test.go deleted file mode 100644 index a2c559e90e..0000000000 --- a/adapters/eskimi/params_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package eskimi - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json schema. %v", err) - } - - for _, p := range validParams { - if err := validator.Validate(openrtb_ext.BidderEskimi, json.RawMessage(p)); err != nil { - t.Errorf("Schema rejected valid params: %s", p) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json schema. %v", err) - } - - for _, p := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderEskimi, json.RawMessage(p)); err == nil { - t.Errorf("Schema allowed invalid params: %s", p) - } - } -} - -var validParams = []string{ - `{"placementId":625}`, - `{"placementId":625,"bidFloor":0.5,"bidFloorCur":"USD"}`, - `{"placementId":625,"bcat":["IAB1"],"badv":["bad.com"],"bapp":["com.bad.app"]}`, - `{"placementId":625,"battr":[1,2,17]}`, -} - -var invalidParams = []string{ - ``, - `null`, - `{}`, - `{"placementId":"625"}`, - `{"placementId":625.5}`, - `{"placementId":0}`, - `{"placementId":-1}`, - `{"bidFloor":0.5}`, - `{"placementId":625,"bcat":"IAB1"}`, - `{"placementId":625,"battr":[0]}`, - `{"placementId":625,"battr":[18]}`, - `{"placementId":625,"unknownField":"foo"}`, -} diff --git a/adapters/exco/exco.go b/adapters/exco/exco.go index 49f519691f..dc79c6ec1e 100644 --- a/adapters/exco/exco.go +++ b/adapters/exco/exco.go @@ -5,11 +5,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/exco/exco_test.go b/adapters/exco/exco_test.go index faa955569e..77ab4afe88 100644 --- a/adapters/exco/exco_test.go +++ b/adapters/exco/exco_test.go @@ -3,9 +3,9 @@ package exco import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/exco/params_test.go b/adapters/exco/params_test.go index 73fc0d657a..eed4bc4b64 100644 --- a/adapters/exco/params_test.go +++ b/adapters/exco/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/exco.json diff --git a/adapters/ezoic/ezoic.go b/adapters/ezoic/ezoic.go deleted file mode 100644 index fd5e51950d..0000000000 --- a/adapters/ezoic/ezoic.go +++ /dev/null @@ -1,95 +0,0 @@ -package ezoic - -import ( - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -// Builder builds a new instance of the Ezoic adapter for the given bidder with the given config. -func Builder(bidderName openrtb_ext.BidderName, cfg config.Adapter, server config.Server) (adapters.Bidder, error) { - return &adapter{endpoint: cfg.Endpoint}, nil -} - -// MakeRequests forwards the OpenRTB request to the Ezoic bidder endpoint -// unchanged. Eligibility, demand selection, and creative construction all -// happen server-side at Ezoic; the adapter is a deliberately thin transport. -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - body, err := jsonutil.Marshal(request) - if err != nil { - return nil, []error{fmt.Errorf("unable to marshal openrtb request: %w", err)} - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - return []*adapters.RequestData{{ - Method: http.MethodPost, - Uri: a.endpoint, - Body: body, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - }}, nil -} - -// MakeBids unpacks the Ezoic endpoint's OpenRTB BidResponse. -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var bidResp openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &bidResp); err != nil { - return nil, []error{err} - } - - bidderResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - if bidResp.Cur != "" { - bidderResponse.Currency = bidResp.Cur - } - - var errs []error - for _, seatBid := range bidResp.SeatBid { - for i := range seatBid.Bid { - bidType, err := getMediaTypeForBid(seatBid.Bid[i]) - if err != nil { - errs = append(errs, err) - continue - } - bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - }) - } - } - return bidderResponse, errs -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported mtype %d for bid %s", bid.MType, bid.ID), - } - } -} diff --git a/adapters/ezoic/ezoic_test.go b/adapters/ezoic/ezoic_test.go deleted file mode 100644 index 0c9a24a953..0000000000 --- a/adapters/ezoic/ezoic_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package ezoic - -import ( - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" -) - -const testsBidderEndpoint = "https://g.ezoic.net/ezoic/prebid/adapter/ortb" - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderEzoic, config.Adapter{ - Endpoint: testsBidderEndpoint}, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "ezoictest", bidder) -} - -func TestNoContentResponse(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderEzoic, config.Adapter{ - Endpoint: testsBidderEndpoint}, config.Server{}) - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - bidResponse, errs := bidder.MakeBids(nil, nil, &adapters.ResponseData{StatusCode: 204}) - assert.Nil(t, bidResponse) - assert.Empty(t, errs) -} - -func TestGetMediaTypeForBid(t *testing.T) { - bidType, err := getMediaTypeForBid(openrtb2.Bid{MType: openrtb2.MarkupBanner}) - assert.NoError(t, err) - assert.Equal(t, openrtb_ext.BidTypeBanner, bidType) - - bidType, err = getMediaTypeForBid(openrtb2.Bid{MType: openrtb2.MarkupVideo}) - assert.NoError(t, err) - assert.Equal(t, openrtb_ext.BidTypeVideo, bidType) - - bidType, err = getMediaTypeForBid(openrtb2.Bid{MType: openrtb2.MarkupNative}) - assert.NoError(t, err) - assert.Equal(t, openrtb_ext.BidTypeNative, bidType) - - _, err = getMediaTypeForBid(openrtb2.Bid{ID: "no-mtype"}) - assert.Error(t, err) - - _, err = getMediaTypeForBid(openrtb2.Bid{ID: "audio", MType: openrtb2.MarkupAudio}) - assert.Error(t, err) -} diff --git a/adapters/ezoic/ezoictest/exemplary/simple-banner.json b/adapters/ezoic/ezoictest/exemplary/simple-banner.json deleted file mode 100644 index 7c3c29b291..0000000000 --- a/adapters/ezoic/ezoictest/exemplary/simple-banner.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "ezoic", - "bid": [ - { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 2.5, - "adm": "
ezoic-self-tracking-creative
", - "crid": "ezoic-creative-1", - "w": 300, - "h": 250, - "mtype": 1, - "exp": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 2.5, - "adm": "
ezoic-self-tracking-creative
", - "crid": "ezoic-creative-1", - "w": 300, - "h": 250, - "mtype": 1, - "exp": 300 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/ezoic/ezoictest/exemplary/simple-native.json b/adapters/ezoic/ezoictest/exemplary/simple-native.json deleted file mode 100644 index 31a072cd61..0000000000 --- a/adapters/ezoic/ezoictest/exemplary/simple-native.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "native": { - "ver": "1.2", - "request": "{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"w\":1200,\"h\":627}}]}" - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "native": { - "ver": "1.2", - "request": "{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"w\":1200,\"h\":627}}]}" - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "ezoic", - "bid": [ - { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 1.75, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"ezoic native title\"}}],\"link\":{\"url\":\"https://example.com/click\"}}}", - "crid": "ezoic-creative-1", - "mtype": 4, - "exp": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 1.75, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"ezoic native title\"}}],\"link\":{\"url\":\"https://example.com/click\"}}}", - "crid": "ezoic-creative-1", - "mtype": 4, - "exp": 300 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/ezoic/ezoictest/exemplary/simple-video.json b/adapters/ezoic/ezoictest/exemplary/simple-video.json deleted file mode 100644 index 6db45edc5e..0000000000 --- a/adapters/ezoic/ezoictest/exemplary/simple-video.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 3, - 5, - 6 - ], - "w": 640, - "h": 480, - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "tmax": 750, - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "device": { - "ua": "test-user-agent", - "ip": "203.0.113.9" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "div-gpt-ad-1", - "bidfloor": 0.25, - "bidfloorcur": "USD", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 3, - 5, - 6 - ], - "w": 640, - "h": 480, - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "placementId": "ezoic-placement-1" - } - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "ezoic", - "bid": [ - { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 4.5, - "adm": "", - "crid": "ezoic-creative-1", - "w": 640, - "h": 480, - "mtype": 2, - "exp": 300 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "ezoic-bid-1", - "impid": "test-imp-id", - "price": 4.5, - "adm": "", - "crid": "ezoic-creative-1", - "w": 640, - "h": 480, - "mtype": 2, - "exp": 300 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/ezoic/ezoictest/supplemental/invalid-response.json b/adapters/ezoic/ezoictest/supplemental/invalid-response.json deleted file mode 100644 index adcb3c1001..0000000000 --- a/adapters/ezoic/ezoictest/supplemental/invalid-response.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": "invalid response" - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "expect", - "comparison": "regex" - } - ] -} diff --git a/adapters/ezoic/ezoictest/supplemental/status-400.json b/adapters/ezoic/ezoictest/supplemental/status-400.json deleted file mode 100644 index 8d156eb86a..0000000000 --- a/adapters/ezoic/ezoictest/supplemental/status-400.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 400, - "body": {} - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/ezoic/ezoictest/supplemental/status-500.json b/adapters/ezoic/ezoictest/supplemental/status-500.json deleted file mode 100644 index 1d0b418290..0000000000 --- a/adapters/ezoic/ezoictest/supplemental/status-500.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 500, - "body": {} - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/ezoic/ezoictest/supplemental/unsupported-mtype.json b/adapters/ezoic/ezoictest/supplemental/unsupported-mtype.json deleted file mode 100644 index 39d7506d66..0000000000 --- a/adapters/ezoic/ezoictest/supplemental/unsupported-mtype.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://g.ezoic.net/ezoic/prebid/adapter/ortb", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com/article", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": {} - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "ezoic", - "bid": [ - { - "id": "ezoic-bid-good", - "impid": "test-imp-id", - "price": 1.25, - "adm": "
creative
", - "crid": "ezoic-creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - { - "id": "ezoic-bid-no-mtype", - "impid": "test-imp-id", - "price": 9.99, - "adm": "
creative
", - "crid": "ezoic-creative-2", - "w": 300, - "h": 250 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "ezoic-bid-good", - "impid": "test-imp-id", - "price": 1.25, - "adm": "
creative
", - "crid": "ezoic-creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unsupported mtype 0 for bid ezoic-bid-no-mtype", - "comparison": "literal" - } - ] -} diff --git a/adapters/ezoic/params_test.go b/adapters/ezoic/params_test.go deleted file mode 100644 index 91994fe4cf..0000000000 --- a/adapters/ezoic/params_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package ezoic - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -// This file intends to test static/bidder-params/ezoic.json -// -// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.ezoic - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderEzoic, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected ezoic params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderEzoic, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{}`, - `{"placementId": "ezoic-placement-1"}`, -} - -var invalidParams = []string{ - `null`, - `true`, - `[]`, - `"placementId"`, - `{"placementId": 12345}`, - `{"placementId": true}`, -} diff --git a/adapters/feedad/feedad.go b/adapters/feedad/feedad.go index 6a1c1314db..804027ee11 100644 --- a/adapters/feedad/feedad.go +++ b/adapters/feedad/feedad.go @@ -4,10 +4,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const feedAdAdapterVersion = "1.0.0" diff --git a/adapters/feedad/feedad_test.go b/adapters/feedad/feedad_test.go index 66e7414f56..28993850df 100644 --- a/adapters/feedad/feedad_test.go +++ b/adapters/feedad/feedad_test.go @@ -3,9 +3,9 @@ package feedad import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/feedad/params_test.go b/adapters/feedad/params_test.go index 279b6c6c6d..a77ad9ae46 100644 --- a/adapters/feedad/params_test.go +++ b/adapters/feedad/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/flatads/flatads.go b/adapters/flatads/flatads.go index 5bd1532ab7..0bf0b979e7 100644 --- a/adapters/flatads/flatads.go +++ b/adapters/flatads/flatads.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/flatads/flatads_test.go b/adapters/flatads/flatads_test.go index 6bd5187f01..b3b3cf33f7 100644 --- a/adapters/flatads/flatads_test.go +++ b/adapters/flatads/flatads_test.go @@ -3,9 +3,9 @@ package flatads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/flatads/params_test.go b/adapters/flatads/params_test.go index 98c583695e..c58546399b 100644 --- a/adapters/flatads/params_test.go +++ b/adapters/flatads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/flipp/flipp.go b/adapters/flipp/flipp.go index fa8259b80a..4ac5c31c76 100644 --- a/adapters/flipp/flipp.go +++ b/adapters/flipp/flipp.go @@ -13,11 +13,11 @@ import ( "github.com/prebid/go-gdpr/consentconstants" "github.com/prebid/go-gdpr/vendorconsent" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/uuidutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/uuidutil" ) const ( diff --git a/adapters/flipp/flipp_params.go b/adapters/flipp/flipp_params.go index 3e86337916..34d266a7d9 100644 --- a/adapters/flipp/flipp_params.go +++ b/adapters/flipp/flipp_params.go @@ -1,6 +1,6 @@ package flipp -import "github.com/prebid/prebid-server/v4/openrtb_ext" +import "github.com/prebid/prebid-server/v3/openrtb_ext" type CampaignRequestBodyUser struct { Key *string `json:"key"` diff --git a/adapters/flipp/flipp_test.go b/adapters/flipp/flipp_test.go index 3676053f04..8215dabe82 100644 --- a/adapters/flipp/flipp_test.go +++ b/adapters/flipp/flipp_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/flipp/params_test.go b/adapters/flipp/params_test.go index 01d4604c0a..24f30b0a62 100644 --- a/adapters/flipp/params_test.go +++ b/adapters/flipp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/freewheelssp/freewheelssp.go b/adapters/freewheelssp/freewheelssp.go index 6e4ad67228..111b05a60e 100644 --- a/adapters/freewheelssp/freewheelssp.go +++ b/adapters/freewheelssp/freewheelssp.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/freewheelssp/freewheelssp_test.go b/adapters/freewheelssp/freewheelssp_test.go index d8d3350907..ba5e6cf9aa 100644 --- a/adapters/freewheelssp/freewheelssp_test.go +++ b/adapters/freewheelssp/freewheelssp_test.go @@ -3,9 +3,9 @@ package freewheelssp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/frvradn/frvradn.go b/adapters/frvradn/frvradn.go index 4b307c7626..5b21263b1a 100644 --- a/adapters/frvradn/frvradn.go +++ b/adapters/frvradn/frvradn.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/frvradn/frvradn_test.go b/adapters/frvradn/frvradn_test.go index e69c10d865..514ef6c712 100644 --- a/adapters/frvradn/frvradn_test.go +++ b/adapters/frvradn/frvradn_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/frvradn/params_test.go b/adapters/frvradn/params_test.go index 3d054db074..83e1ba631a 100644 --- a/adapters/frvradn/params_test.go +++ b/adapters/frvradn/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/fwssp/fwssp.go b/adapters/fwssp/fwssp.go index ae916dc511..3ee896e156 100644 --- a/adapters/fwssp/fwssp.go +++ b/adapters/fwssp/fwssp.go @@ -5,11 +5,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/fwssp/fwssp_test.go b/adapters/fwssp/fwssp_test.go index 5d9d6a8801..7afd5197fd 100644 --- a/adapters/fwssp/fwssp_test.go +++ b/adapters/fwssp/fwssp_test.go @@ -3,9 +3,9 @@ package fwssp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/fwssp/params_test.go b/adapters/fwssp/params_test.go index a413b51d35..366078c016 100644 --- a/adapters/fwssp/params_test.go +++ b/adapters/fwssp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/gamma/gamma.go b/adapters/gamma/gamma.go index 57edc810e8..66f99953fe 100644 --- a/adapters/gamma/gamma.go +++ b/adapters/gamma/gamma.go @@ -9,11 +9,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type GammaAdapter struct { diff --git a/adapters/gamma/gamma_test.go b/adapters/gamma/gamma_test.go index 0c50d48662..9556e83dc0 100644 --- a/adapters/gamma/gamma_test.go +++ b/adapters/gamma/gamma_test.go @@ -3,9 +3,9 @@ package gamma import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/gamma/params_test.go b/adapters/gamma/params_test.go index 06f6d6faba..d377b50c3d 100644 --- a/adapters/gamma/params_test.go +++ b/adapters/gamma/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/gamma.json diff --git a/adapters/gamoshi/gamoshi.go b/adapters/gamoshi/gamoshi.go index b4cd7841e5..4ba302506f 100644 --- a/adapters/gamoshi/gamoshi.go +++ b/adapters/gamoshi/gamoshi.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type GamoshiAdapter struct { diff --git a/adapters/gamoshi/gamoshi_test.go b/adapters/gamoshi/gamoshi_test.go index ee572b2aca..aa20723b2d 100644 --- a/adapters/gamoshi/gamoshi_test.go +++ b/adapters/gamoshi/gamoshi_test.go @@ -3,9 +3,9 @@ package gamoshi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamplesWithConfiguredURI(t *testing.T) { diff --git a/adapters/gamoshi/params_test.go b/adapters/gamoshi/params_test.go index 21f887d686..429ed96ad8 100644 --- a/adapters/gamoshi/params_test.go +++ b/adapters/gamoshi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/gamoshi.json diff --git a/adapters/globalsun/globalsun.go b/adapters/globalsun/globalsun.go index cbdc899e80..a2b2dc5b9a 100644 --- a/adapters/globalsun/globalsun.go +++ b/adapters/globalsun/globalsun.go @@ -7,11 +7,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/globalsun/globalsun_test.go b/adapters/globalsun/globalsun_test.go index cfbebe3135..e34805f68f 100644 --- a/adapters/globalsun/globalsun_test.go +++ b/adapters/globalsun/globalsun_test.go @@ -3,9 +3,9 @@ package globalsun import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/globalsun/params_test.go b/adapters/globalsun/params_test.go index 9847ce3d29..b4fe0ede7a 100644 --- a/adapters/globalsun/params_test.go +++ b/adapters/globalsun/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/goldbach/goldbach.go b/adapters/goldbach/goldbach.go index 3d47a4b3dd..5c500e63ce 100644 --- a/adapters/goldbach/goldbach.go +++ b/adapters/goldbach/goldbach.go @@ -5,11 +5,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/goldbach/goldbach_test.go b/adapters/goldbach/goldbach_test.go index 55c5ea75fe..a1f046adfe 100644 --- a/adapters/goldbach/goldbach_test.go +++ b/adapters/goldbach/goldbach_test.go @@ -3,9 +3,9 @@ package goldbach import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" ) diff --git a/adapters/goldbach/params_test.go b/adapters/goldbach/params_test.go index 0ef079fa80..b03d182247 100644 --- a/adapters/goldbach/params_test.go +++ b/adapters/goldbach/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" ) diff --git a/adapters/intenze/intenze.go b/adapters/gothamads/gothamads.go similarity index 86% rename from adapters/intenze/intenze.go rename to adapters/gothamads/gothamads.go index 2a9ec562b8..7b2f247108 100644 --- a/adapters/intenze/intenze.go +++ b/adapters/gothamads/gothamads.go @@ -1,4 +1,4 @@ -package intenze +package gothamads import ( "encoding/json" @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -81,24 +81,24 @@ func (a *adapter) MakeRequests(openRTBRequest *openrtb2.BidRequest, reqInfo *ada }}, nil } -func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtIntenze, error) { +func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtGothamAds, error) { var bidderExt adapters.ExtImpBidder if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { return nil, &errortypes.BadInput{ Message: err.Error(), } } - var intenzeExt openrtb_ext.ExtIntenze - if err := jsonutil.Unmarshal(bidderExt.Bidder, &intenzeExt); err != nil { + var gothamadsExt openrtb_ext.ExtGothamAds + if err := jsonutil.Unmarshal(bidderExt.Bidder, &gothamadsExt); err != nil { return nil, &errortypes.BadInput{ Message: err.Error(), } } - return &intenzeExt, nil + return &gothamadsExt, nil } -func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtIntenze) (string, error) { +func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtGothamAds) (string, error) { endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID} return macros.ResolveMacros(a.endpoint, endpointParams) } diff --git a/adapters/gothamads/gothamads_test.go b/adapters/gothamads/gothamads_test.go new file mode 100644 index 0000000000..b3433ae44a --- /dev/null +++ b/adapters/gothamads/gothamads_test.go @@ -0,0 +1,28 @@ +package gothamads + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/stretchr/testify/assert" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderGothamads, config.Adapter{ + Endpoint: "http://us-e-node1.gothamads.com/?pass={{.AccountID}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "gothamadstest", bidder) +} + +func TestEndpointTemplateMalformed(t *testing.T) { + _, buildErr := Builder(openrtb_ext.BidderGothamads, config.Adapter{ + Endpoint: "{{Malformed}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + assert.Error(t, buildErr) +} diff --git a/adapters/intenze/intenzetest/exemplary/banner-app.json b/adapters/gothamads/gothamadstest/exemplary/banner-app.json similarity index 95% rename from adapters/intenze/intenzetest/exemplary/banner-app.json rename to adapters/gothamads/gothamadstest/exemplary/banner-app.json index 1b80ff5bf0..61fd85abc7 100644 --- a/adapters/intenze/intenzetest/exemplary/banner-app.json +++ b/adapters/gothamads/gothamadstest/exemplary/banner-app.json @@ -59,7 +59,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -95,9 +95,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "1" - ] + "impIDs":["1"] }, "mockResponse": { "status": 200, @@ -121,7 +119,7 @@ } ], "type": "banner", - "seat": "intenze" + "seat": "gothamAds" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/exemplary/banner-web.json b/adapters/gothamads/gothamadstest/exemplary/banner-web.json similarity index 95% rename from adapters/intenze/intenzetest/exemplary/banner-web.json rename to adapters/gothamads/gothamadstest/exemplary/banner-web.json index 825ee9c72c..0d09bbeb1f 100644 --- a/adapters/intenze/intenzetest/exemplary/banner-web.json +++ b/adapters/gothamads/gothamadstest/exemplary/banner-web.json @@ -66,7 +66,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -109,10 +109,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id1", - "some-impression-id2" - ] + "impIDs":["some-impression-id1","some-impression-id2"] }, "mockResponse": { "status": 200, @@ -149,7 +146,7 @@ } ], "type": "banner", - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/exemplary/native-app.json b/adapters/gothamads/gothamadstest/exemplary/native-app.json similarity index 96% rename from adapters/intenze/intenzetest/exemplary/native-app.json rename to adapters/gothamads/gothamadstest/exemplary/native-app.json index 57bc6dd727..16ba08b5eb 100644 --- a/adapters/intenze/intenzetest/exemplary/native-app.json +++ b/adapters/gothamads/gothamadstest/exemplary/native-app.json @@ -59,7 +59,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -95,9 +95,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, @@ -119,7 +117,7 @@ } ], "type": "native", - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/exemplary/native-web.json b/adapters/gothamads/gothamadstest/exemplary/native-web.json similarity index 96% rename from adapters/intenze/intenzetest/exemplary/native-web.json rename to adapters/gothamads/gothamadstest/exemplary/native-web.json index 31dedc4403..943871a008 100644 --- a/adapters/intenze/intenzetest/exemplary/native-web.json +++ b/adapters/gothamads/gothamadstest/exemplary/native-web.json @@ -53,7 +53,7 @@ "2607:fb90:f27:4512:d800:cb23:a603:e245" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -83,9 +83,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, @@ -106,7 +104,7 @@ "mtype": 4 } ], - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/exemplary/video-app.json b/adapters/gothamads/gothamadstest/exemplary/video-app.json similarity index 95% rename from adapters/intenze/intenzetest/exemplary/video-app.json rename to adapters/gothamads/gothamadstest/exemplary/video-app.json index dd836ee34c..ce2e289014 100644 --- a/adapters/intenze/intenzetest/exemplary/video-app.json +++ b/adapters/gothamads/gothamadstest/exemplary/video-app.json @@ -64,7 +64,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -105,9 +105,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, @@ -130,7 +128,7 @@ "mtype": 2 } ], - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/exemplary/video-web.json b/adapters/gothamads/gothamadstest/exemplary/video-web.json similarity index 95% rename from adapters/intenze/intenzetest/exemplary/video-web.json rename to adapters/gothamads/gothamadstest/exemplary/video-web.json index c8b596f06a..a475fc5a0c 100644 --- a/adapters/intenze/intenzetest/exemplary/video-web.json +++ b/adapters/gothamads/gothamadstest/exemplary/video-web.json @@ -58,7 +58,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -93,9 +93,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, @@ -123,7 +121,7 @@ "mtype": 2 } ], - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/supplemental/bad_media_type.json b/adapters/gothamads/gothamadstest/supplemental/bad_media_type.json similarity index 95% rename from adapters/intenze/intenzetest/supplemental/bad_media_type.json rename to adapters/gothamads/gothamadstest/supplemental/bad_media_type.json index 6b8050c0e7..0079ce3e71 100644 --- a/adapters/intenze/intenzetest/supplemental/bad_media_type.json +++ b/adapters/gothamads/gothamadstest/supplemental/bad_media_type.json @@ -59,7 +59,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -95,9 +95,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "1" - ] + "impIDs":["1"] }, "mockResponse": { "status": 200, @@ -120,7 +118,7 @@ } ], "mtype": 0, - "seat": "intenze" + "seat": "gothamads" } ], "cur": "USD" diff --git a/adapters/intenze/intenzetest/supplemental/empty-seatbid-array.json b/adapters/gothamads/gothamadstest/supplemental/empty-seatbid-array.json similarity index 95% rename from adapters/intenze/intenzetest/supplemental/empty-seatbid-array.json rename to adapters/gothamads/gothamadstest/supplemental/empty-seatbid-array.json index 3302320c06..58970bd8e8 100644 --- a/adapters/intenze/intenzetest/supplemental/empty-seatbid-array.json +++ b/adapters/gothamads/gothamadstest/supplemental/empty-seatbid-array.json @@ -64,7 +64,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -105,9 +105,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, diff --git a/adapters/intenze/intenzetest/supplemental/invalid-bidder-ext-object.json b/adapters/gothamads/gothamadstest/supplemental/invalid-bidder-ext-object.json similarity index 100% rename from adapters/intenze/intenzetest/supplemental/invalid-bidder-ext-object.json rename to adapters/gothamads/gothamadstest/supplemental/invalid-bidder-ext-object.json diff --git a/adapters/intenze/intenzetest/supplemental/invalid-intenze-ext-object.json b/adapters/gothamads/gothamadstest/supplemental/invalid-gotham-ext-object.json similarity index 100% rename from adapters/intenze/intenzetest/supplemental/invalid-intenze-ext-object.json rename to adapters/gothamads/gothamadstest/supplemental/invalid-gotham-ext-object.json diff --git a/adapters/intenze/intenzetest/supplemental/invalid-response.json b/adapters/gothamads/gothamadstest/supplemental/invalid-response.json similarity index 94% rename from adapters/intenze/intenzetest/supplemental/invalid-response.json rename to adapters/gothamads/gothamadstest/supplemental/invalid-response.json index 585ea65963..fe9cb3fd38 100644 --- a/adapters/intenze/intenzetest/supplemental/invalid-response.json +++ b/adapters/gothamads/gothamadstest/supplemental/invalid-response.json @@ -59,7 +59,7 @@ "123.123.123.123" ] }, - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "device": { @@ -95,9 +95,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, diff --git a/adapters/intenze/intenzetest/supplemental/status-code-bad-request.json b/adapters/gothamads/gothamadstest/supplemental/status-code-bad-request.json similarity index 94% rename from adapters/intenze/intenzetest/supplemental/status-code-bad-request.json rename to adapters/gothamads/gothamadstest/supplemental/status-code-bad-request.json index 746a56355b..b0e2a09855 100644 --- a/adapters/intenze/intenzetest/supplemental/status-code-bad-request.json +++ b/adapters/gothamads/gothamadstest/supplemental/status-code-bad-request.json @@ -41,7 +41,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "imp": [ @@ -76,9 +76,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 400 diff --git a/adapters/intenze/intenzetest/supplemental/status-code-no-content.json b/adapters/gothamads/gothamadstest/supplemental/status-code-no-content.json similarity index 92% rename from adapters/intenze/intenzetest/supplemental/status-code-no-content.json rename to adapters/gothamads/gothamadstest/supplemental/status-code-no-content.json index ad8a50ccc1..97fbc419af 100644 --- a/adapters/intenze/intenzetest/supplemental/status-code-no-content.json +++ b/adapters/gothamads/gothamadstest/supplemental/status-code-no-content.json @@ -35,7 +35,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "imp": [ @@ -64,9 +64,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 204 diff --git a/adapters/intenze/intenzetest/supplemental/status-code-other-error.json b/adapters/gothamads/gothamadstest/supplemental/status-code-other-error.json similarity index 93% rename from adapters/intenze/intenzetest/supplemental/status-code-other-error.json rename to adapters/gothamads/gothamadstest/supplemental/status-code-other-error.json index 59ef26aa88..5d1916cce7 100644 --- a/adapters/intenze/intenzetest/supplemental/status-code-other-error.json +++ b/adapters/gothamads/gothamadstest/supplemental/status-code-other-error.json @@ -35,7 +35,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "imp": [ @@ -64,9 +64,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 306 diff --git a/adapters/intenze/intenzetest/supplemental/status-code-service-unavailable.json b/adapters/gothamads/gothamadstest/supplemental/status-code-service-unavailable.json similarity index 92% rename from adapters/intenze/intenzetest/supplemental/status-code-service-unavailable.json rename to adapters/gothamads/gothamadstest/supplemental/status-code-service-unavailable.json index 138865eefb..e69644e967 100644 --- a/adapters/intenze/intenzetest/supplemental/status-code-service-unavailable.json +++ b/adapters/gothamads/gothamadstest/supplemental/status-code-service-unavailable.json @@ -35,7 +35,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://lb-east.intenze.co/?pass=accountId", + "uri": "http://us-e-node1.gothamads.com/?pass=accountId", "body": { "id": "some-request-id", "imp": [ @@ -64,9 +64,7 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 503 diff --git a/adapters/intenze/params_test.go b/adapters/gothamads/params_test.go similarity index 71% rename from adapters/intenze/params_test.go rename to adapters/gothamads/params_test.go index 51fbd2dc38..ff61796deb 100644 --- a/adapters/intenze/params_test.go +++ b/adapters/gothamads/params_test.go @@ -1,10 +1,10 @@ -package intenze +package gothamads import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ @@ -18,8 +18,8 @@ func TestValidParams(t *testing.T) { } for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderIntenze, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected Intenze params: %s", validParam) + if err := validator.Validate(openrtb_ext.BidderGothamads, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected Gothamads params: %s", validParam) } } } @@ -43,7 +43,7 @@ func TestInvalidParams(t *testing.T) { } for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderIntenze, json.RawMessage(invalidParam)); err == nil { + if err := validator.Validate(openrtb_ext.BidderGothamads, json.RawMessage(invalidParam)); err == nil { t.Errorf("Schema allowed unexpected params: %s", invalidParam) } } diff --git a/adapters/grid/grid.go b/adapters/grid/grid.go index b0b4304f73..ad61058fed 100644 --- a/adapters/grid/grid.go +++ b/adapters/grid/grid.go @@ -9,12 +9,12 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/maputil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/maputil" ) type GridAdapter struct { diff --git a/adapters/grid/grid_test.go b/adapters/grid/grid_test.go index 652ae514cc..bf7bfe547f 100644 --- a/adapters/grid/grid_test.go +++ b/adapters/grid/grid_test.go @@ -3,9 +3,9 @@ package grid import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/gumgum/gumgum.go b/adapters/gumgum/gumgum.go index 08681a48a5..943ccfdf14 100644 --- a/adapters/gumgum/gumgum.go +++ b/adapters/gumgum/gumgum.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // adapter implements Bidder interface. diff --git a/adapters/gumgum/gumgum_test.go b/adapters/gumgum/gumgum_test.go index 852f672678..6386818803 100644 --- a/adapters/gumgum/gumgum_test.go +++ b/adapters/gumgum/gumgum_test.go @@ -3,9 +3,9 @@ package gumgum import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/gumgum/params_test.go b/adapters/gumgum/params_test.go index a67c7695e4..514ab1d8c7 100644 --- a/adapters/gumgum/params_test.go +++ b/adapters/gumgum/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/huaweiads/huaweiads.go b/adapters/huaweiads/huaweiads.go index 6466e2b9b7..144f5e2220 100644 --- a/adapters/huaweiads/huaweiads.go +++ b/adapters/huaweiads/huaweiads.go @@ -20,12 +20,12 @@ import ( nativeRequests "github.com/prebid/openrtb/v20/native1/request" nativeResponse "github.com/prebid/openrtb/v20/native1/response" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const huaweiAdxApiVersion = "3.4" diff --git a/adapters/huaweiads/huaweiads_test.go b/adapters/huaweiads/huaweiads_test.go index aa6e788afa..c6fd17feaa 100644 --- a/adapters/huaweiads/huaweiads_test.go +++ b/adapters/huaweiads/huaweiads_test.go @@ -3,9 +3,9 @@ package huaweiads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/huaweiads/params_test.go b/adapters/huaweiads/params_test.go index 22c1d1e527..9c4b5b36d2 100644 --- a/adapters/huaweiads/params_test.go +++ b/adapters/huaweiads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/imds/imds.go b/adapters/imds/imds.go index 18a7284612..a5f53d6036 100644 --- a/adapters/imds/imds.go +++ b/adapters/imds/imds.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const adapterVersion string = "pbs-go/1.0.0" diff --git a/adapters/imds/imds_test.go b/adapters/imds/imds_test.go index 525b2e6de5..40a00462c1 100644 --- a/adapters/imds/imds_test.go +++ b/adapters/imds/imds_test.go @@ -3,9 +3,9 @@ package imds import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/imds/params_test.go b/adapters/imds/params_test.go index 2aa4a6b5e4..d98fe04cd1 100644 --- a/adapters/imds/params_test.go +++ b/adapters/imds/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/imds.json diff --git a/adapters/impactify/impactify.go b/adapters/impactify/impactify.go index eca008f150..52f20ddd8d 100644 --- a/adapters/impactify/impactify.go +++ b/adapters/impactify/impactify.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/impactify/impactify_test.go b/adapters/impactify/impactify_test.go index 31be74f2fa..2385c5c64a 100644 --- a/adapters/impactify/impactify_test.go +++ b/adapters/impactify/impactify_test.go @@ -3,9 +3,9 @@ package impactify import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/impactify/params_test.go b/adapters/impactify/params_test.go index d8b4626092..589e090172 100644 --- a/adapters/impactify/params_test.go +++ b/adapters/impactify/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/improvedigital/improvedigital.go b/adapters/improvedigital/improvedigital.go index 3821087d14..13534cc6dd 100644 --- a/adapters/improvedigital/improvedigital.go +++ b/adapters/improvedigital/improvedigital.go @@ -9,11 +9,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/improvedigital/improvedigital_test.go b/adapters/improvedigital/improvedigital_test.go index ecb0007f9c..cd00aeaab7 100644 --- a/adapters/improvedigital/improvedigital_test.go +++ b/adapters/improvedigital/improvedigital_test.go @@ -3,9 +3,9 @@ package improvedigital import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/improvedigital/params_test.go b/adapters/improvedigital/params_test.go index 4b3c9cea9a..abb1491fb0 100644 --- a/adapters/improvedigital/params_test.go +++ b/adapters/improvedigital/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/infoawarebidder.go b/adapters/infoawarebidder.go index 414a9d3599..6ccc039b48 100644 --- a/adapters/infoawarebidder.go +++ b/adapters/infoawarebidder.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // InfoAwareBidder wraps a Bidder to ensure all requests abide by the capabilities and diff --git a/adapters/infoawarebidder_test.go b/adapters/infoawarebidder_test.go index 1008cadcbe..5a28e506cc 100644 --- a/adapters/infoawarebidder_test.go +++ b/adapters/infoawarebidder_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/infytv/infytv.go b/adapters/infytv/infytv.go index 1d2a7b29d8..1d0c70123a 100644 --- a/adapters/infytv/infytv.go +++ b/adapters/infytv/infytv.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/infytv/infytv_test.go b/adapters/infytv/infytv_test.go index c9d8c140cb..85a4dd4b9b 100644 --- a/adapters/infytv/infytv_test.go +++ b/adapters/infytv/infytv_test.go @@ -3,9 +3,9 @@ package infytv import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/infytv/params_test.go b/adapters/infytv/params_test.go index 7ab22349be..671a5a4e71 100644 --- a/adapters/infytv/params_test.go +++ b/adapters/infytv/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/inmobi/inmobi.go b/adapters/inmobi/inmobi.go index 6aa6422127..f79151bea8 100644 --- a/adapters/inmobi/inmobi.go +++ b/adapters/inmobi/inmobi.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type InMobiAdapter struct { diff --git a/adapters/inmobi/inmobi_test.go b/adapters/inmobi/inmobi_test.go index 67f095f86a..89884a8dde 100644 --- a/adapters/inmobi/inmobi_test.go +++ b/adapters/inmobi/inmobi_test.go @@ -3,9 +3,9 @@ package inmobi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/insticator/insticator.go b/adapters/insticator/insticator.go index 2d0014c2c5..fc8487971b 100644 --- a/adapters/insticator/insticator.go +++ b/adapters/insticator/insticator.go @@ -3,16 +3,15 @@ package insticator import ( "fmt" "net/http" - "net/url" "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/mathutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/mathutil" ) type ext struct { @@ -25,12 +24,7 @@ type impInsticatorExt struct { } type adapter struct { - endpoint string - extraInfo ExtraInfo -} - -type ExtraInfo struct { - AppEndpoint string `json:"app_endpoint,omitempty"` + endpoint string } type reqExt struct { @@ -60,53 +54,12 @@ type bidInsticatorExt struct { // Builder builds a new instance of the Insticator adapter with the given config. func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - extraInfo, err := parseExtraInfo(config.ExtraAdapterInfo) - if err != nil { - return nil, err - } - bidder := &adapter{ - endpoint: config.Endpoint, - extraInfo: extraInfo, + endpoint: config.Endpoint, } return bidder, nil } -func parseExtraInfo(v string) (ExtraInfo, error) { - if len(v) == 0 { - return ExtraInfo{}, nil - } - - var extraInfo ExtraInfo - if err := jsonutil.Unmarshal([]byte(v), &extraInfo); err != nil { - return extraInfo, fmt.Errorf("invalid extra info: %v", err) - } - - return extraInfo, nil -} - -// buildEndpointURL builds the endpoint URL with publisherId query parameter -func (a *adapter) buildEndpointURL(publisherId string, request *openrtb2.BidRequest) string { - // Use app endpoint from extra_info if this is an app request - baseEndpoint := a.endpoint - if request.App != nil && a.extraInfo.AppEndpoint != "" { - baseEndpoint = a.extraInfo.AppEndpoint - } - - // Append publisherId as query parameter - if publisherId != "" { - parsedURL, err := url.Parse(baseEndpoint) - if err == nil { - query := parsedURL.Query() - query.Set("publisherId", publisherId) - parsedURL.RawQuery = query.Encode() - return parsedURL.String() - } - } - - return baseEndpoint -} - // getMediaTypeForBid figures out which media type this bid is for func getMediaTypeForBid(bid *openrtb2.Bid) openrtb_ext.BidType { switch bid.MType { @@ -123,7 +76,6 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte var errs []error var adapterRequests []*adapters.RequestData var groupedImps = make(map[string][]openrtb2.Imp) - var publisherId string reqExt, err := makeReqExt(request) if err != nil { @@ -137,15 +89,14 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte isPublisherIdPopulated := false // Flag to track if populatePublisherId has been called for i := 0; i < len(request.Imp); i++ { - impCopy, impKey, impPublisherId, err := makeImps(request.Imp[i]) + impCopy, impKey, publisherId, err := makeImps(request.Imp[i]) if err != nil { errs = append(errs, err) continue } - // Populate publisher.id from imp extension (only once) + // Populate publisher.id from imp extension if !isPublisherIdPopulated { - publisherId = impPublisherId populatePublisherId(publisherId, &requestCopy) isPublisherIdPopulated = true } @@ -167,7 +118,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte } for _, impList := range groupedImps { - if adapterReq, err := a.makeRequest(&requestCopy, impList, publisherId); err == nil { + if adapterReq, err := a.makeRequest(&requestCopy, impList); err == nil { adapterRequests = append(adapterRequests, adapterReq) } else { errs = append(errs, err) @@ -176,7 +127,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte return adapterRequests, errs } -func (a *adapter) makeRequest(request *openrtb2.BidRequest, impList []openrtb2.Imp, publisherId string) (*adapters.RequestData, error) { +func (a *adapter) makeRequest(request *openrtb2.BidRequest, impList []openrtb2.Imp) (*adapters.RequestData, error) { request.Imp = impList reqJSON, err := jsonutil.Marshal(request) @@ -184,9 +135,6 @@ func (a *adapter) makeRequest(request *openrtb2.BidRequest, impList []openrtb2.I return nil, err } - // Build endpoint URL with publisherId query parameter - endpointURL := a.buildEndpointURL(publisherId, request) - headers := http.Header{} headers.Add("Content-Type", "application/json;charset=utf-8") headers.Add("Accept", "application/json") @@ -208,7 +156,7 @@ func (a *adapter) makeRequest(request *openrtb2.BidRequest, impList []openrtb2.I return &adapters.RequestData{ Method: "POST", - Uri: endpointURL, + Uri: a.endpoint, Body: reqJSON, Headers: headers, ImpIDs: openrtb_ext.GetImpIDs(request.Imp), @@ -238,10 +186,8 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R bid := &seatBid.Bid[i] bidType := getMediaTypeForBid(bid) b := &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - BidMeta: getBidMeta(bid, bidType, seatBid.Seat), - BidVideo: getBidVideo(bid, bidType), + Bid: &seatBid.Bid[i], + BidType: bidType, } bidResponse.Bids = append(bidResponse.Bids, b) } @@ -249,42 +195,6 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R return bidResponse, nil } -// getBidMeta extracts metadata from the bid for brand safety and reporting -func getBidMeta(bid *openrtb2.Bid, bidType openrtb_ext.BidType, seat string) *openrtb_ext.ExtBidPrebidMeta { - meta := &openrtb_ext.ExtBidPrebidMeta{ - MediaType: string(bidType), - Seat: seat, - } - - if len(bid.ADomain) > 0 { - meta.AdvertiserDomains = bid.ADomain - } - - if len(bid.Cat) > 0 { - meta.PrimaryCategoryID = bid.Cat[0] - meta.SecondaryCategoryIDs = bid.Cat[1:] - } - - return meta -} - -// getBidVideo extracts video-specific metadata from the bid -func getBidVideo(bid *openrtb2.Bid, bidType openrtb_ext.BidType) *openrtb_ext.ExtBidPrebidVideo { - if bidType != openrtb_ext.BidTypeVideo { - return nil - } - - var primaryCategory string - if len(bid.Cat) > 0 { - primaryCategory = bid.Cat[0] - } - - return &openrtb_ext.ExtBidPrebidVideo{ - Duration: int(bid.Dur), - PrimaryCategory: primaryCategory, - } -} - func makeImps(imp openrtb2.Imp) (openrtb2.Imp, string, string, error) { var bidderExt adapters.ExtImpBidder if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { @@ -319,13 +229,13 @@ func makeImps(imp openrtb2.Imp) (openrtb2.Imp, string, string, error) { // Validate Video if it exists if imp.Video != nil { if err := validateVideoParams(imp.Video); err != nil { - return openrtb2.Imp{}, "", insticatorExt.PublisherId, &errortypes.BadInput{ + return openrtb2.Imp{}, insticatorExt.AdUnitId, insticatorExt.PublisherId, &errortypes.BadInput{ Message: err.Error(), } } } - // Return the imp, adUnitId as groupKey, publisherId, and no error + // Return the imp, AdUnitId, and no error return imp, insticatorExt.AdUnitId, insticatorExt.PublisherId, nil } diff --git a/adapters/insticator/insticator_test.go b/adapters/insticator/insticator_test.go index 6e80fa4eac..b557aedce4 100644 --- a/adapters/insticator/insticator_test.go +++ b/adapters/insticator/insticator_test.go @@ -3,16 +3,14 @@ package insticator import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { bidder, buildErr := Builder(openrtb_ext.BidderInsticator, config.Adapter{ - Endpoint: "https://insticator.example.com/v1/pbs", - ExtraAdapterInfo: `{"app_endpoint": "https://insticator-app.example.com/v1/pbs"}`, - }, + Endpoint: "https://insticator.example.com/v1/pbs"}, config.Server{ExternalUrl: "https://insticator.example.com/v1/pbs", GvlID: 1, DataCenter: "2"}) if buildErr != nil { diff --git a/adapters/insticator/insticatortest/exemplary/app-banner.json b/adapters/insticator/insticatortest/exemplary/app-banner.json index 443dde561d..4c71760a73 100644 --- a/adapters/insticator/insticatortest/exemplary/app-banner.json +++ b/adapters/insticator/insticatortest/exemplary/app-banner.json @@ -1,103 +1,85 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" } } - } - ], - "app": { - "publisher": { - "id": "test-publisher-id" + ], + "app": { + "publisher": { + "id": "test-publisher-id" + } + }, + "device": { + "ua": "", + "ip": "1.1.1.2", + "ipv6": "" } }, - "device": { - "ua": "", - "ip": "1.1.1.2", - "ipv6": "" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator-app.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "device": { - "ip": "1.1.1.2" - }, - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "device":{ + "ip": "1.1.1.2" + }, + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "app": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "app": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1" - ], "crid": "crid_10", "h": 90, "w": 728, @@ -107,51 +89,39 @@ "mediaType": "banner" } } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1" - ], - "crid": "crid_10", - "w": 728, - "h": 90, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" + }] } - } - }, - "BidMeta": { - "advertiserDomains": [ - "insticator.com" ], - "mediaType": "banner", - "primaryCatId": "IAB1" - }, - "type": "banner" + "cur": "USD" + } } - ] - } - ] -} + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/exemplary/app-video.json b/adapters/insticator/insticatortest/exemplary/app-video.json index 6173802b15..2f0143fe96 100644 --- a/adapters/insticator/insticatortest/exemplary/app-video.json +++ b/adapters/insticator/insticatortest/exemplary/app-video.json @@ -59,7 +59,7 @@ "1.22.22.1" ] }, - "uri": "https://insticator-app.example.com/v1/pbs?publisherId=test-publisher-id", + "uri": "https://insticator.example.com/v1/pbs", "body": { "device": { "ip": "1.22.22.1", @@ -125,15 +125,8 @@ { "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-vast-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1-1" - ], - "dur": 30, "mtype": 2, "crid": "crid_10", "h": 90, @@ -162,13 +155,6 @@ "impid": "test-imp-id", "price": 0.5, "adm": "some-test-vast-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1-1" - ], - "dur": 30, "crid": "crid_10", "w": 728, "mtype": 2, @@ -179,20 +165,9 @@ } } }, - "BidMeta": { - "advertiserDomains": [ - "insticator.com" - ], - "mediaType": "video", - "primaryCatId": "IAB1-1" - }, - "BidVideo": { - "duration": 30, - "primary_category": "IAB1-1" - }, "type": "video" } ] } ] -} +} \ No newline at end of file diff --git a/adapters/insticator/insticatortest/exemplary/multi-format.json b/adapters/insticator/insticatortest/exemplary/multi-format.json index 2efb075a39..1fedfe8dc9 100644 --- a/adapters/insticator/insticatortest/exemplary/multi-format.json +++ b/adapters/insticator/insticatortest/exemplary/multi-format.json @@ -1,146 +1,121 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "video": { + "w": 728, + "h": 90, + "protocols": [2], + "playbackmethod": [2], + "mimes": ["foo", "bar"] + }, + "ext": { + "bidder": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] - }, - "video": { - "w": 728, - "h": 90, - "protocols": [ - 2 - ], - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] - }, - "ext": { - "bidder": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "video": { - "w": 728, - "h": 90, - "protocols": [ - 2 - ], - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] - }, - "ext": { - "insticator": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "video": { + "w": 728, + "h": 90, + "protocols": [2], + "playbackmethod": [2], + "mimes": ["foo", "bar"] + }, + "ext": { + "insticator": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, "w": 728 - } - ] - } - ], - "cur": "USD" + }] + } + ], + "cur": "USD" + } } } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90 - }, - "type": "banner" - } - ] - } - ] -} + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90 + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/exemplary/multi-imps.json b/adapters/insticator/insticatortest/exemplary/multi-imps.json index 794c34bfbb..eb744ced11 100644 --- a/adapters/insticator/insticatortest/exemplary/multi-imps.json +++ b/adapters/insticator/insticatortest/exemplary/multi-imps.json @@ -1,175 +1,137 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id1", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id1", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" } - } - }, - { - "id": "test-imp-id2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] }, - "ext": { - "bidder": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" - } - } - }, - { - "id": "test-imp-id3", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + { + "id": "test-imp-id2", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" } - } - }, - { - "id": "test-imp-id4", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + }, + { + "id": "test-imp-id3", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] + } }, - "ext": { - "bidder": { - "adUnitId": "siab", - "publisherId": "test-publisher-id" + { + "id": "test-imp-id4", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "siab", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id1", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" - } } }, - { - "id": "test-imp-id2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id1", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "insticator": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" } - } - }, - { - "id": "test-imp-id3", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + }, + { + "id":"test-imp-id2", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" } - ] + } }, - "ext": { - "insticator": { - "adUnitId": "inview", - "publisherId": "test-publisher-id" + { + "id":"test-imp-id3", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "inview", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id1","test-imp-id2", "test-imp-id3"] }, - "impIDs": [ - "test-imp-id1", - "test-imp-id2", - "test-imp-id3" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [ + { "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id1", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, @@ -179,98 +141,91 @@ "mediaType": "banner" } } - }, - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id2", - "price": 0.6, - "adm": "some-test-ad", - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - "insticator": { - "mediaType": "banner" + }, + { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id2", + "price": 0.600000, + "adm": "some-test-ad", + "crid": "crid_10", + "h": 90, + "w": 728, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id3", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - "insticator": { - "mediaType": "banner" + }, + { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id3", + "price": 0.500000, + "adm": "some-test-ad", + "crid": "crid_10", + "h": 90, + "w": 728, + "ext": { + "insticator": { + "mediaType": "banner" + } } } - } - ] - } - ], - "cur": "USD" + ] + } + ], + "cur": "USD" + } } - } - }, - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id4", - "banner": { - "format": [ + }, + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "siab", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id4", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "siab", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id4"] }, - "impIDs": [ - "test-imp-id4" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [ + { "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id4", - "price": 0.5, + "impid": "test-imp-id4", + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, @@ -280,93 +235,95 @@ "mediaType": "banner" } } - } - ] - } - ], - "cur": "USD" + } + ] + } + ], + "cur": "USD" + } } } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "insticator": { - "mediaType": "banner" + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id1", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } + }, + "type": "banner" }, - "type": "banner" - }, - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id2", - "price": 0.6, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "insticator": { - "mediaType": "banner" + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id2", + "price": 0.6, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } + }, + "type": "banner" }, - "type": "banner" - }, - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id3", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "insticator": { - "mediaType": "banner" + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id3", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - "type": "banner" - } - ] - }, - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id4", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "insticator": { - "mediaType": "banner" + }, + "type": "banner" + } + ] + }, + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id4", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - "type": "banner" - } - ] - } - ] -} + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/exemplary/site-banner.json b/adapters/insticator/insticatortest/exemplary/site-banner.json index ada1c6c7c0..4586fdc176 100644 --- a/adapters/insticator/insticatortest/exemplary/site-banner.json +++ b/adapters/insticator/insticatortest/exemplary/site-banner.json @@ -47,7 +47,7 @@ "2001:0db8:85a3:0000:0000:8a2e:0370:7334" ] }, - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", + "uri": "https://insticator.example.com/v1/pbs", "body": { "device": { "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334", @@ -104,14 +104,8 @@ { "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1" - ], "crid": "crid_10", "h": 90, "w": 728, @@ -140,12 +134,6 @@ "impid": "test-imp-id", "price": 0.5, "adm": "some-test-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1" - ], "crid": "crid_10", "w": 728, "h": 90, @@ -156,16 +144,9 @@ } } }, - "BidMeta": { - "advertiserDomains": [ - "insticator.com" - ], - "mediaType": "banner", - "primaryCatId": "IAB1" - }, "type": "banner" } ] } ] -} +} \ No newline at end of file diff --git a/adapters/insticator/insticatortest/exemplary/site-video.json b/adapters/insticator/insticatortest/exemplary/site-video.json index 0e7b404ba6..bd7c40af20 100644 --- a/adapters/insticator/insticatortest/exemplary/site-video.json +++ b/adapters/insticator/insticatortest/exemplary/site-video.json @@ -5,20 +5,13 @@ { "id": "test-imp-id", "video": { - "w": 728, + "w": 728, "h": 90, - "protocols": [ - 2 - ], + "protocols": [2], "placement": 1, "startdelay": -2, - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] + "playbackmethod": [2], + "mimes": ["foo", "bar"] }, "ext": { "bidder": { @@ -34,10 +27,11 @@ } } }, + "httpCalls": [ { "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", + "uri": "https://insticator.example.com/v1/pbs", "body": { "ext": { "insticator": { @@ -52,22 +46,15 @@ "id": "test-request-id", "imp": [ { - "id": "test-imp-id", + "id":"test-imp-id", "video": { - "w": 728, + "w": 728, "h": 90, - "protocols": [ - 2 - ], + "protocols": [2], "placement": 1, "startdelay": -2, - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] + "playbackmethod": [2], + "mimes": ["foo", "bar"] }, "ext": { "insticator": { @@ -83,9 +70,7 @@ } } }, - "impIDs": [ - "test-imp-id" - ] + "impIDs":["test-imp-id"] }, "mockResponse": { "status": 200, @@ -94,30 +79,21 @@ "seatbid": [ { "seat": "insticator", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-vast-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1-1" - ], - "dur": 30, - "mtype": 2, - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - "insticator": { - "mediaType": "video" - } + "bid": [{ + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-vast-ad", + "mtype": 2, + "crid": "crid_10", + "h": 90, + "w": 728, + "ext": { + "insticator": { + "mediaType": "video" } } - ] + }] } ], "cur": "USD" @@ -125,6 +101,7 @@ } } ], + "expectedBidResponses": [ { "currency": "USD", @@ -135,13 +112,6 @@ "impid": "test-imp-id", "price": 0.5, "adm": "some-test-vast-ad", - "adomain": [ - "insticator.com" - ], - "cat": [ - "IAB1-1" - ], - "dur": 30, "crid": "crid_10", "w": 728, "mtype": 2, @@ -152,17 +122,6 @@ } } }, - "BidMeta": { - "advertiserDomains": [ - "insticator.com" - ], - "mediaType": "video", - "primaryCatId": "IAB1-1" - }, - "BidVideo": { - "duration": 30, - "primary_category": "IAB1-1" - }, "type": "video" } ] diff --git a/adapters/insticator/insticatortest/supplemental/204.json b/adapters/insticator/insticatortest/supplemental/204.json index e2a7ef5787..f0a43defb1 100644 --- a/adapters/insticator/insticatortest/supplemental/204.json +++ b/adapters/insticator/insticatortest/supplemental/204.json @@ -1,81 +1,71 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 204, - "body": {} + "mockResponse": { + "status": 204, + "body": {} + } } - } - ], - "expectedBidResponses": [] -} \ No newline at end of file + ], + "expectedBidResponses": [] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/app-pubid-absent.json b/adapters/insticator/insticatortest/supplemental/app-pubid-absent.json index 5efc22fa3c..0fcafa58b1 100644 --- a/adapters/insticator/insticatortest/supplemental/app-pubid-absent.json +++ b/adapters/insticator/insticatortest/supplemental/app-pubid-absent.json @@ -1,89 +1,77 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-app-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-app-id", - "publisherId": "test-publisher-id" } } - } - ], - "app": { - "id": "test-app-id", - "bundle": "test-app.com" + ], + "app": { + "id": "test-app-id", + "bundle": "test-app.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator-app.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-app-id", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-app-id", + "publisherId": "test-publisher-id" + } } } - } - ], - "app": { + ], + "app": { "id": "test-app-id", "bundle": "test-app.com", - "publisher": { - "id": "test-publisher-id" + "publisher": { + "id": "test-publisher-id" + } } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, @@ -94,38 +82,39 @@ "mediaType": "banner" } } - } - ] - } - ], - "cur": "USD" + }] + } + ], + "cur": "USD" + } } } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - "type": "banner" - } - ] - } - ] -} + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/bad-imp-ext.json b/adapters/insticator/insticatortest/supplemental/bad-imp-ext.json index 71727e03f4..2e0507791a 100644 --- a/adapters/insticator/insticatortest/supplemental/bad-imp-ext.json +++ b/adapters/insticator/insticatortest/supplemental/bad-imp-ext.json @@ -1,32 +1,29 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": "invalid ext" + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": "invalid ext" + } + } + ], + "site": { + "publisher": { + "id": "test-publisher-id" } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] -} \ No newline at end of file + }, + + "expectedMakeRequestsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/currency-conversion-fail.json b/adapters/insticator/insticatortest/supplemental/currency-conversion-fail.json index 1bdc9587da..4c7082f47d 100644 --- a/adapters/insticator/insticatortest/supplemental/currency-conversion-fail.json +++ b/adapters/insticator/insticatortest/supplemental/currency-conversion-fail.json @@ -1,49 +1,49 @@ { - "mockBidRequest": { - "cur": [ - "GBP" - ], - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + "mockBidRequest": { + "cur": [ + "GBP" + ], + "id": "test-request-id", + "imp": [ { - "w": 728, - "h": 90 + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 728, + "h": 90 + } + ] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } + }, + "bidfloor": 1, + "bidfloorcur": "GBP" + } + ], + "site": { + "publisher": { + "id": "test-publisher-id" } - ] }, "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" - } - }, - "bidfloor": 1, - "bidfloorcur": "GBP" - } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "INR": { - "USD": 2 + "prebid": { + "currency": { + "rates": { + "INR": { + "USD": 2 + } + }, + "usepbsrates": false + } } - }, - "usepbsrates": false } - } - } - }, - "expectedMakeRequestsErrors": [ + }, + "expectedMakeRequestsErrors": [ { "value": "Error in converting the provided bid floor currency from GBP to USD", "comparison": "literal" diff --git a/adapters/insticator/insticatortest/supplemental/currency-conversion.json b/adapters/insticator/insticatortest/supplemental/currency-conversion.json index a067eac721..9ce11dcdfb 100644 --- a/adapters/insticator/insticatortest/supplemental/currency-conversion.json +++ b/adapters/insticator/insticatortest/supplemental/currency-conversion.json @@ -1,152 +1,152 @@ { - "mockBidRequest": { - "cur": [ - "GBP" - ], - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" - } - }, - "bidfloor": 1, - "bidfloorcur": "GBP" - } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - }, - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 2 - } - }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "cur": [ + "mockBidRequest": { + "cur": [ "GBP" - ], - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ + ], + "id": "test-request-id", + "imp": [ { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" - } - }, - "bidfloor": 2, - "bidfloorcur": "USD" + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 728, + "h": 90 + } + ] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } + }, + "bidfloor": 1, + "bidfloorcur": "GBP" } - ], - "site": { + ], + "site": { "publisher": { - "id": "test-publisher-id" + "id": "test-publisher-id" } - } }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "h": 90, - "w": 728, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" - } - } + "ext": { + "prebid": { + "currency": { + "rates": { + "GBP": { + "USD": 2 + } + }, + "usepbsrates": false } - ] } - ], - "cur": "USD" } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ + }, + "httpCalls": [ { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" - } + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "cur": [ + "GBP" + ], + "ext": { + "insticator": { + "caller": [ + { + "name": "Prebid-Server", + "version": "n/a" + } + ] + } + }, + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 728, + "h": 90 + } + ] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } + }, + "bidfloor": 2, + "bidfloorcur": "USD" + } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } + } + }, + "impIDs": [ + "test-imp-id" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [ + { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "crid": "crid_10", + "h": 90, + "w": 728, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } + } + } + ] + } + ], + "cur": "USD" + } } - }, - "type": "banner" } - ] - } - ] -} + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/device-validation.json b/adapters/insticator/insticatortest/supplemental/device-validation.json index b6901f9177..a493e1b28a 100644 --- a/adapters/insticator/insticatortest/supplemental/device-validation.json +++ b/adapters/insticator/insticatortest/supplemental/device-validation.json @@ -56,7 +56,7 @@ "1.22.22.1" ] }, - "uri": "https://insticator-app.example.com/v1/pbs?publisherId=test-publisher-id", + "uri": "https://insticator.example.com/v1/pbs", "body": { "device": { "ip": "1.22.22.1" @@ -120,7 +120,7 @@ { "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-vast-ad", "mtype": 2, "crid": "crid_10", @@ -165,4 +165,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/multi-imp-mixed-validation.json b/adapters/insticator/insticatortest/supplemental/multi-imp-mixed-validation.json index 8ea638fcee..18fa069aed 100644 --- a/adapters/insticator/insticatortest/supplemental/multi-imp-mixed-validation.json +++ b/adapters/insticator/insticatortest/supplemental/multi-imp-mixed-validation.json @@ -1,137 +1,110 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id1", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id1", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" } - } - }, - { - "id": "test-imp-id2", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 3, - 5, - 6 - ], - "w": 640, - "h": 480 }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + { + "id": "test-imp-id2", + "video": { + "mimes": ["video/mp4"], + "minduration": 5, + "maxduration": 30, + "protocols": [2, 3, 5, 6], + "w": 640, + "h": 480 + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id1", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" - } } }, - { - "id": "test-imp-id2", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 3, - 5, - 6 - ], - "w": 640, - "h": 480 + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id1", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } + } }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + { + "id":"test-imp-id2", + "video": { + "mimes": ["video/mp4"], + "minduration": 5, + "maxduration": 30, + "protocols": [2, 3, 5, 6], + "w": 640, + "h": 480 + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id1", "test-imp-id2"] }, - "impIDs": [ - "test-imp-id1", - "test-imp-id2" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id1", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, @@ -142,38 +115,38 @@ "mediaType": "banner" } } - } - ] - } - ], - "cur": "USD" + }] + } + ], + "cur": "USD" + } } } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id1", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - "type": "banner" - } - ] - } - ] -} + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/request-ext-unmarshal-fail.json b/adapters/insticator/insticatortest/supplemental/request-ext-unmarshal-fail.json index 3a99a142a1..1ea883a11c 100644 --- a/adapters/insticator/insticatortest/supplemental/request-ext-unmarshal-fail.json +++ b/adapters/insticator/insticatortest/supplemental/request-ext-unmarshal-fail.json @@ -1,24 +1,17 @@ { - "mockBidRequest": { +"mockBidRequest": { "id": "test-request-id", "imp": [ { "id": "test-imp-id", "video": { - "w": 728, + "w": 728, "h": 90, - "protocols": [ - 2 - ], + "protocols": [2], "placement": 1, "startdelay": -2, - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] + "playbackmethod": [2], + "mimes": ["foo", "bar"] }, "ext": { "bidder": "invalid" @@ -31,17 +24,18 @@ } }, "ext": { - "insticator": "invalid" + "insticator": "invalid" } }, - "expectedMakeRequestsErrors": [ - { - "value": "cannot unmarshal insticator.reqExt.Insticator: expect { or n, but found \"", - "comparison": "literal" - }, - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] + + "expectedMakeRequestsErrors": [ + { + "value": "cannot unmarshal insticator.reqExt.Insticator: expect { or n, but found \"", + "comparison": "literal" + }, + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] } \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/response-unmarshal-fail.json b/adapters/insticator/insticatortest/supplemental/response-unmarshal-fail.json index 7ae1059b9c..a3b40b084e 100644 --- a/adapters/insticator/insticatortest/supplemental/response-unmarshal-fail.json +++ b/adapters/insticator/insticatortest/supplemental/response-unmarshal-fail.json @@ -1,102 +1,102 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "w": 728, - "h": 90, - "protocols": [ - 2 - ], - "placement": 1, - "startdelay": -2, - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" - } - } - } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ { - "id": "test-imp-id", - "video": { - "w": 728, - "h": 90, - "protocols": [ - 2 - ], - "placement": 1, - "startdelay": -2, - "playbackmethod": [ - 2 - ], - "mimes": [ - "foo", - "bar" - ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + "id": "test-imp-id", + "video": { + "w": 728, + "h": 90, + "protocols": [ + 2 + ], + "placement": 1, + "startdelay": -2, + "playbackmethod": [ + 2 + ], + "mimes": [ + "foo", + "bar" + ] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } - } } - ], - "site": { + ], + "site": { "publisher": { - "id": "test-publisher-id" + "id": "test-publisher-id" } - } - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": "invalid json" - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ + { + "name": "Prebid-Server", + "version": "n/a" + } + ] + } + }, + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 728, + "h": 90, + "protocols": [ + 2 + ], + "placement": 1, + "startdelay": -2, + "playbackmethod": [ + 2 + ], + "mimes": [ + "foo", + "bar" + ] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } + } + } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } + } + }, + "impIDs": [ + "test-imp-id" + ] + }, + "mockResponse": { + "status": 200, + "body": "invalid json" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] } \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/site-pubid-absent.json b/adapters/insticator/insticatortest/supplemental/site-pubid-absent.json index 7b2b3c5e6e..00c694a197 100644 --- a/adapters/insticator/insticatortest/supplemental/site-pubid-absent.json +++ b/adapters/insticator/insticatortest/supplemental/site-pubid-absent.json @@ -1,89 +1,77 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" } } - } - ], - "site": { - "id": "test-site-id", - "domain": "test-site.com" + ], + "site": { + "id": "test-site-id", + "domain": "test-site.com" } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } - } - ], - "site": { + ], + "site": { "id": "test-site-id", "domain": "test-site.com", - "publisher": { - "id": "test-publisher-id" + "publisher": { + "id": "test-publisher-id" + } } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "insticator", - "bid": [ - { + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "insticator", + "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", - "price": 0.5, + "price": 0.500000, "adm": "some-test-ad", "crid": "crid_10", "h": 90, @@ -94,38 +82,39 @@ "mediaType": "banner" } } - } - ] - } - ], - "cur": "USD" + }] + } + ], + "cur": "USD" + } } } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90, - "mtype": 1, - "ext": { - "insticator": { - "mediaType": "banner" + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "crid": "crid_10", + "w": 728, + "h": 90, + "mtype": 1, + "ext": { + "insticator": { + "mediaType": "banner" + } } - } - }, - "type": "banner" - } - ] - } - ] -} + }, + "type": "banner" + } + ] + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/status-not-ok.json b/adapters/insticator/insticatortest/supplemental/status-not-ok.json index 374b2bca26..e530896e2d 100644 --- a/adapters/insticator/insticatortest/supplemental/status-not-ok.json +++ b/adapters/insticator/insticatortest/supplemental/status-not-ok.json @@ -1,95 +1,86 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "bidder": { + "adUnitId": "fake-invalid-site-id", + "publisherId": "test-publisher-id" } - ] - }, - "ext": { - "bidder": { - "adUnitId": "fake-invalid-site-id", - "publisherId": "test-publisher-id" } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://insticator.example.com/v1/pbs?publisherId=test-publisher-id", - "body": { - "ext": { - "insticator": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://insticator.example.com/v1/pbs", + "body": { + "ext": { + "insticator": { + "caller": [ { - "w": 728, - "h": 90 + "name": "Prebid-Server", + "version": "n/a" } ] - }, - "ext": { - "insticator": { - "adUnitId": "fake-invalid-site-id", - "publisherId": "test-publisher-id" + } + }, + "id": "test-request-id", + "imp": [ + { + "id":"test-imp-id", + "banner": { + "format": [{"w": 728, "h": 90}] + }, + "ext": { + "insticator": { + "adUnitId": "fake-invalid-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" - } - } + }, + "impIDs":["test-imp-id"] }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 400, - "body": { - "error": { - "message": "Validation failed", - "details": [ - { - "message": "site.id is invalid" - } - ] + "mockResponse": { + "status": 400, + "body": { + "error": { + "message": "Validation failed", + "details": [ + { + "message": "site.id is invalid" + } + ] + } } } } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} \ No newline at end of file + ], + + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/insticator/insticatortest/supplemental/video-validation-fail.json b/adapters/insticator/insticatortest/supplemental/video-validation-fail.json index 51f40f8333..553b0f68c6 100644 --- a/adapters/insticator/insticatortest/supplemental/video-validation-fail.json +++ b/adapters/insticator/insticatortest/supplemental/video-validation-fail.json @@ -1,31 +1,33 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "adUnitId": "fake-site-id", - "publisherId": "test-publisher-id" + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "video": { + "w": 728, + "h": 90 + }, + "ext": { + "bidder": { + "adUnitId": "fake-site-id", + "publisherId": "test-publisher-id" + } } } + ], + "site": { + "publisher": { + "id": "test-publisher-id" + } } - ], - "site": { - "publisher": { - "id": "test-publisher-id" + }, + + "expectedMakeRequestsErrors": [ + { + "value": "One or more invalid or missing video field(s) w, h, mimes", + "comparison": "literal" } - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "One or more invalid or missing video field(s) w, h, mimes", - "comparison": "literal" - } - ] -} \ No newline at end of file + ] + } + \ No newline at end of file diff --git a/adapters/insticator/params_test.go b/adapters/insticator/params_test.go index 85089bb1ec..47d2bdf44f 100644 --- a/adapters/insticator/params_test.go +++ b/adapters/insticator/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/Insticator.json diff --git a/adapters/intenze/intenze_test.go b/adapters/intenze/intenze_test.go deleted file mode 100644 index 00d97a6b31..0000000000 --- a/adapters/intenze/intenze_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package intenze - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderIntenze, config.Adapter{ - Endpoint: "http://lb-east.intenze.co/?pass={{.AccountID}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "intenzetest", bidder) -} - -func TestEndpointTemplateMalformed(t *testing.T) { - _, buildErr := Builder(openrtb_ext.BidderIntenze, config.Adapter{ - Endpoint: "{{Malformed}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - assert.Error(t, buildErr) -} diff --git a/adapters/interactiveoffers/interactiveoffers.go b/adapters/interactiveoffers/interactiveoffers.go index 3c3d750bbb..6eaee7a978 100644 --- a/adapters/interactiveoffers/interactiveoffers.go +++ b/adapters/interactiveoffers/interactiveoffers.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/interactiveoffers/interactiveoffers_test.go b/adapters/interactiveoffers/interactiveoffers_test.go index 16c5eeb958..df116c60a5 100644 --- a/adapters/interactiveoffers/interactiveoffers_test.go +++ b/adapters/interactiveoffers/interactiveoffers_test.go @@ -3,9 +3,9 @@ package interactiveoffers import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/interactiveoffers/params_test.go b/adapters/interactiveoffers/params_test.go index cb15379164..631d8f44ae 100644 --- a/adapters/interactiveoffers/params_test.go +++ b/adapters/interactiveoffers/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/intertech/intertech.go b/adapters/intertech/intertech.go new file mode 100644 index 0000000000..ae491995a7 --- /dev/null +++ b/adapters/intertech/intertech.go @@ -0,0 +1,226 @@ +package intertech + +import ( + "fmt" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +const ( + pageIDMacro = "{{page_id}}" + impIDMacro = "{{imp_id}}" +) + +type adapter struct { + endpoint string +} + +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + var errs []error + var requests []*adapters.RequestData + + referer := getReferer(request) + cur := getCur(request) + + for _, imp := range request.Imp { + extImp, err := parseAndValidateImpExt(imp) + if err != nil { + errs = append(errs, err) + continue + } + + modifiedImp, err := modifyImp(imp) + if err != nil { + errs = append(errs, err) + continue + } + + modifiedUrl := a.modifyUrl(extImp, referer, cur) + + modRequest := *request + modRequest.Imp = []openrtb2.Imp{modifiedImp} + + reqData, err := buildRequestData(modRequest, modifiedUrl) + if err != nil { + errs = append(errs, err) + continue + } + + requests = append(requests, reqData) + } + + return requests, errs +} + +func parseAndValidateImpExt(imp openrtb2.Imp) (openrtb_ext.ExtImpIntertech, error) { + var bidderExt adapters.ExtImpBidder + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { + return openrtb_ext.ExtImpIntertech{}, &errortypes.BadInput{ + Message: fmt.Sprintf("imp #%s: unable to parse bidder ext: %s", imp.ID, err), + } + } + + var extImp openrtb_ext.ExtImpIntertech + if err := jsonutil.Unmarshal(bidderExt.Bidder, &extImp); err != nil { + return openrtb_ext.ExtImpIntertech{}, &errortypes.BadInput{ + Message: fmt.Sprintf("imp #%s: unable to parse intertech ext: %s", imp.ID, err), + } + } + + return extImp, nil +} + +func modifyImp(imp openrtb2.Imp) (openrtb2.Imp, error) { + if imp.Banner != nil { + banner, err := updateBanner(imp.Banner) + if err != nil { + return openrtb2.Imp{}, &errortypes.BadInput{ + Message: fmt.Sprintf("imp #%s: %s", imp.ID, err.Error()), + } + } + imp.Banner = banner + } + return imp, nil +} + +func updateBanner(banner *openrtb2.Banner) (*openrtb2.Banner, error) { + bannerCopy := *banner + if bannerCopy.W == nil || bannerCopy.H == nil || *bannerCopy.W == 0 || *bannerCopy.H == 0 { + if len(bannerCopy.Format) > 0 { + w := bannerCopy.Format[0].W + h := bannerCopy.Format[0].H + bannerCopy.W = &w + bannerCopy.H = &h + } else { + return nil, fmt.Errorf("Invalid sizes provided for Banner") + } + } + return &bannerCopy, nil +} + +func (a *adapter) modifyUrl(extImp openrtb_ext.ExtImpIntertech, referer, cur string) string { + pageStr := strconv.Itoa(extImp.PageID) + impStr := strconv.Itoa(extImp.ImpID) + + resolvedUrl := strings.ReplaceAll(a.endpoint, pageIDMacro, url.QueryEscape(pageStr)) + resolvedUrl = strings.ReplaceAll(resolvedUrl, impIDMacro, url.QueryEscape(impStr)) + + if referer != "" { + resolvedUrl += "&target-ref=" + url.QueryEscape(referer) + } + + if cur != "" { + resolvedUrl += "&ssp-cur=" + cur + } + + return resolvedUrl +} + +func buildRequestData(bidRequest openrtb2.BidRequest, uri string) (*adapters.RequestData, error) { + body, err := jsonutil.Marshal(bidRequest) + if err != nil { + return nil, err + } + + headers := http.Header{} + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + + if bidRequest.Device != nil { + if bidRequest.Device.UA != "" { + headers.Add("User-Agent", bidRequest.Device.UA) + } + if bidRequest.Device.IP != "" { + headers.Add("X-Forwarded-For", bidRequest.Device.IP) + headers.Add("X-Real-Ip", bidRequest.Device.IP) + } + if bidRequest.Device.Language != "" { + headers.Add("Accept-Language", bidRequest.Device.Language) + } + } + return &adapters.RequestData{ + Method: http.MethodPost, + Uri: uri, + Body: body, + Headers: headers, + ImpIDs: openrtb_ext.GetImpIDs(bidRequest.Imp), + }, nil +} + +func getReferer(request *openrtb2.BidRequest) string { + if request.Site != nil { + return request.Site.Page + } + return "" +} + +func getCur(request *openrtb2.BidRequest) string { + if len(request.Cur) > 0 { + return request.Cur[0] + } + return "" +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(responseData) { + return nil, nil + } + + if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { + return nil, []error{err} + } + + var response openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + if len(response.Cur) != 0 { + bidResponse.Currency = response.Cur + } + + for _, seatBid := range response.SeatBid { + for i := range seatBid.Bid { + bid := seatBid.Bid[i] + bidType, err := getBidType(bid) + if err != nil { + return nil, []error{err} + } + + b := &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + return bidResponse, nil +} + +func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) { + switch bid.MType { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + } + + return "", fmt.Errorf("could not define media type for impression: %s", bid.ImpID) +} diff --git a/adapters/intertech/intertech_test.go b/adapters/intertech/intertech_test.go new file mode 100644 index 0000000000..952b2a4431 --- /dev/null +++ b/adapters/intertech/intertech_test.go @@ -0,0 +1,21 @@ +package intertech + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderIntertech, config.Adapter{ + Endpoint: "https://test.intertech.com/ssp?pid={{page_id}}&imp={{imp_id}}"}, config.Server{ + ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "intertechtest", bidder) +} diff --git a/adapters/intertech/intertechtest/exemplary/simple-banner-muli-format.json b/adapters/intertech/intertechtest/exemplary/simple-banner-muli-format.json new file mode 100644 index 0000000000..39f1262628 --- /dev/null +++ b/adapters/intertech/intertechtest/exemplary/simple-banner-muli-format.json @@ -0,0 +1,115 @@ +{ + "mockBidRequest": { + "id": "request-id-1", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "site": { + "page": "http://bannercheck.com" + }, + "imp": [ + { + "id": "imp-id-1", + "tagid": "tag-id-1", + "banner": { + "format": [ + { "w": 728, "h": 90 }, + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1111, + "imp_id": 2222 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1111&imp=2222&target-ref=http%3A%2F%2Fbannercheck.com&ssp-cur=USD", + "body": { + "id": "request-id-1", + "imp": [ + { + "id": "imp-id-1", + "tagid": "tag-id-1", + "banner": { + "w": 728, + "h": 90, + "format": [ + { "w": 728, "h": 90 }, + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1111, + "imp_id": 2222 + } + } + } + ], + "site": { + "page": "http://bannercheck.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "cur": ["USD"] + }, + "impIDs": ["imp-id-1"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "request-id-1", + "cur": "USD", + "seatbid": [ + { + "seat": "intertech", + "bid": [ + { + "id": "bid-id-1", + "impid": "imp-id-1", + "price": 0.7, + "adm": "

Test Banner 728x90

", + "cid": "campaign-id-1", + "crid": "creative-id-1", + "w": 728, + "h": 90, + "mtype": 1 + } + ] + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "bid-id-1", + "impid": "imp-id-1", + "price": 0.7, + "adm": "

Test Banner 728x90

", + "cid": "campaign-id-1", + "crid": "creative-id-1", + "w": 728, + "h": 90, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/intertech/intertechtest/exemplary/simple-banner.json b/adapters/intertech/intertechtest/exemplary/simple-banner.json new file mode 100644 index 0000000000..dc0473465a --- /dev/null +++ b/adapters/intertech/intertechtest/exemplary/simple-banner.json @@ -0,0 +1,119 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (iPad; CPU OS 10_3 like Mac OS X)", + "language": "en-US" + }, + "site": { + "page": "mypage" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1001&imp=2002&target-ref=mypage&ssp-cur=USD", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "Accept-Language": ["en-US"], + "User-Agent": ["Mozilla/5.0 (iPad; CPU OS 10_3 like Mac OS X)"], + "X-Forwarded-For": ["123.123.123.123"], + "X-Real-Ip": ["123.123.123.123"] + }, + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "site": { + "page": "mypage" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (iPad; CPU OS 10_3 like Mac OS X)", + "language": "en-US" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "cur": "USD", + "seatbid": [ + { + "seat": "intertech", + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.5, + "adm": "

Test Ad

", + "cid": "test_cid", + "crid": "test_crid", + "w": 300, + "h": 250, + "mtype": 1 + } + ] + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.5, + "adm": "

Test Ad

", + "cid": "test_cid", + "crid": "test_crid", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/intertech/intertechtest/exemplary/simple-native.json b/adapters/intertech/intertechtest/exemplary/simple-native.json new file mode 100644 index 0000000000..a9336b8ffb --- /dev/null +++ b/adapters/intertech/intertechtest/exemplary/simple-native.json @@ -0,0 +1,103 @@ +{ + "mockBidRequest": { + "id": "test-native-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X)" + }, + "site": { + "page": "nativepage" + }, + "imp": [ + { + "id": "test-native-imp-id", + "tagid": "test-native-tag", + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}}],\"eventtrackers\":[{\"event\":1,\"method\":1}],\"ver\":\"1.2\"}" + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 4004 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=3003&imp=4004&target-ref=nativepage&ssp-cur=USD", + "body": { + "id": "test-native-request-id", + "imp": [ + { + "id": "test-native-imp-id", + "tagid": "test-native-tag", + "native": { + "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}}],\"eventtrackers\":[{\"event\":1,\"method\":1}],\"ver\":\"1.2\"}" + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 4004 + } + } + } + ], + "site": { + "page": "nativepage" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-native-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-native-request-id", + "cur": "USD", + "seatbid": [ + { + "seat": "intertech", + "bid": [ + { + "id": "test_native_bid_id", + "impid": "test-native-imp-id", + "price": 1.0, + "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Native Title\"}}],\"link\":{\"url\":\"http://example.com\"},\"imptrackers\":[\"http://example.com/imp\"]}}", + "cid": "test_native_cid", + "crid": "test_native_crid", + "mtype": 4 + } + ] + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_native_bid_id", + "impid": "test-native-imp-id", + "price": 1.0, + "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Native Title\"}}],\"link\":{\"url\":\"http://example.com\"},\"imptrackers\":[\"http://example.com/imp\"]}}", + "cid": "test_native_cid", + "crid": "test_native_crid", + "mtype": 4 + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/intertech/intertechtest/supplemental/bad_media_type.json b/adapters/intertech/intertechtest/supplemental/bad_media_type.json new file mode 100644 index 0000000000..4e1074f136 --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/bad_media_type.json @@ -0,0 +1,100 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "site": { + "page": "http://example.com" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 5005 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=3003&imp=5005&target-ref=http%3A%2F%2Fexample.com&ssp-cur=USD", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 5005 + } + } + } + ], + "site": { + "page": "http://example.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "cur": "USD", + "seatbid": [ + { + "seat": "intertech", + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.5, + "adm": "

Test Ad

", + "cid": "test_cid", + "crid": "test_crid", + "w": 300, + "h": 250, + "mtype": 2 + } + ] + } + ] + } + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "could not define media type for impression: test-imp-id", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/intertech/intertechtest/supplemental/bad_response.json b/adapters/intertech/intertechtest/supplemental/bad_response.json new file mode 100644 index 0000000000..6ca58d71dd --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/bad_response.json @@ -0,0 +1,79 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "site": { + "page": "http://example.com" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1001&imp=2002&target-ref=http%3A%2F%2Fexample.com&ssp-cur=USD", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "site": { + "page": "http://example.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": "" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/intertech/intertechtest/supplemental/invalid-banner-size.json b/adapters/intertech/intertechtest/supplemental/invalid-banner-size.json new file mode 100644 index 0000000000..49d6a4996c --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/invalid-banner-size.json @@ -0,0 +1,35 @@ +{ + "mockBidRequest": { + "id": "test-invalid-sizes-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "site": { + "page": "http://no-size-banner.com" + }, + "imp": [ + { + "id": "test-imp-no-size", + "tagid": "no-size-tag", + "banner": { + "format": [] + }, + "ext": { + "bidder": { + "page_id": 1111, + "imp_id": 9999 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [], + "expectedMakeRequestsErrors": [ + { + "value": "imp #test-imp-no-size: Invalid sizes provided for Banner", + "comparison": "literal" + } + ] +} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-bidder.json b/adapters/intertech/intertechtest/supplemental/invalid-bidder.json similarity index 60% rename from adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-bidder.json rename to adapters/intertech/intertechtest/supplemental/invalid-bidder.json index 2e538cb024..0f530a0e68 100644 --- a/adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-bidder.json +++ b/adapters/intertech/intertechtest/supplemental/invalid-bidder.json @@ -1,6 +1,6 @@ { "mockBidRequest": { - "id": "test-request-id", + "id": "test-req-id", "imp": [ { "id": "test-imp-id", @@ -13,18 +13,16 @@ ] }, "ext": { - "prebid": 1 + "bidder": "badBidder" } } - ], - "site": { - "page": "https://example.com" - } + ] }, + "expectedMakeRequestsErrors": [ { - "value": "Error parsing bidderExt from imp.ext:", - "comparison": "regex" + "value": "imp #test-imp-id: unable to parse intertech ext: expect { or n, but found \"", + "comparison": "literal" } ] } diff --git a/adapters/zeroclickfraud/zeroclickfraudtest/supplemental/invalid-host.json b/adapters/intertech/intertechtest/supplemental/invalid-ext.json similarity index 53% rename from adapters/zeroclickfraud/zeroclickfraudtest/supplemental/invalid-host.json rename to adapters/intertech/intertechtest/supplemental/invalid-ext.json index edd5ca65a2..4c8eb9c9c7 100644 --- a/adapters/zeroclickfraud/zeroclickfraudtest/supplemental/invalid-host.json +++ b/adapters/intertech/intertechtest/supplemental/invalid-ext.json @@ -1,9 +1,9 @@ { "mockBidRequest": { - "id": "test-request-id", + "id": "test-req-id", "imp": [ { - "id": "some-impression-id", + "id": "test-imp-id", "banner": { "format": [ { @@ -12,19 +12,18 @@ } ] }, - "ext": { - "bidder": { - "host": "evil.com/path?redirect=http://attacker.com#", - "sourceId": 123 - } - } + "ext": 123 } ] }, + "httpCalls": [], + + "expectedBidResponses": [], + "expectedMakeRequestsErrors": [ { - "value": "Invalid/Missing Host", + "value": "imp #test-imp-id: unable to parse bidder ext: expect { or n, but found 1", "comparison": "literal" } ] diff --git a/adapters/intertech/intertechtest/supplemental/no-cur-req.json b/adapters/intertech/intertechtest/supplemental/no-cur-req.json new file mode 100644 index 0000000000..a6101b6023 --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/no-cur-req.json @@ -0,0 +1,71 @@ +{ + "mockBidRequest": { + "id": "test-no-cur-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "site": { + "page": "http://example-nocur.com" + }, + "imp": [ + { + "id": "test-imp-no-cur", + "tagid": "no-cur-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1111, + "imp_id": 2222 + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1111&imp=2222&target-ref=http%3A%2F%2Fexample-nocur.com", + "body": { + "id": "test-no-cur-request-id", + "imp": [ + { + "id": "test-imp-no-cur", + "tagid": "no-cur-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1111, + "imp_id": 2222 + } + } + } + ], + "site": { + "page": "http://example-nocur.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + } + }, + "impIDs": ["test-imp-no-cur"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/eskimi/eskimitest/exemplary/simple-banner-web.json b/adapters/intertech/intertechtest/supplemental/no-device.json similarity index 50% rename from adapters/eskimi/eskimitest/exemplary/simple-banner-web.json rename to adapters/intertech/intertechtest/supplemental/no-device.json index 44cb835683..8f811e0709 100644 --- a/adapters/eskimi/eskimitest/exemplary/simple-banner-web.json +++ b/adapters/intertech/intertechtest/supplemental/no-device.json @@ -1,75 +1,76 @@ { "mockBidRequest": { - "id": "test-request-id", + "id": "test-request-no-device", + "site": { + "page": "mypage" + }, "imp": [ { "id": "test-imp-id", + "tagid": "test-tag", "banner": { - "format": [ - { "w": 300, "h": 250 } - ] + "w": 300, + "h": 250 }, "ext": { "bidder": { - "placementId": 625 + "page_id": 1001, + "imp_id": 2002 } } } ], - "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/" - } + "cur": ["USD"] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://ittr.eskimi.com/prebidjs", + "uri": "https://test.intertech.com/ssp?pid=1001&imp=2002&target-ref=mypage&ssp-cur=USD", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"] + }, "body": { - "id": "test-request-id", + "id": "test-request-no-device", "imp": [ { "id": "test-imp-id", - "secure": 1, + "tagid": "test-tag", "banner": { - "format": [ - { "w": 300, "h": 250 } - ] + "w": 300, + "h": 250 }, "ext": { "bidder": { - "placementId": 625 + "page_id": 1001, + "imp_id": 2002 } } } ], "site": { - "id": "271", - "domain": "display.eskimi-creatives.com", - "page": "https://display.eskimi-creatives.com/", - "ext": { - "placementId": 625 - } - } + "page": "mypage" + }, + "cur": ["USD"] }, "impIDs": ["test-imp-id"] }, "mockResponse": { "status": 200, "body": { - "id": "test-request-id", + "id": "test-request-no-device", "cur": "USD", "seatbid": [ { - "seat": "eskimi", + "seat": "intertech", "bid": [ { - "id": "1", + "id": "test_bid_id", "impid": "test-imp-id", - "price": 1.25, - "adm": "
ad
", - "crid": "creative-1", + "price": 0.5, + "adm": "

Test Ad

", + "cid": "test_cid", + "crid": "test_crid", "w": 300, "h": 250, "mtype": 1 @@ -83,15 +84,15 @@ ], "expectedBidResponses": [ { - "currency": "USD", "bids": [ { "bid": { - "id": "1", + "id": "test_bid_id", "impid": "test-imp-id", - "price": 1.25, - "adm": "
ad
", - "crid": "creative-1", + "price": 0.5, + "adm": "

Test Ad

", + "cid": "test_cid", + "crid": "test_crid", "w": 300, "h": 250, "mtype": 1 diff --git a/adapters/intertech/intertechtest/supplemental/no-site-req.json b/adapters/intertech/intertechtest/supplemental/no-site-req.json new file mode 100644 index 0000000000..9d4901994b --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/no-site-req.json @@ -0,0 +1,67 @@ +{ + "mockBidRequest": { + "id": "test-no-site-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "imp": [ + { + "id": "test-imp-no-site", + "tagid": "no-site-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 5005 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=3003&imp=5005&ssp-cur=USD", + "body": { + "id": "test-no-site-request-id", + "imp": [ + { + "id": "test-imp-no-site", + "tagid": "no-site-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 3003, + "imp_id": 5005 + } + } + } + ], + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (X11; Linux x86_64)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-no-site"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/intertech/intertechtest/supplemental/status-204.json b/adapters/intertech/intertechtest/supplemental/status-204.json new file mode 100644 index 0000000000..8225c9ea57 --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/status-204.json @@ -0,0 +1,73 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "site": { + "page": "http://example.com" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1001&imp=2002&target-ref=http%3A%2F%2Fexample.com&ssp-cur=USD", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "site": { + "page": "http://example.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/intertech/intertechtest/supplemental/status-not-200.json b/adapters/intertech/intertechtest/supplemental/status-not-200.json new file mode 100644 index 0000000000..58317e359f --- /dev/null +++ b/adapters/intertech/intertechtest/supplemental/status-not-200.json @@ -0,0 +1,78 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "site": { + "page": "http://mypage.com" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "cur": ["USD"] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://test.intertech.com/ssp?pid=1001&imp=2002&target-ref=http%3A%2F%2Fmypage.com&ssp-cur=USD", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-tag", + "banner": { + "w": 300, + "h": 250, + "format": [ + { "w": 300, "h": 250 } + ] + }, + "ext": { + "bidder": { + "page_id": 1001, + "imp_id": 2002 + } + } + } + ], + "site": { + "page": "http://mypage.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + }, + "cur": ["USD"] + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 404, + "body": {} + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 404. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} diff --git a/adapters/alliance_gravity/params_test.go b/adapters/intertech/params_test.go similarity index 59% rename from adapters/alliance_gravity/params_test.go rename to adapters/intertech/params_test.go index 697c99a48f..eb7bb0aba4 100644 --- a/adapters/alliance_gravity/params_test.go +++ b/adapters/intertech/params_test.go @@ -1,10 +1,10 @@ -package alliance_gravity +package intertech import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -14,7 +14,7 @@ func TestValidParams(t *testing.T) { } for _, p := range validParams { - if err := validator.Validate(openrtb_ext.BidderAllianceGravity, json.RawMessage(p)); err != nil { + if err := validator.Validate(openrtb_ext.BidderIntertech, json.RawMessage(p)); err != nil { t.Errorf("Schema rejected valid params: %s", p) } } @@ -27,22 +27,22 @@ func TestInvalidParams(t *testing.T) { } for _, p := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderAllianceGravity, json.RawMessage(p)); err == nil { + if err := validator.Validate(openrtb_ext.BidderIntertech, json.RawMessage(p)); err == nil { t.Errorf("Schema allowed invalid params: %s", p) } } } var validParams = []string{ - `{"srid":"11223344"}`, - `{"srid":"1122334455"}`, - `{"srid":"0"}`, - `{"srid":"11223344","other_params":"hoge"}`, + `{"page_id": 123, "imp_id": 456}`, + `{"page_id": 1, "imp_id": 1}`, + `{"page_id": 999, "imp_id": 999}`, } var invalidParams = []string{ + `{"page_id": "abc", "imp_id": 1}`, + `{"page_id": "1", "imp_id": abc}`, + `{"page_id": "123123"}`, + `{"imp_id": "123"}`, `{}`, - `null`, - `12345`, - `{"id":123456}`, } diff --git a/adapters/invibes/invibes.go b/adapters/invibes/invibes.go index a157fddff8..4657be2974 100644 --- a/adapters/invibes/invibes.go +++ b/adapters/invibes/invibes.go @@ -10,13 +10,13 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const adapterVersion = "prebid_1.0.0" diff --git a/adapters/invibes/invibes_test.go b/adapters/invibes/invibes_test.go index 1c27e09edb..be8dda3ffd 100644 --- a/adapters/invibes/invibes_test.go +++ b/adapters/invibes/invibes_test.go @@ -3,9 +3,9 @@ package invibes import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/invibes/params_test.go b/adapters/invibes/params_test.go index 2a5394488b..48be52c4ba 100644 --- a/adapters/invibes/params_test.go +++ b/adapters/invibes/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/iqx/iqx.go b/adapters/iqx/iqx.go index ea2100ef0d..c3519b10b1 100644 --- a/adapters/iqx/iqx.go +++ b/adapters/iqx/iqx.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/iqx/iqxtest_test.go b/adapters/iqx/iqxtest_test.go index 6504c0e1d4..190560d6de 100644 --- a/adapters/iqx/iqxtest_test.go +++ b/adapters/iqx/iqxtest_test.go @@ -3,9 +3,9 @@ package iqx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/iqx/params_test.go b/adapters/iqx/params_test.go index 883bb46a37..4b687728b2 100644 --- a/adapters/iqx/params_test.go +++ b/adapters/iqx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/iqzone/iqzone.go b/adapters/iqzone/iqzone.go index 2aaf90eeb7..9becbfbb89 100644 --- a/adapters/iqzone/iqzone.go +++ b/adapters/iqzone/iqzone.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/iqzone/iqzone_test.go b/adapters/iqzone/iqzone_test.go index bda00b1527..37ba833f50 100644 --- a/adapters/iqzone/iqzone_test.go +++ b/adapters/iqzone/iqzone_test.go @@ -3,9 +3,9 @@ package iqzone import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/iqzone/params_test.go b/adapters/iqzone/params_test.go index f1b6ba1c4d..4d3aa165a6 100644 --- a/adapters/iqzone/params_test.go +++ b/adapters/iqzone/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/ix/ix.go b/adapters/ix/ix.go index c5624dd96e..c4853f8aae 100644 --- a/adapters/ix/ix.go +++ b/adapters/ix/ix.go @@ -7,13 +7,13 @@ import ( "sort" "strings" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/version" "github.com/prebid/openrtb/v20/native1" native1response "github.com/prebid/openrtb/v20/native1/response" diff --git a/adapters/ix/ix_test.go b/adapters/ix/ix_test.go index eb6b96f42a..d46b69adff 100644 --- a/adapters/ix/ix_test.go +++ b/adapters/ix/ix_test.go @@ -4,11 +4,11 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/prebid/openrtb/v20/adcom1" diff --git a/adapters/ix/params_test.go b/adapters/ix/params_test.go index e1f4b44663..90d591b50c 100644 --- a/adapters/ix/params_test.go +++ b/adapters/ix/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/jixie/jixie.go b/adapters/jixie/jixie.go index 9ab479664f..d0411d1e5e 100644 --- a/adapters/jixie/jixie.go +++ b/adapters/jixie/jixie.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/jixie/jixie_test.go b/adapters/jixie/jixie_test.go index cf217eb4f0..6fe4fa24ce 100644 --- a/adapters/jixie/jixie_test.go +++ b/adapters/jixie/jixie_test.go @@ -3,9 +3,9 @@ package jixie import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/jixie/params_test.go b/adapters/jixie/params_test.go index 1cd650a94d..653f3f86e1 100644 --- a/adapters/jixie/params_test.go +++ b/adapters/jixie/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/kargo/kargo.go b/adapters/kargo/kargo.go index c75b681280..da12ef68ca 100644 --- a/adapters/kargo/kargo.go +++ b/adapters/kargo/kargo.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/kargo/kargo_test.go b/adapters/kargo/kargo_test.go index fe3ba8bab5..0e7eb83bc1 100644 --- a/adapters/kargo/kargo_test.go +++ b/adapters/kargo/kargo_test.go @@ -3,9 +3,9 @@ package kargo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/kargo/params_test.go b/adapters/kargo/params_test.go index 2bd805d0a3..91b46fbc4e 100644 --- a/adapters/kargo/params_test.go +++ b/adapters/kargo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/kayzen/kayzen.go b/adapters/kayzen/kayzen.go index d5835a38e6..680362603e 100644 --- a/adapters/kayzen/kayzen.go +++ b/adapters/kayzen/kayzen.go @@ -7,13 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -93,9 +92,6 @@ func (a *adapter) getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtKayzen, e } func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtKayzen) (string, error) { - if !urlutil.IsSafeHost(params.Zone) { - return "", &errortypes.BadInput{Message: "Invalid Zone"} - } endpointParams := macros.EndpointTemplateParams{ ZoneID: params.Zone, AccountID: params.Exchange, diff --git a/adapters/kayzen/kayzen_test.go b/adapters/kayzen/kayzen_test.go index 3b0644906e..6b3776ddba 100644 --- a/adapters/kayzen/kayzen_test.go +++ b/adapters/kayzen/kayzen_test.go @@ -3,9 +3,9 @@ package kayzen import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/kayzen/kayzentest/supplemental/invalid-zone.json b/adapters/kayzen/kayzentest/supplemental/invalid-zone.json deleted file mode 100644 index fb22602ffa..0000000000 --- a/adapters/kayzen/kayzentest/supplemental/invalid-zone.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 50}] - }, - "ext": { - "bidder": { - "zone": "evil.com/path?redirect=http://attacker.com#", - "exchange": "ex" - } - } - } - ], - "site": { - "page": "test.com" - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid Zone", - "comparison": "literal" - } - ] -} diff --git a/adapters/kayzen/params_test.go b/adapters/kayzen/params_test.go index 45f07b9eed..647f77d134 100644 --- a/adapters/kayzen/params_test.go +++ b/adapters/kayzen/params_test.go @@ -4,16 +4,11 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ `{ "zone": "dc", "exchange": "ex" }`, - `{ "zone": "host", "exchange": "ex" }`, - `{ "zone": "host.example.com", "exchange": "ex" }`, - `{ "zone": "host-example.test", "exchange": "ex" }`, - `{ "zone": "Host.Example.com", "exchange": "ex" }`, - `{ "zone": "localhost", "exchange": "ex" }`, } func TestValidParams(t *testing.T) { @@ -44,16 +39,6 @@ var invalidParams = []string{ `{ "exchange": "", "zone" : "" }`, `{ "exchange": "ex", "zone" : "" }`, `{ "exchange": "", "zone" : "dc" }`, - `{ "zone": "/path", "exchange": "ex" }`, - `{ "zone": "//evil.com", "exchange": "ex" }`, - `{ "zone": "host/path", "exchange": "ex" }`, - `{ "zone": "host?query=1", "exchange": "ex" }`, - `{ "zone": "host#fragment", "exchange": "ex" }`, - `{ "zone": "user@host", "exchange": "ex" }`, - `{ "zone": "https://host.com", "exchange": "ex" }`, - `{ "zone": "host:notaport", "exchange": "ex" }`, - `{ "zone": "host:8080:extra", "exchange": "ex" }`, - `{ "zone": "host:8080", "exchange": "ex" }`, } func TestInvalidParams(t *testing.T) { diff --git a/adapters/kidoz/kidoz.go b/adapters/kidoz/kidoz.go index df9d1fe457..88628085ef 100644 --- a/adapters/kidoz/kidoz.go +++ b/adapters/kidoz/kidoz.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type KidozAdapter struct { diff --git a/adapters/kidoz/kidoz_test.go b/adapters/kidoz/kidoz_test.go index 59b1b63f22..8923518559 100644 --- a/adapters/kidoz/kidoz_test.go +++ b/adapters/kidoz/kidoz_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/kidoz/params_test.go b/adapters/kidoz/params_test.go index 87521a27fd..1dfa3e8955 100644 --- a/adapters/kidoz/params_test.go +++ b/adapters/kidoz/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/kiviads/kiviads.go b/adapters/kiviads/kiviads.go index 98ab0dc0ca..ad5dcb58e2 100644 --- a/adapters/kiviads/kiviads.go +++ b/adapters/kiviads/kiviads.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/kiviads/kiviads_test.go b/adapters/kiviads/kiviads_test.go index c754fea012..dd83e0d177 100644 --- a/adapters/kiviads/kiviads_test.go +++ b/adapters/kiviads/kiviads_test.go @@ -3,9 +3,9 @@ package kiviads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/kiviads/params_test.go b/adapters/kiviads/params_test.go index 12a46ce732..0192795006 100644 --- a/adapters/kiviads/params_test.go +++ b/adapters/kiviads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/kobler/kobler.go b/adapters/kobler/kobler.go index 30c88ba55f..cb1a1acaa7 100644 --- a/adapters/kobler/kobler.go +++ b/adapters/kobler/kobler.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/kobler/kobler_test.go b/adapters/kobler/kobler_test.go index 622a43c8dc..0cd924b8ba 100644 --- a/adapters/kobler/kobler_test.go +++ b/adapters/kobler/kobler_test.go @@ -3,9 +3,9 @@ package kobler import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/kobler/params_test.go b/adapters/kobler/params_test.go index d40dbfba14..bc8b3ec9bf 100644 --- a/adapters/kobler/params_test.go +++ b/adapters/kobler/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/krushmedia/krushmedia.go b/adapters/krushmedia/krushmedia.go index 3d95cd94fb..fd2a0adf8b 100644 --- a/adapters/krushmedia/krushmedia.go +++ b/adapters/krushmedia/krushmedia.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type KrushmediaAdapter struct { diff --git a/adapters/krushmedia/krushmedia_test.go b/adapters/krushmedia/krushmedia_test.go index f39f62993b..26117ce103 100644 --- a/adapters/krushmedia/krushmedia_test.go +++ b/adapters/krushmedia/krushmedia_test.go @@ -3,9 +3,9 @@ package krushmedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/krushmedia/params_test.go b/adapters/krushmedia/params_test.go index 0fc1a0fbb7..babf6b205d 100644 --- a/adapters/krushmedia/params_test.go +++ b/adapters/krushmedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/kueezrtb/kueezrtb.go b/adapters/kueezrtb/kueezrtb.go index cd2000747d..0edfbffd38 100644 --- a/adapters/kueezrtb/kueezrtb.go +++ b/adapters/kueezrtb/kueezrtb.go @@ -4,11 +4,11 @@ import ( "encoding/json" "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "net/http" "net/url" ) diff --git a/adapters/kueezrtb/kueezrtb_test.go b/adapters/kueezrtb/kueezrtb_test.go index 82b233a6fa..b62eff292d 100644 --- a/adapters/kueezrtb/kueezrtb_test.go +++ b/adapters/kueezrtb/kueezrtb_test.go @@ -3,9 +3,9 @@ package kueezrtb import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/kueezrtb/params_test.go b/adapters/kueezrtb/params_test.go index 4fdf113bd7..33e5ea0a64 100644 --- a/adapters/kueezrtb/params_test.go +++ b/adapters/kueezrtb/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/lemmadigital/lemmadigital.go b/adapters/lemmadigital/lemmadigital.go index a098699dc8..16d93d47be 100644 --- a/adapters/lemmadigital/lemmadigital.go +++ b/adapters/lemmadigital/lemmadigital.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/lemmadigital/lemmadigital_test.go b/adapters/lemmadigital/lemmadigital_test.go index a6705f391f..d3e770bb63 100644 --- a/adapters/lemmadigital/lemmadigital_test.go +++ b/adapters/lemmadigital/lemmadigital_test.go @@ -3,9 +3,9 @@ package lemmadigital import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/lemmadigital/params_test.go b/adapters/lemmadigital/params_test.go index b9335a1efa..c8c739ff59 100644 --- a/adapters/lemmadigital/params_test.go +++ b/adapters/lemmadigital/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Tests for static/bidder-params/lemmadigital.json diff --git a/adapters/limelightDigital/limelightDigital.go b/adapters/limelightDigital/limelightDigital.go index 47566812cc..18ba5dd6f7 100644 --- a/adapters/limelightDigital/limelightDigital.go +++ b/adapters/limelightDigital/limelightDigital.go @@ -10,12 +10,12 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/limelightDigital/limelightDigital_test.go b/adapters/limelightDigital/limelightDigital_test.go index 1f838245cb..2b36ee573d 100644 --- a/adapters/limelightDigital/limelightDigital_test.go +++ b/adapters/limelightDigital/limelightDigital_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/limelightDigital/params_test.go b/adapters/limelightDigital/params_test.go index a4aaa4466c..04c49d8373 100644 --- a/adapters/limelightDigital/params_test.go +++ b/adapters/limelightDigital/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/lm_kiviads/lmkiviads.go b/adapters/lm_kiviads/lmkiviads.go index e94a9a9aba..bc4e48b1d7 100644 --- a/adapters/lm_kiviads/lmkiviads.go +++ b/adapters/lm_kiviads/lmkiviads.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/lm_kiviads/lmkiviads_test.go b/adapters/lm_kiviads/lmkiviads_test.go index 05d8458250..34ea2bf467 100644 --- a/adapters/lm_kiviads/lmkiviads_test.go +++ b/adapters/lm_kiviads/lmkiviads_test.go @@ -3,9 +3,9 @@ package lmkiviads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/lm_kiviads/params_test.go b/adapters/lm_kiviads/params_test.go index 2d77754e06..00f76bca95 100644 --- a/adapters/lm_kiviads/params_test.go +++ b/adapters/lm_kiviads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/lockerdome/lockerdome.go b/adapters/lockerdome/lockerdome.go index ac79a67262..2206b82015 100644 --- a/adapters/lockerdome/lockerdome.go +++ b/adapters/lockerdome/lockerdome.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const unexpectedStatusCodeMessage = "Unexpected status code: %d. Run with request.debug = 1 for more info" diff --git a/adapters/lockerdome/lockerdome_test.go b/adapters/lockerdome/lockerdome_test.go index 3d2de082dd..b0c12083e4 100644 --- a/adapters/lockerdome/lockerdome_test.go +++ b/adapters/lockerdome/lockerdome_test.go @@ -3,9 +3,9 @@ package lockerdome import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/lockerdome/params_test.go b/adapters/lockerdome/params_test.go index 3a15f24855..50504b68d2 100644 --- a/adapters/lockerdome/params_test.go +++ b/adapters/lockerdome/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file tests static/bidder-params/lockerdome.json diff --git a/adapters/logan/logan.go b/adapters/logan/logan.go index bff7cbcbec..a5f995108f 100644 --- a/adapters/logan/logan.go +++ b/adapters/logan/logan.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/logan/logan_test.go b/adapters/logan/logan_test.go index a465282d71..8e677c5585 100644 --- a/adapters/logan/logan_test.go +++ b/adapters/logan/logan_test.go @@ -3,9 +3,9 @@ package logan import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/logan/params_test.go b/adapters/logan/params_test.go index c09b6c4f83..76c8cb3dd8 100644 --- a/adapters/logan/params_test.go +++ b/adapters/logan/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/logicad/logicad.go b/adapters/logicad/logicad.go index 8f81e4a7cd..a1dc40fdcf 100644 --- a/adapters/logicad/logicad.go +++ b/adapters/logicad/logicad.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type LogicadAdapter struct { diff --git a/adapters/logicad/logicad_test.go b/adapters/logicad/logicad_test.go index c58f39085c..a15d381cbb 100644 --- a/adapters/logicad/logicad_test.go +++ b/adapters/logicad/logicad_test.go @@ -3,9 +3,9 @@ package logicad import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/logicad/params_test.go b/adapters/logicad/params_test.go index 9a15906c8f..06f15d9d1b 100644 --- a/adapters/logicad/params_test.go +++ b/adapters/logicad/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/loopme/loopme.go b/adapters/loopme/loopme.go index fde97aee06..d4b9d7906f 100644 --- a/adapters/loopme/loopme.go +++ b/adapters/loopme/loopme.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type adapter struct { diff --git a/adapters/loopme/loopme_test.go b/adapters/loopme/loopme_test.go index 003a240c27..ca293c45ce 100644 --- a/adapters/loopme/loopme_test.go +++ b/adapters/loopme/loopme_test.go @@ -3,9 +3,9 @@ package loopme import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/loopme/params_test.go b/adapters/loopme/params_test.go index 9ff1acf3d4..12ddf8e985 100644 --- a/adapters/loopme/params_test.go +++ b/adapters/loopme/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/loopme.json diff --git a/adapters/loyal/loyal.go b/adapters/loyal/loyal.go index 8a16c4f5bd..efe069c638 100644 --- a/adapters/loyal/loyal.go +++ b/adapters/loyal/loyal.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/loyal/loyal_test.go b/adapters/loyal/loyal_test.go index 5664860199..1836b267be 100644 --- a/adapters/loyal/loyal_test.go +++ b/adapters/loyal/loyal_test.go @@ -3,9 +3,9 @@ package loyal import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/loyal/params_test.go b/adapters/loyal/params_test.go index ae1ba114ee..e0c47d5030 100644 --- a/adapters/loyal/params_test.go +++ b/adapters/loyal/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/lunamedia/lunamedia.go b/adapters/lunamedia/lunamedia.go index 2c5b87aa6c..3db1b12ad4 100644 --- a/adapters/lunamedia/lunamedia.go +++ b/adapters/lunamedia/lunamedia.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type LunaMediaAdapter struct { diff --git a/adapters/lunamedia/lunamedia_test.go b/adapters/lunamedia/lunamedia_test.go index b04789370a..8677fbb297 100644 --- a/adapters/lunamedia/lunamedia_test.go +++ b/adapters/lunamedia/lunamedia_test.go @@ -3,9 +3,9 @@ package lunamedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/lunamedia/params_test.go b/adapters/lunamedia/params_test.go index 6ff7240b5d..b78b94934d 100644 --- a/adapters/lunamedia/params_test.go +++ b/adapters/lunamedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/mabidder/mabidder.go b/adapters/mabidder/mabidder.go index 99a37ce8bd..25d2830ef9 100644 --- a/adapters/mabidder/mabidder.go +++ b/adapters/mabidder/mabidder.go @@ -4,10 +4,10 @@ import ( "encoding/json" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type serverResponse struct { diff --git a/adapters/mabidder/mabidder_test.go b/adapters/mabidder/mabidder_test.go index 8aa74d5b03..f821752e9b 100644 --- a/adapters/mabidder/mabidder_test.go +++ b/adapters/mabidder/mabidder_test.go @@ -3,9 +3,9 @@ package mabidder import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mabidder/params_test.go b/adapters/mabidder/params_test.go index 1d216b4d42..bd4162448f 100644 --- a/adapters/mabidder/params_test.go +++ b/adapters/mabidder/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/madsense/madsense.go b/adapters/madsense/madsense.go index d827fcb36c..5cf32d64d5 100644 --- a/adapters/madsense/madsense.go +++ b/adapters/madsense/madsense.go @@ -5,11 +5,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/madsense/madsense_test.go b/adapters/madsense/madsense_test.go index f1f6c1f3a4..8093066ac5 100644 --- a/adapters/madsense/madsense_test.go +++ b/adapters/madsense/madsense_test.go @@ -1,9 +1,9 @@ package madsense import ( - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" "testing" ) diff --git a/adapters/madsense/params_test.go b/adapters/madsense/params_test.go index 32283395ad..de59706745 100644 --- a/adapters/madsense/params_test.go +++ b/adapters/madsense/params_test.go @@ -2,7 +2,7 @@ package madsense import ( "encoding/json" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/require" "testing" ) diff --git a/adapters/madsense/utils.go b/adapters/madsense/utils.go index fb1d168d6f..992d136330 100644 --- a/adapters/madsense/utils.go +++ b/adapters/madsense/utils.go @@ -5,10 +5,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func parseImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpMadSense, error) { diff --git a/adapters/madvertise/madvertise.go b/adapters/madvertise/madvertise.go index bcc95ed889..d8c6fc3953 100644 --- a/adapters/madvertise/madvertise.go +++ b/adapters/madvertise/madvertise.go @@ -8,12 +8,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/madvertise/madvertise_test.go b/adapters/madvertise/madvertise_test.go index edfb3f3356..e402ae4dc7 100644 --- a/adapters/madvertise/madvertise_test.go +++ b/adapters/madvertise/madvertise_test.go @@ -3,9 +3,9 @@ package madvertise import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/madvertise/params_test.go b/adapters/madvertise/params_test.go index f5f1af383f..c155d5beda 100644 --- a/adapters/madvertise/params_test.go +++ b/adapters/madvertise/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/Madvertise.json diff --git a/adapters/marsmedia/marsmedia.go b/adapters/marsmedia/marsmedia.go index b9548e77f9..92bfa0dc9f 100644 --- a/adapters/marsmedia/marsmedia.go +++ b/adapters/marsmedia/marsmedia.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type MarsmediaAdapter struct { diff --git a/adapters/marsmedia/marsmedia_test.go b/adapters/marsmedia/marsmedia_test.go index 5b3da23b36..4164d433fd 100644 --- a/adapters/marsmedia/marsmedia_test.go +++ b/adapters/marsmedia/marsmedia_test.go @@ -3,9 +3,9 @@ package marsmedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/marsmedia/params_test.go b/adapters/marsmedia/params_test.go index e2c00c9683..7961d21455 100644 --- a/adapters/marsmedia/params_test.go +++ b/adapters/marsmedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/marsmedia.json diff --git a/adapters/mediago/mediago.go b/adapters/mediago/mediago.go index 428e6cb15f..dc7ee01b9f 100644 --- a/adapters/mediago/mediago.go +++ b/adapters/mediago/mediago.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/mediago/mediago_test.go b/adapters/mediago/mediago_test.go index 944643e417..d6a480c828 100644 --- a/adapters/mediago/mediago_test.go +++ b/adapters/mediago/mediago_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mediago/params_test.go b/adapters/mediago/params_test.go index 9639863066..c1a7fbd3e4 100644 --- a/adapters/mediago/params_test.go +++ b/adapters/mediago/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/medianet/medianet.go b/adapters/medianet/medianet.go index 06ae131f69..08a1ae021f 100644 --- a/adapters/medianet/medianet.go +++ b/adapters/medianet/medianet.go @@ -7,11 +7,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/medianet/medianet_test.go b/adapters/medianet/medianet_test.go index 84efea60bc..8721c6984c 100644 --- a/adapters/medianet/medianet_test.go +++ b/adapters/medianet/medianet_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/medianet/params_test.go b/adapters/medianet/params_test.go index 78c520a8f1..15cd4acbab 100644 --- a/adapters/medianet/params_test.go +++ b/adapters/medianet/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/medianet.json diff --git a/adapters/mediasquare/mediasquare.go b/adapters/mediasquare/mediasquare.go index 8b232b44a8..c23164c254 100644 --- a/adapters/mediasquare/mediasquare.go +++ b/adapters/mediasquare/mediasquare.go @@ -5,11 +5,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -33,6 +33,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E } msqParams := initMsqParams(request) + msqParams.Test = (request.Test == int8(1)) for _, imp := range request.Imp { var ( bidderExt adapters.ExtImpBidder @@ -87,6 +88,7 @@ func (a *adapter) makeRequest(request *openrtb2.BidRequest, msqParams *msqParame } else { err = errorWriter(" jsonutil.Marshal", err, false) } + return } diff --git a/adapters/mediasquare/mediasquare_test.go b/adapters/mediasquare/mediasquare_test.go index 25df6fb351..091f13ba19 100644 --- a/adapters/mediasquare/mediasquare_test.go +++ b/adapters/mediasquare/mediasquare_test.go @@ -4,10 +4,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/mediasquare/mediasquaretest/exemplary/multi-format.json b/adapters/mediasquare/mediasquaretest/exemplary/multi-format.json index ba89936eaf..335da6ab6c 100644 --- a/adapters/mediasquare/mediasquaretest/exemplary/multi-format.json +++ b/adapters/mediasquare/mediasquaretest/exemplary/multi-format.json @@ -126,21 +126,14 @@ "language": "fr", "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" }, - "site": { - "id": "test-site-id", - "page": "https://www.example.com/" - }, "regs": { "gdpr": 1, "ext": { - "dsa": { - "msq_test": 42 - } + "dsa": "mediasquare-test" } }, "user": { - "consent": "there-is-a-real-cs-in-it", - "buyeruid": "42" + "consent": "there-is-a-real-cs-in-it" }, "test": 1 }, @@ -244,10 +237,7 @@ "consent_required": true, "consent_string": "there-is-a-real-cs-in-it" }, - "dsa": { - "msq_test": 42 - }, - "pbjs": "prebid-test-version", + "dsa": "mediasquare-test", "tech": { "device": { "geo": { @@ -267,19 +257,10 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "site": { - "id": "test-site-id", - "page": "https://www.example.com/" - }, - "user": { - "consent": "there-is-a-real-cs-in-it", - "buyeruid": "42" } }, "type": "pbs", - "test": true, - "user_uid": "42" + "test": true }, "impIDs": [ "2c35e25e-e7d3-41bf-b810-06a449f456b9", @@ -312,12 +293,7 @@ "transaction_id": "2c35e25e-e7d3-41bf-b810-06a449f456b9", "ttl": 20000, "adomain": ["mediasquare.fr"], - "hasConsent": true, - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } + "hasConsent": true }, { "ad": "\u003c!-- This is an example --\u003e", @@ -333,12 +309,7 @@ "transaction_id": "2059a3e6-71a3-43ea-8290-b5ceb13d35a8", "ttl": 20000, "adomain": ["mediasquare.fr"], - "hasConsent": true, - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } + "hasConsent": true }, { "bid_id": "2c35e25e-e7d3-41bf-b810-06a449f456c9", @@ -356,12 +327,7 @@ "title": "Learn about this awesome thing" }, "adomain": ["mediasquare.fr"], - "hasConsent": true, - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } + "hasConsent": true }, { "bid_id": "2c35e25e-e7d3-41bf-b810-06a449f456d9", @@ -379,14 +345,27 @@ "url": "https://dummy.domain.tv/some_vast" }, "adomain": ["mediasquare.fr"], - "hasConsent": true, - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } + "hasConsent": true } - ] + ], + "Calc_cpm": { + "2059a3e6-71a3-43ea-8290-b5ceb13d35a8": { + "TmpCpmMax": 0, + "CpmMax": 0.02 + }, + "2c35e25e-e7d3-41bf-b810-06a449f456b9": { + "TmpCpmMax": 0, + "CpmMax": 2 + }, + "2c35e25e-e7d3-41bf-b810-06a449f456c9": { + "TmpCpmMax": 0, + "CpmMax": 2 + }, + "2c35e25e-e7d3-41bf-b810-06a449f456d9": { + "TmpCpmMax": 0, + "CpmMax": 2 + } + } } } } @@ -403,13 +382,6 @@ "adm": "\u003c!-- This is an example --\u003e", "adomain": ["mediasquare.fr"], "crid": "msq_test|fakeCreative", - "ext": { - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } - }, "w": 250, "mtype": 1 }, @@ -427,13 +399,6 @@ "adm": "\u003c!-- This is an example --\u003e", "adomain": ["mediasquare.fr"], "crid": "msq_test|fakeCreative", - "ext": { - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } - }, "w": 250, "mtype": 1 }, @@ -450,13 +415,6 @@ "price": 2, "adomain": ["mediasquare.fr"], "crid": "msq_test|fakeCreative", - "ext": { - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } - }, "mtype": 4 }, "BidMeta": { @@ -472,13 +430,6 @@ "price": 2, "adomain": ["mediasquare.fr"], "crid": "msq_test|fakeCreative", - "ext": { - "dsa": { - "adrender": 1, - "behalf": "test-behalf", - "paid": "test-paid" - } - }, "mtype": 2 }, "BidMeta": { diff --git a/adapters/mediasquare/mediasquaretest/exemplary/simple-banner.json b/adapters/mediasquare/mediasquaretest/exemplary/simple-banner.json index 5753abb611..8769b37df1 100644 --- a/adapters/mediasquare/mediasquaretest/exemplary/simple-banner.json +++ b/adapters/mediasquare/mediasquaretest/exemplary/simple-banner.json @@ -58,9 +58,7 @@ "regs": { "gdpr": 1, "ext": { - "dsa": { - "msq_test": 42 - } + "dsa": "mediasquare-test" } }, "user": { @@ -128,10 +126,7 @@ "consent_required": true, "consent_string": "there-is-a-real-cs-in-it" }, - "dsa": { - "msq_test": 42 - }, - "pbjs": "prebid-test-version", + "dsa": "mediasquare-test", "tech": { "device": { "geo": { @@ -151,14 +146,10 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "user": { - "consent": "there-is-a-real-cs-in-it" } }, "type": "pbs", - "test": true, - "user_uid": "" + "test": true }, "impIDs": [ "2c35e25e-e7d3-41bf-b810-06a449f456b9", diff --git a/adapters/mediasquare/mediasquaretest/exemplary/simple-native.json b/adapters/mediasquare/mediasquaretest/exemplary/simple-native.json index 23d29d544b..9a9e842b34 100644 --- a/adapters/mediasquare/mediasquaretest/exemplary/simple-native.json +++ b/adapters/mediasquare/mediasquaretest/exemplary/simple-native.json @@ -42,16 +42,13 @@ "regs": { "gdpr": 1, "ext": { - "dsa": { - "msq_test": 42 - } + "dsa": "mediasquare-test" } }, "user": { "consent": "there-is-a-real-cs-in-it" }, - "test": 1, - "user_uid": "" + "test": 1 }, "httpCalls": [ @@ -79,10 +76,7 @@ "consent_required": true }, "type": "pbs", - "dsa": { - "msq_test": 42 - }, - "pbjs": "prebid-test-version", + "dsa": "mediasquare-test", "tech": { "device": { "geo": { @@ -102,13 +96,9 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "user": { - "consent": "there-is-a-real-cs-in-it" } }, - "test": true, - "user_uid": "" + "test": true }, "impIDs": ["2c35e25e-e7d3-41bf-b810-06a449f456b9"] }, diff --git a/adapters/mediasquare/mediasquaretest/exemplary/simple-video.json b/adapters/mediasquare/mediasquaretest/exemplary/simple-video.json index bd00984ad7..13de7f873b 100644 --- a/adapters/mediasquare/mediasquaretest/exemplary/simple-video.json +++ b/adapters/mediasquare/mediasquaretest/exemplary/simple-video.json @@ -52,9 +52,7 @@ "regs": { "gdpr": 1, "ext": { - "dsa": { - "msq_test": 42 - } + "dsa": "mediasquare-test" } }, "user": { @@ -102,10 +100,7 @@ "consent_required": true }, "type": "pbs", - "dsa": { - "msq_test": 42 - }, - "pbjs": "prebid-test-version", + "dsa": "mediasquare-test", "tech": { "device": { "geo": { @@ -125,13 +120,9 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "user": { - "consent": "there-is-a-real-cs-in-it" } }, - "test": true, - "user_uid": "" + "test": true }, "impIDs": ["2c35e25e-e7d3-41bf-b810-06a449f456b9"] }, diff --git a/adapters/mediasquare/mediasquaretest/supplemental/no-valid-imp-ext.json b/adapters/mediasquare/mediasquaretest/supplemental/no-valid-imp-ext.json index 3c43f93784..6fae03fd4e 100644 --- a/adapters/mediasquare/mediasquaretest/supplemental/no-valid-imp-ext.json +++ b/adapters/mediasquare/mediasquaretest/supplemental/no-valid-imp-ext.json @@ -51,10 +51,9 @@ "codes": null, "gdpr": { "consent_required": false, "consent_string": "" }, "type": "pbs", - "pbjs": "prebid-test-version", - "tech": {}, - "test": true, - "user_uid": "" + "dsa": "", + "tech": { "device": null, "app": null }, + "test": true }, "impIDs": ["0", "1", "-42", "-1", "-0", "42"] }, diff --git a/adapters/mediasquare/mediasquaretest/supplemental/no-valid-response.json b/adapters/mediasquare/mediasquaretest/supplemental/no-valid-response.json index ce2eec4eec..5e987db615 100644 --- a/adapters/mediasquare/mediasquaretest/supplemental/no-valid-response.json +++ b/adapters/mediasquare/mediasquaretest/supplemental/no-valid-response.json @@ -26,7 +26,6 @@ ], "app": null, "device": null, - "site": null, "regs": { "gdpr": null, "ext": { @@ -52,18 +51,17 @@ "uri": "https://pbs-front.mediasquare.fr/msq_prebid", "body": { "codes": null, - "gdpr": { "consent_required": false, "consent_string": "" }, + "gdpr": { + "consent_string": "", + "consent_required": false + }, "type": "pbs", - "pbjs": "prebid-test-version", + "dsa": "", "tech": { - "user": { - "ext": { - "consent": null - } - } + "device": null, + "app": null }, - "test": true, - "user_uid": "" + "test": true }, "impIDs": ["2c35e25e-e7d3-41bf-b810-06a449f456b9"] }, diff --git a/adapters/mediasquare/mediasquaretest/supplemental/status-400.json b/adapters/mediasquare/mediasquaretest/supplemental/status-400.json index 0541a0fdd8..05e4413a97 100644 --- a/adapters/mediasquare/mediasquaretest/supplemental/status-400.json +++ b/adapters/mediasquare/mediasquaretest/supplemental/status-400.json @@ -102,7 +102,7 @@ "consent_required": true }, "type": "pbs", - "pbjs": "prebid-test-version", + "dsa": "", "tech": { "device": { "geo": { @@ -122,15 +122,9 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "user": { - "ext": { - "consent": "consent-covering" - } } }, - "test": true, - "user_uid": "" + "test": true }, "impIDs": ["2c35e25e-e7d3-41bf-b810-06a449f456b9"] }, diff --git a/adapters/mediasquare/mediasquaretest/supplemental/status-not-200.json b/adapters/mediasquare/mediasquaretest/supplemental/status-not-200.json index f2e91c9581..4168a7adea 100644 --- a/adapters/mediasquare/mediasquaretest/supplemental/status-not-200.json +++ b/adapters/mediasquare/mediasquaretest/supplemental/status-not-200.json @@ -102,7 +102,7 @@ "consent_required": true }, "type": "pbs", - "pbjs": "prebid-test-version", + "dsa": "", "tech": { "device": { "geo": { @@ -122,15 +122,9 @@ "id": "MEDIA_SQUARE" }, "content": {} - }, - "user": { - "ext": { - "gdpr": "consent-covering" - } } }, - "test": true, - "user_uid": "" + "test": true }, "impIDs": ["2c35e25e-e7d3-41bf-b810-06a449f456b9"] }, diff --git a/adapters/mediasquare/params_test.go b/adapters/mediasquare/params_test.go index 4906679e28..c9d2d5fe01 100644 --- a/adapters/mediasquare/params_test.go +++ b/adapters/mediasquare/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/mediasquare/parsers.go b/adapters/mediasquare/parsers.go index ec531456c1..f2ef4ab675 100644 --- a/adapters/mediasquare/parsers.go +++ b/adapters/mediasquare/parsers.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // parserDSA: Struct used to extracts dsa content of a jsonutil. @@ -24,14 +24,15 @@ func (parser *parserDSA) setContent(extJsonBytes []byte) error { } // getValue: Returns the DSA value as a string, defaultly returns empty-string. -func (parser parserDSA) getValue(request *openrtb2.BidRequest) interface{} { +func (parser parserDSA) getValue(request *openrtb2.BidRequest) (dsa string) { if request == nil || request.Regs == nil { - return nil + return } - if parser.setContent(request.Regs.Ext) != nil { - return nil + parser.setContent(request.Regs.Ext) + if parser.DSA != nil { + dsa = fmt.Sprint(parser.DSA) } - return parser.DSA + return } // parserGDPR: Struct used to extract pair of GDPR/Consent of a jsonutil. @@ -67,9 +68,9 @@ func (parser parserGDPR) getValue(field string, request *openrtb2.BidRequest) (g if request != nil { switch { case field == "consent_requirement" && request.Regs != nil: - gdpr = "true" - if !ptrInt8ToBool(request.Regs.GDPR) { - gdpr = "false" + gdpr = "false" + if ptrInt8ToBool(request.Regs.GDPR) { + gdpr = "true" } case field == "consent_string" && request.User != nil: gdpr = request.User.Consent diff --git a/adapters/mediasquare/structs.go b/adapters/mediasquare/structs.go index dbda186a28..3758e31380 100644 --- a/adapters/mediasquare/structs.go +++ b/adapters/mediasquare/structs.go @@ -4,9 +4,8 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) // msqResponse: Bid-Response sent by mediasquare. @@ -21,14 +20,12 @@ type msqResponse struct { // msqParameters: Bid-Request sent to mediasquare. type msqParameters struct { - Codes []msqParametersCodes `json:"codes"` - Gdpr msqParametersGdpr `json:"gdpr"` - Type string `json:"type"` - PrebidVer string `json:"pbjs,omitempty"` - DSA interface{} `json:"dsa,omitempty"` - Support msqSupport `json:"tech"` - Test bool `json:"test"` - UserUID string `json:"user_uid"` + Codes []msqParametersCodes `json:"codes"` + Gdpr msqParametersGdpr `json:"gdpr"` + Type string `json:"type"` + DSA interface{} `json:"dsa,omitempty"` + Support msqSupport `json:"tech"` + Test bool `json:"test"` } type msqResponseBidsVideo struct { @@ -86,10 +83,8 @@ type msqResponseBids struct { } type msqSupport struct { - Device *openrtb2.Device `json:"device,omitempty"` - App *openrtb2.App `json:"app,omitempty"` - Site *openrtb2.Site `json:"site,omitempty"` - User *openrtb2.User `json:"user,omitempty"` + Device interface{} `json:"device"` + App interface{} `json:"app"` } type msqParametersCodes struct { @@ -127,26 +122,13 @@ func initMsqParams(request *openrtb2.BidRequest) (msqParams msqParameters) { msqParams.Support = msqSupport{ Device: request.Device, App: request.App, - Site: request.Site, - User: request.User, } msqParams.Gdpr = msqParametersGdpr{ ConsentRequired: (parserGDPR{}).getValue("consent_requirement", request) == "true", ConsentString: (parserGDPR{}).getValue("consent_string", request), } msqParams.DSA = (parserDSA{}).getValue(request) - if request.User != nil && len(request.User.BuyerUID) > 0 { - msqParams.UserUID = request.User.BuyerUID - } - msqParams.Test = (request.Test == int8(1)) - switch { - case msqParams.Test: - msqParams.PrebidVer = "prebid-test-version" - case len(version.Ver) > 0: - msqParams.PrebidVer = version.Ver - default: - msqParams.PrebidVer = "n/a" - } + return } diff --git a/adapters/mediasquare/utils.go b/adapters/mediasquare/utils.go index b2f94d32c6..50ee7285a7 100644 --- a/adapters/mediasquare/utils.go +++ b/adapters/mediasquare/utils.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) var headerList = map[string][]string{ @@ -87,9 +87,9 @@ func ptrInt8ToBool(i *int8) bool { } // errorWriter: Returns a Custom error message. -func errorWriter(header string, err error, isEmpty bool) error { +func errorWriter(referer string, err error, isEmpty bool) error { if isEmpty { - return fmt.Errorf("%s: is empty.", header) + return fmt.Errorf("%s: is empty.", referer) } - return fmt.Errorf("%s: %s", header, err.Error()) + return fmt.Errorf("%s: %s", referer, err.Error()) } diff --git a/adapters/melozen/melozen.go b/adapters/melozen/melozen.go index 2b9353a253..d49cc28784 100644 --- a/adapters/melozen/melozen.go +++ b/adapters/melozen/melozen.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/melozen/melozen_test.go b/adapters/melozen/melozen_test.go index c2db273e18..cf6189c6ab 100644 --- a/adapters/melozen/melozen_test.go +++ b/adapters/melozen/melozen_test.go @@ -3,9 +3,9 @@ package melozen import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/melozen/params_test.go b/adapters/melozen/params_test.go index 19d4d2e243..42a4b38ec8 100644 --- a/adapters/melozen/params_test.go +++ b/adapters/melozen/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/metax/metax.go b/adapters/metax/metax.go index f5e0a3a69f..8b19704362 100644 --- a/adapters/metax/metax.go +++ b/adapters/metax/metax.go @@ -9,13 +9,13 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type adapter struct { diff --git a/adapters/metax/metax_test.go b/adapters/metax/metax_test.go index 74399aada1..f4f9d7e496 100644 --- a/adapters/metax/metax_test.go +++ b/adapters/metax/metax_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/adapters/metax/params_test.go b/adapters/metax/params_test.go index f0ae81cb73..4487c23326 100644 --- a/adapters/metax/params_test.go +++ b/adapters/metax/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/metax.json diff --git a/adapters/mgid/mgid.go b/adapters/mgid/mgid.go index 159475eecc..68a760a7f5 100644 --- a/adapters/mgid/mgid.go +++ b/adapters/mgid/mgid.go @@ -7,11 +7,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type MgidAdapter struct { diff --git a/adapters/mgid/mgid_test.go b/adapters/mgid/mgid_test.go index 50d7792d1b..7dc7018b57 100644 --- a/adapters/mgid/mgid_test.go +++ b/adapters/mgid/mgid_test.go @@ -3,9 +3,9 @@ package mgid import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mgidX/mgidX.go b/adapters/mgidX/mgidX.go index 1b123b04d6..f952fc27ff 100644 --- a/adapters/mgidX/mgidX.go +++ b/adapters/mgidX/mgidX.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/mgidX/mgidX_test.go b/adapters/mgidX/mgidX_test.go index 33ea88c0d1..90ea5c7904 100644 --- a/adapters/mgidX/mgidX_test.go +++ b/adapters/mgidX/mgidX_test.go @@ -3,9 +3,9 @@ package mgidX import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mgidX/params_test.go b/adapters/mgidX/params_test.go index 0bc39eafa9..c5246fba4b 100644 --- a/adapters/mgidX/params_test.go +++ b/adapters/mgidX/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/minutemedia/minutemedia.go b/adapters/minutemedia/minutemedia.go index 209492527c..f5a212501a 100644 --- a/adapters/minutemedia/minutemedia.go +++ b/adapters/minutemedia/minutemedia.go @@ -10,11 +10,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // adapter is a MinuteMedia implementation of the adapters.Bidder interface. diff --git a/adapters/minutemedia/minutemedia_test.go b/adapters/minutemedia/minutemedia_test.go index 577f4388f2..aa3ce56ca2 100644 --- a/adapters/minutemedia/minutemedia_test.go +++ b/adapters/minutemedia/minutemedia_test.go @@ -3,9 +3,9 @@ package minutemedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "minutemediatest" diff --git a/adapters/missena/missena.go b/adapters/missena/missena.go index b620a89972..401f11d159 100644 --- a/adapters/missena/missena.go +++ b/adapters/missena/missena.go @@ -7,13 +7,13 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) type adapter struct { @@ -24,7 +24,6 @@ type MissenaAdRequest struct { Adunit string `json:"adunit,omitempty"` BuyerUID string `json:"buyeruid,omitempty"` Currency string `json:"currency,omitempty"` - Debug bool `json:"debug,omitempty"` EIDs []openrtb2.EID `json:"userEids,omitempty"` Floor float64 `json:"floor,omitempty"` FloorCurrency string `json:"floor_currency,omitempty"` @@ -44,19 +43,19 @@ type BidServerResponse struct { } type UserParams struct { - APIKey string `json:"apiKey,omitempty"` Formats []string `json:"formats,omitempty"` Placement string `json:"placement,omitempty" default:"sticky"` - Sample string `json:"sample,omitempty"` + TestMode string `json:"test,omitempty"` Settings map[string]any `json:"settings,omitempty"` } -const ( - currencyUSD = "USD" - currencyEUR = "EUR" -) +type MissenaAdapter struct { + EndpointTemplate *template.Template +} -// Builder builds a new instance of the Missena adapter for the given bidder with the given config. +var defaultCur = "USD" + +// Builder builds a new instance of the Foo adapter for the given bidder with the given config. func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { endpoint, err := template.New("endpointTemplate").Parse(config.Endpoint) if err != nil { @@ -68,25 +67,18 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co return bidder, nil } -func getVersionString() string { - if version.Ver == "" { - return version.VerUnknown - } - return version.Ver -} - func getCurrency(currencies []string) (string, error) { eurAvailable := false for _, cur := range currencies { - if cur == currencyUSD { - return currencyUSD, nil + if cur == defaultCur { + return defaultCur, nil } - if cur == currencyEUR { + if cur == "EUR" { eurAvailable = true } } if eurAvailable { - return currencyEUR, nil + return "EUR", nil } return "", fmt.Errorf("no currency supported %v", currencies) } @@ -105,7 +97,7 @@ func (a *adapter) makeRequest(imp openrtb2.Imp, request *openrtb2.BidRequest, re } cur, err := getCurrency(request.Cur) if err != nil { - cur = currencyUSD + cur = defaultCur } var floor float64 @@ -114,7 +106,7 @@ func (a *adapter) makeRequest(imp openrtb2.Imp, request *openrtb2.BidRequest, re floor = imp.BidFloor floorCur, err = getCurrency(request.Cur) if err != nil { - floorCur = currencyUSD + floorCur = defaultCur floor, err = requestInfo.ConvertCurrency(imp.BidFloor, imp.BidFloorCur, floorCur) if err != nil { return nil, err @@ -122,20 +114,9 @@ func (a *adapter) makeRequest(imp openrtb2.Imp, request *openrtb2.BidRequest, re } } - // Extract EIDs from user.ext. Unmarshal errors are intentionally ignored - // to allow requests to proceed without EIDs, as they are optional. - var eids []openrtb2.EID - if request.User != nil && request.User.Ext != nil { - var extUser openrtb_ext.ExtUser - if err := jsonutil.Unmarshal(request.User.Ext, &extUser); err == nil { - eids = extUser.Eids - } - } - missenaRequest := MissenaAdRequest{ Adunit: imp.ID, Currency: cur, - Debug: request.Test == 1, Floor: floor, FloorCurrency: floorCur, IdempotencyKey: request.ID, @@ -143,14 +124,12 @@ func (a *adapter) makeRequest(imp openrtb2.Imp, request *openrtb2.BidRequest, re RequestID: request.ID, Timeout: request.TMax, UserParams: UserParams{ - APIKey: params.APIKey, Formats: params.Formats, Placement: params.Placement, - Sample: params.Sample, + TestMode: params.TestMode, Settings: params.Settings, }, - EIDs: eids, - Version: fmt.Sprintf("prebid-server@%s", getVersionString()), + Version: version.Ver, } body, err := jsonutil.Marshal(missenaRequest) diff --git a/adapters/missena/missena_test.go b/adapters/missena/missena_test.go index e6a4a69038..4a858d27c1 100644 --- a/adapters/missena/missena_test.go +++ b/adapters/missena/missena_test.go @@ -3,9 +3,9 @@ package missena import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/missena/missenatest/exemplary/bid-floor-currency.json b/adapters/missena/missenatest/exemplary/bid-floor-currency.json index a2601c35bf..940a2451d8 100644 --- a/adapters/missena/missenatest/exemplary/bid-floor-currency.json +++ b/adapters/missena/missenatest/exemplary/bid-floor-currency.json @@ -88,11 +88,9 @@ "request_id": "test-request-id", "timeout": 500, "params": { - "apiKey": "test-api-key", "formats": ["banner"], "placement": "sticky" - }, - "version": "prebid-server@unknown" + } }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/missenatest/exemplary/multiple-imps.json b/adapters/missena/missenatest/exemplary/multiple-imps.json index 2dadd0fee0..9f0ea74ce3 100644 --- a/adapters/missena/missenatest/exemplary/multiple-imps.json +++ b/adapters/missena/missenatest/exemplary/multiple-imps.json @@ -144,12 +144,11 @@ } }, "params": { - "apiKey": "test-api-key", - "placement": "test-placement-1" + "placement": "test-placement-1", + "test": "1" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id-1"] }, diff --git a/adapters/missena/missenatest/exemplary/simple-banner-ipv6.json b/adapters/missena/missenatest/exemplary/simple-banner-ipv6.json index 3d04e6738a..ab279f26b7 100644 --- a/adapters/missena/missenatest/exemplary/simple-banner-ipv6.json +++ b/adapters/missena/missenatest/exemplary/simple-banner-ipv6.json @@ -96,12 +96,11 @@ } }, "params": { - "apiKey": "test-api-key", - "placement": "test-placement" + "placement": "test-placement", + "test": "1" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/missenatest/exemplary/simple-banner-with-eids.json b/adapters/missena/missenatest/exemplary/simple-banner-with-eids.json deleted file mode 100644 index ef3495317f..0000000000 --- a/adapters/missena/missenatest/exemplary/simple-banner-with-eids.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "tmax": 500, - "at": 1, - "cur": ["EUR"], - "regs": { - "ext": { - "gdpr": 1 - } - }, - "user": { - "ext": { - "consent": "CO-X2XiO_eyUoAsAxBFRBECsA", - "eids": [ - { - "source": "adserver.org", - "uids": [ - { - "id": "111111111111", - "atype": 1 - } - ] - }, - { - "source": "liveramp.com", - "uids": [ - { - "id": "AjfowMv4ZHZQME1RWTn", - "atype": 3 - } - ] - } - ] - } - }, - "device": { - "ip": "123.123.123.123", - "ua": "test-user-agent" - }, - "site": { - "page": "https://example.com/page", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "h": 50, - "w": 320 - }, - "ext": { - "bidder": { - "apiKey": "test-api-key", - "placement": "test-placement" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://example.com/?t=test-api-key", - "headers": { - "Content-Type": ["application/json;charset=utf-8"], - "Accept": ["application/json"], - "User-Agent": ["test-user-agent"], - "X-Forwarded-For": ["123.123.123.123"], - "Referer": ["https://example.com/page"], - "Origin": ["https://example.com"] - }, - "body": { - "adunit": "test-imp-id", - "currency": "EUR", - "ik": "test-request-id", - "ortb2": { - "at": 1, - "cur": ["EUR"], - "device": { - "ip": "123.123.123.123", - "ua": "test-user-agent" - }, - "id": "test-request-id", - "imp": [ - { - "banner": { - "h": 50, - "w": 320 - }, - "ext": { - "bidder": { - "apiKey": "test-api-key", - "placement": "test-placement" - } - }, - "id": "test-imp-id" - } - ], - "regs": { - "ext": { - "gdpr": 1 - } - }, - "site": { - "domain": "example.com", - "page": "https://example.com/page" - }, - "tmax": 500, - "user": { - "ext": { - "consent": "CO-X2XiO_eyUoAsAxBFRBECsA", - "eids": [ - { - "source": "adserver.org", - "uids": [ - { - "id": "111111111111", - "atype": 1 - } - ] - }, - { - "source": "liveramp.com", - "uids": [ - { - "id": "AjfowMv4ZHZQME1RWTn", - "atype": 3 - } - ] - } - ] - } - } - }, - "params": { - "apiKey": "test-api-key", - "placement": "test-placement" - }, - "request_id": "test-request-id", - "timeout": 500, - "userEids": [ - { - "source": "adserver.org", - "uids": [ - { - "id": "111111111111", - "atype": 1 - } - ] - }, - { - "source": "liveramp.com", - "uids": [ - { - "id": "AjfowMv4ZHZQME1RWTn", - "atype": 3 - } - ] - } - ], - "version": "prebid-server@unknown" - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "ad": "
test ad
", - "cpm": 1.5, - "currency": "EUR", - "requestId": "test-request-id" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-request-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-request-id" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/missena/missenatest/exemplary/simple-banner-with-sample.json b/adapters/missena/missenatest/exemplary/simple-banner-with-sample.json deleted file mode 100644 index 4406bf98b2..0000000000 --- a/adapters/missena/missenatest/exemplary/simple-banner-with-sample.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "tmax": 500, - "at": 1, - "cur": ["EUR"], - "regs": { - "ext": { - "gdpr": 1 - } - }, - "user": { - "ext": { - "consent": "CO-X2XiO_eyUoAsAxBFRBECsA" - } - }, - "device": { - "ip": "123.123.123.123", - "ua": "test-user-agent" - }, - "site": { - "page": "https://example.com/page", - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "h": 50, - "w": 320 - }, - "ext": { - "bidder": { - "apiKey": "test-api-key", - "placement": "test-placement", - "sample": "test-sample-value" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://example.com/?t=test-api-key", - "headers": { - "Content-Type": ["application/json;charset=utf-8"], - "Accept": ["application/json"], - "User-Agent": ["test-user-agent"], - "X-Forwarded-For": ["123.123.123.123"], - "Referer": ["https://example.com/page"], - "Origin": ["https://example.com"] - }, - "body": { - "adunit": "test-imp-id", - "currency": "EUR", - "ik": "test-request-id", - "ortb2": { - "at": 1, - "cur": ["EUR"], - "device": { - "ip": "123.123.123.123", - "ua": "test-user-agent" - }, - "id": "test-request-id", - "imp": [ - { - "banner": { - "h": 50, - "w": 320 - }, - "ext": { - "bidder": { - "apiKey": "test-api-key", - "placement": "test-placement", - "sample": "test-sample-value" - } - }, - "id": "test-imp-id" - } - ], - "regs": { - "ext": { - "gdpr": 1 - } - }, - "site": { - "domain": "example.com", - "page": "https://example.com/page" - }, - "tmax": 500, - "user": { - "ext": { - "consent": "CO-X2XiO_eyUoAsAxBFRBECsA" - } - } - }, - "params": { - "apiKey": "test-api-key", - "placement": "test-placement", - "sample": "test-sample-value" - }, - "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "ad": "
test ad
", - "cpm": 1.5, - "currency": "EUR", - "requestId": "test-request-id" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-request-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-request-id" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/missena/missenatest/exemplary/simple-banner.json b/adapters/missena/missenatest/exemplary/simple-banner.json index 543f0c4995..e2368579b5 100644 --- a/adapters/missena/missenatest/exemplary/simple-banner.json +++ b/adapters/missena/missenatest/exemplary/simple-banner.json @@ -94,12 +94,10 @@ } }, "params": { - "apiKey": "test-api-key", "placement": "test-placement" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/missenatest/exemplary/valid-imp-error-imp.json b/adapters/missena/missenatest/exemplary/valid-imp-error-imp.json index 2dadd0fee0..9f0ea74ce3 100644 --- a/adapters/missena/missenatest/exemplary/valid-imp-error-imp.json +++ b/adapters/missena/missenatest/exemplary/valid-imp-error-imp.json @@ -144,12 +144,11 @@ } }, "params": { - "apiKey": "test-api-key", - "placement": "test-placement-1" + "placement": "test-placement-1", + "test": "1" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id-1"] }, diff --git a/adapters/missena/missenatest/supplemental/status-204.json b/adapters/missena/missenatest/supplemental/status-204.json index ab649bb814..4cd1a24b8a 100644 --- a/adapters/missena/missenatest/supplemental/status-204.json +++ b/adapters/missena/missenatest/supplemental/status-204.json @@ -96,12 +96,11 @@ } }, "params": { - "apiKey": "test-api-key", - "placement": "test-placement" + "placement": "test-placement", + "test": "1" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/missenatest/supplemental/status-400.json b/adapters/missena/missenatest/supplemental/status-400.json index 8b0dbf6d77..616fa05cab 100644 --- a/adapters/missena/missenatest/supplemental/status-400.json +++ b/adapters/missena/missenatest/supplemental/status-400.json @@ -94,12 +94,10 @@ } }, "params": { - "apiKey": "test-api-key", "placement": "test-placement" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/missenatest/supplemental/status-not-200.json b/adapters/missena/missenatest/supplemental/status-not-200.json index 600ae11f62..3dc28ab762 100644 --- a/adapters/missena/missenatest/supplemental/status-not-200.json +++ b/adapters/missena/missenatest/supplemental/status-not-200.json @@ -96,12 +96,11 @@ } }, "params": { - "apiKey": "test-api-key", - "placement": "test-placement" + "placement": "test-placement", + "test": "1" }, "request_id": "test-request-id", - "timeout": 500, - "version": "prebid-server@unknown" + "timeout": 500 }, "impIDs": ["test-imp-id"] }, diff --git a/adapters/missena/params_test.go b/adapters/missena/params_test.go index 496a44bf8b..393561b43c 100644 --- a/adapters/missena/params_test.go +++ b/adapters/missena/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -36,7 +36,7 @@ func TestInvalidParams(t *testing.T) { var validParams = []string{ `{"apiKey": "PA-123456"}`, `{"apiKey": "PA-123456", "placement": "sticky"}`, - `{"apiKey": "PA-123456", "sample": "test-sample"}`, + `{"apiKey": "PA-123456", "test": "native"}`, } var invalidParams = []string{ @@ -45,6 +45,6 @@ var invalidParams = []string{ `{"placement": 111}`, `{"placement": "sticky"}`, `{"apiKey": "PA-123456", "placement": 111}`, - `{"sample": "test-sample"}`, - `{"apiKey": "PA-123456", "sample": 111}`, + `{"test": "native"}`, + `{"apiKey": "PA-123456", "test": 111}`, } diff --git a/adapters/mobfoxpb/mobfoxpb.go b/adapters/mobfoxpb/mobfoxpb.go index 5f9dff28f7..538e7f7bce 100644 --- a/adapters/mobfoxpb/mobfoxpb.go +++ b/adapters/mobfoxpb/mobfoxpb.go @@ -8,11 +8,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/mobfoxpb/mobfoxpb_test.go b/adapters/mobfoxpb/mobfoxpb_test.go index 4a36694e02..cbcfd29ebc 100644 --- a/adapters/mobfoxpb/mobfoxpb_test.go +++ b/adapters/mobfoxpb/mobfoxpb_test.go @@ -3,9 +3,9 @@ package mobfoxpb import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mobfoxpb/params_test.go b/adapters/mobfoxpb/params_test.go index 40553b9461..52b9ffb627 100644 --- a/adapters/mobfoxpb/params_test.go +++ b/adapters/mobfoxpb/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the mobfoxpb schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/mobilefuse/mobilefuse.go b/adapters/mobilefuse/mobilefuse.go index 1bcc20b66d..88e562b47f 100644 --- a/adapters/mobilefuse/mobilefuse.go +++ b/adapters/mobilefuse/mobilefuse.go @@ -7,17 +7,25 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type MobileFuseAdapter struct { Endpoint string } +type ExtMf struct { + MediaType string `json:"media_type"` +} + +type BidExt struct { + Mf ExtMf `json:"mf"` +} + type ExtSkadn struct { Skadn json.RawMessage `json:"skadn"` } @@ -66,15 +74,10 @@ func (adapter *MobileFuseAdapter) MakeBids(incomingRequest *openrtb2.BidRequest, } outgoingBidResponse := adapters.NewBidderResponseWithBidsCapacity(1) - var errors []error + for _, seatbid := range incomingBidResponse.SeatBid { for i := range seatbid.Bid { - bidType, err := getBidType(seatbid.Bid[i]) - if err != nil { - errors = append(errors, err) - continue - } - + bidType := getBidType(seatbid.Bid[i]) seatbid.Bid[i].Ext = nil outgoingBidResponse.Bids = append(outgoingBidResponse.Bids, &adapters.TypedBid{ @@ -84,7 +87,7 @@ func (adapter *MobileFuseAdapter) MakeBids(incomingRequest *openrtb2.BidRequest, } } - return outgoingBidResponse, errors + return outgoingBidResponse, nil } func (adapter *MobileFuseAdapter) makeRequest(bidRequest *openrtb2.BidRequest) (*adapters.RequestData, []error) { @@ -197,17 +200,18 @@ func getValidImps(bidRequest *openrtb2.BidRequest, ext *openrtb_ext.ExtImpMobile return validImps, nil } -func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unsupported MType \"%d\" for impression ID \"%s\"", bid.MType, bid.ImpID), +func getBidType(bid openrtb2.Bid) openrtb_ext.BidType { + if bid.Ext != nil { + var bidExt BidExt + err := jsonutil.Unmarshal(bid.Ext, &bidExt) + if err == nil { + if bidExt.Mf.MediaType == "video" { + return openrtb_ext.BidTypeVideo + } else if bidExt.Mf.MediaType == "native" { + return openrtb_ext.BidTypeNative + } } } + + return openrtb_ext.BidTypeBanner } diff --git a/adapters/mobilefuse/mobilefuse_test.go b/adapters/mobilefuse/mobilefuse_test.go index 0d05f27fcc..e0a2f3dc23 100644 --- a/adapters/mobilefuse/mobilefuse_test.go +++ b/adapters/mobilefuse/mobilefuse_test.go @@ -3,9 +3,9 @@ package mobilefuse import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps-multi-format.json b/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps-multi-format.json index 1c7a770aa1..039758bd52 100644 --- a/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps-multi-format.json +++ b/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps-multi-format.json @@ -117,7 +117,11 @@ "crid": "test-crid", "h": 50, "w": 320, - "mtype": 1 + "ext": { + "mf": { + "media_type": "banner" + } + } } ] } @@ -139,8 +143,7 @@ "adm": "some-test-ad", "crid": "test-crid", "w": 320, - "h": 50, - "mtype": 1 + "h": 50 }, "type": "banner" } diff --git a/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps.json b/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps.json index bb1b6d7c30..4e0206f298 100644 --- a/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps.json +++ b/adapters/mobilefuse/mobilefusetest/exemplary/multi-imps.json @@ -89,7 +89,11 @@ "crid": "test-crid", "h": 50, "w": 320, - "mtype": 1 + "ext": { + "mf": { + "media_type": "banner" + } + } } ] } @@ -112,8 +116,7 @@ "adm": "some-test-ad", "crid": "test-crid", "w": 320, - "h": 50, - "mtype": 1 + "h": 50 }, "type": "banner" } diff --git a/adapters/mobilefuse/mobilefusetest/exemplary/simple-banner.json b/adapters/mobilefuse/mobilefusetest/exemplary/simple-banner.json index 48d9335d62..d6b70c5a28 100644 --- a/adapters/mobilefuse/mobilefusetest/exemplary/simple-banner.json +++ b/adapters/mobilefuse/mobilefusetest/exemplary/simple-banner.json @@ -61,7 +61,11 @@ "crid": "test-crid", "h": 50, "w": 320, - "mtype": 1 + "ext": { + "mf": { + "media_type": "banner" + } + } } ] } @@ -84,8 +88,7 @@ "adm": "some-test-ad", "crid": "test-crid", "w": 320, - "h": 50, - "mtype": 1 + "h": 50 }, "type": "banner" } diff --git a/adapters/mobilefuse/mobilefusetest/exemplary/simple-native.json b/adapters/mobilefuse/mobilefusetest/exemplary/simple-native.json index 5906b37041..8a075d955a 100644 --- a/adapters/mobilefuse/mobilefusetest/exemplary/simple-native.json +++ b/adapters/mobilefuse/mobilefusetest/exemplary/simple-native.json @@ -51,7 +51,11 @@ "crid": "test-crid", "h": 50, "w": 320, - "mtype": 4 + "ext": { + "mf": { + "media_type": "native" + } + } } ] } @@ -73,8 +77,7 @@ "adm": "{\"native\":{\"link\":{\"url\":\"http://mfx.mobilefuse.com/openrtb\"},\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"url\":\"...\"}},{\"id\":1,\"required\":1,\"title\":{\"text\":\"custom title\"}}]}}", "crid": "test-crid", "h": 50, - "w": 320, - "mtype": 4 + "w": 320 }, "type": "native" } diff --git a/adapters/mobilefuse/mobilefusetest/exemplary/simple-video.json b/adapters/mobilefuse/mobilefusetest/exemplary/simple-video.json index 2dd83841b0..71bfdaf0fe 100644 --- a/adapters/mobilefuse/mobilefusetest/exemplary/simple-video.json +++ b/adapters/mobilefuse/mobilefusetest/exemplary/simple-video.json @@ -66,7 +66,11 @@ "crid": "test-crid", "w": 320, "h": 480, - "mtype": 2 + "ext": { + "mf": { + "media_type": "video" + } + } } ] } @@ -87,8 +91,7 @@ "adm": "some-test-ad", "crid": "test-crid", "w": 320, - "h": 480, - "mtype": 2 + "h": 480 }, "type": "video" } diff --git a/adapters/mobilefuse/params_test.go b/adapters/mobilefuse/params_test.go index 2ef8686ab0..e585675457 100644 --- a/adapters/mobilefuse/params_test.go +++ b/adapters/mobilefuse/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(test *testing.T) { diff --git a/adapters/mobkoi/mobkoi.go b/adapters/mobkoi/mobkoi.go index b9569fd3fa..3f8bffe0c5 100644 --- a/adapters/mobkoi/mobkoi.go +++ b/adapters/mobkoi/mobkoi.go @@ -5,10 +5,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -37,11 +37,13 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte return nil, []error{err} } - if ext.Bidder.PlacementID != "" { - request.Imp[0].TagID = ext.Bidder.PlacementID - } else if request.Imp[0].TagID == "" { - return nil, []error{ - errors.New("invalid because it comes with neither request.imp[0].tagId nor req.imp[0].ext.Bidder.placementId"), + if request.Imp[0].TagID == "" { + if ext.Bidder.PlacementID != "" { + request.Imp[0].TagID = ext.Bidder.PlacementID + } else { + return nil, []error{ + errors.New("invalid because it comes with neither request.imp[0].tagId nor req.imp[0].ext.Bidder.placementId"), + } } } diff --git a/adapters/mobkoi/mobkoi_test.go b/adapters/mobkoi/mobkoi_test.go index 6c61fffc71..19bcdb8385 100644 --- a/adapters/mobkoi/mobkoi_test.go +++ b/adapters/mobkoi/mobkoi_test.go @@ -3,9 +3,9 @@ package mobkoi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/mobkoi/params_test.go b/adapters/mobkoi/params_test.go index ad34cedadf..ea279629dc 100644 --- a/adapters/mobkoi/params_test.go +++ b/adapters/mobkoi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(test *testing.T) { diff --git a/adapters/motorik/motorik.go b/adapters/motorik/motorik.go index 4802d19b0e..5256605ec8 100644 --- a/adapters/motorik/motorik.go +++ b/adapters/motorik/motorik.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/motorik/motorik_test.go b/adapters/motorik/motorik_test.go index 9a94bc633a..5d99d05012 100644 --- a/adapters/motorik/motorik_test.go +++ b/adapters/motorik/motorik_test.go @@ -3,9 +3,9 @@ package motorik import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/motorik/params_test.go b/adapters/motorik/params_test.go index 5a8dc41891..9c8dc2f5d1 100644 --- a/adapters/motorik/params_test.go +++ b/adapters/motorik/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/msft/models.go b/adapters/msft/models.go index 7a3bf291fb..625251c773 100644 --- a/adapters/msft/models.go +++ b/adapters/msft/models.go @@ -1,7 +1,7 @@ package msft import ( - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type extraAdapterInfo struct { diff --git a/adapters/msft/msft.go b/adapters/msft/msft.go index 8eae4790cc..c7711dace6 100644 --- a/adapters/msft/msft.go +++ b/adapters/msft/msft.go @@ -10,12 +10,12 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const ( diff --git a/adapters/msft/msft_test.go b/adapters/msft/msft_test.go index 6247788282..b16a8c64b2 100644 --- a/adapters/msft/msft_test.go +++ b/adapters/msft/msft_test.go @@ -3,9 +3,9 @@ package msft import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/msft/params_test.go b/adapters/msft/params_test.go index 6c897aafd1..1046a4a0b2 100644 --- a/adapters/msft/params_test.go +++ b/adapters/msft/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file tests static/bidder-params/msft.json diff --git a/adapters/nativery/nativery.go b/adapters/nativery/nativery.go index 99a0a4ff5c..1cd05aac12 100644 --- a/adapters/nativery/nativery.go +++ b/adapters/nativery/nativery.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/nativery/nativery_test.go b/adapters/nativery/nativery_test.go index 0c7bdce2d6..4875089fea 100644 --- a/adapters/nativery/nativery_test.go +++ b/adapters/nativery/nativery_test.go @@ -3,9 +3,9 @@ package nativery import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/nativery/params_test.go b/adapters/nativery/params_test.go index 79f3cb3d0b..557c3e0bb9 100644 --- a/adapters/nativery/params_test.go +++ b/adapters/nativery/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/nativo/nativo.go b/adapters/nativo/nativo.go index b06020a830..6e595bbff8 100644 --- a/adapters/nativo/nativo.go +++ b/adapters/nativo/nativo.go @@ -1,16 +1,14 @@ package nativo import ( + "encoding/json" "fmt" "net/http" - "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type adapter struct { @@ -26,7 +24,7 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co } func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - requestJSON, err := jsonutil.Marshal(request) + requestJSON, err := json.Marshal(request) if err != nil { return nil, []error{err} } @@ -56,80 +54,32 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, externalRequest *adapte var bidResp openrtb2.BidResponse - if err := jsonutil.Unmarshal(response.Body, &bidResp); err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: "Bad Server Response", - }} + if err := json.Unmarshal(response.Body, &bidResp); err != nil { + return nil, []error{err} } bidResponse := adapters.NewBidderResponse() - // Get the ext from the request - var extReq openrtb_ext.ExtRequest - if len(request.Ext) > 0 { - _ = jsonutil.Unmarshal(request.Ext, &extReq) - } - var errs []error - for seatBidIndex := range bidResp.SeatBid { - seatBid := bidResp.SeatBid[seatBidIndex] - for bidIndex := range seatBid.Bid { - bid := seatBid.Bid[bidIndex] - bidType, err := getMediaTypeForImp(bid.ImpID, request.Imp) - if err != nil { - // Fallback needed in some cases with Prebid SDK - bidType, err = getMediaTypeForBid(bid) - } + for _, seatBid := range bidResp.SeatBid { + for i := range seatBid.Bid { + bidType, err := getMediaTypeForImp(seatBid.Bid[i].ImpID, request.Imp) if err != nil { errs = append(errs, err) continue } b := &adapters.TypedBid{ - Bid: &seatBid.Bid[bidIndex], + Bid: &seatBid.Bid[i], BidType: bidType, - BidMeta: getRendererMeta(&extReq), } + bidResponse.Bids = append(bidResponse.Bids, b) } } return bidResponse, errs } -// Attempt to set NativoRenderer as the meta renderer if it exists in the request ext -func getRendererMeta(ext *openrtb_ext.ExtRequest) *openrtb_ext.ExtBidPrebidMeta { - if ext == nil || ext.Prebid.Sdk == nil { - return nil - } - const rendererName = "NativoRenderer" - for i := range ext.Prebid.Sdk.Renderers { - renderer := &ext.Prebid.Sdk.Renderers[i] - if strings.EqualFold(renderer.Name, rendererName) { - return &openrtb_ext.ExtBidPrebidMeta{ - RendererName: renderer.Name, - RendererVersion: renderer.Version, - } - } - } - return nil -} - -// Get media type from bid response -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - if bid.Ext != nil { - var bidExt openrtb_ext.ExtBid - err := jsonutil.Unmarshal(bid.Ext, &bidExt) - if err == nil && bidExt.Prebid != nil { - return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type)) - } - } - - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Failed to parse impression \"%s\" mediatype", bid.ImpID), - } -} - -// Get media type from bid request func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) { for _, imp := range imps { if imp.ID == impID { diff --git a/adapters/nativo/nativo_test.go b/adapters/nativo/nativo_test.go index 3877bb0065..87bce3f08d 100644 --- a/adapters/nativo/nativo_test.go +++ b/adapters/nativo/nativo_test.go @@ -1,16 +1,11 @@ package nativo import ( - "encoding/json" "testing" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestBidderNativo(t *testing.T) { @@ -24,244 +19,3 @@ func TestBidderNativo(t *testing.T) { adapterstest.RunJSONBidderTest(t, "nativotest", bidder) } - -func TestGetRendererMeta(t *testing.T) { - tests := []struct { - description string - ext *openrtb_ext.ExtRequest - expected *openrtb_ext.ExtBidPrebidMeta - }{ - { - description: "nil ext returns nil", - ext: nil, - expected: nil, - }, - { - description: "nil sdk returns nil", - ext: &openrtb_ext.ExtRequest{}, - expected: nil, - }, - { - description: "empty renderers returns nil", - ext: &openrtb_ext.ExtRequest{ - Prebid: openrtb_ext.ExtRequestPrebid{ - Sdk: &openrtb_ext.ExtRequestSdk{}, - }, - }, - expected: nil, - }, - { - description: "NativoRenderer found returns meta with name and version", - ext: &openrtb_ext.ExtRequest{ - Prebid: openrtb_ext.ExtRequestPrebid{ - Sdk: &openrtb_ext.ExtRequestSdk{ - Renderers: []openrtb_ext.ExtRequestSdkRenderer{ - {Name: "NativoRenderer", Version: "1.0"}, - }, - }, - }, - }, - expected: &openrtb_ext.ExtBidPrebidMeta{ - RendererName: "NativoRenderer", - RendererVersion: "1.0", - }, - }, - { - description: "NativoRenderer matched case-insensitively", - ext: &openrtb_ext.ExtRequest{ - Prebid: openrtb_ext.ExtRequestPrebid{ - Sdk: &openrtb_ext.ExtRequestSdk{ - Renderers: []openrtb_ext.ExtRequestSdkRenderer{ - {Name: "nativorenderer", Version: "2.0"}, - }, - }, - }, - }, - expected: &openrtb_ext.ExtBidPrebidMeta{ - RendererName: "nativorenderer", - RendererVersion: "2.0", - }, - }, - { - description: "non-NativoRenderer returns nil", - ext: &openrtb_ext.ExtRequest{ - Prebid: openrtb_ext.ExtRequestPrebid{ - Sdk: &openrtb_ext.ExtRequestSdk{ - Renderers: []openrtb_ext.ExtRequestSdkRenderer{ - {Name: "OtherRenderer", Version: "1.0"}, - }, - }, - }, - }, - expected: nil, - }, - { - description: "NativoRenderer found among multiple renderers", - ext: &openrtb_ext.ExtRequest{ - Prebid: openrtb_ext.ExtRequestPrebid{ - Sdk: &openrtb_ext.ExtRequestSdk{ - Renderers: []openrtb_ext.ExtRequestSdkRenderer{ - {Name: "OtherRenderer", Version: "1.0"}, - {Name: "NativoRenderer", Version: "3.0"}, - }, - }, - }, - }, - expected: &openrtb_ext.ExtBidPrebidMeta{ - RendererName: "NativoRenderer", - RendererVersion: "3.0", - }, - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - result := getRendererMeta(test.ext) - assert.Equal(t, test.expected, result) - }) - } -} - -func TestGetMediaTypeForBid(t *testing.T) { - tests := []struct { - description string - bid openrtb2.Bid - expectedType openrtb_ext.BidType - hasError bool - }{ - { - description: "nil ext returns error", - bid: openrtb2.Bid{ImpID: "test-imp"}, - hasError: true, - }, - { - description: "invalid ext JSON returns error", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`invalid`)}, - hasError: true, - }, - { - description: "ext without prebid field returns error", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`{"other":"data"}`)}, - hasError: true, - }, - { - description: "valid banner type", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`{"prebid":{"type":"banner"}}`)}, - expectedType: openrtb_ext.BidTypeBanner, - }, - { - description: "valid native type", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`{"prebid":{"type":"native"}}`)}, - expectedType: openrtb_ext.BidTypeNative, - }, - { - description: "valid video type", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`{"prebid":{"type":"video"}}`)}, - expectedType: openrtb_ext.BidTypeVideo, - }, - { - description: "unknown bid type string returns error", - bid: openrtb2.Bid{ImpID: "test-imp", Ext: json.RawMessage(`{"prebid":{"type":"unknown"}}`)}, - hasError: true, - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - result, err := getMediaTypeForBid(test.bid) - if test.hasError { - assert.Error(t, err) - assert.Empty(t, result) - } else { - assert.NoError(t, err) - assert.Equal(t, test.expectedType, result) - } - }) - } -} - -func TestGetMediaTypeForImp(t *testing.T) { - tests := []struct { - description string - impID string - imps []openrtb2.Imp - expectedType openrtb_ext.BidType - hasError bool - }{ - { - description: "banner imp", - impID: "test-imp", - imps: []openrtb2.Imp{{ID: "test-imp", Banner: &openrtb2.Banner{}}}, - expectedType: openrtb_ext.BidTypeBanner, - }, - { - description: "video imp", - impID: "test-imp", - imps: []openrtb2.Imp{{ID: "test-imp", Video: &openrtb2.Video{}}}, - expectedType: openrtb_ext.BidTypeVideo, - }, - { - description: "native imp", - impID: "test-imp", - imps: []openrtb2.Imp{{ID: "test-imp", Native: &openrtb2.Native{}}}, - expectedType: openrtb_ext.BidTypeNative, - }, - { - description: "imp not found returns error", - impID: "unknown-imp", - imps: []openrtb2.Imp{{ID: "test-imp", Banner: &openrtb2.Banner{}}}, - hasError: true, - }, - { - description: "imp found but no media type set returns error", - impID: "test-imp", - imps: []openrtb2.Imp{{ID: "test-imp"}}, - hasError: true, - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - result, err := getMediaTypeForImp(test.impID, test.imps) - if test.hasError { - assert.Error(t, err) - assert.Empty(t, result) - } else { - assert.NoError(t, err) - assert.Equal(t, test.expectedType, result) - } - }) - } -} - -func TestMakeBidsNativoRenderer(t *testing.T) { - bidder := &adapter{endpoint: "https://foo.io/?src=prebid"} - - request := &openrtb2.BidRequest{ - ID: "test-request-id", - Imp: []openrtb2.Imp{ - {ID: "test-imp", Banner: &openrtb2.Banner{}}, - }, - Ext: json.RawMessage(`{"prebid":{"sdk":{"renderers":[{"name":"NativoRenderer","version":"1.0.0"}]}}}`), - } - - response := &adapters.ResponseData{ - StatusCode: 200, - Body: json.RawMessage(`{ - "id": "test-response-id", - "seatbid": [{"bid": [{"id": "bid-id", "impid": "test-imp", "price": 3.5}], "seat": "nativo"}], - "cur": "USD" - }`), - } - - bidderResp, errs := bidder.MakeBids(request, nil, response) - - require.Empty(t, errs) - require.Len(t, bidderResp.Bids, 1) - - bid := bidderResp.Bids[0] - assert.Equal(t, openrtb_ext.BidTypeBanner, bid.BidType) - require.NotNil(t, bid.BidMeta) - assert.Equal(t, "NativoRenderer", bid.BidMeta.RendererName) - assert.Equal(t, "1.0.0", bid.BidMeta.RendererVersion) -} diff --git a/adapters/nativo/nativotest/exemplary/banner-app.json b/adapters/nativo/nativotest/exemplary/banner-app.json index 29280cbc05..738d01bd9a 100644 --- a/adapters/nativo/nativotest/exemplary/banner-app.json +++ b/adapters/nativo/nativotest/exemplary/banner-app.json @@ -30,26 +30,9 @@ "banner": { "w": 320, "h": 50 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } - ], - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + ] }, "httpCalls": [ { @@ -70,12 +53,7 @@ "w": 320, "h": 50 }, - "tagid": "ogTAGID", - "ext": { - "bidder": { - "placementId": 12345678 - } - } + "tagid": "ogTAGID" } ], "app": { @@ -93,19 +71,7 @@ "user": { "buyeruid": "awesome-user" }, - "tmax": 1000, - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + "tmax": 1000 }, "impIDs":["some-impression-id"] }, @@ -126,15 +92,7 @@ ], "crid": "20", "w": 320, - "h": 50, - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + "h": 50 } ], "seat": "nativo" @@ -165,15 +123,7 @@ ], "crid": "20", "w": 320, - "h": 50, - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + "h": 50 }, "type": "banner" } diff --git a/adapters/nativo/nativotest/exemplary/banner-web-no-placementid.json b/adapters/nativo/nativotest/exemplary/banner-web-no-placementid.json deleted file mode 100644 index d4c3d38a00..0000000000 --- a/adapters/nativo/nativotest/exemplary/banner-web-no-placementid.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "mockBidRequest": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "tmax": 1000, - "user": { - "buyeruid": "awesome-user" - }, - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": {} - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": {} - } - } - ], - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 - }, - "impIDs": ["some-impression-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "awesome-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "adomain": [ - "awesome.com" - ], - "crid": "20", - "w": 320, - "h": 50 - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "crid": "20", - "adomain": [ - "awesome.com" - ], - "w": 320, - "h": 50 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/nativo/nativotest/exemplary/banner-web-string-placementid.json b/adapters/nativo/nativotest/exemplary/banner-web-string-placementid.json deleted file mode 100644 index a26662fed2..0000000000 --- a/adapters/nativo/nativotest/exemplary/banner-web-string-placementid.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "mockBidRequest": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "tmax": 1000, - "user": { - "buyeruid": "awesome-user" - }, - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "placementId": "12345678" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "placementId": "12345678" - } - } - } - ], - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 - }, - "impIDs": ["some-impression-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "awesome-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "adomain": [ - "awesome.com" - ], - "crid": "20", - "w": 320, - "h": 50 - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "crid": "20", - "adomain": [ - "awesome.com" - ], - "w": 320, - "h": 50 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/nativo/nativotest/exemplary/banner-web.json b/adapters/nativo/nativotest/exemplary/banner-web.json index ce67bbd15f..58af89b202 100644 --- a/adapters/nativo/nativotest/exemplary/banner-web.json +++ b/adapters/nativo/nativotest/exemplary/banner-web.json @@ -24,11 +24,6 @@ "banner": { "w":320, "h":50 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ] @@ -52,11 +47,6 @@ "banner": { "w":320, "h":50 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ], diff --git a/adapters/nativo/nativotest/exemplary/native-app.json b/adapters/nativo/nativotest/exemplary/native-app.json index 5f3e5a730d..5f038958b7 100644 --- a/adapters/nativo/nativotest/exemplary/native-app.json +++ b/adapters/nativo/nativotest/exemplary/native-app.json @@ -30,26 +30,9 @@ "native": { "ver":"1.1", "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } - ], - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + ] }, "httpCalls": [ { @@ -70,12 +53,7 @@ "ver":"1.1", "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" }, - "tagid": "ogTAGID", - "ext": { - "bidder": { - "placementId": 12345678 - } - } + "tagid": "ogTAGID" } ], "app": { @@ -93,19 +71,7 @@ "user": { "buyeruid": "awesome-user" }, - "tmax": 1000, - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + "tmax": 1000 }, "impIDs":["some-impression-id"] }, @@ -124,15 +90,7 @@ "adomain": [ "awesome.com" ], - "crid": "20", - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + "crid": "20" } ], "seat": "nativo" @@ -161,15 +119,7 @@ "crid": "20", "adomain": [ "awesome.com" - ], - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + ] }, "type": "native" } diff --git a/adapters/nativo/nativotest/exemplary/native-web.json b/adapters/nativo/nativotest/exemplary/native-web.json index 98e0ca38df..598dc2abfc 100644 --- a/adapters/nativo/nativotest/exemplary/native-web.json +++ b/adapters/nativo/nativotest/exemplary/native-web.json @@ -24,11 +24,6 @@ "native": { "ver":"1.1", "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ] @@ -52,11 +47,6 @@ "native": { "ver":"1.1", "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ], diff --git a/adapters/nativo/nativotest/exemplary/video-app.json b/adapters/nativo/nativotest/exemplary/video-app.json index 2a478e2526..596bf9bcaf 100644 --- a/adapters/nativo/nativotest/exemplary/video-app.json +++ b/adapters/nativo/nativotest/exemplary/video-app.json @@ -35,26 +35,9 @@ "h": 480, "minduration": 120, "maxduration": 150 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } - ], - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + ] }, "httpCalls": [ { @@ -80,12 +63,7 @@ "w": 640, "h": 480 }, - "tagid": "ogTAGID", - "ext": { - "bidder": { - "placementId": 12345678 - } - } + "tagid": "ogTAGID" } ], "app": { @@ -103,19 +81,7 @@ "user": { "buyeruid": "awesome-user" }, - "tmax": 1000, - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } + "tmax": 1000 }, "impIDs":["some-impression-id"] }, @@ -136,15 +102,7 @@ ], "crid": "20", "w": 1280, - "h": 720, - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + "h": 720 } ], "seat": "nativo" @@ -175,15 +133,7 @@ "awesome.com" ], "w": 1280, - "h": 720, - "ext": { - "prebid": { - "meta": { - "rendererName": "NativoRenderer", - "rendererVersion": "1.0.0" - } - } - } + "h": 720 }, "type": "video" } diff --git a/adapters/nativo/nativotest/exemplary/video-web.json b/adapters/nativo/nativotest/exemplary/video-web.json index a1043b2136..12e185ca15 100644 --- a/adapters/nativo/nativotest/exemplary/video-web.json +++ b/adapters/nativo/nativotest/exemplary/video-web.json @@ -29,11 +29,6 @@ "h": 480, "minduration": 120, "maxduration": 150 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ] @@ -62,11 +57,6 @@ "maxduration": 150, "w": 640, "h": 480 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } } } ], diff --git a/adapters/nativo/nativotest/supplemental/200-different-impID-response-from-nativo.json b/adapters/nativo/nativotest/supplemental/200-different-impID-response-from-nativo.json index 96e4b3e875..320d7f5e1b 100755 --- a/adapters/nativo/nativotest/supplemental/200-different-impID-response-from-nativo.json +++ b/adapters/nativo/nativotest/supplemental/200-different-impID-response-from-nativo.json @@ -13,9 +13,7 @@ ] }, "ext": { - "bidder": { - "placementId": "12345678" - } + "bidder": {} } } ] @@ -38,9 +36,7 @@ ] }, "ext": { - "bidder": { - "placementId": "12345678" - } + "bidder": {} } } ] @@ -78,7 +74,7 @@ ], "expectedMakeBidsErrors": [ { - "value": "Failed to parse impression \"nativo-id-2\" mediatype", + "value": "Unrecognized impression type in response from nativo: nativo-id-2", "comparison": "literal" } ] diff --git a/adapters/nativo/nativotest/supplemental/400-response-from-nativo.json b/adapters/nativo/nativotest/supplemental/400-response-from-nativo.json index 342ad1a243..f5ebb6024c 100755 --- a/adapters/nativo/nativotest/supplemental/400-response-from-nativo.json +++ b/adapters/nativo/nativotest/supplemental/400-response-from-nativo.json @@ -13,9 +13,7 @@ ] }, "ext": { - "bidder": { - "placementId": 12345678 - } + "bidder": {} } } ] @@ -38,9 +36,7 @@ ] }, "ext": { - "bidder": { - "placementId": 12345678 - } + "bidder": {} } } ] diff --git a/adapters/nativo/nativotest/supplemental/500-response-from-nativo.json b/adapters/nativo/nativotest/supplemental/500-response-from-nativo.json index c111cf3edd..cc58f18ece 100755 --- a/adapters/nativo/nativotest/supplemental/500-response-from-nativo.json +++ b/adapters/nativo/nativotest/supplemental/500-response-from-nativo.json @@ -13,9 +13,7 @@ ] }, "ext": { - "bidder": { - "placementId": 12345678 - } + "bidder": {} } } ] @@ -38,9 +36,7 @@ ] }, "ext": { - "bidder": { - "placementId": 12345678 - } + "bidder": {} } } ] diff --git a/adapters/nativo/nativotest/supplemental/bid-type-fallback-invalid-type.json b/adapters/nativo/nativotest/supplemental/bid-type-fallback-invalid-type.json deleted file mode 100644 index 2a6c36c019..0000000000 --- a/adapters/nativo/nativotest/supplemental/bid-type-fallback-invalid-type.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "impIDs": ["nativo-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 50, - "ext": { - "prebid": { - "type": "unknown" - } - } - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "invalid BidType: unknown", - "comparison": "literal" - } - ] -} diff --git a/adapters/nativo/nativotest/supplemental/bid-type-fallback-native.json b/adapters/nativo/nativotest/supplemental/bid-type-fallback-native.json deleted file mode 100644 index 3eec53f1bc..0000000000 --- a/adapters/nativo/nativotest/supplemental/bid-type-fallback-native.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "native": { - "request": "" - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "native": { - "request": "" - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "impIDs": ["nativo-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "native" - } - } - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "native" - } - } - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/nativo/nativotest/supplemental/bid-type-fallback-success.json b/adapters/nativo/nativotest/supplemental/bid-type-fallback-success.json deleted file mode 100644 index 286fa30ae7..0000000000 --- a/adapters/nativo/nativotest/supplemental/bid-type-fallback-success.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "impIDs": ["nativo-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 50, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 50, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/nativo/nativotest/supplemental/bid-type-fallback-video.json b/adapters/nativo/nativotest/supplemental/bid-type-fallback-video.json deleted file mode 100644 index 9bbab6b643..0000000000 --- a/adapters/nativo/nativotest/supplemental/bid-type-fallback-video.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ] - }, - "impIDs": ["nativo-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 5.0, - "adm": "awesome-video-markup", - "w": 640, - "h": 480, - "ext": { - "prebid": { - "type": "video" - } - } - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-id", - "impid": "nativo-id-2", - "price": 5.0, - "adm": "awesome-video-markup", - "w": 640, - "h": 480, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/nativo/nativotest/supplemental/nativo-renderer-in-request.json b/adapters/nativo/nativotest/supplemental/nativo-renderer-in-request.json deleted file mode 100644 index 4d03e79af2..0000000000 --- a/adapters/nativo/nativotest/supplemental/nativo-renderer-in-request.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ], - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://foo.io/?src=prebid", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "nativo-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placementId": 12345678 - } - } - } - ], - "ext": { - "prebid": { - "sdk": { - "renderers": [ - { - "name": "NativoRenderer", - "version": "1.0.0" - } - ] - } - } - } - }, - "impIDs": ["nativo-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-id", - "impid": "nativo-id", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 250 - } - ], - "seat": "nativo" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-id", - "impid": "nativo-id", - "price": 3.5, - "adm": "awesome-markup", - "w": 300, - "h": 250 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/nativo/params_test.go b/adapters/nativo/params_test.go deleted file mode 100644 index 8d8cc8a4a8..0000000000 --- a/adapters/nativo/params_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package nativo - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderNativo, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected valid params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderNativo, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{"placementId": "12345678"}`, - `{"placementId": 12345678}`, - `{}`, -} - -var invalidParams = []string{ - `{"placementId": false}`, -} diff --git a/adapters/nextmillennium/nextmillennium.go b/adapters/nextmillennium/nextmillennium.go index c678b39eda..1b2546b662 100644 --- a/adapters/nextmillennium/nextmillennium.go +++ b/adapters/nextmillennium/nextmillennium.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) const NM_ADAPTER_VERSION = "v1.0.1" diff --git a/adapters/nextmillennium/nextmillennium_test.go b/adapters/nextmillennium/nextmillennium_test.go index da32f73484..1ffe49540b 100644 --- a/adapters/nextmillennium/nextmillennium_test.go +++ b/adapters/nextmillennium/nextmillennium_test.go @@ -3,9 +3,9 @@ package nextmillennium import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/nextmillennium/params_test.go b/adapters/nextmillennium/params_test.go index fcfab8e41d..3833c474a3 100644 --- a/adapters/nextmillennium/params_test.go +++ b/adapters/nextmillennium/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/nexx360/nexx360.go b/adapters/nexx360/nexx360.go index 4d63524ba6..f91961918c 100644 --- a/adapters/nexx360/nexx360.go +++ b/adapters/nexx360/nexx360.go @@ -7,12 +7,12 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) type adapter struct { @@ -66,27 +66,11 @@ func processImps(impList []openrtb2.Imp) (imp []openrtb2.Imp, tagId string, plac } } - // Unmarshal entire ext to preserve all fields - var impExtMap map[string]interface{} - if err := jsonutil.Unmarshal(imp.Ext, &impExtMap); err != nil { - return nil, "", "", &errortypes.BadInput{ - Message: err.Error(), - } + impExt := Ext{ + Nexx360: bidderExt.Bidder, } - // Unmarshal nexx360 bidder params to a map for merging - var nexx360ExtMap map[string]interface{} - if err := jsonutil.Unmarshal(bidderExt.Bidder, &nexx360ExtMap); err != nil { - return nil, "", "", &errortypes.BadInput{ - Message: err.Error(), - } - } - - // Replace bidder field with nexx360 field - delete(impExtMap, "bidder") - impExtMap["nexx360"] = nexx360ExtMap - - impExtJSON, err := jsonutil.Marshal(impExtMap) + impExtJSON, err := json.Marshal(impExt) if err != nil { return nil, "", "", &errortypes.BadInput{ Message: err.Error(), diff --git a/adapters/nexx360/nexx360_test.go b/adapters/nexx360/nexx360_test.go index e66cc24219..f7a8741f17 100644 --- a/adapters/nexx360/nexx360_test.go +++ b/adapters/nexx360/nexx360_test.go @@ -3,9 +3,9 @@ package nexx360 import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/nexx360/nexx360test/exemplary/simple-banner-with-extra-ext.json b/adapters/nexx360/nexx360test/exemplary/simple-banner-with-extra-ext.json deleted file mode 100644 index 704f8ebc6c..0000000000 --- a/adapters/nexx360/nexx360test/exemplary/simple-banner-with-extra-ext.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "tagId": "testnexx" - }, - "gpid": "/1111/homepage", - "ae": 1, - "data": { - "pbadslot": "homepage-top" - }, - "skadn": { - "version": "2.0", - "sourceapp": "123456789" - } - } - } - ], - "site": {}, - "ext": { - "nexx360": "Prebid-Server", - "test": 1 - } - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://fast.nexx360.io/prebid-server?tag_id=testnexx", - "body": { - "ext": { - "nexx360": { - "caller": [ - { - "name": "Prebid-Server", - "version": "n/a" - } - ] - } - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "nexx360": { - "tagId": "testnexx" - }, - "gpid": "/1111/homepage", - "ae": 1, - "data": { - "pbadslot": "homepage-top" - }, - "skadn": { - "version": "2.0", - "sourceapp": "123456789" - } - } - } - ], - "site": {} - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "testalias", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-banner", - "crid": "crid_10", - "h": 90, - "w": 728, - "ext": { - "mediaType": "banner", - "bidType": "banner", - "tagId": "testnexx", - "ssp": "test" - } - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-banner", - "crid": "crid_10", - "w": 728, - "h": 90, - "ext": { - "mediaType": "banner", - "bidType": "banner", - "tagId": "testnexx", - "ssp": "test" - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/nexx360/params_test.go b/adapters/nexx360/params_test.go index 45b4c38d96..dc21d21134 100644 --- a/adapters/nexx360/params_test.go +++ b/adapters/nexx360/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/nexx360.json diff --git a/adapters/nobid/nobid.go b/adapters/nobid/nobid.go index 12be203e5c..811ef3363e 100644 --- a/adapters/nobid/nobid.go +++ b/adapters/nobid/nobid.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // NoBidAdapter - NoBid Adapter definition diff --git a/adapters/nobid/nobid_test.go b/adapters/nobid/nobid_test.go index ad117b4c80..6b4a7346cf 100644 --- a/adapters/nobid/nobid_test.go +++ b/adapters/nobid/nobid_test.go @@ -3,9 +3,9 @@ package nobid import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/nobid/params_test.go b/adapters/nobid/params_test.go index 27acf08d21..375237f344 100644 --- a/adapters/nobid/params_test.go +++ b/adapters/nobid/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/ogury/ogury.go b/adapters/ogury/ogury.go index a97923da06..7207ff2ac9 100644 --- a/adapters/ogury/ogury.go +++ b/adapters/ogury/ogury.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -87,10 +87,15 @@ func (a adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapter } if len(impsWithOguryParams) == 0 { - if !hasPublisherId(request) { + if request.Site != nil && (request.Site.Publisher == nil || request.Site.Publisher.ID == "") { // we can serve ads with publisherId+adunitcode combination return nil, []error{&errortypes.BadInput{ - Message: "Invalid request. assetKey/adUnitId or request.site/app.publisher.id required", + Message: "Invalid request. assetKey/adUnitId or request.site.publisher.id required", + }} + } else if request.App != nil { + // for app request there is no adunitcode equivalent so we can't serve ads with just the publisher id + return nil, []error{&errortypes.BadInput{ + Message: "Invalid request. assetKey/adUnitId required", }} } } else if len(impsWithOguryParams) > 0 { @@ -144,18 +149,6 @@ func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { } } -func hasPublisherId(request *openrtb2.BidRequest) bool { - return hasSitePublisherId(request) || hasAppPublisherId(request) -} - -func hasSitePublisherId(request *openrtb2.BidRequest) bool { - return request.Site != nil && request.Site.Publisher != nil && request.Site.Publisher.ID != "" -} - -func hasAppPublisherId(request *openrtb2.BidRequest) bool { - return request.App != nil && request.App.Publisher != nil && request.App.Publisher.ID != "" -} - func (a adapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { if adapters.IsResponseStatusCodeNoContent(responseData) { return nil, nil diff --git a/adapters/ogury/ogury_test.go b/adapters/ogury/ogury_test.go index 2c57b27d39..504be6ccaa 100644 --- a/adapters/ogury/ogury_test.go +++ b/adapters/ogury/ogury_test.go @@ -3,9 +3,9 @@ package ogury import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/ogury/ogurytest/exemplary/app_banner_publisher.json b/adapters/ogury/ogurytest/exemplary/app_banner_publisher.json deleted file mode 100644 index 6a19c07729..0000000000 --- a/adapters/ogury/ogurytest/exemplary/app_banner_publisher.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "id": "1", - "bundle": "com.example", - "publisher": { - "id": "pub-id" - } - }, - "imp": [ - { - "id": "imp-id", - "banner": { - "format": [{"w": 320, "h": 50}] - }, - "ext": { - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://ogury.example.com", - "body": { - "app": { - "id": "1", - "bundle": "com.example", - "publisher": { - "id": "pub-id" - } - }, - "id": "test-request-id", - "imp": [ - { - "id":"imp-id", - "tagid": "imp-id", - "banner": { - "format": [{"w": 320, "h": 50}] - }, - "ext": { - } - } - ] - }, - "impIDs":["imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [ - { - "seat": "seat", - "bid": [{ - "id": "some-UUID", - "impid": "imp-id", - "price": 0.500000, - "nurl": "example nurl", - "adm": "adm string", - "crid": "crid_10", - "h": 100, - "w": 128, - "mtype": 1 - }] - } - ] - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "some-UUID", - "impid": "imp-id", - "price": 0.5, - "nurl": "example nurl", - "adm": "adm string", - "crid": "crid_10", - "h": 100, - "w": 128, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/ogury/ogurytest/supplemental/app_banner_invalid_request.json b/adapters/ogury/ogurytest/supplemental/app_banner_invalid_request.json index 274258f9fa..36f7948bc1 100644 --- a/adapters/ogury/ogurytest/supplemental/app_banner_invalid_request.json +++ b/adapters/ogury/ogurytest/supplemental/app_banner_invalid_request.json @@ -3,7 +3,10 @@ "id": "test-request-id", "app": { "id": "1", - "bundle": "com.example" + "bundle": "com.example", + "publisher": { + "id": "pub-id" + } }, "imp": [ { @@ -23,7 +26,7 @@ "expectedBidResponses": [], "expectedMakeRequestsErrors": [{ - "value": "Invalid request. assetKey/adUnitId or request.site/app.publisher.id required", + "value": "Invalid request. assetKey/adUnitId required", "comparison": "literal" }] } diff --git a/adapters/ogury/ogurytest/supplemental/site_banner_invalid_request.json b/adapters/ogury/ogurytest/supplemental/site_banner_invalid_request.json index c385c9f1e6..e26875ba07 100644 --- a/adapters/ogury/ogurytest/supplemental/site_banner_invalid_request.json +++ b/adapters/ogury/ogurytest/supplemental/site_banner_invalid_request.json @@ -22,7 +22,7 @@ "httpCalls": [], "expectedBidResponses": [], "expectedMakeRequestsErrors": [{ - "value": "Invalid request. assetKey/adUnitId or request.site/app.publisher.id required", + "value": "Invalid request. assetKey/adUnitId or request.site.publisher.id required", "comparison": "literal" }] } diff --git a/adapters/ogury/param_test.go b/adapters/ogury/param_test.go index b48b22cb33..f4c7c83445 100644 --- a/adapters/ogury/param_test.go +++ b/adapters/ogury/param_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/oms/oms.go b/adapters/oms/oms.go index 3e4e8ff392..3ea5bd3284 100644 --- a/adapters/oms/oms.go +++ b/adapters/oms/oms.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/oms/oms_test.go b/adapters/oms/oms_test.go index d0d14fe1eb..e0555b3c75 100644 --- a/adapters/oms/oms_test.go +++ b/adapters/oms/oms_test.go @@ -3,9 +3,9 @@ package oms import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/oms/params_test.go b/adapters/oms/params_test.go index 300c2058d0..ed4113d423 100644 --- a/adapters/oms/params_test.go +++ b/adapters/oms/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/oms.json diff --git a/adapters/onetag/onetag.go b/adapters/onetag/onetag.go index efa38c631e..d1b2e6238e 100644 --- a/adapters/onetag/onetag.go +++ b/adapters/onetag/onetag.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/onetag/onetag_test.go b/adapters/onetag/onetag_test.go index f7c64ef3f9..23a2871758 100644 --- a/adapters/onetag/onetag_test.go +++ b/adapters/onetag/onetag_test.go @@ -3,9 +3,9 @@ package onetag import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/onetag/params_test.go b/adapters/onetag/params_test.go index 3d6021a5dc..6ccf060696 100644 --- a/adapters/onetag/params_test.go +++ b/adapters/onetag/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/openweb/openweb.go b/adapters/openweb/openweb.go index 5d8e770cf3..7a9914b272 100644 --- a/adapters/openweb/openweb.go +++ b/adapters/openweb/openweb.go @@ -10,11 +10,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/openweb/openweb_test.go b/adapters/openweb/openweb_test.go index 51b2305c6f..a08788e7db 100644 --- a/adapters/openweb/openweb_test.go +++ b/adapters/openweb/openweb_test.go @@ -3,9 +3,9 @@ package openweb import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/openweb/params_test.go b/adapters/openweb/params_test.go index 622816033c..73fb20a7e9 100644 --- a/adapters/openweb/params_test.go +++ b/adapters/openweb/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/openweb.json diff --git a/adapters/openx/openx.go b/adapters/openx/openx.go index 5148ffde25..992baa0cdc 100644 --- a/adapters/openx/openx.go +++ b/adapters/openx/openx.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const hbconfig = "hb_pbs_1.0.0" diff --git a/adapters/openx/openx_test.go b/adapters/openx/openx_test.go index dd320b717f..fdfb37cc4a 100644 --- a/adapters/openx/openx_test.go +++ b/adapters/openx/openx_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/openx/params_test.go b/adapters/openx/params_test.go index 1fc71fce7e..0becd9b206 100644 --- a/adapters/openx/params_test.go +++ b/adapters/openx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/openx.json diff --git a/adapters/operaads/operaads.go b/adapters/operaads/operaads.go index 448c4843a6..47c372beca 100644 --- a/adapters/operaads/operaads.go +++ b/adapters/operaads/operaads.go @@ -8,13 +8,13 @@ import ( "strings" "text/template" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/operaads/operaads_test.go b/adapters/operaads/operaads_test.go index b5e21bd8cd..8614e77e7e 100644 --- a/adapters/operaads/operaads_test.go +++ b/adapters/operaads/operaads_test.go @@ -3,9 +3,9 @@ package operaads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/operaads/params_test.go b/adapters/operaads/params_test.go index a20d374942..b845fde89b 100644 --- a/adapters/operaads/params_test.go +++ b/adapters/operaads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/operaads.json diff --git a/adapters/optidigital/optidigital.go b/adapters/optidigital/optidigital.go index a59cd2a73a..89e2474d97 100644 --- a/adapters/optidigital/optidigital.go +++ b/adapters/optidigital/optidigital.go @@ -4,11 +4,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/optidigital/optidigital_test.go b/adapters/optidigital/optidigital_test.go index d89bb92e0c..dda8b09b54 100644 --- a/adapters/optidigital/optidigital_test.go +++ b/adapters/optidigital/optidigital_test.go @@ -3,9 +3,9 @@ package optidigital import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/optidigital/params_test.go b/adapters/optidigital/params_test.go index cb5c9329f2..5c29d9796d 100644 --- a/adapters/optidigital/params_test.go +++ b/adapters/optidigital/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/optidigital.json diff --git a/adapters/oraki/oraki.go b/adapters/oraki/oraki.go index 49a970d934..db6876f2e0 100644 --- a/adapters/oraki/oraki.go +++ b/adapters/oraki/oraki.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/oraki/oraki_test.go b/adapters/oraki/oraki_test.go index e37922fb1b..753357c29f 100644 --- a/adapters/oraki/oraki_test.go +++ b/adapters/oraki/oraki_test.go @@ -3,9 +3,9 @@ package oraki import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/oraki/params_test.go b/adapters/oraki/params_test.go index 3e8ca92e90..24fc6ea29e 100644 --- a/adapters/oraki/params_test.go +++ b/adapters/oraki/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/orbidder/orbidder.go b/adapters/orbidder/orbidder.go index 980ffdde3e..b2f6705273 100644 --- a/adapters/orbidder/orbidder.go +++ b/adapters/orbidder/orbidder.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type OrbidderAdapter struct { diff --git a/adapters/orbidder/orbidder_test.go b/adapters/orbidder/orbidder_test.go index 1b29f988fb..ce26bdd7f2 100644 --- a/adapters/orbidder/orbidder_test.go +++ b/adapters/orbidder/orbidder_test.go @@ -8,10 +8,10 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/mock" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/orbidder/params_test.go b/adapters/orbidder/params_test.go index 9f8d316b18..bb557faa2c 100644 --- a/adapters/orbidder/params_test.go +++ b/adapters/orbidder/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/orbidder.json diff --git a/adapters/outbrain/outbrain.go b/adapters/outbrain/outbrain.go index dfcc2ec378..612a9a0cbe 100644 --- a/adapters/outbrain/outbrain.go +++ b/adapters/outbrain/outbrain.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/native1" nativeResponse "github.com/prebid/openrtb/v20/native1/response" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/outbrain/outbrain_test.go b/adapters/outbrain/outbrain_test.go index 84b347df51..1e1fc1e803 100644 --- a/adapters/outbrain/outbrain_test.go +++ b/adapters/outbrain/outbrain_test.go @@ -3,9 +3,9 @@ package outbrain import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/outbrain/params_test.go b/adapters/outbrain/params_test.go index 9df86a4e15..e6d76d9472 100644 --- a/adapters/outbrain/params_test.go +++ b/adapters/outbrain/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/ownadx/ownadx.go b/adapters/ownadx/ownadx.go index f01048d812..737adfa30d 100644 --- a/adapters/ownadx/ownadx.go +++ b/adapters/ownadx/ownadx.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/ownadx/ownadx_test.go b/adapters/ownadx/ownadx_test.go index 6f979f185c..6921e1ba12 100644 --- a/adapters/ownadx/ownadx_test.go +++ b/adapters/ownadx/ownadx_test.go @@ -3,9 +3,9 @@ package ownadx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/pangle/pangle.go b/adapters/pangle/pangle.go index 76ad2cc8b6..a86052d649 100644 --- a/adapters/pangle/pangle.go +++ b/adapters/pangle/pangle.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/pangle/pangle_test.go b/adapters/pangle/pangle_test.go index 5e52025f02..2143d4f90a 100644 --- a/adapters/pangle/pangle_test.go +++ b/adapters/pangle/pangle_test.go @@ -3,9 +3,9 @@ package pangle import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/pangle/param_test.go b/adapters/pangle/param_test.go index 57adb0d8f1..57acfb0609 100644 --- a/adapters/pangle/param_test.go +++ b/adapters/pangle/param_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/pgamssp/params_test.go b/adapters/pgamssp/params_test.go index fd8962b04e..ec95d47e5f 100644 --- a/adapters/pgamssp/params_test.go +++ b/adapters/pgamssp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/pgamssp/pgamssp.go b/adapters/pgamssp/pgamssp.go index a74719d08c..6ddf21159e 100644 --- a/adapters/pgamssp/pgamssp.go +++ b/adapters/pgamssp/pgamssp.go @@ -7,10 +7,10 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/pgamssp/pgamssp_test.go b/adapters/pgamssp/pgamssp_test.go index 691e8cbb8a..450eb0f0b5 100644 --- a/adapters/pgamssp/pgamssp_test.go +++ b/adapters/pgamssp/pgamssp_test.go @@ -3,9 +3,9 @@ package pgamssp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/pixfuture/params_test.go b/adapters/pixfuture/params_test.go deleted file mode 100644 index 19f2438f65..0000000000 --- a/adapters/pixfuture/params_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package pixfuture - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json schema.") - - tests := []struct { - name string - json string - }{ - { - name: "Minimum length satisfied", - json: `{"pix_id": "1"}`, - }, - { - name: "Longer valid string", - json: `{"pix_id": "abcdef"}`, - }, - } - - for _, tt := range tests { - tt := tt // capture range variable - t.Run(tt.name, func(t *testing.T) { - assert.NoErrorf(t, validator.Validate(openrtb_ext.BidderPixfuture, json.RawMessage(tt.json)), "Schema rejected valid params: %s", tt.json) - }) - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json schema.") - - tests := []struct { - name string - json string - }{ - { - name: "Wrong type (integer)", - json: `{"pix_id": 123}`, - }, - { - name: "Missing required pix_id", - json: `{}`, - }, - { - name: "Empty string (violates minLength)", - json: `{"pix_id": ""}`, - }, - { - name: "Unknown field (additionalProperties: false)", - json: `{"pix_id": "123", "unknown_field": "anything"}`, - }, - } - - for _, tt := range tests { - tt := tt // capture range variable - t.Run(tt.name, func(t *testing.T) { - err := validator.Validate(openrtb_ext.BidderPixfuture, json.RawMessage(tt.json)) - assert.Errorf(t, err, "Schema allowed invalid params: %s", tt.json) - }) - } -} diff --git a/adapters/pixfuture/pixfuture.go b/adapters/pixfuture/pixfuture.go deleted file mode 100644 index 47cebb45a2..0000000000 --- a/adapters/pixfuture/pixfuture.go +++ /dev/null @@ -1,134 +0,0 @@ -// Package pixfuture implements the Pixfuture adapter for Prebid Server. -// It provides functionality to handle bid requests and responses according to Pixfuture's specifications -package pixfuture - -import ( - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iterutil" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - return &adapter{ - endpoint: config.Endpoint, - }, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - - var errs []error - var adapterRequests []*adapters.RequestData - - for imp := range iterutil.SlicePointerValues(request.Imp) { - headers := http.Header{} - headers.Set("Content-Type", "application/json") - headers.Set("Accept", "application/json") - - requestCopy := *request - requestCopy.Imp = []openrtb2.Imp{*imp} // slice notation with dereferencing - - reqJSON, err := jsonutil.Marshal(requestCopy) - if err != nil { - errs = append(errs, err) - continue - } - - adapterRequests = append(adapterRequests, &adapters.RequestData{ - Method: http.MethodPost, - Uri: a.endpoint, - Body: reqJSON, - Headers: headers, - ImpIDs: []string{imp.ID}, - }) - } - - if len(adapterRequests) == 0 && len(errs) > 0 { - return nil, errs - } - return adapterRequests, errs -} - -func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(response) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil { - return nil, []error{err} - } - - var bidResp openrtb2.BidResponse - // Step 1: Check if body is empty to avoid unnecessary unmarshal overhead - if len(response.Body) == 0 { - return nil, nil // Or return a specific error if Pixfuture always expects a body - } - - // Step 2: The Unmarshal call (Lines 88-92) - if err := jsonutil.Unmarshal(response.Body, &bidResp); err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Invalid response format: %s", err.Error()), - }} - } - - // Pre-calculate total number of bids // - expectedBids := 0 - for i := range bidResp.SeatBid { - expectedBids += len(bidResp.SeatBid[i].Bid) - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(expectedBids) - if bidResp.Cur != "" { - bidResponse.Currency = bidResp.Cur - } - - var errs []error - for i := range bidResp.SeatBid { - // Use index j to avoid copying the large openrtb2.Bid struct - for j := range bidResp.SeatBid[i].Bid { - bid := &bidResp.SeatBid[i].Bid[j] - - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errs = append(errs, err) - continue - } - - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - }) - } - } - - if len(bidResponse.Bids) == 0 { - return nil, errs - } - - return bidResponse, errs -} - -func getMediaTypeForBid(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Failed to parse bid mediatype for impression %s from MType", bid.ImpID), - } - } -} diff --git a/adapters/pixfuture/pixfuture_test.go b/adapters/pixfuture/pixfuture_test.go deleted file mode 100644 index 0dfbaf0efa..0000000000 --- a/adapters/pixfuture/pixfuture_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package pixfuture - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderPixfuture, config.Adapter{ - Endpoint: "http://any.url", - }, config.Server{}) - require.NoError(t, buildErr, "Builder returned unexpected error") - - adapterstest.RunJSONBidderTest(t, "pixfuturetest", bidder) -} diff --git a/adapters/pixfuture/pixfuturetest/exemplary/banner-site.json b/adapters/pixfuture/pixfuturetest/exemplary/banner-site.json deleted file mode 100644 index fcbc4ceea5..0000000000 --- a/adapters/pixfuture/pixfuturetest/exemplary/banner-site.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": [ - "imp1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/exemplary/multiimp.json b/adapters/pixfuture/pixfuturetest/exemplary/multiimp.json deleted file mode 100644 index f89c979cb6..0000000000 --- a/adapters/pixfuture/pixfuturetest/exemplary/multiimp.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - }, - { - "id": "imp2", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "pix_id": "55464" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": [ - "imp1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-1", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad 1
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - }, - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp2", - "banner": { - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "pix_id": "55464" - } - } - } - ] - }, - "impIDs": [ - "imp2" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-2", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid2", - "impid": "imp2", - "price": 2.34, - "adm": "
Banner Ad 2
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad 1
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ], - "currency": "USD" - }, - { - "bids": [ - { - "bid": { - "id": "bid2", - "impid": "imp2", - "price": 2.34, - "adm": "
Banner Ad 2
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/exemplary/native.json b/adapters/pixfuture/pixfuturetest/exemplary/native.json deleted file mode 100644 index 9052af00bd..0000000000 --- a/adapters/pixfuture/pixfuturetest/exemplary/native.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "native": { - "request": "{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":1,\"assets\":[]}", - "ver": "1.2" - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "native": { - "request": "{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":1,\"assets\":[]}", - "ver": "1.2" - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "{\"ver\":\"1.2\",\"native\":{\"assets\":[]}}", - "mtype": 4, - "ext": { - "prebid": { - "type": "native" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "{\"ver\":\"1.2\",\"native\":{\"assets\":[]}}", - "mtype": 4, - "ext": { - "prebid": { - "type": "native" - } - } - }, - "type": "native" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/exemplary/video-app.json b/adapters/pixfuture/pixfuturetest/exemplary/video-app.json deleted file mode 100644 index d790349cfa..0000000000 --- a/adapters/pixfuture/pixfuturetest/exemplary/video-app.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "id": "app1" - }, - "imp": [ - { - "id": "imp1", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "app": { - "id": "app1" - }, - "imp": [ - { - "id": "imp1", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/exemplary/video.json b/adapters/pixfuture/pixfuturetest/exemplary/video.json deleted file mode 100644 index 62c0dcd6f8..0000000000 --- a/adapters/pixfuture/pixfuturetest/exemplary/video.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/supplemental/bad_status.json b/adapters/pixfuture/pixfuturetest/supplemental/bad_status.json deleted file mode 100644 index 4cd7ffb3fd..0000000000 --- a/adapters/pixfuture/pixfuturetest/supplemental/bad_status.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 400, - "headers": {}, - "body": "Bad Request" - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/pixfuture/pixfuturetest/supplemental/no_bids.json b/adapters/pixfuture/pixfuturetest/supplemental/no_bids.json deleted file mode 100644 index 5f2ccb6748..0000000000 --- a/adapters/pixfuture/pixfuturetest/supplemental/no_bids.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 204, - "headers": {}, - "body": "" - } - } - ], - "expectedBidResponses": [] -} \ No newline at end of file diff --git a/adapters/pixfuture/pixfuturetest/supplemental/no_cur_in_response.json b/adapters/pixfuture/pixfuturetest/supplemental/no_cur_in_response.json deleted file mode 100644 index 7a1da098bb..0000000000 --- a/adapters/pixfuture/pixfuturetest/supplemental/no_cur_in_response.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "55463" - } - } - } - ] - }, - "impIDs": [ - "imp1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Banner Ad
", - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ], - "currency": "USD" - } - ] -} diff --git a/adapters/pixfuture/pixfuturetest/supplemental/status_204.json b/adapters/pixfuture/pixfuturetest/supplemental/status_204.json deleted file mode 100644 index 5f2ccb6748..0000000000 --- a/adapters/pixfuture/pixfuturetest/supplemental/status_204.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 204, - "headers": {}, - "body": "" - } - } - ], - "expectedBidResponses": [] -} \ No newline at end of file diff --git a/adapters/pixfuture/pixfuturetest/supplemental/unknown_type.json b/adapters/pixfuture/pixfuturetest/supplemental/unknown_type.json deleted file mode 100644 index e1551cc1c9..0000000000 --- a/adapters/pixfuture/pixfuturetest/supplemental/unknown_type.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "description": "Tests an unknown bid type response", - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://any.url", - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"] - }, - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "imp1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "pix_id": "123" - } - } - } - ] - }, - "impIDs": ["imp1"] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": ["application/json"] - }, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid1", - "impid": "imp1", - "price": 1.23, - "adm": "
Ad
", - "ext": { - "prebid": { - "type": "unknown" - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Failed to parse bid mediatype for impression imp1 from MType", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/playdigo/params_test.go b/adapters/playdigo/params_test.go index f586019b45..cb0fa0c681 100644 --- a/adapters/playdigo/params_test.go +++ b/adapters/playdigo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/playdigo/playdigo.go b/adapters/playdigo/playdigo.go index 578e39ae7b..fe0091e2cb 100644 --- a/adapters/playdigo/playdigo.go +++ b/adapters/playdigo/playdigo.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/playdigo/playdigo_test.go b/adapters/playdigo/playdigo_test.go index 0318659595..275924f193 100644 --- a/adapters/playdigo/playdigo_test.go +++ b/adapters/playdigo/playdigo_test.go @@ -3,9 +3,9 @@ package playdigo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/proxistore/params_test.go b/adapters/proxistore/params_test.go deleted file mode 100644 index 0d2f987f50..0000000000 --- a/adapters/proxistore/params_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package proxistore - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json schema. %v", err) - - for _, p := range validParams { - err := validator.Validate(openrtb_ext.BidderProxistore, json.RawMessage(p)) - assert.NoError(t, err, "Schema rejected valid params: %s", p) - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json schema. %v", err) - - for _, p := range invalidParams { - err := validator.Validate(openrtb_ext.BidderProxistore, json.RawMessage(p)) - assert.Error(t, err, "Schema allowed invalid params: %s", p) - } -} - -var validParams = []string{ - `{"website": "example.com", "language": "fr"}`, - `{"website": "test-site", "language": "en"}`, - `{"website": "publisher.be", "language": "nl"}`, -} - -var invalidParams = []string{ - `{}`, - `{"website": "example.com"}`, - `{"language": "fr"}`, - `{"website": "", "language": "fr"}`, - `{"website": "example.com", "language": ""}`, - `{"website": 123, "language": "fr"}`, - `{"website": "example.com", "language": 456}`, - `null`, -} diff --git a/adapters/proxistore/proxistore.go b/adapters/proxistore/proxistore.go deleted file mode 100644 index 9952f1bc4c..0000000000 --- a/adapters/proxistore/proxistore.go +++ /dev/null @@ -1,97 +0,0 @@ -package proxistore - -import ( - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - requestJSON, err := jsonutil.Marshal(request) - if err != nil { - return nil, []error{err} - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json") - headers.Add("Accept", "application/json") - headers.Add("X-Prebid-Source", "server") - - requestData := &adapters.RequestData{ - Method: "POST", - Uri: a.endpoint, - Body: requestJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - - return []*adapters.RequestData{requestData}, nil -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - bidResponse.Currency = response.Cur - - var errors []error - for _, seatBid := range response.SeatBid { - for i, bid := range seatBid.Bid { - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errors = append(errors, err) - continue - } - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - }) - } - } - - return bidResponse, errors -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported MType %d for bid %s", bid.MType, bid.ID), - } - } -} diff --git a/adapters/proxistore/proxistore_test.go b/adapters/proxistore/proxistore_test.go deleted file mode 100644 index 826607ecae..0000000000 --- a/adapters/proxistore/proxistore_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package proxistore - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder( - openrtb_ext.BidderProxistore, - config.Adapter{ - Endpoint: "https://api.proxistore.com/v3/rtb/openrtb", - }, - config.Server{ - ExternalUrl: "http://hosturl.com", - GvlID: 1, - DataCenter: "2", - }, - ) - - assert.NoError(t, buildErr) - adapterstest.RunJSONBidderTest(t, "proxistoretest", bidder) -} diff --git a/adapters/proxistore/proxistoretest/exemplary/multi-imp-banner.json b/adapters/proxistore/proxistoretest/exemplary/multi-imp-banner.json deleted file mode 100644 index cab78da49b..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/multi-imp-banner.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0" - }, - "site": { - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "imp-1", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - }, - { - "id": "imp-2", - "banner": { - "format": [{"w": 728, "h": 90}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0" - }, - "site": { - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "imp-1", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - }, - { - "id": "imp-2", - "banner": { - "format": [{"w": 728, "h": 90}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["imp-1", "imp-2"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "imp-1", - "price": 1.50, - "adm": "
Ad 1
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - { - "id": "bid-2", - "impid": "imp-2", - "price": 0.80, - "adm": "
Ad 2
", - "crid": "creative-2", - "w": 728, - "h": 90, - "mtype": 1 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "imp-1", - "price": 1.50, - "adm": "
Ad 1
", - "crid": "creative-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-2", - "impid": "imp-2", - "price": 0.80, - "adm": "
Ad 2
", - "crid": "creative-2", - "w": 728, - "h": 90, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/exemplary/simple-audio.json b/adapters/proxistore/proxistoretest/exemplary/simple-audio.json deleted file mode 100644 index 4bcea39364..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/simple-audio.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp3"], - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp3"], - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "", - "adomain": ["advertiser.com"], - "crid": "creative-audio-123", - "mtype": 3 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "", - "adomain": ["advertiser.com"], - "crid": "creative-audio-123", - "mtype": 3 - }, - "type": "audio" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/exemplary/simple-banner-app.json b/adapters/proxistore/proxistoretest/exemplary/simple-banner-app.json deleted file mode 100644 index bfc01eca1c..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/simple-banner-app.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36" - }, - "app": { - "id": "app-id", - "bundle": "com.example.app", - "name": "Example App", - "domain": "example.com", - "publisher": { - "id": "pub-123" - } - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - {"w": 320, "h": 50}, - {"w": 300, "h": 250} - ] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ], - "regs": { - "gdpr": 1 - }, - "user": { - "ext": { - "consent": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36" - }, - "app": { - "id": "app-id", - "bundle": "com.example.app", - "name": "Example App", - "domain": "example.com", - "publisher": { - "id": "pub-123" - } - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - {"w": 320, "h": 50}, - {"w": 300, "h": 250} - ] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ], - "regs": { - "gdpr": 1 - }, - "user": { - "ext": { - "consent": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.85, - "adm": "
App banner creative
", - "adomain": ["advertiser.com"], - "crid": "creative-456", - "w": 320, - "h": 50, - "mtype": 1 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.85, - "adm": "
App banner creative
", - "adomain": ["advertiser.com"], - "crid": "creative-456", - "w": 320, - "h": 50, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/exemplary/simple-banner.json b/adapters/proxistore/proxistoretest/exemplary/simple-banner.json deleted file mode 100644 index a3006eed94..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/simple-banner.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - {"w": 300, "h": 250}, - {"w": 300, "h": 600} - ] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ], - "regs": { - "gdpr": 1 - }, - "user": { - "ext": { - "consent": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - {"w": 300, "h": 250}, - {"w": 300, "h": 600} - ] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ], - "regs": { - "gdpr": 1 - }, - "user": { - "ext": { - "consent": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.23, - "adm": "
Ad creative
", - "adomain": ["advertiser.com"], - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.23, - "adm": "
Ad creative
", - "adomain": ["advertiser.com"], - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/exemplary/simple-native.json b/adapters/proxistore/proxistoretest/exemplary/simple-native.json deleted file mode 100644 index b0146495cd..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/simple-native.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}}]}" - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}}]}" - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.80, - "adm": "{\"native\":{\"ver\":\"1.1\",\"link\":{\"url\":\"https://example.com\"},\"assets\":[{\"id\":1,\"title\":{\"text\":\"Ad Title\"}}]}}", - "adomain": ["advertiser.com"], - "crid": "creative-native-123", - "mtype": 4 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.80, - "adm": "{\"native\":{\"ver\":\"1.1\",\"link\":{\"url\":\"https://example.com\"},\"assets\":[{\"id\":1,\"title\":{\"text\":\"Ad Title\"}}]}}", - "adomain": ["advertiser.com"], - "crid": "creative-native-123", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/exemplary/simple-video.json b/adapters/proxistore/proxistoretest/exemplary/simple-video.json deleted file mode 100644 index 192eb60295..0000000000 --- a/adapters/proxistore/proxistoretest/exemplary/simple-video.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [1, 2], - "w": 640, - "h": 480, - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "site": { - "id": "site-id", - "domain": "example.com", - "page": "https://example.com/page" - }, - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [1, 2], - "w": 640, - "h": 480, - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.50, - "adm": "", - "adomain": ["advertiser.com"], - "crid": "creative-video-123", - "w": 640, - "h": 480, - "mtype": 2 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.50, - "adm": "", - "adomain": ["advertiser.com"], - "crid": "creative-video-123", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/proxistore/proxistoretest/supplemental/bad-response.json b/adapters/proxistore/proxistoretest/supplemental/bad-response.json deleted file mode 100644 index 850d729e25..0000000000 --- a/adapters/proxistore/proxistoretest/supplemental/bad-response.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": "not valid json" - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] -} diff --git a/adapters/proxistore/proxistoretest/supplemental/status-204.json b/adapters/proxistore/proxistoretest/supplemental/status-204.json deleted file mode 100644 index 1375e9c65f..0000000000 --- a/adapters/proxistore/proxistoretest/supplemental/status-204.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/proxistore/proxistoretest/supplemental/status-400.json b/adapters/proxistore/proxistoretest/supplemental/status-400.json deleted file mode 100644 index ef772ce672..0000000000 --- a/adapters/proxistore/proxistoretest/supplemental/status-400.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 400, - "body": {} - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/proxistore/proxistoretest/supplemental/status-500.json b/adapters/proxistore/proxistoretest/supplemental/status-500.json deleted file mode 100644 index b8595ed9db..0000000000 --- a/adapters/proxistore/proxistoretest/supplemental/status-500.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 500, - "body": {} - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/proxistore/proxistoretest/supplemental/unsupported-mtype.json b/adapters/proxistore/proxistoretest/supplemental/unsupported-mtype.json deleted file mode 100644 index 5141e24f1d..0000000000 --- a/adapters/proxistore/proxistoretest/supplemental/unsupported-mtype.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://api.proxistore.com/v3/rtb/openrtb", - "body": { - "id": "test-request-id", - "site": { - "domain": "example.com" - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "website": "example.com", - "language": "fr" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.23, - "adm": "
Ad creative
", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 99 - } - ], - "seat": "proxistore" - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unsupported MType 99 for bid test-bid-id", - "comparison": "literal" - } - ] -} diff --git a/adapters/pubmatic/params_test.go b/adapters/pubmatic/params_test.go index 5ca06fdaf9..531416f187 100644 --- a/adapters/pubmatic/params_test.go +++ b/adapters/pubmatic/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/pubmatic.json diff --git a/adapters/pubmatic/pubmatic.go b/adapters/pubmatic/pubmatic.go index ebc6634090..e35229143c 100644 --- a/adapters/pubmatic/pubmatic.go +++ b/adapters/pubmatic/pubmatic.go @@ -9,12 +9,12 @@ import ( "strconv" "strings" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" diff --git a/adapters/pubmatic/pubmatic_test.go b/adapters/pubmatic/pubmatic_test.go index de7afcd4d4..ac1e645c19 100644 --- a/adapters/pubmatic/pubmatic_test.go +++ b/adapters/pubmatic/pubmatic_test.go @@ -8,11 +8,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/pubnative/pubnative.go b/adapters/pubnative/pubnative.go index b30912d257..7c77aeefc9 100644 --- a/adapters/pubnative/pubnative.go +++ b/adapters/pubnative/pubnative.go @@ -8,12 +8,12 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type PubnativeAdapter struct { diff --git a/adapters/pubnative/pubnative_test.go b/adapters/pubnative/pubnative_test.go index c4e8613b8d..dfc065b716 100644 --- a/adapters/pubnative/pubnative_test.go +++ b/adapters/pubnative/pubnative_test.go @@ -3,9 +3,9 @@ package pubnative import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/pubrise/params_test.go b/adapters/pubrise/params_test.go index 4422295bd7..97ee8ebc5c 100644 --- a/adapters/pubrise/params_test.go +++ b/adapters/pubrise/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/pubrise/pubrise.go b/adapters/pubrise/pubrise.go index 2c4b11e5c3..80168f9725 100644 --- a/adapters/pubrise/pubrise.go +++ b/adapters/pubrise/pubrise.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/pubrise/pubrise_test.go b/adapters/pubrise/pubrise_test.go index abccfafddc..9f4f2124ab 100644 --- a/adapters/pubrise/pubrise_test.go +++ b/adapters/pubrise/pubrise_test.go @@ -3,9 +3,9 @@ package pubrise import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/pulsepoint/params_test.go b/adapters/pulsepoint/params_test.go index 56cf4139c0..4359c4115a 100644 --- a/adapters/pulsepoint/params_test.go +++ b/adapters/pulsepoint/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/pulsepoint/pulsepoint.go b/adapters/pulsepoint/pulsepoint.go index 11dd7533a4..2f750e9f85 100644 --- a/adapters/pulsepoint/pulsepoint.go +++ b/adapters/pulsepoint/pulsepoint.go @@ -7,11 +7,11 @@ import ( "net/http" "strconv" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/pulsepoint/pulsepoint_test.go b/adapters/pulsepoint/pulsepoint_test.go index fb766aab8c..be9fff83a6 100644 --- a/adapters/pulsepoint/pulsepoint_test.go +++ b/adapters/pulsepoint/pulsepoint_test.go @@ -3,9 +3,9 @@ package pulsepoint import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/pwbid/params_test.go b/adapters/pwbid/params_test.go index a57cf6baea..52f06e0257 100644 --- a/adapters/pwbid/params_test.go +++ b/adapters/pwbid/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/pwbid/pwbid.go b/adapters/pwbid/pwbid.go index 6cd6b9ea6e..7e03185f2c 100644 --- a/adapters/pwbid/pwbid.go +++ b/adapters/pwbid/pwbid.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/pwbid/pwbid_test.go b/adapters/pwbid/pwbid_test.go index 3a9e76e2b6..cb028a19f6 100644 --- a/adapters/pwbid/pwbid_test.go +++ b/adapters/pwbid/pwbid_test.go @@ -3,9 +3,9 @@ package pwbid import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/qt/params_test.go b/adapters/qt/params_test.go index 0b46b55067..5c8d3253be 100644 --- a/adapters/qt/params_test.go +++ b/adapters/qt/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/qt/qt.go b/adapters/qt/qt.go index 1a1a96acbe..a7c5d53c5a 100644 --- a/adapters/qt/qt.go +++ b/adapters/qt/qt.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/qt/qt_test.go b/adapters/qt/qt_test.go index 3da46eb223..f85adbaf18 100644 --- a/adapters/qt/qt_test.go +++ b/adapters/qt/qt_test.go @@ -3,9 +3,9 @@ package qt import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/readpeak/params_test.go b/adapters/readpeak/params_test.go index d71396eb35..772855e425 100644 --- a/adapters/readpeak/params_test.go +++ b/adapters/readpeak/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/readpeak/readpeak.go b/adapters/readpeak/readpeak.go index 5aaf8c9d80..7049dace48 100644 --- a/adapters/readpeak/readpeak.go +++ b/adapters/readpeak/readpeak.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/readpeak/readpeak_test.go b/adapters/readpeak/readpeak_test.go index 9f4feb20c1..8c8e8e27be 100644 --- a/adapters/readpeak/readpeak_test.go +++ b/adapters/readpeak/readpeak_test.go @@ -3,9 +3,9 @@ package readpeak import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/rediads/params_test.go b/adapters/rediads/params_test.go index 13ba386eff..af69698237 100644 --- a/adapters/rediads/params_test.go +++ b/adapters/rediads/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -36,25 +36,9 @@ func TestInvalidParams(t *testing.T) { var validParams = []string{ `{"account_id": "123"}`, `{"account_id": "123", "slot": "12345"}`, - `{"account_id": "123", "slot": "12345", "endpoint": "bidding2"}`, - `{"account_id": "123", "endpoint": "host"}`, - `{"account_id": "123", "endpoint": "host.example.com"}`, - `{"account_id": "123", "endpoint": "host-example.test"}`, - `{"account_id": "123", "endpoint": "Host.Example.com"}`, - `{"account_id": "123", "endpoint": "localhost"}`, + `{"account_id": "123", "slot": "12345", "endpoint": "https://bidding.rediads.com/openrtb2/auction"}`, } var invalidParams = []string{ - `{"account": 42}`, - `{}`, - `{"account_id": "123", "endpoint": "/path"}`, - `{"account_id": "123", "endpoint": "//evil.com"}`, - `{"account_id": "123", "endpoint": "host/path"}`, - `{"account_id": "123", "endpoint": "host?query=1"}`, - `{"account_id": "123", "endpoint": "host#fragment"}`, - `{"account_id": "123", "endpoint": "user@host"}`, - `{"account_id": "123", "endpoint": "https://host.com"}`, - `{"account_id": "123", "endpoint": "host:notaport"}`, - `{"account_id": "123", "endpoint": "host:8080:extra"}`, - `{"account_id": "123", "endpoint": "host:8080"}`, + `{"account": 42}`, `{}`, } diff --git a/adapters/rediads/rediads.go b/adapters/rediads/rediads.go index bbf6a8e1dc..cfa60eacf6 100644 --- a/adapters/rediads/rediads.go +++ b/adapters/rediads/rediads.go @@ -7,12 +7,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -100,9 +99,6 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte finalEndpoint := a.endpoint if endpoint != "" { - if !urlutil.IsSafeHost(endpoint) { - return nil, []error{&errortypes.BadInput{Message: "Invalid endpoint"}} - } parsedURL, _ := url.Parse(finalEndpoint) host := parsedURL.Host parts := strings.Split(host, ".") diff --git a/adapters/rediads/rediads_test.go b/adapters/rediads/rediads_test.go index ec263d8324..b5e935b680 100644 --- a/adapters/rediads/rediads_test.go +++ b/adapters/rediads/rediads_test.go @@ -3,9 +3,9 @@ package rediads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/rediads/rediadstest/supplemental/invalid-endpoint.json b/adapters/rediads/rediadstest/supplemental/invalid-endpoint.json deleted file mode 100644 index 5766b970d1..0000000000 --- a/adapters/rediads/rediadstest/supplemental/invalid-endpoint.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "account_id": "123", - "endpoint": "evil.com/path?redirect=http://attacker.com#" - } - } - } - ], - "site": { - "page": "test.com", - "publisher": { - "id": "pub1" - } - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid endpoint", - "comparison": "literal" - } - ] -} diff --git a/adapters/relevantdigital/params_test.go b/adapters/relevantdigital/params_test.go index 21aad12ff1..987dfd6e58 100644 --- a/adapters/relevantdigital/params_test.go +++ b/adapters/relevantdigital/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -34,32 +34,9 @@ func TestInvalidParams(t *testing.T) { } var validParams = []string{ - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host.example.com"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host.example.com:8080"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host-example.test"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "Host.Example.com"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "localhost:3000"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "https://foo.relevant-digital.com"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "http://foo.relevant-digital.com"}`, + `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId" : "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost" : "some-host" }`, } var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{}`, - `{"accountId": 123, "placementId": 123, "pbsHost": ""}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host", "useSourceBidderCode": "somethingInvalid"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "/path"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "//evil.com"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host/path"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host?query=1"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host#fragment"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "user@host"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host:notaport"}`, - `{"accountId": "5fcf49f83a64ba6602b5be7e", "placementId": "63b68275b4f35962c8eec9b1_5fcf49f83a64ba6602b5be9a", "pbsHost": "host:8080:extra"}`, + `{"accountId": 123, "placementId" : 123, "pbsHost" : ""}`, } diff --git a/adapters/relevantdigital/relevantdigital.go b/adapters/relevantdigital/relevantdigital.go index 9fa8174fea..702dca6b27 100644 --- a/adapters/relevantdigital/relevantdigital.go +++ b/adapters/relevantdigital/relevantdigital.go @@ -10,13 +10,12 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) @@ -115,11 +114,6 @@ func setTMax(prebidBidRequest *openrtb2.BidRequest, pbsBufferMs int) { func createBidRequest(prebidBidRequest *openrtb2.BidRequest, params []*openrtb_ext.ExtRelevantDigital) ([]byte, error) { bidRequestCopy := *prebidBidRequest - // Copy Imp slice so patchBidImpExt only mutates this outgoing request. - // MakeBids receives the same request and needs the original Imp[].Ext - // to read useSourceBidderCode from bidder params. - bidRequestCopy.Imp = make([]openrtb2.Imp, len(prebidBidRequest.Imp)) - copy(bidRequestCopy.Imp, prebidBidRequest.Imp) err := patchBidRequestExt(&bidRequestCopy, params[0].AccountId) if err != nil { @@ -183,9 +177,6 @@ func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtRelevantDigital) (stri params.Host = strings.ReplaceAll(params.Host, "http://", "") params.Host = strings.ReplaceAll(params.Host, "https://", "") params.Host = strings.ReplaceAll(params.Host, relevant_domain, "") - if !urlutil.IsSafeHost(params.Host) { - return "", &errortypes.BadInput{Message: "Invalid Host"} - } endpointParams := macros.EndpointTemplateParams{Host: params.Host} return macros.ResolveMacros(a.endpoint, endpointParams) @@ -301,17 +292,6 @@ func isSupportedMediaType(bidType openrtb_ext.BidType) error { return fmt.Errorf("bid type not supported %s", bidType) } -func useSourceBidderCode(request *openrtb2.BidRequest) bool { - if request == nil || len(request.Imp) == 0 { - return false - } - impExt, err := getImpressionExt(&request.Imp[0]) - if err != nil { - return false - } - return impExt.UseSourceBidderCode -} - func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { if adapters.IsResponseStatusCodeNoContent(responseData) { return nil, nil @@ -326,8 +306,6 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R return nil, []error{err} } - passSourceSeat := useSourceBidderCode(request) - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(response.SeatBid)) bidResponse.Currency = response.Cur var errs []error @@ -346,9 +324,6 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R Bid: &seatBid.Bid[i], BidType: bidType, } - if passSourceSeat { - b.Seat = openrtb_ext.BidderName(seatBid.Seat) - } bidResponse.Bids = append(bidResponse.Bids, b) } } diff --git a/adapters/relevantdigital/relevantdigital_test.go b/adapters/relevantdigital/relevantdigital_test.go index 8859a27d37..31e6b370d8 100644 --- a/adapters/relevantdigital/relevantdigital_test.go +++ b/adapters/relevantdigital/relevantdigital_test.go @@ -3,9 +3,9 @@ package relevantdigital import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/host-normalization.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/host-normalization.json deleted file mode 100644 index 2f320358e2..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/host-normalization.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "mockBidRequest": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "accountId": "620523ae7f4bbe1691bbb815", - "pbsHost": "https://fakeHost.relevant-digital.com", - "placementId": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com", - "publisher": { - "id": "1001", - "domain": "somepub.com" - } - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://fakeHost.relevant-digital.com/openrtb2/auction", - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com", - "publisher": { - "id": "1001", - "domain": "somepub.com" - } - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "ext": { - "prebid": { - "debug": false, - "storedrequest": { - "id": "620523ae7f4bbe1691bbb815" - } - }, - "relevant": { - "adapterType": "server", - "count": 1 - } - }, - "tmax": 750 - }, - "impIDs": ["div-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "seatbid": [ - { - "seat": "relevantdigital", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-ad-markup", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-ad-markup", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/invalid-host.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/invalid-host.json deleted file mode 100644 index 1a29f98435..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/invalid-host.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "some-impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "accountId": "testaccount", - "placementId": "testplacement", - "pbsHost": "evil.com/path?redirect=http://attacker.com#" - } - } - } - ], - "site": { - "page": "test.com" - } - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Invalid Host", - "comparison": "literal" - } - ] -} diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCode.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCode.json deleted file mode 100644 index 1b8e105dfe..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCode.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "accountId": "620523ae7f4bbe1691bbb815", - "pbsHost": "fakeHost", - "placementId": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817", - "useSourceBidderCode": true - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://fakeHost.relevant-digital.com/openrtb2/auction", - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "ext": { - "prebid": { - "debug": false, - "storedrequest": { - "id": "620523ae7f4bbe1691bbb815" - } - }, - "relevant": { - "adapterType": "server", - "count": 1 - } - }, - "tmax": 750 - }, - "impIDs": ["div-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "seatbid": [ - { - "seat": "pubmatic", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner", - "seat": "pubmatic" - } - ] - } - ] -} diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabled.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabled.json deleted file mode 100644 index a8ab5a81c0..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabled.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "mockBidRequest": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "accountId": "620523ae7f4bbe1691bbb815", - "pbsHost": "fakeHost", - "placementId": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://fakeHost.relevant-digital.com/openrtb2/auction", - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "ext": { - "prebid": { - "debug": false, - "storedrequest": { - "id": "620523ae7f4bbe1691bbb815" - } - }, - "relevant": { - "adapterType": "server", - "count": 1 - } - }, - "tmax": 750 - }, - "impIDs": ["div-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "seatbid": [ - { - "seat": "pubmatic", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "div-1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabledMultipleSeatBids.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabledMultipleSeatBids.json deleted file mode 100644 index 8040c2e039..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeDisabledMultipleSeatBids.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "mockBidRequest": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "accountId": "620523ae7f4bbe1691bbb815", - "pbsHost": "fakeHost", - "placementId": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://fakeHost.relevant-digital.com/openrtb2/auction", - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "ext": { - "prebid": { - "debug": false, - "storedrequest": { - "id": "620523ae7f4bbe1691bbb815" - } - }, - "relevant": { - "adapterType": "server", - "count": 1 - } - }, - "tmax": 750 - }, - "impIDs": ["div-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "seatbid": [ - { - "seat": "pubmatic", - "bid": [ - { - "id": "bid-1", - "impid": "div-1", - "price": 0.5, - "adm": "pubmatic-ad", - "crid": "crid_1", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - }, - { - "seat": "appnexus", - "bid": [ - { - "id": "bid-2", - "impid": "div-1", - "price": 0.8, - "adm": "appnexus-ad", - "crid": "crid_2", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "div-1", - "price": 0.5, - "adm": "pubmatic-ad", - "crid": "crid_1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-2", - "impid": "div-1", - "price": 0.8, - "adm": "appnexus-ad", - "crid": "crid_2", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeMultipleSeatBids.json b/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeMultipleSeatBids.json deleted file mode 100644 index 1a0b8e2aac..0000000000 --- a/adapters/relevantdigital/relevantdigitaltest/supplemental/useSourceBidderCodeMultipleSeatBids.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "mockBidRequest": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "accountId": "620523ae7f4bbe1691bbb815", - "pbsHost": "fakeHost", - "placementId": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817", - "useSourceBidderCode": true - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://fakeHost.relevant-digital.com/openrtb2/auction", - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "imp": [ - { - "id": "div-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "620525862d7518bfd4bbb81e_620523b5d1dbed6b0fbbb817" - } - } - } - } - ], - "site": { - "domain": "somedomain.com", - "page": "https://somedomain.com" - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "ext": { - "prebid": { - "debug": false, - "storedrequest": { - "id": "620523ae7f4bbe1691bbb815" - } - }, - "relevant": { - "adapterType": "server", - "count": 1 - } - }, - "tmax": 750 - }, - "impIDs": ["div-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "3621f78b-abdf-4562-8eca-1c5e893387d0", - "seatbid": [ - { - "seat": "pubmatic", - "bid": [ - { - "id": "bid-1", - "impid": "div-1", - "price": 0.5, - "adm": "pubmatic-ad", - "crid": "crid_1", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - }, - { - "seat": "appnexus", - "bid": [ - { - "id": "bid-2", - "impid": "div-1", - "price": 0.8, - "adm": "appnexus-ad", - "crid": "crid_2", - "w": 300, - "h": 250, - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "div-1", - "price": 0.5, - "adm": "pubmatic-ad", - "crid": "crid_1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner", - "seat": "pubmatic" - }, - { - "bid": { - "id": "bid-2", - "impid": "div-1", - "price": 0.8, - "adm": "appnexus-ad", - "crid": "crid_2", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner", - "seat": "appnexus" - } - ] - } - ] -} diff --git a/adapters/resetdigital/params_test.go b/adapters/resetdigital/params_test.go index f82b10855e..4098b44493 100644 --- a/adapters/resetdigital/params_test.go +++ b/adapters/resetdigital/params_test.go @@ -4,9 +4,10 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) +// TestValidParams tests valid parameter(s) declared in openrtb_ext/imp_resetdigital.go func TestValidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -20,6 +21,7 @@ func TestValidParams(t *testing.T) { } } +// TestValidParams tests invalid parameter(s) declared in openrtb_ext/imp_resetdigital.go func TestInvalidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -33,13 +35,17 @@ func TestInvalidParams(t *testing.T) { } } +// list of valid parameter(s) test cases var validParams = []string{ `{"placement_id":"1000"}`, `{"placement_id":"0"}`, `{"placement_id":"abc"}`, `{"placement_id":"123abc"}`, + `{}`, + `{"cp":"1000"}`, } +// list of invalid parameter(s) test cases var invalidParams = []string{ ``, `null`, @@ -49,6 +55,4 @@ var invalidParams = []string{ `[]`, `{"placement_id":}`, `{"placement_id":""}`, - `{"placement_id": 123}`, - `{"cp":"1000"}`, } diff --git a/adapters/resetdigital/resetdigital.go b/adapters/resetdigital/resetdigital.go index 40050400ea..2a619e7604 100644 --- a/adapters/resetdigital/resetdigital.go +++ b/adapters/resetdigital/resetdigital.go @@ -4,231 +4,305 @@ import ( "encoding/json" "fmt" "net/http" - "strings" + "strconv" + "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "golang.org/x/text/currency" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) -const ( - contentTypeJSON = "application/json" - openRTBVersion = "2.6" - currencyUSD = "USD" - bidderSeat = "resetdigital" -) - -var baseHeaders = http.Header{ - "Content-Type": []string{contentTypeJSON}, - "Accept": []string{contentTypeJSON}, - "X-OpenRTB-Version": []string{openRTBVersion}, -} - type adapter struct { - endpoint string + endpoint *template.Template + endpointUri string } -func Builder(_ openrtb_ext.BidderName, cfg config.Adapter, _ config.Server) (adapters.Bidder, error) { - return &adapter{ - endpoint: cfg.Endpoint, - }, nil +type resetDigitalRequest struct { + Site resetDigitalSite `json:"site"` + Imps []resetDigitalImp `json:"imps"` +} +type resetDigitalSite struct { + Domain string `json:"domain"` + Referrer string `json:"referrer"` +} +type resetDigitalImp struct { + ZoneID resetDigitalImpZone `json:"zone_id"` + BidID string `json:"bid_id"` + ImpID string `json:"imp_id"` + Ext resetDigitalImpExt `json:"ext"` + MediaTypes resetDigitalMediaTypes `json:"media_types"` +} +type resetDigitalImpZone struct { + PlacementID string `json:"placementId"` +} +type resetDigitalImpExt struct { + Gpid string `json:"gpid"` +} +type resetDigitalMediaTypes struct { + Banner resetDigitalMediaType `json:"banner,omitempty"` + Video resetDigitalMediaType `json:"video,omitempty"` + Audio resetDigitalMediaType `json:"audio,omitempty"` +} +type resetDigitalMediaType struct { + Sizes [][]int64 `json:"sizes,omitempty"` + Mimes []string `json:"mimes,omitempty"` +} +type resetDigitalBidResponse struct { + Bids []resetDigitalBid `json:"bids"` +} +type resetDigitalBid struct { + BidID string `json:"bid_id"` + ImpID string `json:"imp_id"` + CPM float64 `json:"cpm"` + CID string `json:"cid,omitempty"` + CrID string `json:"crid,omitempty"` + AdID string `json:"adid"` + W string `json:"w,omitempty"` + H string `json:"h,omitempty"` + Seat string `json:"seat"` + HTML string `json:"html"` } -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - - if len(request.Imp) != 1 { - return nil, []error{&errortypes.BadInput{ - Message: "ResetDigital adapter supports only one impression per request", - }} +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + template, err := template.New("endpointTemplate").Parse(config.Endpoint) + if err != nil { + return nil, fmt.Errorf("unable to parse endpoint url template: %v", err) + } + bidder := &adapter{ + endpoint: template, } + return bidder, nil +} - imp := request.Imp[0] - var bidderExt adapters.ExtImpBidder - if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Error parsing bidderExt from imp.ext: %v", err), - }} +func getHeaders(request *openrtb2.BidRequest) http.Header { + headers := http.Header{} + + addNonEmptyHeaders(&headers, map[string]string{ + "Content-Type": "application/json;charset=utf-8", + "Accept": "application/json", + }) + + if request != nil && request.Device != nil { + addNonEmptyHeaders(&headers, map[string]string{ + "Accept-Language": request.Device.Language, + "User-Agent": request.Device.UA, + "X-Forwarded-For": request.Device.IP, + "X-Real-Ip": request.Device.IP, + }) + } + if request != nil && request.Site != nil { + addNonEmptyHeaders(&headers, map[string]string{ + "Referer": request.Site.Page, + }) } - var resetDigitalExt openrtb_ext.ImpExtResetDigital - if err := json.Unmarshal(bidderExt.Bidder, &resetDigitalExt); err != nil { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Error parsing resetDigitalExt from bidderExt.bidder: %v", err), - }} - } - - reqCopy := openrtb2.BidRequest{ - ID: request.ID, - Source: request.Source, - TMax: request.TMax, - Test: request.Test, - Imp: []openrtb2.Imp{imp}, - Device: request.Device, - Site: request.Site, - App: request.App, - User: request.User, - Regs: request.Regs, - Ext: request.Ext, - AT: request.AT, - BAdv: request.BAdv, - BCat: request.BCat, - BSeat: request.BSeat, - WLang: request.WLang, - WSeat: request.WSeat, - } - - if imp.TagID == "" { - reqCopy.Imp[0].TagID = resetDigitalExt.PlacementID - } - - reqCopy.Cur = validateAndFilterCurrencies(request.Cur) - - reqBody, err := json.Marshal(&reqCopy) - if err != nil { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Error marshalling OpenRTB request: %v", err), - }} + return headers +} + +func addNonEmptyHeaders(headers *http.Header, headerValues map[string]string) { + for key, value := range headerValues { + if len(value) > 0 { + headers.Add(key, value) + } } +} + +func (a *adapter) MakeRequests(requestData *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + var ( + requests []*adapters.RequestData + errors []error + ) + + for _, imp := range requestData.Imp { + bidType, err := getBidType(imp) + if err != nil { + errors = append(errors, err) + continue + } - uri := fmt.Sprintf("%s?pid=%s", a.endpoint, resetDigitalExt.PlacementID) + splittedRequestData, err := processDataFromRequest(requestData, imp, bidType) + if err != nil { + errors = append(errors, err) + continue + } + + requestBody, err := json.Marshal(splittedRequestData) - reqHeaders := baseHeaders.Clone() + if err != nil { + errors = append(errors, err) + continue + } - reqs := []*adapters.RequestData{ - { - Method: http.MethodPost, - Uri: uri, - Body: reqBody, - Headers: reqHeaders, + requests = append(requests, &adapters.RequestData{ + Method: "POST", + Uri: a.endpointUri, + Body: requestBody, + Headers: getHeaders(requestData), ImpIDs: []string{imp.ID}, - }, + }) } - return reqs, nil + return requests, errors } -func (a *adapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if responseData.StatusCode == http.StatusNoContent { - return nil, nil - } +func processDataFromRequest(requestData *openrtb2.BidRequest, imp openrtb2.Imp, bidType openrtb_ext.BidType) (resetDigitalRequest, error) { + var reqData resetDigitalRequest - if responseData.StatusCode >= http.StatusBadRequest && responseData.StatusCode < http.StatusInternalServerError { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", responseData.StatusCode), - }} + if requestData.Site != nil { + reqData.Site.Domain = requestData.Site.Domain + reqData.Site.Referrer = requestData.Site.Page } - if responseData.StatusCode != http.StatusOK { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", responseData.StatusCode), - }} + rdImp := resetDigitalImp{ + BidID: requestData.ID, + ImpID: imp.ID, } - var bidResp openrtb2.BidResponse - if err := json.Unmarshal(responseData.Body, &bidResp); err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Bad server response: %s", err), - }} + if bidType == openrtb_ext.BidTypeBanner && imp.Banner != nil { + var tempH, tempW int64 + if imp.Banner.H != nil { + tempH = *imp.Banner.H + } + if imp.Banner.W != nil { + tempW = *imp.Banner.W + } + if tempH > 0 && tempW > 0 { + rdImp.MediaTypes.Banner.Sizes = append(rdImp.MediaTypes.Banner.Sizes, []int64{tempW, tempH}) + } + } + if bidType == openrtb_ext.BidTypeVideo && imp.Video != nil { + var tempH, tempW int64 + if imp.Video.H != nil { + tempH = *imp.Video.H + } + if imp.Video.W != nil { + tempW = *imp.Video.W + } + if tempH > 0 && tempW > 0 { + rdImp.MediaTypes.Video.Sizes = append(rdImp.MediaTypes.Video.Sizes, []int64{tempW, tempH}) + } + if imp.Video.MIMEs != nil { + rdImp.MediaTypes.Video.Mimes = append(rdImp.MediaTypes.Video.Mimes, imp.Video.MIMEs...) + } + } + if bidType == openrtb_ext.BidTypeAudio && imp.Audio != nil && imp.Audio.MIMEs != nil { + rdImp.MediaTypes.Audio.Mimes = append(rdImp.MediaTypes.Audio.Mimes, imp.Audio.MIMEs...) } - if len(bidResp.SeatBid) == 0 { - return nil, nil + var bidderExt adapters.ExtImpBidder + var resetDigitalExt openrtb_ext.ImpExtResetDigital + + if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil { + return resetDigitalRequest{}, err + } + if err := json.Unmarshal(bidderExt.Bidder, &resetDigitalExt); err != nil { + return resetDigitalRequest{}, err } + rdImp.ZoneID.PlacementID = resetDigitalExt.PlacementID - return parseBidResponse(request, &bidResp) + reqData.Imps = append(reqData.Imps, rdImp) + + return reqData, nil } -func parseBidResponse(request *openrtb2.BidRequest, bidResp *openrtb2.BidResponse) (*adapters.BidderResponse, []error) { - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(bidResp.SeatBid)) - var errs []error +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(responseData) { + return nil, nil + } - if bidResp.Cur != "" { - bidResponse.Currency = bidResp.Cur - } else { - cur := validateAndFilterCurrencies(request.Cur) - bidResponse.Currency = cur[0] + if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { + return nil, []error{err} } - for _, seatBid := range bidResp.SeatBid { - for i := range seatBid.Bid { - if seatBid.Bid[i].Price <= 0 { - errs = append(errs, &errortypes.Warning{ - Message: fmt.Sprintf("price %f <= 0 filtered out", seatBid.Bid[i].Price), - }) - continue - } + var response resetDigitalBidResponse + if err := json.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } - bidType, err := getBidType(seatBid.Bid[i], request) - if err != nil { - errs = append(errs, err) - continue - } + if len(response.Bids) != 1 { + return nil, []error{fmt.Errorf("expected exactly one bid in the response, but got %d", len(response.Bids))} + } - seat := openrtb_ext.BidderName(bidderSeat) - if seatBid.Seat != "" { - seat = openrtb_ext.BidderName(seatBid.Seat) - } + resetDigitalBid := &response.Bids[0] - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - Seat: seat, - }) - } + requestImp, found := findRequestImpByID(request.Imp, resetDigitalBid.ImpID) + if !found { + return nil, []error{fmt.Errorf("no matching impression found for ImpID %s", resetDigitalBid.ImpID)} + } + + bid, err := getBidFromResponse(resetDigitalBid) + if err != nil { + return nil, []error{err} } - return bidResponse, errs + bidType := GetMediaTypeForImp(requestImp) + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(1) + bidResponse.Currency = "USD" // Default currency + bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ + Bid: bid, + BidType: bidType, + Seat: openrtb_ext.BidderName(resetDigitalBid.Seat), + }) + + return bidResponse, nil } -func getBidType(bid openrtb2.Bid, request *openrtb2.BidRequest) (openrtb_ext.BidType, error) { - if bid.MType > 0 { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil +// findRequestImpByID searches for an impression by its ID in the list of impressions +func findRequestImpByID(imps []openrtb2.Imp, impID string) (openrtb2.Imp, bool) { + for _, imp := range imps { + if imp.ID == impID { + return imp, true } } - if request.Imp[0].ID != bid.ImpID { - return "", fmt.Errorf("no matching impression found for ImpID: %s", bid.ImpID) - } - return getMediaType(request.Imp[0]), nil + return openrtb2.Imp{}, false } -func validateAndFilterCurrencies(currencies []string) []string { - valid := make([]string, 0, len(currencies)) - for _, s := range currencies { - s = strings.TrimSpace(s) - if s == "" { - continue - } - s = strings.ToUpper(s) - if u, err := currency.ParseISO(s); err == nil { - valid = append(valid, u.String()) - } +func getBidFromResponse(bidResponse *resetDigitalBid) (*openrtb2.Bid, error) { + + bid := &openrtb2.Bid{ + ID: bidResponse.BidID, + Price: bidResponse.CPM, + ImpID: bidResponse.ImpID, + CID: bidResponse.CID, + CrID: bidResponse.CrID, + AdM: bidResponse.HTML, + } + + w, err := strconv.ParseInt(bidResponse.W, 10, 64) + if err != nil { + return nil, err + } + bid.W = w + + h, err := strconv.ParseInt(bidResponse.H, 10, 64) + if err != nil { + return nil, err } - if len(valid) == 0 { - return []string{currencyUSD} + bid.H = h + return bid, nil +} + +func getBidType(imp openrtb2.Imp) (openrtb_ext.BidType, error) { + if imp.Banner != nil { + return openrtb_ext.BidTypeBanner, nil + } else if imp.Video != nil { + return openrtb_ext.BidTypeVideo, nil + } else if imp.Audio != nil { + return openrtb_ext.BidTypeAudio, nil } - return valid + + return "", fmt.Errorf("failed to find matching imp for bid %s", imp.ID) } -func getMediaType(imp openrtb2.Imp) openrtb_ext.BidType { - switch { - case imp.Video != nil: +func GetMediaTypeForImp(reqImp openrtb2.Imp) openrtb_ext.BidType { + + if reqImp.Video != nil { return openrtb_ext.BidTypeVideo - case imp.Audio != nil: + } + if reqImp.Audio != nil { return openrtb_ext.BidTypeAudio - case imp.Native != nil: - return openrtb_ext.BidTypeNative - default: - return openrtb_ext.BidTypeBanner } + return openrtb_ext.BidTypeBanner } diff --git a/adapters/resetdigital/resetdigital_test.go b/adapters/resetdigital/resetdigital_test.go index dd33c8bdeb..9efba33f30 100644 --- a/adapters/resetdigital/resetdigital_test.go +++ b/adapters/resetdigital/resetdigital_test.go @@ -1,751 +1,21 @@ package resetdigital import ( - "encoding/json" - "net/http" "testing" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "resetdigitaltest", bidder) -} - -func TestValidateAndFilterCurrencies(t *testing.T) { - tests := []struct { - name string - input []string - expected []string - }{ - { - name: "empty array", - input: []string{}, - expected: []string{"USD"}, - }, - { - name: "nil array", - input: nil, - expected: []string{"USD"}, - }, - { - name: "single empty string", - input: []string{""}, - expected: []string{"USD"}, - }, - { - name: "multiple empty strings", - input: []string{"", ""}, - expected: []string{"USD"}, - }, - { - name: "whitespace only strings", - input: []string{" ", "\t", "\n"}, - expected: []string{"USD"}, - }, - { - name: "single valid currency", - input: []string{"EUR"}, - expected: []string{"EUR"}, - }, - { - name: "multiple valid currencies", - input: []string{"USD", "EUR", "GBP"}, - expected: []string{"USD", "EUR", "GBP"}, - }, - { - name: "single invalid currency", - input: []string{"INVALID"}, - expected: []string{"USD"}, - }, - { - name: "mixed valid and invalid currencies", - input: []string{"USD", "INVALID", "EUR"}, - expected: []string{"USD", "EUR"}, - }, - { - name: "currencies with whitespace", - input: []string{" USD ", "\tEUR\t", " GBP\n"}, - expected: []string{"USD", "EUR", "GBP"}, - }, - { - name: "lowercase currencies", - input: []string{"usd", "eur"}, - expected: []string{"USD", "EUR"}, - }, - { - name: "mixed case currencies", - input: []string{"Usd", "EUR", "gbp"}, - expected: []string{"USD", "EUR", "GBP"}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := validateAndFilterCurrencies(tt.input) - assert.Equal(t, tt.expected, result) - }) - } -} - -func TestGetMediaType(t *testing.T) { - tests := []struct { - name string - imp openrtb2.Imp - expected openrtb_ext.BidType - }{ - { - name: "Banner type", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - }, - expected: openrtb_ext.BidTypeBanner, - }, - { - name: "Video type", - imp: openrtb2.Imp{ - Video: &openrtb2.Video{}, - }, - expected: openrtb_ext.BidTypeVideo, - }, - { - name: "Audio type", - imp: openrtb2.Imp{ - Audio: &openrtb2.Audio{}, - }, - expected: openrtb_ext.BidTypeAudio, - }, - { - name: "Native type", - imp: openrtb2.Imp{ - Native: &openrtb2.Native{}, - }, - expected: openrtb_ext.BidTypeNative, - }, - { - name: "Multiple media types - prioritize video", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - Video: &openrtb2.Video{}, - }, - expected: openrtb_ext.BidTypeVideo, - }, - { - name: "Multiple media types - prioritize audio over banner", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - Audio: &openrtb2.Audio{}, - }, - expected: openrtb_ext.BidTypeAudio, - }, - { - name: "Multiple media types - prioritize native over banner", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - Native: &openrtb2.Native{}, - }, - expected: openrtb_ext.BidTypeNative, - }, - { - name: "No media type defaults to banner", - imp: openrtb2.Imp{}, - expected: openrtb_ext.BidTypeBanner, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - result := getMediaType(test.imp) - assert.Equal(t, test.expected, result) - }) - } -} - -func TestGetBidType(t *testing.T) { - tests := []struct { - name string - bid openrtb2.Bid - request *openrtb2.BidRequest - expected openrtb_ext.BidType - hasError bool - }{ - { - name: "Banner MType", - bid: openrtb2.Bid{ - MType: openrtb2.MarkupBanner, - }, - request: &openrtb2.BidRequest{}, - expected: openrtb_ext.BidTypeBanner, - hasError: false, - }, - { - name: "Video MType", - bid: openrtb2.Bid{ - MType: openrtb2.MarkupVideo, - }, - request: &openrtb2.BidRequest{}, - expected: openrtb_ext.BidTypeVideo, - hasError: false, - }, - { - name: "Audio MType", - bid: openrtb2.Bid{ - MType: openrtb2.MarkupAudio, - }, - request: &openrtb2.BidRequest{}, - expected: openrtb_ext.BidTypeAudio, - hasError: false, - }, - { - name: "Native MType", - bid: openrtb2.Bid{ - MType: openrtb2.MarkupNative, - }, - request: &openrtb2.BidRequest{}, - expected: openrtb_ext.BidTypeNative, - hasError: false, - }, - { - name: "No MType, lookup impression - banner", - bid: openrtb2.Bid{ - ImpID: "imp-1", - }, - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Banner: &openrtb2.Banner{}, - }, - }, - }, - expected: openrtb_ext.BidTypeBanner, - hasError: false, - }, - { - name: "No MType, lookup impression - video", - bid: openrtb2.Bid{ - ImpID: "imp-1", - }, - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Video: &openrtb2.Video{}, - }, - }, - }, - expected: openrtb_ext.BidTypeVideo, - hasError: false, - }, - { - name: "No matching impression", - bid: openrtb2.Bid{ - ImpID: "imp-not-found", - }, - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Banner: &openrtb2.Banner{}, - }, - }, - }, - expected: "", - hasError: true, - }, - { - name: "Unknown MType falls back to impression lookup", - bid: openrtb2.Bid{ - ImpID: "imp-1", - MType: openrtb2.MarkupType(99), - }, - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Banner: &openrtb2.Banner{}, - }, - }, - }, - expected: openrtb_ext.BidTypeBanner, - hasError: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - bidType, err := getBidType(test.bid, test.request) - - if test.hasError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, test.expected, bidType) - } - }) - } -} - -func TestMakeBidsErrorCases(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - tests := []struct { - name string - responseData *adapters.ResponseData - expectNil bool - expectErrs int - errType interface{} - }{ - { - name: "Status 204 No Content", - responseData: &adapters.ResponseData{ - StatusCode: http.StatusNoContent, - }, - expectNil: true, - expectErrs: 0, - }, - { - name: "Status 400 Bad Request", - responseData: &adapters.ResponseData{ - StatusCode: http.StatusBadRequest, - Body: []byte(`{"error": "Bad Request"}`), - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadInput{}, - }, - { - name: "Status 500 Internal Server Error", - responseData: &adapters.ResponseData{ - StatusCode: http.StatusInternalServerError, - Body: []byte(`{"error": "Internal Server Error"}`), - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadServerResponse{}, - }, - { - name: "Invalid JSON response", - responseData: &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{invalid json`), - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadServerResponse{}, - }, - { - name: "Empty seatbid array", - responseData: &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{"id": "test", "seatbid": []}`), - }, - expectNil: true, - expectErrs: 0, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - request := &openrtb2.BidRequest{} - bidResponse, errs := bidder.MakeBids(request, &adapters.RequestData{}, test.responseData) - if test.expectNil { - assert.Nil(t, bidResponse) - } else { - assert.NotNil(t, bidResponse) - } - - assert.Len(t, errs, test.expectErrs) - - if test.expectErrs > 0 && test.errType != nil { - assert.IsType(t, test.errType, errs[0]) - } - }) - } -} - -func TestMakeRequestsErrorCases(t *testing.T) { bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) + Endpoint: "https://test.com"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) if buildErr != nil { t.Fatalf("Builder returned unexpected error %v", buildErr) } - tests := []struct { - name string - request *openrtb2.BidRequest - expectNil bool - expectErrs int - errType interface{} - }{ - { - name: "Multiple impressions", - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - {ID: "imp1", Ext: json.RawMessage(`{"bidder": {"placement_id": "test"}}`)}, - {ID: "imp2", Ext: json.RawMessage(`{"bidder": {"placement_id": "test"}}`)}, - }, - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadInput{}, - }, - { - name: "Malformed imp.ext", - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{invalid json`), - }, - }, - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadInput{}, - }, - { - name: "Malformed bidder params", - request: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{"bidder": {invalid json}`), - }, - }, - }, - expectNil: true, - expectErrs: 1, - errType: &errortypes.BadInput{}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - reqs, errs := bidder.MakeRequests(test.request, &adapters.ExtraRequestInfo{}) - - if test.expectNil { - assert.Nil(t, reqs) - } else { - assert.NotNil(t, reqs) - } - - assert.Len(t, errs, test.expectErrs) - - if test.expectErrs > 0 && test.errType != nil { - assert.IsType(t, test.errType, errs[0]) - } - }) - } -} - -func TestParseBidResponseEdgeCases(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - tests := []struct { - name string - request *openrtb2.BidRequest - responseData *adapters.ResponseData - expectBids int - expectErrs int - }{ - { - name: "Bid with zero price filtered out", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Imp: []openrtb2.Imp{ - {ID: "test-imp-id", Banner: &openrtb2.Banner{}}, - }, - }, - responseData: &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{ - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.0, - "adm": "
test ad
" - } - ] - } - ], - "cur": "USD" - }`), - }, - expectBids: 0, - expectErrs: 1, - }, - { - name: "Bid with negative price filtered out", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Imp: []openrtb2.Imp{ - {ID: "test-imp-id", Banner: &openrtb2.Banner{}}, - }, - }, - responseData: &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{ - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": -1.5, - "adm": "
test ad
" - } - ] - } - ], - "cur": "USD" - }`), - }, - expectBids: 0, - expectErrs: 1, - }, - { - name: "Currency fallback to request currency", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Cur: []string{"EUR"}, - Imp: []openrtb2.Imp{ - {ID: "test-imp-id", Banner: &openrtb2.Banner{}}, - }, - }, - responseData: &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{ - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
" - } - ] - } - ] - }`), - }, - expectBids: 1, - expectErrs: 0, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - bidResponse, errs := bidder.MakeBids(test.request, &adapters.RequestData{}, test.responseData) - - if test.expectBids > 0 { - assert.NotNil(t, bidResponse) - assert.Len(t, bidResponse.Bids, test.expectBids) - } - - assert.Len(t, errs, test.expectErrs) - }) - } -} - -func TestSchainPassthrough(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - tests := []struct { - name string - request *openrtb2.BidRequest - expectSchain bool - expectedSchain *openrtb2.SupplyChain - }{ - { - name: "Request with schain should pass it through", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Source: &openrtb2.Source{ - TID: "test-transaction-id", - SChain: &openrtb2.SupplyChain{ - Complete: 1, - Ver: "1.0", - Nodes: []openrtb2.SupplyChainNode{ - { - ASI: "example.com", - SID: "12345", - HP: openrtb2.Int8Ptr(1), - RID: "request-id-123", - }, - }, - }, - }, - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{"bidder": {"placement_id": "test-placement"}}`), - }, - }, - }, - expectSchain: true, - expectedSchain: &openrtb2.SupplyChain{ - Complete: 1, - Ver: "1.0", - Nodes: []openrtb2.SupplyChainNode{ - { - ASI: "example.com", - SID: "12345", - HP: openrtb2.Int8Ptr(1), - RID: "request-id-123", - }, - }, - }, - }, - { - name: "Request without schain should not include it", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Source: &openrtb2.Source{ - TID: "test-transaction-id", - }, - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{"bidder": {"placement_id": "test-placement"}}`), - }, - }, - }, - expectSchain: false, - expectedSchain: nil, - }, - { - name: "Request without source should not include schain", - request: &openrtb2.BidRequest{ - ID: "test-request-id", - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{"bidder": {"placement_id": "test-placement"}}`), - }, - }, - }, - expectSchain: false, - expectedSchain: nil, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - reqs, errs := bidder.MakeRequests(test.request, &adapters.ExtraRequestInfo{}) - - assert.Empty(t, errs) - assert.Len(t, reqs, 1) - - var sentRequest openrtb2.BidRequest - err := json.Unmarshal(reqs[0].Body, &sentRequest) - assert.NoError(t, err) - - if test.expectSchain { - assert.NotNil(t, sentRequest.Source) - assert.NotNil(t, sentRequest.Source.SChain) - assert.Equal(t, test.expectedSchain.Complete, sentRequest.Source.SChain.Complete) - assert.Equal(t, test.expectedSchain.Ver, sentRequest.Source.SChain.Ver) - assert.Len(t, sentRequest.Source.SChain.Nodes, len(test.expectedSchain.Nodes)) - - if len(sentRequest.Source.SChain.Nodes) > 0 { - assert.Equal(t, test.expectedSchain.Nodes[0].ASI, sentRequest.Source.SChain.Nodes[0].ASI) - assert.Equal(t, test.expectedSchain.Nodes[0].SID, sentRequest.Source.SChain.Nodes[0].SID) - assert.Equal(t, test.expectedSchain.Nodes[0].HP, sentRequest.Source.SChain.Nodes[0].HP) - assert.Equal(t, test.expectedSchain.Nodes[0].RID, sentRequest.Source.SChain.Nodes[0].RID) - } - } else { - if sentRequest.Source != nil { - assert.Nil(t, sentRequest.Source.SChain) - } - } - }) - } -} - -func TestSourceFieldsPassthrough(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderResetDigital, config.Adapter{ - Endpoint: "https://example.com", - }, config.Server{}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - request := &openrtb2.BidRequest{ - ID: "test-request-id", - Source: &openrtb2.Source{ - TID: "test-transaction-id", - FD: openrtb2.Int8Ptr(1), - Ext: json.RawMessage(`{"custom": "data"}`), - }, - Imp: []openrtb2.Imp{ - { - ID: "test-imp-id", - Ext: json.RawMessage(`{"bidder": {"placement_id": "test-placement"}}`), - }, - }, - } - - reqs, errs := bidder.MakeRequests(request, &adapters.ExtraRequestInfo{}) - - assert.Empty(t, errs) - assert.Len(t, reqs, 1) - - var sentRequest openrtb2.BidRequest - err := json.Unmarshal(reqs[0].Body, &sentRequest) - assert.NoError(t, err) - - assert.NotNil(t, sentRequest.Source) - assert.Equal(t, "test-transaction-id", sentRequest.Source.TID) - assert.Equal(t, openrtb2.Int8Ptr(1), sentRequest.Source.FD) - - var expectedExt, actualExt map[string]interface{} - err = json.Unmarshal([]byte(`{"custom": "data"}`), &expectedExt) - assert.NoError(t, err) - err = json.Unmarshal(sentRequest.Source.Ext, &actualExt) - assert.NoError(t, err) - assert.Equal(t, expectedExt, actualExt) + adapterstest.RunJSONBidderTest(t, "resetdigitaltest", bidder) } diff --git a/adapters/resetdigital/resetdigitaltest/exemplary/simple-audio.json b/adapters/resetdigital/resetdigitaltest/exemplary/simple-audio.json index 38a44e8cf2..d032b4c6f3 100644 --- a/adapters/resetdigital/resetdigitaltest/exemplary/simple-audio.json +++ b/adapters/resetdigital/resetdigitaltest/exemplary/simple-audio.json @@ -1,82 +1,155 @@ { "mockBidRequest": { - "id": "test-audio-request-id", + "id": "12345", + "at": 1, + "bcat": [ + "IAB24", + "IAB25", + "IAB26" + ], + "cur": [ + "USD" + ], + "source": { + "fd": 0, + "tid": "00000FBCE10DE8FA", + "schain": { + "complete": 1, + "ver": "1.0", + "nodes": [ + { + "asi": "resetdigital.co", + "sid": "176", + "hp": 1 + } + ] + } + }, + "device": { + "ip": "35.146.176.97", + "js": 1, + "language": "en", + "ua": "PostmanRuntime/7.42.0" + }, + "user": { + "id": "000011200BA1065C", + "buyeruid": "000011200BA1065C" + }, + "app": { + "id": "test.com", + "bundle": "test.com", + "name": "test.com", + "content": { + "livestream": 1, + "genre": "F%C3%BAtbol", + "cat": [ + "" + ], + "language": "es" + }, + "publisher": { + "id": "176" + }, + "keywords": "" + }, "imp": [ { - "id": "test-audio-imp-id", + "id": "001", + "bidfloor": 1.429, + "tagid": "667", + "secure": 1, "audio": { - "mimes": ["audio/mpeg"], - "minduration": 5, - "maxduration": 30 + "protocols": [ + 2, + 3, + 5, + 6 + ], + "mimes": [ + "audio/mp4", + "audio/mp3" + ], + "api": [], + "minduration": 15, + "maxduration": 60, + "startdelay": -1 }, "ext": { "bidder": { - "placement_id": "test-audio-placement" + "placement_id": "placement-id-1" } } } ], "site": { - "page": "https://example.com/audio", - "domain": "example.com" - } + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 400 }, "httpCalls": [ { "expectedRequest": { - "uri": "https://example.com?pid=test-audio-placement", + "method": "POST", "body": { - "id": "test-audio-request-id", - "imp": [ + "imps": [ { - "id": "test-audio-imp-id", - "audio": { - "mimes": ["audio/mpeg"], - "minduration": 5, - "maxduration": 30 - }, - "tagid": "test-audio-placement", + "bid_id": "12345", "ext": { - "bidder": { - "placement_id": "test-audio-placement" + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": {}, + "video": {}, + "audio": { + "mimes": [ + "audio/mp4", + "audio/mp3" + ] } + }, + "zone_id": { + "placementId": "placement-id-1" } } ], "site": { - "page": "https://example.com/audio", - "domain": "example.com" - }, - "cur": ["USD"] - }, - "headers": { - "Content-Type": ["application/json"], - "Accept": ["application/json"], - "X-OpenRTB-Version": ["2.6"] + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } }, - "impIDs": ["test-audio-imp-id"] + "impIDs": [ + "001" + ] }, "mockResponse": { "status": 200, "body": { - "id": "test-audio-request-id", - "seatbid": [ + "bids": [ { - "bid": [ - { - "id": "test-audio-bid-id", - "impid": "test-audio-imp-id", - "price": 4.2, - "adm": "", - "crid": "test-audio-creative-id", - "adomain": ["example.com"], - "mtype": 3 - } - ], - "seat": "resetdigital" + "bid_id": "01", + "imp_id": "001", + "cpm": 9.11, + "dealid": "RD-1000164", + "cid": "1000048-1002918", + "crid": "1003893", + "adid": "1003893", + "language": "en", + "w": "0", + "h": "0", + "seat": "resetdigital", + "html": "test markup" } - ], - "cur": "USD" + ] } } } @@ -87,13 +160,12 @@ "bids": [ { "bid": { - "id": "test-audio-bid-id", - "impid": "test-audio-imp-id", - "price": 4.2, - "adm": "", - "crid": "test-audio-creative-id", - "adomain": ["example.com"], - "mtype": 3 + "adm": "test markup", + "cid": "1000048-1002918", + "crid": "1003893", + "id": "01", + "impid": "001", + "price": 9.11 }, "type": "audio", "seat": "resetdigital" @@ -101,4 +173,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/exemplary/simple-banner.json b/adapters/resetdigital/resetdigitaltest/exemplary/simple-banner.json index 22a0584e9c..2a0fcacd55 100644 --- a/adapters/resetdigital/resetdigitaltest/exemplary/simple-banner.json +++ b/adapters/resetdigital/resetdigitaltest/exemplary/simple-banner.json @@ -1,120 +1,101 @@ { "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" } } - ], + }], "site": { - "page": "https://example.com", - "domain": "example.com" - } + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com", - "domain": "example.com" + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" }, - "cur": [ - "USD" - ] - }, - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ], - "X-OpenRTB-Version": [ - "2.6" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3.14, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250, - "adomain": ["example.com"] - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3.14, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250, - "adomain": ["example.com"] + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "audio": {}, + "video": {} }, - "type": "banner", - "seat": "resetdigital" + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" } + }, + "impIDs": [ + "001" ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }] + } } - ] + }], + + "expectedBidResponses": [{ + "currency": "USD", + "bids": [{ + "bid": { + "adm": "test markup", + "cid": "1002088", + "crid": "1000763-1002088", + "id": "01", + "impid": "001", + "price": 1.00, + "w": 300, + "h": 250 + }, + "type": "banner", + "seat": "resetdigital" + }] + }] } diff --git a/adapters/resetdigital/resetdigitaltest/exemplary/simple-video.json b/adapters/resetdigital/resetdigitaltest/exemplary/simple-video.json new file mode 100644 index 0000000000..ce4e1916fd --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/exemplary/simple-video.json @@ -0,0 +1,120 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [ + { + "id": "001", + "video": { + "w": 900, + "h": 250, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + } + ], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [ + { + "expectedRequest": { + "method": "POST", + "body": { + "imps": [ + { + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": {}, + "video": { + "sizes": [ + [ + 900, + 250 + ] + ], + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + } + ], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [ + { + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "900", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "test markup", + "cid": "1002088", + "crid": "1000763-1002088", + "id": "01", + "impid": "001", + "price": 1.00, + "w": 900, + "h": 250 + }, + "type": "video", + "seat": "resetdigital" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-resetdigital.json b/adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-resetdigital.json deleted file mode 100644 index 428bbdee22..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/bad-ext-resetdigital.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": 123 - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "Error parsing resetDigitalExt from bidderExt.bidder:", - "comparison": "regex" - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/bad-response-body.json b/adapters/resetdigital/resetdigitaltest/supplemental/bad-response-body.json deleted file mode 100644 index c4aa6c727b..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/bad-response-body.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": 123 - } - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Bad server response:", - "comparison": "regex" - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/currency-fallback.json b/adapters/resetdigital/resetdigitaltest/supplemental/currency-fallback.json deleted file mode 100644 index c4757d6588..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/currency-fallback.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": ["EUR"] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "EUR" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250 - } - ], - "seat": "resetdigital" - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }, - "type": "banner", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/empty-response.json b/adapters/resetdigital/resetdigitaltest/supplemental/empty-response.json deleted file mode 100644 index f83460632f..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/empty-response.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-empty-request-id", - "imp": [ - { - "id": "test-empty-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-no-bids-placement" - } - } - } - ], - "site": { - "page": "https://example.com/empty", - "domain": "example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-no-bids-placement", - "body": { - "id": "test-empty-request-id", - "imp": [ - { - "id": "test-empty-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-no-bids-placement", - "ext": { - "bidder": { - "placement_id": "test-no-bids-placement" - } - } - } - ], - "site": { - "page": "https://example.com/empty", - "domain": "example.com" - }, - "cur": [ - "USD" - ] - }, - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ], - "X-OpenRTB-Version": [ - "2.6" - ] - }, - "impIDs": ["test-empty-imp-id"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/imp-id-mismatch.json b/adapters/resetdigital/resetdigitaltest/supplemental/imp-id-mismatch.json new file mode 100644 index 0000000000..a763e88561 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/imp-id-mismatch.json @@ -0,0 +1,91 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "999", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }] + } + } + }], + + "expectedMakeBidsErrors": [ + { + "value": "no matching impression found for ImpID 999", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-height.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-height.json new file mode 100644 index 0000000000..d1c40ffaba --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-height.json @@ -0,0 +1,91 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "123456789012345678901234567890123456789012345678901234567890", + "seat": "resetdigital", + "html": "test markup" + }] + } + } + }], + + "expectedMakeBidsErrors": [ + { + "value": "strconv.ParseInt: parsing \"123456789012345678901234567890123456789012345678901234567890\": value out of range", + "comparison": "literal" + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-width.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-width.json new file mode 100644 index 0000000000..8c118bfecd --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-bid-width.json @@ -0,0 +1,91 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "123456789012345678901234567890123456789012345678901234567890", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }] + } + } + }], + + "expectedMakeBidsErrors": [ + { + "value": "strconv.ParseInt: parsing \"123456789012345678901234567890123456789012345678901234567890\": value out of range", + "comparison": "literal" + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-cur.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-cur.json new file mode 100644 index 0000000000..3dcf7a7656 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-cur.json @@ -0,0 +1,75 @@ +{ + "mockBidRequest": { + "id": "test-invalid-cur", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + } + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "test-invalid-cur", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 400, + "body": { + "error": "Unexpected status code: 400. Run with request.debug = 1 for more info" + } + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-device.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-device.json new file mode 100644 index 0000000000..7b0fc8c264 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-device.json @@ -0,0 +1,73 @@ +{ + "mockBidRequest": { + "id": "test-invalid-device", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ] + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "test-invalid-device", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 400, + "body": { + "error": "Unexpected status code: 400. Run with request.debug = 1 for more info" + } + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-media-def.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-media-def.json new file mode 100644 index 0000000000..0c24e666b9 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-media-def.json @@ -0,0 +1,35 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500, + "debug": 1 + }, + "httpCalls": [], + "expectedMakeRequestsErrors": [ + { + "value": "failed to find matching imp for bid 001", + "comparison": "literal" + } + ], + "expectedBidResponses": [] + } \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-placement-id.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-placement-id.json new file mode 100644 index 0000000000..14959b36d1 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-placement-id.json @@ -0,0 +1,43 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "video": { + "w": 900, + "h": 250, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "placement_id": 1 + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500, + "debug": 1 + }, + "httpCalls": [], + "expectedMakeRequestsErrors": [ + { + "value": "json: cannot unmarshal number into Go struct field ImpExtResetDigital.placement_id of type string", + "comparison": "literal" + } + ], + "expectedBidResponses": [] + } diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/invalid-video-dim.json b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-video-dim.json new file mode 100644 index 0000000000..4e1f43d13f --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/invalid-video-dim.json @@ -0,0 +1,76 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "video": { + "w": 0, + "h": 480, + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500, + "debug": 1 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": {}, + "video": { + "mimes": [ + "video/x-flv", + "video/mp4" + ] + }, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 204, + "body": { + "error": "Unexpected status code: 204. Run with request.debug = 1 for more info" + } + } + }], + "expectedBidResponses": [] + } diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/malformed-response.json b/adapters/resetdigital/resetdigitaltest/supplemental/malformed-response.json new file mode 100644 index 0000000000..4a063d0843 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/malformed-response.json @@ -0,0 +1,78 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": "malformed body!" + } + }], + + "expectedMakeBidsErrors": [ + { + "value": "json: cannot unmarshal string into Go value of type resetdigital.resetDigitalBidResponse", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/missing-currency.json b/adapters/resetdigital/resetdigitaltest/supplemental/missing-currency.json new file mode 100644 index 0000000000..bd438f7857 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/missing-currency.json @@ -0,0 +1,98 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }] + } + } + }], + + "expectedBidResponses": [{ + "currency": "USD", + "bids": [{ + "bid": { + "adm": "test markup", + "cid": "1002088", + "crid": "1000763-1002088", + "id": "01", + "impid": "001", + "price": 1.00, + "w": 300, + "h": 250 + }, + "type": "banner", + "seat": "resetdigital" + }] + }] +} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-audio.json b/adapters/resetdigital/resetdigitaltest/supplemental/mtype-audio.json deleted file mode 100644 index 2b790feee4..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-audio.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4"], - "protocols": [2, 3, 5, 6] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4"], - "protocols": [2, 3, 5, 6] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.8, - "adm": "", - "crid": "test-creative-id", - "mtype": 3 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.8, - "adm": "", - "crid": "test-creative-id", - "mtype": 3 - }, - "type": "audio", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-banner.json b/adapters/resetdigital/resetdigitaltest/supplemental/mtype-banner.json deleted file mode 100644 index 25f1ad849b..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-banner.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250, - "mtype": 1 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-native.json b/adapters/resetdigital/resetdigitaltest/supplemental/mtype-native.json deleted file mode 100644 index 3e6347322d..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-native.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}" - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}" - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.0, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}}]}}", - "crid": "test-creative-id", - "mtype": 4 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.0, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}}]}}", - "crid": "test-creative-id", - "mtype": 4 - }, - "type": "native", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-video.json b/adapters/resetdigital/resetdigitaltest/supplemental/mtype-video.json deleted file mode 100644 index 0589a8da5b..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/mtype-video.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480 - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.5, - "adm": "", - "crid": "test-creative-id", - "w": 640, - "h": 480, - "mtype": 2 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.5, - "adm": "", - "crid": "test-creative-id", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/multi-format.json b/adapters/resetdigital/resetdigitaltest/supplemental/multi-format.json new file mode 100644 index 0000000000..4de554752f --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/multi-format.json @@ -0,0 +1,107 @@ +{ + "mockBidRequest": { + "id": "test-multi-format", + "imp": [{ + "id": "001", + "banner": { + "w": 300, + "h": 600 + }, + "video": { + "w": 900, + "h": 250, + "mimes": ["video/mp4"] + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "test-multi-format", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 300, + 600 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "" + }] + } + } + }], + + "expectedBidResponses": [{ + "currency": "USD", + "bids": [{ + "bid": { + "adm": "", + "cid": "1002088", + "crid": "1000763-1002088", + "id": "01", + "impid": "001", + "price": 1.00, + "w": 300, + "h": 250 + }, + "type": "video", + "seat": "resetdigital" + }] + }] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/multiple-bids.json b/adapters/resetdigital/resetdigitaltest/supplemental/multiple-bids.json new file mode 100644 index 0000000000..8892994d73 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/multiple-bids.json @@ -0,0 +1,103 @@ +{ + "mockBidRequest": { + "id": "12345", + "imp": [{ + "id": "001", + "banner": { + "h": 300, + "w": 250 + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ], + "device": { + "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "ip": "127.0.0.1", + "language": "EN" + }, + "tmax": 500 + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "12345", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": { + "sizes": [ + [ + 250, + 300 + ] + ] + }, + "video": {}, + "audio": {} + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 200, + "body": { + "bids": [{ + "bid_id": "01", + "imp_id": "001", + "cpm": 1.00, + "cid": "1002088", + "crid": "1000763-1002088", + "adid": "1002088", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }, + { + "bid_id": "02", + "imp_id": "001", + "cpm": 1.10, + "cid": "1002089", + "crid": "1000763-1002089", + "adid": "1002089", + "w": "300", + "h": "250", + "seat": "resetdigital", + "html": "test markup" + }] + } + } + }], + + "expectedMakeBidsErrors": [ + { + "value": "expected exactly one bid in the response, but got 2", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/multiple-imp-error.json b/adapters/resetdigital/resetdigitaltest/supplemental/multiple-imp-error.json deleted file mode 100644 index 81ee3ec8df..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/multiple-imp-error.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-multi-request-id", - "imp": [ - { - "id": "test-imp-banner-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-banner-placement" - } - } - }, - { - "id": "test-imp-video-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "linearity": 1, - "maxduration": 30 - }, - "ext": { - "bidder": { - "placement_id": "test-video-placement" - } - } - } - ], - "site": { - "page": "https://example.com/multi", - "domain": "example.com" - } - }, - "expectedMakeRequestsErrors": [ - { - "value": "ResetDigital adapter supports only one impression per request", - "comparison": "literal" - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/native-mediatype.json b/adapters/resetdigital/resetdigitaltest/supplemental/native-mediatype.json deleted file mode 100644 index 13a660cf6b..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/native-mediatype.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}" - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}" - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.0, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}}]}}", - "crid": "test-creative-id" - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.0, - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}}]}}", - "crid": "test-creative-id" - }, - "type": "native", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/no-matching-impression.json b/adapters/resetdigital/resetdigitaltest/supplemental/no-matching-impression.json deleted file mode 100644 index 64656b0b4f..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/no-matching-impression.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-placement", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-placement", - "ext": { - "bidder": { - "placement_id": "test-placement" - } - } - } - ], - "site": { - "page": "https://example.com" - }, - "cur": [ - "USD" - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-bid-id", - "impid": "wrong-imp-id", - "price": 1.5, - "adm": "
test ad
", - "crid": "test-creative-id", - "w": 300, - "h": 250 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "no matching impression found for ImpID: wrong-imp-id", - "comparison": "literal" - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/unknown-media.json b/adapters/resetdigital/resetdigitaltest/supplemental/unknown-media.json new file mode 100644 index 0000000000..5d9fb57363 --- /dev/null +++ b/adapters/resetdigital/resetdigitaltest/supplemental/unknown-media.json @@ -0,0 +1,67 @@ +{ + "mockBidRequest": { + "id": "test-unknown-media-type", + "imp": [{ + "id": "001", + "audio": { + "mimes": ["audio/mpeg"] + }, + "ext": { + "bidder": { + "placement_id": "placement-id-1" + } + } + }], + "site": { + "domain": "https://test.com", + "page": "https://test.com/2016/06/12" + }, + "cur": [ + "USD" + ] + }, + "httpCalls": [{ + "expectedRequest": { + "method": "POST", + "body": { + "imps": [{ + "bid_id": "test-unknown-media-type", + "ext": { + "gpid": "" + }, + "imp_id": "001", + "media_types": { + "banner": {}, + "video": {}, + "audio": { + "mimes": ["audio/mpeg"] + } + }, + "zone_id": { + "placementId": "placement-id-1" + } + }], + "site": { + "domain": "https://test.com", + "referrer": "https://test.com/2016/06/12" + } + }, + "impIDs": [ + "001" + ] + }, + "mockResponse": { + "status": 400, + "body": { + "error": "unknown media type for bid imp ID 003" + } + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] + } + \ No newline at end of file diff --git a/adapters/resetdigital/resetdigitaltest/supplemental/zero-price-bid.json b/adapters/resetdigital/resetdigitaltest/supplemental/zero-price-bid.json deleted file mode 100644 index eab76ee66a..0000000000 --- a/adapters/resetdigital/resetdigitaltest/supplemental/zero-price-bid.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-zero-price-request-id", - "imp": [ - { - "id": "test-zero-price-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placement_id": "test-zero-price-placement" - } - } - } - ], - "site": { - "page": "https://example.com/zero-price", - "domain": "example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-zero-price-placement", - "body": { - "id": "test-zero-price-request-id", - "imp": [ - { - "id": "test-zero-price-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-zero-price-placement", - "ext": { - "bidder": { - "placement_id": "test-zero-price-placement" - } - } - } - ], - "site": { - "page": "https://example.com/zero-price", - "domain": "example.com" - }, - "cur": [ - "USD" - ] - }, - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ], - "X-OpenRTB-Version": [ - "2.6" - ] - }, - "impIDs": ["test-zero-price-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-zero-price-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-zero-price-bid-id", - "impid": "test-zero-price-imp-id", - "price": 0.0, - "adm": "
test zero price ad
", - "crid": "test-zero-price-creative-id", - "w": 300, - "h": 250, - "adomain": ["example.com"] - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "price 0.000000 <= 0 filtered out", - "comparison": "literal" - } - ] -} diff --git a/adapters/resetdigital/resetdigitaltest/video/simple-video.json b/adapters/resetdigital/resetdigitaltest/video/simple-video.json deleted file mode 100644 index fc62f5d85d..0000000000 --- a/adapters/resetdigital/resetdigitaltest/video/simple-video.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-video-request-id", - "imp": [ - { - "id": "test-video-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "linearity": 1, - "maxduration": 30 - }, - "ext": { - "bidder": { - "placement_id": "test-video-placement" - } - } - } - ], - "site": { - "page": "https://example.com/video", - "domain": "example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.com?pid=test-video-placement", - "body": { - "id": "test-video-request-id", - "imp": [ - { - "id": "test-video-imp-id", - "video": { - "mimes": ["video/mp4"], - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "linearity": 1, - "maxduration": 30 - }, - "tagid": "test-video-placement", - "ext": { - "bidder": { - "placement_id": "test-video-placement" - } - } - } - ], - "site": { - "page": "https://example.com/video", - "domain": "example.com" - }, - "cur": [ - "USD" - ] - }, - "headers": { - "Content-Type": [ - "application/json" - ], - "Accept": [ - "application/json" - ], - "X-OpenRTB-Version": [ - "2.6" - ] - }, - "impIDs": ["test-video-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-video-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-video-bid-id", - "impid": "test-video-imp-id", - "price": 5.01, - "adm": "", - "crid": "test-video-creative-id", - "w": 640, - "h": 480, - "adomain": ["example.com"], - "mtype": 2 - } - ], - "seat": "resetdigital" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-video-bid-id", - "impid": "test-video-imp-id", - "price": 5.01, - "adm": "", - "crid": "test-video-creative-id", - "w": 640, - "h": 480, - "adomain": ["example.com"], - "mtype": 2 - }, - "type": "video", - "seat": "resetdigital" - } - ] - } - ] -} diff --git a/adapters/response.go b/adapters/response.go index 6c3c6a8237..ec02513ca6 100644 --- a/adapters/response.go +++ b/adapters/response.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) func CheckResponseStatusCodeForErrors(response *ResponseData) error { diff --git a/adapters/response_test.go b/adapters/response_test.go index 70106756b4..28fbefdf52 100644 --- a/adapters/response_test.go +++ b/adapters/response_test.go @@ -3,7 +3,7 @@ package adapters import ( "testing" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" "github.com/stretchr/testify/assert" ) diff --git a/adapters/revcontent/revcontent.go b/adapters/revcontent/revcontent.go index 7793e6fdd1..881b1d4916 100644 --- a/adapters/revcontent/revcontent.go +++ b/adapters/revcontent/revcontent.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/revcontent/revcontent_test.go b/adapters/revcontent/revcontent_test.go index 5b266e2fcd..35e6970c7f 100644 --- a/adapters/revcontent/revcontent_test.go +++ b/adapters/revcontent/revcontent_test.go @@ -3,9 +3,9 @@ package revcontent import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/richaudience/params_test.go b/adapters/richaudience/params_test.go index f0bf685372..8f5b2e244b 100644 --- a/adapters/richaudience/params_test.go +++ b/adapters/richaudience/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/richaudience/richaudience.go b/adapters/richaudience/richaudience.go index 0d8b5d2e29..969fd312c9 100644 --- a/adapters/richaudience/richaudience.go +++ b/adapters/richaudience/richaudience.go @@ -7,11 +7,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/richaudience/richaudience_test.go b/adapters/richaudience/richaudience_test.go index a55e5225d1..342301f808 100644 --- a/adapters/richaudience/richaudience_test.go +++ b/adapters/richaudience/richaudience_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/rise/rise.go b/adapters/rise/rise.go index d9d9c2a4bc..9a438f6dac 100644 --- a/adapters/rise/rise.go +++ b/adapters/rise/rise.go @@ -9,10 +9,10 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // adapter is a Rise implementation of the adapters.Bidder interface. diff --git a/adapters/rise/rise_test.go b/adapters/rise/rise_test.go index 8d10cedb95..d7235a7f3f 100644 --- a/adapters/rise/rise_test.go +++ b/adapters/rise/rise_test.go @@ -3,9 +3,9 @@ package rise import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "risetest" diff --git a/adapters/roulax/roulax.go b/adapters/roulax/roulax.go index c5af6833fc..9923836908 100644 --- a/adapters/roulax/roulax.go +++ b/adapters/roulax/roulax.go @@ -7,11 +7,11 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/roulax/roulax_test.go b/adapters/roulax/roulax_test.go index 67744873da..3bd03bbbf3 100644 --- a/adapters/roulax/roulax_test.go +++ b/adapters/roulax/roulax_test.go @@ -3,9 +3,9 @@ package roulax import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "roulaxtest" diff --git a/adapters/rtbhouse/rtbhouse.go b/adapters/rtbhouse/rtbhouse.go index 03432e55c1..c6445f1f15 100644 --- a/adapters/rtbhouse/rtbhouse.go +++ b/adapters/rtbhouse/rtbhouse.go @@ -10,11 +10,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( @@ -59,15 +59,7 @@ func (adapter *RTBHouseAdapter) MakeRequests( var publisherId string for _, imp := range openRTBRequest.Imp { - var impExtMap map[string]interface{} - err := jsonutil.Unmarshal(imp.Ext, &impExtMap) - if err != nil { - return nil, []error{&errortypes.BadInput{ - Message: "Bidder extension not provided or can't be unmarshalled", - }} - } - - rtbhouseExt, err := getImpressionExt(imp.Ext) + rtbhouseExt, err := getImpressionExt(imp) if err != nil { return nil, []error{err} } @@ -108,13 +100,9 @@ func (adapter *RTBHouseAdapter) MakeRequests( imp.BidFloor = bidFloor } - if imp.TagID == "" { - imp.TagID = getTagIDFromImpExt(impExtMap, imp.ID) - } - - // remove PAAPI signals - clearAuctionEnvironment(impExtMap) - newImpExt, err := jsonutil.Marshal(impExtMap) + // remove PAAPI signals from imp.Ext. RTB House pauses PAAPI support, + // the bidder should not get any PAAPI signals + newImpExt, err := clearAuctionEnvironment(&imp) if err != nil { errs = append(errs, err) return nil, errs @@ -211,39 +199,32 @@ func setPublisherID(request *openrtb2.BidRequest, publisherId string) error { return nil } -func clearAuctionEnvironment(impExtMap map[string]interface{}) { - keysToDelete := []string{"ae", "igs", "paapi"} - for _, key := range keysToDelete { - delete(impExtMap, key) - } -} - -func getTagIDFromImpExt(impExtMap map[string]interface{}, impID string) string { - if gpid, ok := impExtMap["gpid"].(string); ok && gpid != "" { - return gpid +func clearAuctionEnvironment(imp *openrtb2.Imp) (json.RawMessage, error) { + var objmap map[string]interface{} + err := json.Unmarshal(imp.Ext, &objmap) + if err != nil { + return nil, err } - dataMap, hasData := impExtMap["data"].(map[string]interface{}) - if hasData { - // imp.ext.data.adserver.adslot - if adserver, ok := dataMap["adserver"].(map[string]interface{}); ok { - if adslot, ok := adserver["adslot"].(string); ok && adslot != "" { - return adslot - } + keysToDelete := []string{"ae", "igs", "paapi"} + for _, key := range keysToDelete { + _, exists := objmap[key] + if exists { + delete(objmap, key) } + } - if pbAdSlot, ok := dataMap["pbadslot"].(string); ok && pbAdSlot != "" { - return pbAdSlot - } + newImpExt, err := json.Marshal(objmap) + if err != nil { + return nil, err } - // imp.ID as fallback - return impID + return newImpExt, nil } -func getImpressionExt(impExt json.RawMessage) (*openrtb_ext.ExtImpRTBHouse, error) { +func getImpressionExt(imp openrtb2.Imp) (*openrtb_ext.ExtImpRTBHouse, error) { var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(impExt, &bidderExt); err != nil { + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { return nil, &errortypes.BadInput{ Message: "Bidder extension not provided or can't be unmarshalled", } @@ -255,6 +236,7 @@ func getImpressionExt(impExt json.RawMessage) (*openrtb_ext.ExtImpRTBHouse, erro Message: "Error while unmarshaling bidder extension", } } + return &rtbhouseExt, nil } diff --git a/adapters/rtbhouse/rtbhouse_test.go b/adapters/rtbhouse/rtbhouse_test.go index 8dde82f949..c7189cffc9 100644 --- a/adapters/rtbhouse/rtbhouse_test.go +++ b/adapters/rtbhouse/rtbhouse_test.go @@ -3,9 +3,9 @@ package rtbhouse import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "rtbhousetest" diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/ae-igs-removal.json b/adapters/rtbhouse/rtbhousetest/exemplary/ae-igs-removal.json index bfb2c55af5..7cf35414aa 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/ae-igs-removal.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/ae-igs-removal.json @@ -36,7 +36,6 @@ ], "imp": [ { - "id": "test-imp-id", "banner": { "format": [ { @@ -51,7 +50,7 @@ }, "someOtherField": "should-remain" }, - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/app-with-publisher.json b/adapters/rtbhouse/rtbhousetest/exemplary/app-with-publisher.json index 6ccac25098..d53ab37f2d 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/app-with-publisher.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/app-with-publisher.json @@ -59,8 +59,7 @@ "publisherId": "app-publisher-123" } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/app_banner.json b/adapters/rtbhouse/rtbhousetest/exemplary/app_banner.json index 8a39951ee9..ba14e50d88 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/app_banner.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/app_banner.json @@ -49,8 +49,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } }] }, "impIDs":["test-imp-id"] diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/app_native.json b/adapters/rtbhouse/rtbhousetest/exemplary/app_native.json index 272a10f5a1..bdd5e57350 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/app_native.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/app_native.json @@ -43,8 +43,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } } ], "app": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/banner-resolve-macros.json b/adapters/rtbhouse/rtbhousetest/exemplary/banner-resolve-macros.json index 55c054d545..eaa3965040 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/banner-resolve-macros.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/banner-resolve-macros.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } }] }, "impIDs":["test-imp-id"] diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json index a9ede9271e..d31110cb3e 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param-without-cur.json @@ -60,8 +60,7 @@ "bidfloor": 3.00 } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json index bdc7eed6be..fd324fb034 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-bidder-param.json @@ -63,8 +63,7 @@ "bidfloor": 2 } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json index 97c9f2e59c..24cc0822dd 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-with-cur.json @@ -60,8 +60,7 @@ "publisherId": "12345" } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json index 139a492ce5..e579017c07 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/bidfloor-as-impbidfloor-without-cur.json @@ -58,8 +58,7 @@ "publisherId": "12345" } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/existing-site-publisher-override.json b/adapters/rtbhouse/rtbhousetest/exemplary/existing-site-publisher-override.json index a45e84bb7b..235e2c4a8b 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/existing-site-publisher-override.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/existing-site-publisher-override.json @@ -63,8 +63,7 @@ "publisherId": "new-publisher-123" } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/multiple-imps-different-publishers.json b/adapters/rtbhouse/rtbhousetest/exemplary/multiple-imps-different-publishers.json index 70cfc797b3..3cb44d5422 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/multiple-imps-different-publishers.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/multiple-imps-different-publishers.json @@ -60,8 +60,7 @@ "publisherId": "first-publisher" } }, - "id": "test-imp-id-1", - "tagid": "test-imp-id-1" + "id": "test-imp-id-1" }, { "banner": { @@ -77,8 +76,7 @@ "publisherId": "second-publisher" } }, - "id": "test-imp-id-2", - "tagid": "test-imp-id-2" + "id": "test-imp-id-2" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json index ca898872a6..a4aa158053 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-deprecated-native-prop.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json index 5f5f6f1a2c..232a102ce7 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/native-with-proper-native-response.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/pmp-removal-test.json b/adapters/rtbhouse/rtbhousetest/exemplary/pmp-removal-test.json index 3b05d5c587..0d31ef3d5b 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/pmp-removal-test.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/pmp-removal-test.json @@ -53,8 +53,7 @@ "publisherId": "12345" } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner-paapi.json b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner-paapi.json index 1a561ab573..fb96bdff14 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner-paapi.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner-paapi.json @@ -45,8 +45,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } }] }, "impIDs":["test-imp-id"] diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json index 61923eb38e..0cad5a6b96 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/simple-banner.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } }] }, "impIDs":["test-imp-id"] diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-adserver-adslot.json b/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-adserver-adslot.json deleted file mode 100644 index e069a1fd84..0000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-adserver-adslot.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "data": { - "adserver": { - "adslot": "adserver_slot_value" - } - }, - "bidder": { - "publisherId": "12345" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345" - }, - "data": { - "adserver": { - "adslot": "adserver_slot_value" - } - } - }, - "id": "test-imp-id", - "tagid": "adserver_slot_value" - } - ], - "site": { - "publisher": { - "ext": { - "prebid": { - "publisherId": "12345" - } - } - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-pbadslot.json b/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-pbadslot.json deleted file mode 100644 index 2fa2988764..0000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-from-pbadslot.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "data": { - "pbadslot": "pbslot_value" - }, - "bidder": { - "publisherId": "12345" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345" - }, - "data": { - "pbadslot": "pbslot_value" - } - }, - "id": "test-imp-id", - "tagid": "pbslot_value" - } - ], - "site": { - "publisher": { - "ext": { - "prebid": { - "publisherId": "12345" - } - } - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-precedence-gpid-over-pbadslot.json b/adapters/rtbhouse/rtbhousetest/exemplary/tagid-precedence-gpid-over-pbadslot.json deleted file mode 100644 index df1b7c3faf..0000000000 --- a/adapters/rtbhouse/rtbhousetest/exemplary/tagid-precedence-gpid-over-pbadslot.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "gpid": "gpid_value", - "data": { - "pbadslot": "pbslot_value" - }, - "bidder": { - "publisherId": "12345" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://localhost/prebid_server", - "body": { - "id": "test-request-id", - "cur": [ - "USD" - ], - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "12345" - }, - "gpid": "gpid_value", - "data": { - "pbadslot": "pbslot_value" - } - }, - "id": "test-imp-id", - "tagid": "gpid_value" - } - ], - "site": { - "publisher": { - "ext": { - "prebid": { - "publisherId": "12345" - } - } - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "cur": "USD", - "seatbid": [ - { - "seat": "rtbhouse", - "bid": [ - { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "randomid", - "impid": "test-imp-id", - "price": 300, - "adid": "12345678", - "adm": "some-test-ad", - "cid": "987", - "crid": "12345678", - "h": 250, - "w": 300, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json b/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json index e1389acece..71b95d18db 100644 --- a/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json +++ b/adapters/rtbhouse/rtbhousetest/exemplary/two-bidfloors-given-param-and-impbidfloor.json @@ -62,8 +62,7 @@ "bidfloor": 2 } }, - "id": "test-imp-id", - "tagid": "test-imp-id" + "id": "test-imp-id" } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/bad_response.json b/adapters/rtbhouse/rtbhousetest/supplemental/bad_response.json index dc61c6d061..a2d0c8da3d 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/bad_response.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/bad_response.json @@ -41,8 +41,7 @@ "ext": { "bidder": { } - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json b/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json index 9229cd58ec..4f643d1842 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.json @@ -49,8 +49,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } }, { "id": "test-banner-imp", @@ -62,8 +61,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-banner-imp" + } } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json index 99dc0bcbb9..bfdf568d3c 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-native-prop.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json index 6a1c564e46..4e95d2e23c 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/native-with-faulty-adm-response.json @@ -37,8 +37,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-native-imp" + } } ], "site": { diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json index 385f807a49..3b92e5d8fd 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-mtype.json @@ -46,8 +46,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json index d73090b0b1..58bdab87eb 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-no-mtype.json @@ -46,8 +46,7 @@ }, "ext": { "bidder": {} - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/status_204.json b/adapters/rtbhouse/rtbhousetest/supplemental/status_204.json index 8258d37698..03a69c2617 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/status_204.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/status_204.json @@ -41,8 +41,7 @@ "ext": { "bidder": { } - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/status_400.json b/adapters/rtbhouse/rtbhousetest/supplemental/status_400.json index 06fcf177af..25f8778636 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/status_400.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/status_400.json @@ -41,8 +41,7 @@ "ext": { "bidder": { } - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbhouse/rtbhousetest/supplemental/status_418.json b/adapters/rtbhouse/rtbhousetest/supplemental/status_418.json index f27138969d..27073b0e0c 100644 --- a/adapters/rtbhouse/rtbhousetest/supplemental/status_418.json +++ b/adapters/rtbhouse/rtbhousetest/supplemental/status_418.json @@ -41,8 +41,7 @@ "ext": { "bidder": { } - }, - "tagid": "test-imp-id" + } } ] }, diff --git a/adapters/rtbstack/params_test.go b/adapters/rtbstack/params_test.go deleted file mode 100644 index 087302decb..0000000000 --- a/adapters/rtbstack/params_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package rtbstack - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderRTBStack, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected rtbstack params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderRTBStack, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{"route":"https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145","tagId":"12345"}`, - `{"route":"https://site.eu-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2","tagId":"tag1"}`, - `{"route":"https://site.asia-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2","tagId":"tag1","customParams":{"foo":"bar"}}`, - `{"route":"https://example.us-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2","tagId":"tag1","customParams":{}}`, - `{"route":"https://example.us-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2","tagId":"tag1","customParams":{"nested":{"key":"value"}}}`, -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{}`, - `{"route":"https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2"}`, - `{"tagId":"12345"}`, - `{"route":"","tagId":"12345"}`, - `{"route":123,"tagId":"12345"}`, - `{"route":"https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2","tagId":123}`, -} diff --git a/adapters/rtbstack/rtbstack.go b/adapters/rtbstack/rtbstack.go deleted file mode 100644 index 5b5b73f0a3..0000000000 --- a/adapters/rtbstack/rtbstack.go +++ /dev/null @@ -1,269 +0,0 @@ -package rtbstack - -import ( - "fmt" - "net/http" - "net/url" - "strings" - "text/template" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint *template.Template -} - -// impCtx represents the context containing an OpenRTB impression and its corresponding RTBStack extension configuration. -type impCtx struct { - imp openrtb2.Imp - rtbStackExt *openrtb_ext.ExtImpRTBStack -} - -// extImpRTBStack is used for imp->ext when sending to rtb-stack backend. -type extImpRTBStack struct { - CustomParams map[string]interface{} `json:"customParams,omitempty"` -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - tpl, err := template.New("endpointTemplate").Parse(config.Endpoint) - if err != nil { - return nil, fmt.Errorf("unable to parse endpoint url template: %v", err) - } - - bidder := &adapter{ - endpoint: tpl, - } - return bidder, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - if len(request.Imp) == 0 { - return nil, []error{&errortypes.BadInput{ - Message: "No impressions in request", - }} - } - - var errs []error - impsByRoute := make(map[string][]*impCtx) - var routeOrder []string - - for i := range request.Imp { - imp, ext, err := preprocessImp(request.Imp[i]) - if err != nil { - errs = append(errs, err) - continue - } - - ctx := &impCtx{ - imp: imp, - rtbStackExt: ext, - } - if _, ok := impsByRoute[ext.Route]; !ok { - routeOrder = append(routeOrder, ext.Route) - } - impsByRoute[ext.Route] = append(impsByRoute[ext.Route], ctx) - } - - if len(routeOrder) == 0 { - return nil, errs - } - - var newSite *openrtb2.Site - if request.Site != nil && request.Site.Domain == "" { - siteCopy := *request.Site - pageURL, parseErr := url.Parse(request.Site.Page) - if parseErr == nil && pageURL.Hostname() != "" { - siteCopy.Domain = pageURL.Hostname() - } else { - siteCopy.Domain = request.Site.Page - } - newSite = &siteCopy - } - - requests := make([]*adapters.RequestData, 0, len(routeOrder)) - for _, route := range routeOrder { - group := impsByRoute[route] - - endpoint, err := a.buildEndpointURL(group[0].rtbStackExt) - if err != nil { - errs = append(errs, err) - continue - } - - processedImps := make([]openrtb2.Imp, 0, len(group)) - for _, v := range group { - processedImps = append(processedImps, v.imp) - } - - newRequest := *request - newRequest.Imp = processedImps - if newSite != nil { - newRequest.Site = newSite - } - - reqJSON, err := jsonutil.Marshal(newRequest) - if err != nil { - errs = append(errs, &errortypes.FailedToRequestBids{ - Message: "Error parsing reqJSON object", - }) - continue - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - requests = append(requests, &adapters.RequestData{ - Method: http.MethodPost, - Uri: endpoint, - Body: reqJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(newRequest.Imp), - }) - } - - if len(requests) == 0 { - return nil, errs - } - - return requests, errs -} - -func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(response) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil { - return nil, []error{err} - } - - var bidResp openrtb2.BidResponse - if err := jsonutil.Unmarshal(response.Body, &bidResp); err != nil { - return nil, []error{err} - } - - if len(bidResp.SeatBid) == 0 { - return nil, nil - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(internalRequest.Imp)) - - if bidResp.Cur != "" { - bidResponse.Currency = bidResp.Cur - } - - var bidErrs []error - for _, sb := range bidResp.SeatBid { - for i := range sb.Bid { - bidType, err := getMediaTypeForBid(sb.Bid[i]) - if err != nil { - bidErrs = append(bidErrs, err) - continue - } - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &sb.Bid[i], - BidType: bidType, - }) - } - } - return bidResponse, bidErrs -} - -var validRegions = map[string]bool{"us": true, "eu": true, "sg": true} - -func (a *adapter) buildEndpointURL(ext *openrtb_ext.ExtImpRTBStack) (string, error) { - routeURL, err := url.Parse(ext.Route) - if err != nil { - return "", &errortypes.BadInput{Message: fmt.Sprintf("invalid route URL: %v", err)} - } - - region, err := extractRegion(routeURL.Hostname()) - if err != nil { - return "", err - } - - queryParams := routeURL.Query() - client := queryParams.Get("client") - endpoint := queryParams.Get("endpoint") - ssp := queryParams.Get("ssp") - - if client == "" || endpoint == "" || ssp == "" { - return "", &errortypes.BadInput{Message: "route URL must contain client, endpoint, and ssp query parameters"} - } - - params := macros.EndpointTemplateParams{ - Region: region, - SspID: ssp, - ZoneID: endpoint, - PartnerId: client, - } - - return macros.ResolveMacros(a.endpoint, params) -} - -func extractRegion(hostname string) (string, error) { - parts := strings.Split(hostname, ".") - for _, part := range parts { - if strings.HasSuffix(part, "-adx-admixer") { - region := strings.ToLower(strings.TrimSuffix(part, "-adx-admixer")) - if validRegions[region] { - return region, nil - } - } - } - return "", &errortypes.BadInput{Message: "unable to extract valid region from route URL hostname"} -} - -func preprocessImp( - imp openrtb2.Imp, -) (openrtb2.Imp, *openrtb_ext.ExtImpRTBStack, error) { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return imp, nil, &errortypes.BadInput{Message: err.Error()} - } - - var impExt openrtb_ext.ExtImpRTBStack - if err := jsonutil.Unmarshal(bidderExt.Bidder, &impExt); err != nil { - return imp, nil, &errortypes.BadInput{ - Message: "Wrong RTBStack bidder ext", - } - } - - imp.TagID = impExt.TagId - - newExt := extImpRTBStack{ - CustomParams: impExt.CustomParams, - } - - newImpExtForRTBStack, err := jsonutil.Marshal(newExt) - if err != nil { - return imp, nil, &errortypes.BadInput{Message: err.Error()} - } - imp.Ext = newImpExtForRTBStack - - return imp, &impExt, nil -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported MType %d for bid %s", bid.MType, bid.ImpID), - } - } -} diff --git a/adapters/rtbstack/rtbstack_test.go b/adapters/rtbstack/rtbstack_test.go deleted file mode 100644 index a28237d4ca..0000000000 --- a/adapters/rtbstack/rtbstack_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package rtbstack - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderRTBStack, config.Adapter{ - Endpoint: "https://{{.Region}}-adx-admixer.rtb-stack.com/pbs?ssp={{.SspID}}&endpoint={{.ZoneID}}&client={{.PartnerId}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "rtbstacktest", bidder) -} - -func TestBuilderInvalidTemplate(t *testing.T) { - _, err := Builder(openrtb_ext.BidderRTBStack, config.Adapter{ - Endpoint: "https://{{.Region}-bad-template"}, config.Server{}) - - if err == nil { - t.Fatal("Builder should return an error for an invalid endpoint template") - } -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/app-audio.json b/adapters/rtbstack/rtbstacktest/exemplary/app-audio.json deleted file mode 100644 index 437343b056..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/app-audio.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-audio-short", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-audio-short", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-app-audio-long", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 15, - "maxduration": 60 - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-audio-long", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-audio-short", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 5, - "maxduration": 30 - }, - "tagid": "app-audio-short", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-app-audio-long", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 15, - "maxduration": 60 - }, - "tagid": "app-audio-long", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-app-audio-short", - "imp-app-audio-long" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-app-audio-short-1", - "impid": "imp-app-audio-short", - "price": 0.75, - "adm": "", - "crid": "crid-app-audio-short-1", - "mtype": 3 - }, - { - "id": "bid-app-audio-long-1", - "impid": "imp-app-audio-long", - "price": 1.25, - "adm": "", - "crid": "crid-app-audio-long-1", - "mtype": 3 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-app-audio-short-1", - "impid": "imp-app-audio-short", - "price": 0.75, - "adm": "", - "crid": "crid-app-audio-short-1", - "mtype": 3 - }, - "type": "audio" - }, - { - "bid": { - "id": "bid-app-audio-long-1", - "impid": "imp-app-audio-long", - "price": 1.25, - "adm": "", - "crid": "crid-app-audio-long-1", - "mtype": 3 - }, - "type": "audio" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/app-banner.json b/adapters/rtbstack/rtbstacktest/exemplary/app-banner.json deleted file mode 100644 index 1072a3946b..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/app-banner.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-basic", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-basic", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-app-large", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-basic", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "tagid": "app-basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-app-large", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "app-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-app-basic", - "imp-app-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-app-basic-1", - "impid": "imp-app-basic", - "price": 0.95, - "adm": "
App Banner 320x50
", - "crid": "crid-app-basic-1", - "mtype": 1 - }, - { - "id": "bid-app-large-1", - "impid": "imp-app-large", - "price": 1.5, - "adm": "
App Banner 728x90
", - "crid": "crid-app-large-1", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-app-basic-1", - "impid": "imp-app-basic", - "price": 0.95, - "adm": "
App Banner 320x50
", - "crid": "crid-app-basic-1", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-app-large-1", - "impid": "imp-app-large", - "price": 1.5, - "adm": "
App Banner 728x90
", - "crid": "crid-app-large-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/app-native.json b/adapters/rtbstack/rtbstacktest/exemplary/app-native.json deleted file mode 100644 index af5549ff6c..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/app-native.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-native-small", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":120,\"hmin\":120,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":100}}]}" - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-native-small", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-app-native-large", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":2,\"adunit\":2,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":300,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":150}}]}" - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-native-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-native-small", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":120,\"hmin\":120,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":100}}]}" - }, - "tagid": "app-native-small", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-app-native-large", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":2,\"adunit\":2,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":300,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":150}}]}" - }, - "tagid": "app-native-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-app-native-small", - "imp-app-native-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-app-native-small-1", - "impid": "imp-app-native-small", - "price": 1.5, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Small App Native Ad\"}}]}}", - "crid": "crid-app-native-small-1", - "mtype": 4 - }, - { - "id": "bid-app-native-large-1", - "impid": "imp-app-native-large", - "price": 2.75, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Large App Native Ad\"}}]}}", - "crid": "crid-app-native-large-1", - "mtype": 4 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-app-native-small-1", - "impid": "imp-app-native-small", - "price": 1.5, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Small App Native Ad\"}}]}}", - "crid": "crid-app-native-small-1", - "mtype": 4 - }, - "type": "native" - }, - { - "bid": { - "id": "bid-app-native-large-1", - "impid": "imp-app-native-large", - "price": 2.75, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Large App Native Ad\"}}]}}", - "crid": "crid-app-native-large-1", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/app-video.json b/adapters/rtbstack/rtbstacktest/exemplary/app-video.json deleted file mode 100644 index c2d5b4e6bc..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/app-video.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-video-small", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 5 - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-video-small", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-app-video-large", - "video": { - "w": 1280, - "h": 720, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 10, - "maxduration": 60, - "protocols": [ - 2, - 5, - 6 - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "app-video-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "app": { - "bundle": "com.prebid.app" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-app-video-small", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 5 - ] - }, - "tagid": "app-video-small", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-app-video-large", - "video": { - "w": 1280, - "h": 720, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 10, - "maxduration": 60, - "protocols": [ - 2, - 5, - 6 - ] - }, - "tagid": "app-video-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-app-video-small", - "imp-app-video-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-app-video-small-1", - "impid": "imp-app-video-small", - "price": 3.0, - "adm": "App Small Video Ad", - "crid": "crid-app-video-small-1", - "mtype": 2 - }, - { - "id": "bid-app-video-large-1", - "impid": "imp-app-video-large", - "price": 5.5, - "adm": "App Large Video Ad", - "crid": "crid-app-video-large-1", - "mtype": 2 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-app-video-small-1", - "impid": "imp-app-video-small", - "price": 3.0, - "adm": "App Small Video Ad", - "crid": "crid-app-video-small-1", - "mtype": 2 - }, - "type": "video" - }, - { - "bid": { - "id": "bid-app-video-large-1", - "impid": "imp-app-video-large", - "price": 5.5, - "adm": "App Large Video Ad", - "crid": "crid-app-video-large-1", - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/multi-route-grouping.json b/adapters/rtbstack/rtbstacktest/exemplary/multi-route-grouping.json deleted file mode 100644 index 543b99815e..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/multi-route-grouping.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-route-a-1", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=client-a&endpoint=100&ssp=200", - "tagId": "tag-a-1" - } - } - }, - { - "id": "imp-route-b-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.eu-adx-admixer.rtb-stack.com/prebid?client=client-b&endpoint=300&ssp=400", - "tagId": "tag-b-1" - } - } - }, - { - "id": "imp-route-a-2", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=client-a&endpoint=100&ssp=200", - "tagId": "tag-a-2" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=200&endpoint=100&client=client-a", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-route-a-1", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "tag-a-1", - "ext": {} - }, - { - "id": "imp-route-a-2", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "tagid": "tag-a-2", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-route-a-1", - "imp-route-a-2" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-a-1", - "impid": "imp-route-a-1", - "price": 1.25, - "adm": "
A1
", - "crid": "crid-a-1", - "mtype": 1 - }, - { - "id": "bid-a-2", - "impid": "imp-route-a-2", - "price": 2.5, - "adm": "
A2
", - "crid": "crid-a-2", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - }, - { - "expectedRequest": { - "uri": "https://eu-adx-admixer.rtb-stack.com/pbs?ssp=400&endpoint=300&client=client-b", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-route-b-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "tag-b-1", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-route-b-1" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-b-1", - "impid": "imp-route-b-1", - "price": 0.75, - "adm": "
B1
", - "crid": "crid-b-1", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-a-1", - "impid": "imp-route-a-1", - "price": 1.25, - "adm": "
A1
", - "crid": "crid-a-1", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-a-2", - "impid": "imp-route-a-2", - "price": 2.5, - "adm": "
A2
", - "crid": "crid-a-2", - "mtype": 1 - }, - "type": "banner" - } - ] - }, - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-b-1", - "impid": "imp-route-b-1", - "price": 0.75, - "adm": "
B1
", - "crid": "crid-b-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/multi-route-same.json b/adapters/rtbstack/rtbstacktest/exemplary/multi-route-same.json deleted file mode 100644 index a419ed2bcc..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/multi-route-same.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-same-route", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-same-1", - "banner": { - "format": [{ "w": 728, "h": 90 }] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=client-x&endpoint=500&ssp=600", - "tagId": "tag-1" - } - } - }, - { - "id": "imp-same-2", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=client-x&endpoint=500&ssp=600", - "tagId": "tag-2" - } - } - }, - { - "id": "imp-same-3", - "banner": { - "format": [{ "w": 970, "h": 250 }] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=client-x&endpoint=500&ssp=600", - "tagId": "tag-3" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=600&endpoint=500&client=client-x", - "body": { - "id": "test-request-same-route", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-same-1", - "banner": { "format": [{ "w": 728, "h": 90 }] }, - "tagid": "tag-1", - "ext": {} - }, - { - "id": "imp-same-2", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "tagid": "tag-2", - "ext": {} - }, - { - "id": "imp-same-3", - "banner": { "format": [{ "w": 970, "h": 250 }] }, - "tagid": "tag-3", - "ext": {} - } - ] - }, - "impIDs": ["imp-same-1", "imp-same-2", "imp-same-3"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-same-route", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-same-1", - "impid": "imp-same-1", - "price": 1.10, - "adm": "
1
", - "crid": "crid-1", - "mtype": 1 - }, - { - "id": "bid-same-2", - "impid": "imp-same-2", - "price": 1.20, - "adm": "
2
", - "crid": "crid-2", - "mtype": 1 - }, - { - "id": "bid-same-3", - "impid": "imp-same-3", - "price": 1.30, - "adm": "
3
", - "crid": "crid-3", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-same-1", - "impid": "imp-same-1", - "price": 1.10, - "adm": "
1
", - "crid": "crid-1", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-same-2", - "impid": "imp-same-2", - "price": 1.20, - "adm": "
2
", - "crid": "crid-2", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-same-3", - "impid": "imp-same-3", - "price": 1.30, - "adm": "
3
", - "crid": "crid-3", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/no-currency-in-response.json b/adapters/rtbstack/rtbstacktest/exemplary/no-currency-in-response.json deleted file mode 100644 index 8e3f949460..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/no-currency-in-response.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "test-tag" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-tag", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-banner" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-1", - "impid": "imp-banner", - "price": 1.0, - "adm": "
Banner
", - "crid": "crid-1", - "mtype": 1 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "imp-banner", - "price": 1.0, - "adm": "
Banner
", - "crid": "crid-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/optional-params.json b/adapters/rtbstack/rtbstacktest/exemplary/optional-params.json deleted file mode 100644 index 8e3f14abfd..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/optional-params.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-empty-custom", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "empty-custom", - "customParams": {} - } - } - }, - { - "id": "imp-numeric-bool", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "numeric-bool", - "customParams": { - "floor": 0.45, - "enabled": true, - "count": 3 - } - } - } - }, - { - "id": "imp-nested-custom", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "nested", - "customParams": { - "placement": { - "position": "top", - "sticky": true - }, - "sizes": [ - "970x250", - "728x90" - ] - } - } - } - }, - { - "id": "imp-no-custom", - "banner": { - "format": [ - { - "w": 468, - "h": 60 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "no-custom" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-empty-custom", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "empty-custom", - "ext": {} - }, - { - "id": "imp-numeric-bool", - "banner": { - "format": [ - { - "w": 320, - "h": 50 - } - ] - }, - "tagid": "numeric-bool", - "ext": { - "customParams": { - "floor": 0.45, - "enabled": true, - "count": 3 - } - } - }, - { - "id": "imp-nested-custom", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "tagid": "nested", - "ext": { - "customParams": { - "placement": { - "position": "top", - "sticky": true - }, - "sizes": [ - "970x250", - "728x90" - ] - } - } - }, - { - "id": "imp-no-custom", - "banner": { - "format": [ - { - "w": 468, - "h": 60 - } - ] - }, - "tagid": "no-custom", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-basic", - "imp-empty-custom", - "imp-numeric-bool", - "imp-nested-custom", - "imp-no-custom" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-audio.json b/adapters/rtbstack/rtbstacktest/exemplary/site-audio.json deleted file mode 100644 index 952d026e80..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-audio.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-audio-small", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 5, - "maxduration": 30 - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "site-audio-small", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-audio-large", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 15, - "maxduration": 60 - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "site-audio-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-audio-small", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 5, - "maxduration": 30 - }, - "tagid": "site-audio-small", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-audio-large", - "audio": { - "mimes": [ - "audio/mpeg", - "audio/mp4" - ], - "minduration": 15, - "maxduration": 60 - }, - "tagid": "site-audio-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-audio-small", - "imp-audio-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-site-audio-small-1", - "impid": "imp-audio-small", - "price": 0.75, - "adm": "", - "crid": "crid-site-audio-small-1", - "mtype": 3 - }, - { - "id": "bid-site-audio-large-1", - "impid": "imp-audio-large", - "price": 1.25, - "adm": "", - "crid": "crid-site-audio-large-1", - "mtype": 3 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-site-audio-small-1", - "impid": "imp-audio-small", - "price": 0.75, - "adm": "", - "crid": "crid-site-audio-small-1", - "mtype": 3 - }, - "type": "audio" - }, - { - "bid": { - "id": "bid-site-audio-large-1", - "impid": "imp-audio-large", - "price": 1.25, - "adm": "", - "crid": "crid-site-audio-large-1", - "mtype": 3 - }, - "type": "audio" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-banner.json b/adapters/rtbstack/rtbstacktest/exemplary/site-banner.json deleted file mode 100644 index 2c0e908c6e..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-banner.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-empty-custom", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "empty-custom", - "customParams": {} - } - } - }, - { - "id": "imp-nested-custom", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "nested", - "customParams": { - "placement": { - "position": "top", - "sticky": true - }, - "sizes": [ - "970x250", - "728x90" - ] - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-empty-custom", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "empty-custom", - "ext": {} - }, - { - "id": "imp-nested-custom", - "banner": { - "format": [ - { - "w": 970, - "h": 250 - } - ] - }, - "tagid": "nested", - "ext": { - "customParams": { - "placement": { - "position": "top", - "sticky": true - }, - "sizes": [ - "970x250", - "728x90" - ] - } - } - } - ] - }, - "impIDs": [ - "imp-basic", - "imp-empty-custom", - "imp-nested-custom" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-basic-1", - "impid": "imp-basic", - "price": 1.25, - "adm": "
Banner 728x90
", - "crid": "crid-basic-1", - "mtype": 1 - }, - { - "id": "bid-empty-1", - "impid": "imp-empty-custom", - "price": 0.75, - "adm": "
Banner 300x250
", - "crid": "crid-empty-1", - "mtype": 1 - }, - { - "id": "bid-nested-1", - "impid": "imp-nested-custom", - "price": 2.5, - "adm": "
Banner 970x250
", - "crid": "crid-nested-1", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-basic-1", - "impid": "imp-basic", - "price": 1.25, - "adm": "
Banner 728x90
", - "crid": "crid-basic-1", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-empty-1", - "impid": "imp-empty-custom", - "price": 0.75, - "adm": "
Banner 300x250
", - "crid": "crid-empty-1", - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-nested-1", - "impid": "imp-nested-custom", - "price": 2.5, - "adm": "
Banner 970x250
", - "crid": "crid-nested-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-empty-mutation.json b/adapters/rtbstack/rtbstacktest/exemplary/site-domain-empty-mutation.json deleted file mode 100644 index 4339d77473..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-empty-mutation.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "imp-basic" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-fallback.json b/adapters/rtbstack/rtbstacktest/exemplary/site-domain-fallback.json deleted file mode 100644 index fd198b1bc2..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-fallback.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "not-a-url", - "domain": "" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "test-tag" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "not-a-url", - "domain": "not-a-url" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-tag", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-banner" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-1", - "impid": "imp-banner", - "price": 1.0, - "adm": "
Banner
", - "crid": "crid-1", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "imp-banner", - "price": 1.0, - "adm": "
Banner
", - "crid": "crid-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-mutation.json b/adapters/rtbstack/rtbstacktest/exemplary/site-domain-mutation.json deleted file mode 100644 index 89954b712a..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-domain-mutation.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://not-empty.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://not-empty.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "imp-basic" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-native.json b/adapters/rtbstack/rtbstacktest/exemplary/site-native.json deleted file mode 100644 index 9d4b018203..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-native.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-site-native-small", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":120,\"hmin\":120,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":100}}]}" - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "site-native-small", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-site-native-large", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":2,\"adunit\":2,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":300,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":150}}]}" - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "site-native-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "device": { - "ifa": "ec943cb9-61ec-460f-a925-6489c3fcc4e3" - }, - "imp": [ - { - "id": "imp-site-native-small", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":1,\"adunit\":1,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":120,\"hmin\":120,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":100}}]}" - }, - "tagid": "site-native-small", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-site-native-large", - "native": { - "ver": "1.1", - "request": "{\"ver\":\"1.0\",\"layout\":2,\"adunit\":2,\"plcmttype\":1,\"plcmtcnt\":1,\"seq\":0,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":300,\"mimes\":[\"image/jpeg\",\"image/png\"]}},{\"id\":3,\"required\":0,\"data\":{\"type\":2,\"len\":150}}]}" - }, - "tagid": "site-native-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-site-native-small", - "imp-site-native-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-site-native-small-1", - "impid": "imp-site-native-small", - "price": 1.5, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Small Native Ad\"}}]}}", - "crid": "crid-site-native-small-1", - "mtype": 4 - }, - { - "id": "bid-site-native-large-1", - "impid": "imp-site-native-large", - "price": 2.75, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Large Native Ad\"}}]}}", - "crid": "crid-site-native-large-1", - "mtype": 4 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-site-native-small-1", - "impid": "imp-site-native-small", - "price": 1.5, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Small Native Ad\"}}]}}", - "crid": "crid-site-native-small-1", - "mtype": 4 - }, - "type": "native" - }, - { - "bid": { - "id": "bid-site-native-large-1", - "impid": "imp-site-native-large", - "price": 2.75, - "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Large Native Ad\"}}]}}", - "crid": "crid-site-native-large-1", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-region-eu.json b/adapters/rtbstack/rtbstacktest/exemplary/site-region-eu.json deleted file mode 100644 index c027397c7f..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-region-eu.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-eu", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-eu-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://publisher.eu-adx-admixer.rtb-stack.com/prebid?client=a1b2c3d4-e5f6-7890-abcd-ef1234567890&endpoint=500&ssp=200", - "tagId": "eu-banner", - "customParams": { - "geo": "europe" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://eu-adx-admixer.rtb-stack.com/pbs?ssp=200&endpoint=500&client=a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "body": { - "id": "test-request-eu", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-eu-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "eu-banner", - "ext": { - "customParams": { - "geo": "europe" - } - } - } - ] - }, - "impIDs": [ - "imp-eu-banner" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-eu", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-eu-1", - "impid": "imp-eu-banner", - "price": 1.1, - "adm": "
EU Banner 300x250
", - "crid": "crid-eu-1", - "mtype": 1 - } - ] - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "bid-eu-1", - "impid": "imp-eu-banner", - "price": 1.1, - "adm": "
EU Banner 300x250
", - "crid": "crid-eu-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-region-sg.json b/adapters/rtbstack/rtbstacktest/exemplary/site-region-sg.json deleted file mode 100644 index 7c685fe00a..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-region-sg.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-sg", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-sg-video", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ] - }, - "ext": { - "bidder": { - "route": "https://mysite.sg-adx-admixer.rtb-stack.com/prebid?client=f9e8d7c6-b5a4-3210-fedc-ba0987654321&endpoint=777&ssp=88", - "tagId": "sg-video", - "customParams": { - "geo": "asia" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://sg-adx-admixer.rtb-stack.com/pbs?ssp=88&endpoint=777&client=f9e8d7c6-b5a4-3210-fedc-ba0987654321", - "body": { - "id": "test-request-sg", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-sg-video", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ] - }, - "tagid": "sg-video", - "ext": { - "customParams": { - "geo": "asia" - } - } - } - ] - }, - "impIDs": [ - "imp-sg-video" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-sg", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-sg-1", - "impid": "imp-sg-video", - "price": 4.5, - "adm": "SG Video Ad", - "crid": "crid-sg-1", - "mtype": 2 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-sg-1", - "impid": "imp-sg-video", - "price": 4.5, - "adm": "SG Video Ad", - "crid": "crid-sg-1", - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/exemplary/site-video.json b/adapters/rtbstack/rtbstacktest/exemplary/site-video.json deleted file mode 100644 index 6d3f1aeefe..0000000000 --- a/adapters/rtbstack/rtbstacktest/exemplary/site-video.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-video-small", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 5 - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "video-small", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-video-large", - "video": { - "w": 1280, - "h": 720, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 10, - "maxduration": 60, - "protocols": [ - 2, - 5, - 6 - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "video-large", - "customParams": {} - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-video-small", - "video": { - "w": 640, - "h": 360, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 5, - "maxduration": 30, - "protocols": [ - 2, - 5 - ] - }, - "tagid": "video-small", - "ext": { - "customParams": { - "foo": "bar" - } - } - }, - { - "id": "imp-video-large", - "video": { - "w": 1280, - "h": 720, - "mimes": [ - "video/mp4", - "video/webm" - ], - "minduration": 10, - "maxduration": 60, - "protocols": [ - 2, - 5, - 6 - ] - }, - "tagid": "video-large", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-video-small", - "imp-video-large" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-video-small-1", - "impid": "imp-video-small", - "price": 3.0, - "adm": "Small Video Ad", - "crid": "crid-video-small-1", - "mtype": 2 - }, - { - "id": "bid-video-large-1", - "impid": "imp-video-large", - "price": 5.5, - "adm": "Large Video Ad", - "crid": "crid-video-large-1", - "mtype": 2 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-video-small-1", - "impid": "imp-video-small", - "price": 3.0, - "adm": "Small Video Ad", - "crid": "crid-video-small-1", - "mtype": 2 - }, - "type": "video" - }, - { - "bid": { - "id": "bid-video-large-1", - "impid": "imp-video-large", - "price": 5.5, - "adm": "Large Video Ad", - "crid": "crid-video-large-1", - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-bidder-ext.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-bidder-ext.json deleted file mode 100644 index 5d3c2f4509..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-bidder-ext.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-bad-bidder-ext", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-bad-ext", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "ext": { - "bidder": "not-an-object" - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Wrong RTBStack bidder ext", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-imp.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-imp.json deleted file mode 100644 index 7fb55166c3..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-imp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-error", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-invalid", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "ext": "invalid-json" - } - ] - }, - - "httpCalls": [], - - "expectedMakeRequestsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ], - - "expectedBidResponses": [] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-mtype.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-mtype.json deleted file mode 100644 index 2b79830d11..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-mtype.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "test-tag" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-tag", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-banner" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-1", - "impid": "imp-banner", - "price": 1.0, - "adm": "
Banner
", - "crid": "crid-1", - "mtype": 0 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "unsupported MType 0 for bid imp-banner", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-response.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-response.json deleted file mode 100644 index 2901ee1359..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-response.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "test-banner", - "customParams": { - "foo": "bar" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "test-banner", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": "{\"id\"data.lost" - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-route-invalid-region.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-route-invalid-region.json deleted file mode 100644 index 156148b2cd..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-route-invalid-region.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-bad-region", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-bad-region", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "ext": { - "bidder": { - "route": "https://publisher.xx-adx-admixer.rtb-stack.com/prebid?client=abc&endpoint=1&ssp=2", - "tagId": "test-tag" - } - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "unable to extract valid region from route URL hostname", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/bad-route-missing-params.json b/adapters/rtbstack/rtbstacktest/supplemental/bad-route-missing-params.json deleted file mode 100644 index ad6a6a463d..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/bad-route-missing-params.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-missing-params", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-missing-params", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "ext": { - "bidder": { - "route": "https://publisher.us-adx-admixer.rtb-stack.com/prebid", - "tagId": "test-tag" - } - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "route URL must contain client, endpoint, and ssp query parameters", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/multi-route-partial-failure.json b/adapters/rtbstack/rtbstacktest/supplemental/multi-route-partial-failure.json deleted file mode 100644 index ebbf7c392d..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/multi-route-partial-failure.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-mixed-routes", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-good", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://publisher.us-adx-admixer.rtb-stack.com/prebid?client=client-good&endpoint=10&ssp=20", - "tagId": "good-tag" - } - } - }, - { - "id": "imp-bad-region", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "route": "https://publisher.xx-adx-admixer.rtb-stack.com/prebid?client=client-bad&endpoint=99&ssp=88", - "tagId": "bad-tag" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=20&endpoint=10&client=client-good", - "body": { - "id": "test-request-mixed-routes", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [ - { - "id": "imp-good", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "good-tag", - "ext": {} - } - ] - }, - "impIDs": [ - "imp-good" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-mixed-routes", - "seatbid": [ - { - "seat": "rtbstack", - "bid": [ - { - "id": "bid-good-1", - "impid": "imp-good", - "price": 1.0, - "adm": "
good
", - "crid": "crid-good-1", - "mtype": 1 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-good-1", - "impid": "imp-good", - "price": 1.0, - "adm": "
good
", - "crid": "crid-good-1", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ], - "expectedMakeRequestsErrors": [ - { - "value": "unable to extract valid region from route URL hostname", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/no-imps.json b/adapters/rtbstack/rtbstacktest/supplemental/no-imps.json deleted file mode 100644 index 74130ada64..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/no-imps.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-no-imps", - "site": { - "page": "https://example.com", - "domain": "example.com" - }, - "imp": [] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "No impressions in request", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/status-204.json b/adapters/rtbstack/rtbstacktest/supplemental/status-204.json deleted file mode 100644 index 49d97f6c63..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/status-204.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "imp-basic" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/status-400.json b/adapters/rtbstack/rtbstacktest/supplemental/status-400.json deleted file mode 100644 index 4b8f01fd8a..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/status-400.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "basic", - "customParams": { - "foo": "bar" - } - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-id", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-basic", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "basic", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "imp-basic" - ] - }, - "mockResponse": { - "status": 400 - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/rtbstack/rtbstacktest/supplemental/two-imps-one-is-bad.json b/adapters/rtbstack/rtbstacktest/supplemental/two-imps-one-is-bad.json deleted file mode 100644 index 04c1d35d98..0000000000 --- a/adapters/rtbstack/rtbstacktest/supplemental/two-imps-one-is-bad.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-partial", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-valid", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "route": "https://testsite.us-adx-admixer.rtb-stack.com/prebid?client=c4527281-5aa5-4c8e-bc53-a80bb3f99470&endpoint=309&ssp=145", - "tagId": "valid-tag", - "customParams": { - "foo": "bar" - } - } - } - }, - { - "id": "imp-invalid", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": "invalid-json" - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://us-adx-admixer.rtb-stack.com/pbs?ssp=145&endpoint=309&client=c4527281-5aa5-4c8e-bc53-a80bb3f99470", - "body": { - "id": "test-request-partial", - "site": { - "page": "https://example.com", - "domain": "https://example.com" - }, - "imp": [ - { - "id": "imp-valid", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "valid-tag", - "ext": { - "customParams": { - "foo": "bar" - } - } - } - ] - }, - "impIDs": [ - "imp-valid" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedMakeRequestsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/rubicon/rubicon.go b/adapters/rubicon/rubicon.go index efcde7037c..b0a694905a 100644 --- a/adapters/rubicon/rubicon.go +++ b/adapters/rubicon/rubicon.go @@ -8,14 +8,14 @@ import ( "strconv" "strings" - "github.com/prebid/prebid-server/v4/version" - - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/maputil" + "github.com/prebid/prebid-server/v3/version" + + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/maputil" "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" diff --git a/adapters/rubicon/rubicon_test.go b/adapters/rubicon/rubicon_test.go index fe9f079c00..3e26e2db12 100644 --- a/adapters/rubicon/rubicon_test.go +++ b/adapters/rubicon/rubicon_test.go @@ -8,12 +8,12 @@ import ( "strconv" "testing" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/adcom1" diff --git a/adapters/sa_lunamedia/params_test.go b/adapters/sa_lunamedia/params_test.go index 1ad6ccf3fd..640af6ceb3 100644 --- a/adapters/sa_lunamedia/params_test.go +++ b/adapters/sa_lunamedia/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/sa_lunamedia/salunamedia.go b/adapters/sa_lunamedia/salunamedia.go index 69b19d9fcd..b75ccd9f8a 100644 --- a/adapters/sa_lunamedia/salunamedia.go +++ b/adapters/sa_lunamedia/salunamedia.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/sa_lunamedia/salunamedia_test.go b/adapters/sa_lunamedia/salunamedia_test.go index 953bbca6e0..3247bb0a57 100644 --- a/adapters/sa_lunamedia/salunamedia_test.go +++ b/adapters/sa_lunamedia/salunamedia_test.go @@ -3,9 +3,9 @@ package salunamedia import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/scalibur/scalibur.go b/adapters/scalibur/scalibur.go deleted file mode 100644 index f4c77ffa5b..0000000000 --- a/adapters/scalibur/scalibur.go +++ /dev/null @@ -1,320 +0,0 @@ -package scalibur - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - "text/template" - - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint *template.Template -} - -// Builder builds a new instance of the Scalibur adapter for the given bidder with the given config. -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - temp, err := template.New("endpointTemplate").Parse(config.Endpoint) - if err != nil { - return nil, fmt.Errorf("unable to parse endpoint url template: %v", err) - } - - return &adapter{ - endpoint: temp, - }, nil -} - -// MakeRequests creates the HTTP requests which should be made to fetch bids from Scalibur. -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var errs []error - var validImps []openrtb2.Imp - - // Process each impression - for _, imp := range request.Imp { - scaliburExt, err := parseScaliburExt(imp.Ext) - if err != nil { - errs = append(errs, err) - continue - } - - impCopy := imp - - // Apply bid floor and currency - if scaliburExt.BidFloor != nil && *scaliburExt.BidFloor > 0 { - impCopy.BidFloor = *scaliburExt.BidFloor - if scaliburExt.BidFloorCur != "" { - impCopy.BidFloorCur = scaliburExt.BidFloorCur - } - } - - if impCopy.BidFloor > 0 && impCopy.BidFloorCur != "" && impCopy.BidFloorCur != "USD" { - convertedValue, err := reqInfo.ConvertCurrency(impCopy.BidFloor, impCopy.BidFloorCur, "USD") - if err != nil { - errs = append(errs, err) - continue - } - impCopy.BidFloor = convertedValue - impCopy.BidFloorCur = "USD" - } - - if impCopy.BidFloorCur == "" { - impCopy.BidFloorCur = "USD" - } - - // Prepare imp.ext with placementId and params - impExtData := make(map[string]interface{}) - impExtData["placementId"] = scaliburExt.PlacementID - - if impCopy.BidFloor > 0 { - impExtData["bidfloor"] = impCopy.BidFloor - } - impExtData["bidfloorcur"] = impCopy.BidFloorCur - - // Preserve GPID if present - var rawExt map[string]json.RawMessage - if err := jsonutil.Unmarshal(imp.Ext, &rawExt); err == nil { - if gpid, ok := rawExt["gpid"]; ok { - impExtData["gpid"] = json.RawMessage(gpid) - } - } - - impExt, err := jsonutil.Marshal(impExtData) - if err != nil { - errs = append(errs, err) - continue - } - impCopy.Ext = impExt - - // Apply video defaults (matching JS defaults) - if impCopy.Video != nil { - videoCopy := *impCopy.Video - - // Note: In openrtb v20, field names are capitalized (MIMEs not Mimes) - if len(videoCopy.MIMEs) == 0 { - videoCopy.MIMEs = []string{"video/mp4"} - } - if videoCopy.MinDuration == 0 { - videoCopy.MinDuration = 1 - } - if videoCopy.MaxDuration == 0 { - videoCopy.MaxDuration = 180 - } - if videoCopy.MaxBitRate == 0 { - videoCopy.MaxBitRate = 30000 - } - if len(videoCopy.Protocols) == 0 { - // Use adcom1.MediaCreativeSubtype for protocols in v20 - videoCopy.Protocols = []adcom1.MediaCreativeSubtype{2, 3, 5, 6} - } - // Note: In openrtb v20, W and H are pointers - if videoCopy.W == nil || *videoCopy.W == 0 { - w := int64(640) - videoCopy.W = &w - } - if videoCopy.H == nil || *videoCopy.H == 0 { - h := int64(480) - videoCopy.H = &h - } - if videoCopy.Placement == 0 { - videoCopy.Placement = 1 - } - if videoCopy.Linearity == 0 { - videoCopy.Linearity = 1 - } - - impCopy.Video = &videoCopy - } - - validImps = append(validImps, impCopy) - } - - // If no valid impressions, return errors - if len(validImps) == 0 { - return nil, errs - } - - // Create the outgoing request - requestCopy := *request - requestCopy.Imp = validImps - requestCopy.Cur = nil - - isDebug := request.Test == 1 - if !isDebug && len(request.Ext) > 0 { - var extRequest openrtb_ext.ExtRequest - if err := jsonutil.Unmarshal(request.Ext, &extRequest); err == nil { - isDebug = extRequest.Prebid.Debug - } - } - - if isDebug { - reqExt := openrtb_ext.ExtRequestScalibur{IsDebug: 1} - if reqExtJSON, err := jsonutil.Marshal(reqExt); err == nil { - requestCopy.Ext = reqExtJSON - } - } else { - requestCopy.Ext = nil - } - - reqJSON, err := jsonutil.Marshal(requestCopy) - if err != nil { - return nil, append(errs, err) - } - - var endpointBuffer bytes.Buffer - if err := a.endpoint.Execute(&endpointBuffer, nil); err != nil { - return nil, []error{err} - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - requestData := &adapters.RequestData{ - Method: "POST", - Uri: endpointBuffer.String(), - Body: reqJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(requestCopy.Imp), - } - - return []*adapters.RequestData{requestData}, errs -} - -// MakeBids unpacks the server's response into bids. -func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if response.StatusCode == http.StatusNoContent { - return nil, nil - } - - if response.StatusCode != http.StatusOK { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", response.StatusCode), - }} - } - - var bidResp openrtb2.BidResponse - if err := jsonutil.Unmarshal(response.Body, &bidResp); err != nil { - return nil, []error{err} - } - - // Parse the external request to get impression details - var bidReq openrtb2.BidRequest - if err := jsonutil.Unmarshal(externalRequest.Body, &bidReq); err != nil { - return nil, []error{err} - } - - // Build impression map for lookup - impMap := make(map[string]*openrtb2.Imp, len(bidReq.Imp)) - for i := range bidReq.Imp { - impMap[bidReq.Imp[i].ID] = &bidReq.Imp[i] - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(bidReq.Imp)) - - // Set currency - if bidResp.Cur != "" { - bidResponse.Currency = bidResp.Cur - } else { - bidResponse.Currency = "USD" - } - - // Process each seat bid - for _, seatBid := range bidResp.SeatBid { - for _, bid := range seatBid.Bid { - // Find the corresponding imp - imp, found := impMap[bid.ImpID] - if !found { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Invalid bid imp ID %s", bid.ImpID), - }} - } - - // Determine bid type based on imp - bidType, err := getBidMediaType(bid, imp) - if err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: err.Error(), - }} - } - - bidCopy := bid - - // Handle video VAST - if bidType == openrtb_ext.BidTypeVideo { - // Try to extract custom fields vastXml and vastUrl from bid.ext - var bidExtData struct { - VastXML string `json:"vastXml"` - VastURL string `json:"vastUrl"` - } - if bid.Ext != nil { - if err := jsonutil.Unmarshal(bid.Ext, &bidExtData); err == nil { - if bidExtData.VastXML != "" { - bidCopy.AdM = bidExtData.VastXML - } else if bidExtData.VastURL != "" && bidCopy.AdM == "" { - // Wrap VAST URL in VAST wrapper - bidCopy.AdM = fmt.Sprintf(``, bidExtData.VastURL) - } - } - } - } - - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &bidCopy, - BidType: bidType, - }) - } - } - - if len(bidResponse.Bids) == 0 { - return nil, nil - } - - return bidResponse, nil -} - -// parseScaliburExt extracts Scalibur-specific parameters from the impression extension. -func parseScaliburExt(impExt json.RawMessage) (*openrtb_ext.ExtImpScalibur, error) { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(impExt, &bidderExt); err != nil { - return nil, &errortypes.BadInput{ - Message: fmt.Sprintf("Failed to parse imp.ext: %s", err.Error()), - } - } - - var scaliburExt openrtb_ext.ExtImpScalibur - if err := jsonutil.Unmarshal(bidderExt.Bidder, &scaliburExt); err != nil { - return nil, &errortypes.BadInput{ - Message: fmt.Sprintf("Failed to parse Scalibur params: %s", err.Error()), - } - } - - return &scaliburExt, nil -} - -// getBidMediaType determines the media type based on the impression -func getBidMediaType(bid openrtb2.Bid, imp *openrtb2.Imp) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - } - - // Fallback for bidders not supporting mtype (non-multi-format requests) - if imp.Banner != nil && imp.Video == nil { - return openrtb_ext.BidTypeBanner, nil - } - if imp.Video != nil && imp.Banner == nil { - return openrtb_ext.BidTypeVideo, nil - } - - return "", fmt.Errorf("unsupported or ambiguous media type for bid id=%s", bid.ID) -} diff --git a/adapters/scalibur/scalibur_test.go b/adapters/scalibur/scalibur_test.go deleted file mode 100644 index 3199e8ef66..0000000000 --- a/adapters/scalibur/scalibur_test.go +++ /dev/null @@ -1,344 +0,0 @@ -package scalibur - -import ( - "encoding/json" - "net/http" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func newTestAdapter() adapters.Bidder { - adapter, _ := Builder( - openrtb_ext.BidderScalibur, - config.Adapter{Endpoint: "https://srv.scalibur.io/adserver/ortb?type=prebid-server"}, - config.Server{}, - ) - return adapter -} - -// -// ------------------------------------------------------------------------------------------ -// MAKE REQUESTS TESTS -// ------------------------------------------------------------------------------------------ -// - -func TestJsonSamples(t *testing.T) { - adapterstest.RunJSONBidderTest(t, "scaliburtest", newTestAdapter()) -} - -func TestMakeRequests_SuccessBanner(t *testing.T) { - bidder := newTestAdapter() - - ext, _ := json.Marshal(adapters.ExtImpBidder{ - Bidder: json.RawMessage(`{ - "placementId": "p123", - "bidfloor": 1.25, - "bidfloorcur": "EUR" - }`), - }) - - req := &openrtb2.BidRequest{ - ID: "req1", - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Ext: ext, - Banner: &openrtb2.Banner{ - W: ptrInt64(300), H: ptrInt64(250), - }, - }, - }, - Site: &openrtb2.Site{Page: "https://test.com"}, - } - - requests, errs := bidder.MakeRequests(req, &adapters.ExtraRequestInfo{ - CurrencyConversions: &mockConversions{}, - }) - - require.Len(t, errs, 0) - require.Len(t, requests, 1) - - r := requests[0] - assert.Equal(t, "https://srv.scalibur.io/adserver/ortb?type=prebid-server", r.Uri) - assert.Equal(t, "POST", r.Method) - assert.Contains(t, r.Headers.Get("Content-Type"), "application/json") - - // Ensure body contains rewritten ext fields - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(r.Body, &out)) - require.Len(t, out.Imp, 1) - - imp := out.Imp[0] - - assert.Equal(t, float64(1.25), imp.BidFloor) - assert.Equal(t, "USD", imp.BidFloorCur) - - var outExt map[string]interface{} - require.NoError(t, json.Unmarshal(imp.Ext, &outExt)) - assert.Equal(t, "p123", outExt["placementId"]) -} - -func TestMakeRequests_InvalidExt(t *testing.T) { - bidder := newTestAdapter() - - badExt, _ := json.Marshal(adapters.ExtImpBidder{ - Bidder: json.RawMessage(`{invalid`), - }) - - req := &openrtb2.BidRequest{ - ID: "req2", - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Ext: badExt, - Banner: &openrtb2.Banner{ - W: ptrInt64(300), H: ptrInt64(250), - }, - }, - }, - } - - requests, errs := bidder.MakeRequests(req, &adapters.ExtraRequestInfo{}) - - require.Len(t, requests, 0) - require.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "Failed to parse imp.ext") -} - -func TestMakeRequests_VideoDefaultsApplied(t *testing.T) { - bidder := newTestAdapter() - - ext, _ := json.Marshal(adapters.ExtImpBidder{ - Bidder: json.RawMessage(`{"placementId": "p123"}`), - }) - - req := &openrtb2.BidRequest{ - ID: "req-video", - Imp: []openrtb2.Imp{ - { - ID: "v1", - Ext: ext, - Video: &openrtb2.Video{ - // Intentionally empty → should fill defaults - }, - }, - }, - } - - requests, errs := bidder.MakeRequests(req, &adapters.ExtraRequestInfo{ - CurrencyConversions: &mockConversions{}, - }) - - require.Len(t, errs, 0) - require.Len(t, requests, 1) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(requests[0].Body, &out)) - - v := out.Imp[0].Video - require.NotNil(t, v) - - assert.NotEmpty(t, v.MIMEs) - assert.NotZero(t, v.MinDuration) - assert.NotZero(t, v.MaxDuration) - assert.NotZero(t, v.MaxBitRate) - assert.NotEmpty(t, v.Protocols) - assert.NotNil(t, v.W) - assert.NotNil(t, v.H) - assert.NotZero(t, v.Placement) - assert.NotZero(t, v.Linearity) -} - -type mockConversions struct{} - -func (m *mockConversions) GetRate(from string, to string) (float64, error) { - return 1.0, nil -} - -func (m *mockConversions) GetRates() *map[string]map[string]float64 { - return nil -} - -// -// ------------------------------------------------------------------------------------------ -// MAKE BIDS TESTS -// ------------------------------------------------------------------------------------------ -// - -func TestMakeBids_SuccessBanner(t *testing.T) { - bidder := newTestAdapter() - - mockReq := &openrtb2.BidRequest{ - ID: "req1", - Imp: []openrtb2.Imp{ - { - ID: "1", - Banner: &openrtb2.Banner{W: ptrInt64(300), H: ptrInt64(250)}, - }, - }, - } - - mockReqData := &adapters.RequestData{ - Body: func() []byte { - b, _ := json.Marshal(mockReq) - return b - }(), - } - - mockResp := &openrtb2.BidResponse{ - ID: "resp1", - Cur: "USD", - SeatBid: []openrtb2.SeatBid{ - { - Bid: []openrtb2.Bid{ - { - ID: "b1", - ImpID: "1", - Price: 2.5, - AdM: "
ad markup
", - W: 300, - H: 250, - }, - }, - }, - }, - } - - respData := &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: func() []byte { - b, _ := json.Marshal(mockResp) - return b - }(), - } - - bidderResp, errs := bidder.MakeBids(mockReq, mockReqData, respData) - - require.Len(t, errs, 0) - require.NotNil(t, bidderResp) - require.Len(t, bidderResp.Bids, 1) - - b := bidderResp.Bids[0] - assert.Equal(t, openrtb_ext.BidTypeBanner, b.BidType) - assert.Equal(t, float64(2.5), b.Bid.Price) - assert.Equal(t, "
ad markup
", b.Bid.AdM) -} - -func TestMakeBids_EmptySeatBid(t *testing.T) { - bidder := newTestAdapter() - - mockReq := &openrtb2.BidRequest{ - ID: "req2", - Imp: []openrtb2.Imp{}, - } - - mockReqData := &adapters.RequestData{ - Body: []byte(`{"id":"req2","imp":[]}`), - } - - respData := &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{"id":"resp","seatbid":[]}`), - } - - bidderResp, errs := bidder.MakeBids(mockReq, mockReqData, respData) - - require.Len(t, errs, 0) - assert.Nil(t, bidderResp) -} - -func TestMakeBids_Status204(t *testing.T) { - bidder := newTestAdapter() - - respData := &adapters.ResponseData{ - StatusCode: http.StatusNoContent, - } - - resp, errs := bidder.MakeBids(&openrtb2.BidRequest{}, &adapters.RequestData{}, respData) - - assert.Nil(t, resp) - assert.Nil(t, errs) -} - -func TestMakeBids_InvalidJSON(t *testing.T) { - bidder := newTestAdapter() - - respData := &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`not-json`), - } - - _, errs := bidder.MakeBids(&openrtb2.BidRequest{}, &adapters.RequestData{}, respData) - require.Len(t, errs, 1) -} - -func TestMakeBids_ImpNotFound(t *testing.T) { - bidder := newTestAdapter() - - mockReq := &openrtb2.BidRequest{ - ID: "req1", - Imp: []openrtb2.Imp{ - {ID: "1"}, - }, - } - - mockReqData := &adapters.RequestData{ - Body: []byte(`{"id":"req1","imp":[{"id":"1"}]}`), - } - - mockResp := &openrtb2.BidResponse{ - ID: "resp1", - SeatBid: []openrtb2.SeatBid{ - { - Bid: []openrtb2.Bid{ - { - ID: "b1", - ImpID: "non-existent", - }, - }, - }, - }, - } - - respData := &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: func() []byte { - b, _ := json.Marshal(mockResp) - return b - }(), - } - - _, errs := bidder.MakeBids(mockReq, mockReqData, respData) - require.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "Invalid bid imp ID non-existent") -} - -func TestGetBidMediaType_Error(t *testing.T) { - bid := openrtb2.Bid{ - ID: "bid1", - ImpID: "imp1", - } - imp := &openrtb2.Imp{ - ID: "imp1", - // No banner or video - } - - _, err := getBidMediaType(bid, imp) - assert.Error(t, err) - assert.Contains(t, err.Error(), "unsupported or ambiguous media type") -} - -func TestParseScaliburExt_ErrorCases(t *testing.T) { - _, err := parseScaliburExt(json.RawMessage(`{invalid`)) - assert.Error(t, err) - assert.Contains(t, err.Error(), "Failed to parse imp.ext") -} - -func ptrInt64(x int64) *int64 { return &x } diff --git a/adapters/scalibur/scaliburtest/exemplary/bid-floor-eur-to-usd.json b/adapters/scalibur/scaliburtest/exemplary/bid-floor-eur-to-usd.json deleted file mode 100644 index c9d3b37c39..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/bid-floor-eur-to-usd.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { - "bidder": { - "placementId": "test-scl-placement", - "bidfloor": 1.0, - "bidfloorcur": "EUR" - } - } - }], - "ext": { - "prebid": { - "currency": { - "rates": { - "EUR": { - "USD": 1.2 - } - } - } - } - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloor": 1.2, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-scl-placement", - "bidfloor": 1.2, - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.2, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }] - }], - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.2, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/scalibur/scaliburtest/exemplary/bid-floor-usd.json b/adapters/scalibur/scaliburtest/exemplary/bid-floor-usd.json deleted file mode 100644 index 2549a4d7e0..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/bid-floor-usd.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { - "bidder": { - "placementId": "test-scl-placement", - "bidfloor": 1.5, - "bidfloorcur": "USD" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloor": 1.5, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-scl-placement", - "bidfloor": 1.5, - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }] - }], - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/scalibur/scaliburtest/exemplary/debug.json b/adapters/scalibur/scaliburtest/exemplary/debug.json deleted file mode 100644 index 4422ffb07e..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/debug.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-debug-request", - "test": 1, - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { "bidder": { "placementId": "test-placement" } } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-debug-request", - "test": 1, - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-placement", - "bidfloorcur": "USD" - } - }], - "ext": { "isDebug": 1 } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-debug-request", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id" - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id" - }, - "type": "banner" - }] - }] -} diff --git a/adapters/scalibur/scaliburtest/exemplary/debug_prebid.json b/adapters/scalibur/scaliburtest/exemplary/debug_prebid.json deleted file mode 100644 index 5f780c6810..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/debug_prebid.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-debug-prebid-request", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { "bidder": { "placementId": "test-placement" } } - }], - "ext": { - "prebid": { - "debug": true - } - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-debug-prebid-request", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-placement", - "bidfloorcur": "USD" - } - }], - "ext": { "isDebug": 1 } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-debug-prebid-request", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id" - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id" - }, - "type": "banner" - }] - }] -} diff --git a/adapters/scalibur/scaliburtest/exemplary/gpid.json b/adapters/scalibur/scaliburtest/exemplary/gpid.json deleted file mode 100644 index 393c8a86dd..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/gpid.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { - "bidder": { "placementId": "test-scl-placement" }, - "gpid": "test-gpid-value" - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-scl-placement", - "bidfloorcur": "USD", - "gpid": "test-gpid-value" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }] - }], - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }, - "type": "banner" - }] - }] -} diff --git a/adapters/scalibur/scaliburtest/exemplary/mtype.json b/adapters/scalibur/scaliburtest/exemplary/mtype.json deleted file mode 100644 index 4256373d8f..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/mtype.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-mtype-request", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { "bidder": { "placementId": "test-placement" } } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-mtype-request", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-placement", - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-mtype-request", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "mtype": 1 - }, - "type": "banner" - }] - }] -} diff --git a/adapters/scalibur/scaliburtest/exemplary/mtype_video.json b/adapters/scalibur/scaliburtest/exemplary/mtype_video.json deleted file mode 100644 index 32121a1a08..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/mtype_video.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-mtype-video-request", - "imp": [{ - "id": "test-imp-id", - "video": { "mimes": ["video/mp4"] }, - "ext": { "bidder": { "placementId": "test-placement" } } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-mtype-video-request", - "imp": [{ - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 1, - "maxduration": 180, - "maxbitrate": 30000, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "placement": 1, - "linearity": 1 - }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-placement", - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-mtype-video-request", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "mtype": 2 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "mtype": 2 - }, - "type": "video" - }] - }] -} diff --git a/adapters/scalibur/scaliburtest/exemplary/success_banner.json b/adapters/scalibur/scaliburtest/exemplary/success_banner.json deleted file mode 100644 index aabe2beb47..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/success_banner.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { "bidder": { "placementId": "test-scl-placement" } } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["test-imp-id"], - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "bidfloorcur": "USD", - "ext": { - "placementId": "test-scl-placement", - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }] - }], - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 0.5, - "adm": "...", - "crid": "test-creative-id", - "w": 300, - "h": 250 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/scalibur/scaliburtest/exemplary/video.json b/adapters/scalibur/scaliburtest/exemplary/video.json deleted file mode 100644 index 7eaea7a289..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/video.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-video-req", - "imp": [{ - "id": "video-imp-1", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "placementId": "46" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["video-imp-1"], - "body": { - "id": "test-video-req", - "imp": [{ - "id": "video-imp-1", - "video": { - "mimes": ["video/mp4"], - "minduration": 1, - "maxduration": 180, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "placement": 1, - "linearity": 1, - "maxbitrate": 30000 - }, - "bidfloorcur": "USD", - "ext": { - "placementId": "46", - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-video-req", - "seatbid": [{ - "bid": [{ - "id": "bid-v1", - "impid": "video-imp-1", - "price": 1.5, - "crid": "cr-video", - "ext": { - "vastXml": "..." - } - }] - }], - "cur": "USD" - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "bid-v1", - "impid": "video-imp-1", - "price": 1.5, - "adm": "...", - "crid": "cr-video", - "ext": { "vastXml": "..." } - }, - "type": "video" - }] - }] -} \ No newline at end of file diff --git a/adapters/scalibur/scaliburtest/exemplary/video_vast_url.json b/adapters/scalibur/scaliburtest/exemplary/video_vast_url.json deleted file mode 100644 index f00833b95b..0000000000 --- a/adapters/scalibur/scaliburtest/exemplary/video_vast_url.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-video-url-req", - "imp": [{ - "id": "video-imp-2", - "video": { "mimes": ["video/mp4"] }, - "ext": { "bidder": { "placementId": "46" } } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "https://srv.scalibur.io/adserver/ortb?type=prebid-server", - "impIDs": ["video-imp-2"], - "body": { - "id": "test-video-url-req", - "imp": [{ - "id": "video-imp-2", - "video": { - "mimes": ["video/mp4"], - "minduration": 1, - "maxduration": 180, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480, - "placement": 1, - "linearity": 1, - "maxbitrate": 30000 - }, - "bidfloorcur": "USD", - "ext": { - "placementId": "46", - "bidfloorcur": "USD" - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-video-url-req", - "seatbid": [{ - "bid": [{ - "id": "bid-v2", - "impid": "video-imp-2", - "price": 2.0, - "ext": { - "vastUrl": "https://cdn.scalibur.io/vast.xml" - } - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "bid-v2", - "impid": "video-imp-2", - "price": 2.0, - "adm": "", - "ext": { "vastUrl": "https://cdn.scalibur.io/vast.xml" } - }, - "type": "video" - }] - }] -} \ No newline at end of file diff --git a/adapters/scalibur/scaliburtest/supplemental/bid-floor-currency-conversion-error.json b/adapters/scalibur/scaliburtest/supplemental/bid-floor-currency-conversion-error.json deleted file mode 100644 index a154313934..0000000000 --- a/adapters/scalibur/scaliburtest/supplemental/bid-floor-currency-conversion-error.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { "format": [{"w": 300, "h": 250}] }, - "ext": { - "bidder": { - "placementId": "test-scl-placement", - "bidfloor": 1.5, - "bidfloorcur": "EUR" - } - } - }], - "ext": { - "prebid": { - "currency": { - "rates": { - "GBP": { - "USD": 1.3 - } - } - } - } - } - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Currency conversion rate not found: 'EUR' => 'USD'", - "comparison": "literal" - } - ] -} diff --git a/adapters/scalibur/params_test.go b/adapters/screencore/params_test.go similarity index 58% rename from adapters/scalibur/params_test.go rename to adapters/screencore/params_test.go index 994a8fb23b..508731fbde 100644 --- a/adapters/scalibur/params_test.go +++ b/adapters/screencore/params_test.go @@ -1,12 +1,16 @@ -package scalibur +package screencore import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) +var validParams = []string{ + `{ "accountId": "hash", "placementId": "hash"}`, +} + func TestValidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -14,12 +18,24 @@ func TestValidParams(t *testing.T) { } for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderScalibur, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected scalibur params: %s", validParam) + if err := validator.Validate(openrtb_ext.BidderScreencore, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected Screencore params: %s", validParam) } } } +var invalidParams = []string{ + ``, + `null`, + `true`, + `5`, + `5.2`, + `[]`, + `{}`, + `{"adCode": "string", "seatCode": 5, "originalPublisherid": "string"}`, + `{ "placementId": "", "accountId": "" }`, +} + func TestInvalidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -27,25 +43,8 @@ func TestInvalidParams(t *testing.T) { } for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderScalibur, json.RawMessage(invalidParam)); err == nil { + if err := validator.Validate(openrtb_ext.BidderScreencore, json.RawMessage(invalidParam)); err == nil { t.Errorf("Schema allowed unexpected params: %s", invalidParam) } } } - -var validParams = []string{ - `{"placementId":"p123"}`, - `{"placementId":"p123", "bidfloor": 1.5}`, - `{"placementId":"p123", "bidfloor": 1.5, "bidfloorcur": "USD"}`, -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `[]`, - `{}`, - `{"placementId": 123}`, - `{"bidfloor": 1.5}`, -} diff --git a/adapters/screencore/screencore.go b/adapters/screencore/screencore.go new file mode 100644 index 0000000000..17dab9084b --- /dev/null +++ b/adapters/screencore/screencore.go @@ -0,0 +1,178 @@ +package screencore + +import ( + "encoding/json" + "fmt" + "net/http" + "text/template" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint *template.Template +} + +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + template, err := template.New("endpointTemplate").Parse(config.Endpoint) + if err != nil { + return nil, fmt.Errorf("unable to parse endpoint url template: %v", err) + } + + bidder := &adapter{ + endpoint: template, + } + return bidder, nil +} + +func getHeaders(request *openrtb2.BidRequest) http.Header { + headers := http.Header{} + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + headers.Add("X-Openrtb-Version", "2.5") + + if request.Device != nil { + if len(request.Device.UA) > 0 { + headers.Add("User-Agent", request.Device.UA) + } + + if len(request.Device.IPv6) > 0 { + headers.Add("X-Forwarded-For", request.Device.IPv6) + } + + if len(request.Device.IP) > 0 { + headers.Add("X-Forwarded-For", request.Device.IP) + } + } + + return headers +} + +func (a *adapter) MakeRequests(openRTBRequest *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) (requestsToBidder []*adapters.RequestData, errs []error) { + if len(openRTBRequest.Imp) == 0 { + return nil, []error{&errortypes.BadInput{ + Message: "Empty Imp array in BidRequest", + }} + } + + screencoreExt, err := getImpressionExt(&openRTBRequest.Imp[0]) + if err != nil { + return nil, []error{err} + } + + openRTBRequest.Imp[0].Ext = nil + + url, err := a.buildEndpointURL(screencoreExt) + if err != nil { + return nil, []error{err} + } + + reqJSON, err := json.Marshal(openRTBRequest) + if err != nil { + return nil, []error{err} + } + + return []*adapters.RequestData{{ + Method: http.MethodPost, + Body: reqJSON, + Uri: url, + Headers: getHeaders(openRTBRequest), + ImpIDs: openrtb_ext.GetImpIDs(openRTBRequest.Imp), + }}, nil +} + +func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtScreencore, error) { + var bidderExt adapters.ExtImpBidder + if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { + return nil, &errortypes.BadInput{ + Message: "Error parsing screencoreExt - " + err.Error(), + } + } + var screencoreExt openrtb_ext.ExtScreencore + if err := jsonutil.Unmarshal(bidderExt.Bidder, &screencoreExt); err != nil { + return nil, &errortypes.BadInput{ + Message: "Error parsing bidderExt - " + err.Error(), + } + } + + return &screencoreExt, nil +} + +func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtScreencore) (string, error) { + endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: params.PlacementID} + return macros.ResolveMacros(a.endpoint, endpointParams) +} + +func checkResponseStatusCodes(response *adapters.ResponseData) error { + if response.StatusCode == http.StatusServiceUnavailable { + return &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Something went wrong Status Code: [ %d ] ", response.StatusCode), + } + } + + return adapters.CheckResponseStatusCodeForErrors(response) +} + +func (a *adapter) MakeBids(openRTBRequest *openrtb2.BidRequest, requestToBidder *adapters.RequestData, bidderRawResponse *adapters.ResponseData) (bidderResponse *adapters.BidderResponse, errs []error) { + if adapters.IsResponseStatusCodeNoContent(bidderRawResponse) { + return nil, nil + } + + httpStatusError := checkResponseStatusCodes(bidderRawResponse) + if httpStatusError != nil { + return nil, []error{httpStatusError} + } + + responseBody := bidderRawResponse.Body + var bidResp openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseBody, &bidResp); err != nil { + return nil, []error{&errortypes.BadServerResponse{ + Message: "Bad Server Response", + }} + } + + if len(bidResp.SeatBid) == 0 { + return nil, []error{&errortypes.BadServerResponse{ + Message: "Empty SeatBid array", + }} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(5) + var bidsArray []*adapters.TypedBid + + for _, sb := range bidResp.SeatBid { + for idx, bid := range sb.Bid { + bidType, err := getMediaTypeForImp(bid) + if err != nil { + return nil, []error{err} + } + + bidsArray = append(bidsArray, &adapters.TypedBid{ + Bid: &sb.Bid[idx], + BidType: bidType, + }) + } + } + + bidResponse.Bids = bidsArray + return bidResponse, nil +} + +func getMediaTypeForImp(bid openrtb2.Bid) (openrtb_ext.BidType, error) { + switch bid.MType { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupVideo: + return openrtb_ext.BidTypeVideo, nil + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + default: + return "", fmt.Errorf("unsupported MType %d", bid.MType) + } +} diff --git a/adapters/screencore/screencore_test.go b/adapters/screencore/screencore_test.go new file mode 100644 index 0000000000..2451231fe5 --- /dev/null +++ b/adapters/screencore/screencore_test.go @@ -0,0 +1,20 @@ +package screencore + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderScreencore, config.Adapter{ + Endpoint: "http://h1.screencore.io/?kp={{.AccountID}}&kn={{.SourceId}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "screencoretest", bidder) +} diff --git a/adapters/mobkoi/mobkoitest/exemplary/placement-id-overrides-tagid.json b/adapters/screencore/screencoretest/exemplary/banner-app.json similarity index 65% rename from adapters/mobkoi/mobkoitest/exemplary/placement-id-overrides-tagid.json rename to adapters/screencore/screencoretest/exemplary/banner-app.json index 99e6f64c46..2c807376f7 100644 --- a/adapters/mobkoi/mobkoitest/exemplary/placement-id-overrides-tagid.json +++ b/adapters/screencore/screencoretest/exemplary/banner-app.json @@ -9,25 +9,31 @@ }, "tmax": 1000, "user": { - "buyeruid": "awesome-user", - "consent": "consent-string" + "buyeruid": "awesome-user" }, - "site": { - "page": "test.com", + "app": { "publisher": { "id": "123456789" - } + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" }, "imp": [ { - "id": "some-impression-id1", - "tagid": "originalTagId", + "id": "1", + "tagid": "ogTAGID", "banner": { "w": 320, "h": 50 }, "ext": { "bidder": { + "accountId": "accountId", "placementId": "placementId" } } @@ -39,13 +45,22 @@ "expectedRequest": { "headers": { "Content-Type": [ - "application/json" + "application/json;charset=utf-8" ], "Accept": [ "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" ] }, - "uri": "http://dev.mobkoi.com/bid", + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", "body": { "id": "some-request-id", "device": { @@ -56,37 +71,32 @@ }, "imp": [ { - "id": "some-impression-id1", - "tagid": "placementId", + "id": "1", "banner": { "w": 320, "h": 50 }, - "ext": { - "bidder": { - "placementId": "placementId" - } - } + "tagid": "ogTAGID" } ], - "site": { - "page": "test.com", + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], "publisher": { "id": "123456789" } }, "user": { - "buyeruid": "awesome-user", - "consent": "consent-string", - "ext": { - "consent": "consent-string" - } + "buyeruid": "awesome-user" }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id1" - ] + "impIDs":["1"] }, "mockResponse": { "status": 200, @@ -97,7 +107,7 @@ "bid": [ { "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id1", + "impid": "1", "price": 3.5, "adm": "awesome-markup", "adomain": [ @@ -106,12 +116,11 @@ "crid": "20", "w": 320, "h": 50, - "lurl": "mobkoi/loss", - "nurl": "mobkoi/win" + "mtype": 1 } ], "type": "banner", - "seat": "mobkoi" + "seat": "screencore" } ], "cur": "USD" @@ -125,20 +134,18 @@ { "bid": { "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id1", + "impid": "1", "price": 3.5, "adm": "awesome-markup", - "crid": "20", "adomain": [ "awesome.com" ], + "crid": "20", "w": 320, "h": 50, - "lurl": "mobkoi/loss", - "nurl": "mobkoi/win" + "mtype": 1 }, - "type": "banner", - "seat": "mobkoi" + "type": "banner" } ] } diff --git a/adapters/screencore/screencoretest/exemplary/banner-web.json b/adapters/screencore/screencoretest/exemplary/banner-web.json new file mode 100644 index 0000000000..7e9b12546b --- /dev/null +++ b/adapters/screencore/screencoretest/exemplary/banner-web.json @@ -0,0 +1,198 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id1", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + }, + { + "id": "some-impression-id2", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id1", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + } + }, + { + "id": "some-impression-id2", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id1","some-impression-id2"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id1", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50, + "mtype": 1 + }, + { + "id": "a3ae1b4e2fc24a4fb45540082e98e162", + "impid": "some-impression-id2", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50, + "mtype": 1 + } + ], + "type": "banner", + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id1", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ], + "w": 320, + "h": 50, + "mtype": 1 + }, + "type": "banner" + }, + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e162", + "impid": "some-impression-id2", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ], + "w": 320, + "h": 50, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/exemplary/native-app.json b/adapters/screencore/screencoretest/exemplary/native-app.json new file mode 100644 index 0000000000..eb85dcbfec --- /dev/null +++ b/adapters/screencore/screencoretest/exemplary/native-app.json @@ -0,0 +1,149 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "mtype": 4 + } + ], + "type": "native", + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ], + "mtype": 4 + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/exemplary/native-web.json b/adapters/screencore/screencoretest/exemplary/native-web.json new file mode 100644 index 0000000000..a597611c23 --- /dev/null +++ b/adapters/screencore/screencoretest/exemplary/native-web.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "2607:fb90:f27:4512:d800:cb23:a603:e245" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "mtype": 4 + } + ], + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ], + "mtype": 4 + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/exemplary/video-app.json b/adapters/screencore/screencoretest/exemplary/video-app.json new file mode 100644 index 0000000000..7a29e5b53d --- /dev/null +++ b/adapters/screencore/screencoretest/exemplary/video-app.json @@ -0,0 +1,162 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 1280, + "h": 720, + "mtype": 2 + } + ], + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ], + "w": 1280, + "h": 720, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/exemplary/video-web.json b/adapters/screencore/screencoretest/exemplary/video-web.json new file mode 100644 index 0000000000..47de396e8c --- /dev/null +++ b/adapters/screencore/screencoretest/exemplary/video-web.json @@ -0,0 +1,160 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 1280, + "h": 720, + "ext": { + "prebid": { + "type": "video" + } + }, + "mtype": 2 + } + ], + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 1280, + "h": 720, + "ext": { + "prebid": { + "type": "video" + } + }, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/bad_media_type.json b/adapters/screencore/screencoretest/supplemental/bad_media_type.json new file mode 100644 index 0000000000..b8a3994730 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/bad_media_type.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "1", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "1", + "banner": { + "w": 320, + "h": 50 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["1"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "test-imp-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50 + } + ], + "mtype": 0, + "seat": "screencore" + } + ], + "cur": "USD" + } + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "unsupported MType 0", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/empty-imp-array.json b/adapters/screencore/screencoretest/supplemental/empty-imp-array.json new file mode 100644 index 0000000000..e19996fbe2 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/empty-imp-array.json @@ -0,0 +1,16 @@ +{ + "expectedMakeRequestsErrors": [ + { + "value": "Empty Imp array in BidRequest", + "comparison": "literal" + } + ], + "mockBidRequest": { + "id": "test-request-id", + "imp": [], + "site": { + "page": "test.com" + } + }, + "httpCalls": [] + } \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/empty_seatbid.json b/adapters/screencore/screencoretest/supplemental/empty-seatbid-array.json similarity index 80% rename from adapters/alliance_gravity/alliance_gravitytest/supplemental/empty_seatbid.json rename to adapters/screencore/screencoretest/supplemental/empty-seatbid-array.json index 3db49b75d9..04058fc917 100644 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/empty_seatbid.json +++ b/adapters/screencore/screencoretest/supplemental/empty-seatbid-array.json @@ -38,7 +38,8 @@ }, "ext": { "bidder": { - "srid": "abcdefgh" + "accountId": "accountId", + "placementId": "placementId" } } } @@ -48,23 +49,23 @@ { "expectedRequest": { "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], "Accept": [ "application/json" ], - "Content-Type": [ - "application/json;charset=utf-8" + "X-Openrtb-Version": [ + "2.5" ], "User-Agent": [ "test-user-agent" ], "X-Forwarded-For": [ "123.123.123.123" - ], - "Cookie": [ - "uids=awesome-user" ] }, - "uri": "http://endpoint", + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", "body": { "id": "some-request-id", "device": { @@ -85,15 +86,7 @@ "w": 640, "h": 480 }, - "tagid": "ogTAGID", - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "abcdefgh" - } - } - } + "tagid": "ogTAGID" } ], "app": { @@ -113,18 +106,26 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { "status": 200, "body": { - "id": "test-request-id", - "seatbid": [] + "id": "awesome-resp-id", + "seatbid": [], + "cur": "USD" } } } ], - "expectedBidResponses": [] + "mockResponse": { + "status": 200, + "body": "invalid response" + }, + "expectedMakeBidsErrors": [ + { + "value": "Empty SeatBid array", + "comparison": "literal" + } + ] } \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/invalid-bidder-ext-object.json b/adapters/screencore/screencoretest/supplemental/invalid-bidder-ext-object.json new file mode 100644 index 0000000000..016fbd4349 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/invalid-bidder-ext-object.json @@ -0,0 +1,33 @@ +{ + "expectedMakeRequestsErrors": [ + { + "value": "Error parsing bidderExt - expect { or n, but found \"", + "comparison": "literal" + } + ], + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "my-adcode", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": "wrongBidderExt" + } + } + ], + "site": { + "page": "test.com" + } + }, + "httpCalls": [] +} \ No newline at end of file diff --git a/adapters/alliance_gravity/alliance_gravitytest/supplemental/204-response.json b/adapters/screencore/screencoretest/supplemental/invalid-response.json similarity index 67% rename from adapters/alliance_gravity/alliance_gravitytest/supplemental/204-response.json rename to adapters/screencore/screencoretest/supplemental/invalid-response.json index b61adcc7a3..79ca5b96dc 100644 --- a/adapters/alliance_gravity/alliance_gravitytest/supplemental/204-response.json +++ b/adapters/screencore/screencoretest/supplemental/invalid-response.json @@ -27,18 +27,14 @@ { "id": "some-impression-id", "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480, - "minduration": 120, - "maxduration": 150 + "banner": { + "w": 320, + "h": 50 }, "ext": { "bidder": { - "srid": "abcdefgh" + "accountId": "accountId", + "placementId": "placementId" } } } @@ -48,23 +44,23 @@ { "expectedRequest": { "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], "Accept": [ "application/json" ], - "Content-Type": [ - "application/json;charset=utf-8" + "X-Openrtb-Version": [ + "2.5" ], "User-Agent": [ "test-user-agent" ], "X-Forwarded-For": [ "123.123.123.123" - ], - "Cookie": [ - "uids=awesome-user" ] }, - "uri": "http://endpoint", + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", "body": { "id": "some-request-id", "device": { @@ -76,24 +72,11 @@ "imp": [ { "id": "some-impression-id", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 + "banner": { + "w": 320, + "h": 50 }, - "tagid": "ogTAGID", - "ext": { - "bidder": {}, - "prebid": { - "storedrequest": { - "id": "abcdefgh" - } - } - } + "tagid": "ogTAGID" } ], "app": { @@ -113,14 +96,18 @@ }, "tmax": 1000 }, - "impIDs": [ - "some-impression-id" - ] + "impIDs":["some-impression-id"] }, "mockResponse": { - "status": 204 + "status": 200, + "body": "invalid response" } } ], - "expectedBidResponses": [] + "expectedMakeBidsErrors": [ + { + "value": "Bad Server Response", + "comparison": "literal" + } + ] } \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/invalid-screencore-ext-object.json b/adapters/screencore/screencoretest/supplemental/invalid-screencore-ext-object.json new file mode 100644 index 0000000000..4c3c9d9505 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/invalid-screencore-ext-object.json @@ -0,0 +1,31 @@ +{ + "expectedMakeRequestsErrors": [ + { + "value": "Error parsing screencoreExt - expect { or n, but found \"", + "comparison": "literal" + } + ], + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "my-adcode", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": "wrongscreencoreExt" + } + ], + "site": { + "page": "test.com" + } + }, + "httpCalls": [] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/status-code-bad-request.json b/adapters/screencore/screencoretest/supplemental/status-code-bad-request.json new file mode 100644 index 0000000000..cb2ac212e8 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/status-code-bad-request.json @@ -0,0 +1,94 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 400 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/status-code-no-content.json b/adapters/screencore/screencoretest/supplemental/status-code-no-content.json new file mode 100644 index 0000000000..b0315e5703 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/status-code-no-content.json @@ -0,0 +1,77 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 204 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/status-code-other-error.json b/adapters/screencore/screencoretest/supplemental/status-code-other-error.json new file mode 100644 index 0000000000..d35c8b0fa8 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/status-code-other-error.json @@ -0,0 +1,82 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 306 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 306. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/screencore/screencoretest/supplemental/status-code-service-unavailable.json b/adapters/screencore/screencoretest/supplemental/status-code-service-unavailable.json new file mode 100644 index 0000000000..f6eb482fa9 --- /dev/null +++ b/adapters/screencore/screencoretest/supplemental/status-code-service-unavailable.json @@ -0,0 +1,82 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://h1.screencore.io/?kp=accountId&kn=placementId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + }, + "impIDs":["some-impression-id"] + }, + "mockResponse": { + "status": 503 + } + } + ], + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Something went wrong Status Code: [ 503 ] ", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/seedingAlliance/params_test.go b/adapters/seedingAlliance/params_test.go index 77088c077d..56433b003c 100644 --- a/adapters/seedingAlliance/params_test.go +++ b/adapters/seedingAlliance/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/seedingAlliance/seedingAlliance.go b/adapters/seedingAlliance/seedingAlliance.go index bc367da19e..1e23d4e25a 100644 --- a/adapters/seedingAlliance/seedingAlliance.go +++ b/adapters/seedingAlliance/seedingAlliance.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/seedingAlliance/seedingAlliance_test.go b/adapters/seedingAlliance/seedingAlliance_test.go index f5721683d7..b432d0577f 100644 --- a/adapters/seedingAlliance/seedingAlliance_test.go +++ b/adapters/seedingAlliance/seedingAlliance_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/seedtag/params_test.go b/adapters/seedtag/params_test.go index f8a6eff8dd..b93be85dfb 100644 --- a/adapters/seedtag/params_test.go +++ b/adapters/seedtag/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -35,16 +35,10 @@ func TestInvalidParams(t *testing.T) { var validParams = []string{ `{"adUnitId": "27604970"}`, - `{"publisherId": "abc123", "integrationType": "ronId"}`, } var invalidParams = []string{ `{"adUnitId": 123}`, `{"adUnitId": ""}`, `{}`, - `{"publisherId": "abc123"}`, - `{"integrationType": "ronId"}`, - `{"publisherId": "", "integrationType": "ronId"}`, - `{"publisherId": "abc123", "integrationType": "unknown"}`, - `{"adUnitId": "27604970", "publisherId": "abc123", "integrationType": "ronId"}`, } diff --git a/adapters/seedtag/seedtag.go b/adapters/seedtag/seedtag.go index e48886b875..7836f2aaff 100644 --- a/adapters/seedtag/seedtag.go +++ b/adapters/seedtag/seedtag.go @@ -6,10 +6,10 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -51,8 +51,6 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E } requestCopy := *request - // Set the CUR of bid to USD after converting all floors - requestCopy.Cur = []string{"USD"} requestCopy.Imp = imps requestJSON, err := jsonutil.Marshal(requestCopy) if err != nil { diff --git a/adapters/seedtag/seedtag_test.go b/adapters/seedtag/seedtag_test.go index 4629793ffd..bdfbc7725e 100644 --- a/adapters/seedtag/seedtag_test.go +++ b/adapters/seedtag/seedtag_test.go @@ -3,9 +3,9 @@ package seedtag import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/seedtag/seedtagtest/exemplary/banner.json b/adapters/seedtag/seedtagtest/exemplary/banner.json index 3493131ab7..8e390c4134 100644 --- a/adapters/seedtag/seedtagtest/exemplary/banner.json +++ b/adapters/seedtag/seedtagtest/exemplary/banner.json @@ -39,7 +39,6 @@ "Accept": ["application/json"] }, "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/exemplary/bidfloor_converted.json b/adapters/seedtag/seedtagtest/exemplary/bidfloor_converted.json index c109875df4..de0991c1e6 100644 --- a/adapters/seedtag/seedtagtest/exemplary/bidfloor_converted.json +++ b/adapters/seedtag/seedtagtest/exemplary/bidfloor_converted.json @@ -53,7 +53,6 @@ "Accept": ["application/json"] }, "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/exemplary/ron_id.json b/adapters/seedtag/seedtagtest/exemplary/ron_id.json deleted file mode 100644 index f09c9b9b3e..0000000000 --- a/adapters/seedtag/seedtagtest/exemplary/ron_id.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "publisher": { - "id": "foo", - "name": "foo" - } - }, - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "abc123", - "integrationType": "ronId" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://url.seedtag.com", - "headers": { - "Content-Type": ["application/json;charset=utf-8"], - "Accept": ["application/json"] - }, - "body": { - "cur": ["USD"], - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "abc123", - "integrationType": "ronId" - } - } - } - ], - "site": { - "publisher": { - "id": "foo", - "name": "foo" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "123", - "bid": [ - { - "id": "7706636740145184841", - "impid": "test-imp-id", - "price": 0.5, - "adid": "12341234", - "adm": "some-test-ad", - "adomain": [ - "domain.com" - ], - "iurl": "http://abc.com/cr?id=12341234", - "cid": "123", - "crid": "12341234", - "h": 250, - "w": 300, - "mtype": 1 - } - ] - } - ], - "bidid": "5778926625248726496", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "7706636740145184841", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "adid": "12341234", - "adomain": [ - "domain.com" - ], - "iurl": "http://abc.com/cr?id=12341234", - "cid": "123", - "crid": "12341234", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/seedtag/seedtagtest/exemplary/video.json b/adapters/seedtag/seedtagtest/exemplary/video.json index d8ac06fbbe..6bfbc52ad2 100644 --- a/adapters/seedtag/seedtagtest/exemplary/video.json +++ b/adapters/seedtag/seedtagtest/exemplary/video.json @@ -41,7 +41,6 @@ "Accept": ["application/json"] }, "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/supplemental/invalid_mtype.json b/adapters/seedtag/seedtagtest/supplemental/invalid_mtype.json index ed830f90b4..636cb0ce97 100644 --- a/adapters/seedtag/seedtagtest/supplemental/invalid_mtype.json +++ b/adapters/seedtag/seedtagtest/supplemental/invalid_mtype.json @@ -37,7 +37,6 @@ "expectedRequest": { "uri": "http://url.seedtag.com", "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/supplemental/response_unmarshal_error.json b/adapters/seedtag/seedtagtest/supplemental/response_unmarshal_error.json index f61a38f3c0..de60e366d4 100644 --- a/adapters/seedtag/seedtagtest/supplemental/response_unmarshal_error.json +++ b/adapters/seedtag/seedtagtest/supplemental/response_unmarshal_error.json @@ -37,7 +37,6 @@ "expectedRequest": { "uri": "http://url.seedtag.com", "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/supplemental/status_bad_request.json b/adapters/seedtag/seedtagtest/supplemental/status_bad_request.json index 27185ea89a..8cd058864e 100644 --- a/adapters/seedtag/seedtagtest/supplemental/status_bad_request.json +++ b/adapters/seedtag/seedtagtest/supplemental/status_bad_request.json @@ -29,7 +29,6 @@ "expectedRequest": { "uri": "http://url.seedtag.com", "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/supplemental/status_no_content.json b/adapters/seedtag/seedtagtest/supplemental/status_no_content.json index b9aeff0796..aa415e17ed 100644 --- a/adapters/seedtag/seedtagtest/supplemental/status_no_content.json +++ b/adapters/seedtag/seedtagtest/supplemental/status_no_content.json @@ -29,7 +29,6 @@ "expectedRequest": { "uri": "http://url.seedtag.com", "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/seedtag/seedtagtest/supplemental/status_not_ok.json b/adapters/seedtag/seedtagtest/supplemental/status_not_ok.json index 20b2eb2600..a5d8f80b41 100644 --- a/adapters/seedtag/seedtagtest/supplemental/status_not_ok.json +++ b/adapters/seedtag/seedtagtest/supplemental/status_not_ok.json @@ -29,7 +29,6 @@ "expectedRequest": { "uri": "http://url.seedtag.com", "body": { - "cur": ["USD"], "id": "test-request-id", "imp": [ { diff --git a/adapters/sharethrough/params_test.go b/adapters/sharethrough/params_test.go index 03c60cec38..a7011ab376 100644 --- a/adapters/sharethrough/params_test.go +++ b/adapters/sharethrough/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/sharethrough/sharethrough.go b/adapters/sharethrough/sharethrough.go index 7663122788..cf5c65a736 100644 --- a/adapters/sharethrough/sharethrough.go +++ b/adapters/sharethrough/sharethrough.go @@ -7,12 +7,12 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) var adapterVersion = "10.0" diff --git a/adapters/sharethrough/sharethrough_test.go b/adapters/sharethrough/sharethrough_test.go index fd2c5d12ed..6ca7d9c7ef 100644 --- a/adapters/sharethrough/sharethrough_test.go +++ b/adapters/sharethrough/sharethrough_test.go @@ -3,9 +3,9 @@ package sharethrough import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/showheroes/params_test.go b/adapters/showheroes/params_test.go index 857a9db650..a22693f81a 100644 --- a/adapters/showheroes/params_test.go +++ b/adapters/showheroes/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/showheroes/showheroes.go b/adapters/showheroes/showheroes.go index c2c27b64b1..f04adc100d 100644 --- a/adapters/showheroes/showheroes.go +++ b/adapters/showheroes/showheroes.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) type adapter struct { diff --git a/adapters/showheroes/showheroes_test.go b/adapters/showheroes/showheroes_test.go index ce82c89255..64f8e62f2f 100644 --- a/adapters/showheroes/showheroes_test.go +++ b/adapters/showheroes/showheroes_test.go @@ -3,9 +3,9 @@ package showheroes import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/silvermob/params_test.go b/adapters/silvermob/params_test.go index c59190d561..9dc9a34eb6 100644 --- a/adapters/silvermob/params_test.go +++ b/adapters/silvermob/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the silvermob schema accepts all imp.ext fields which we intend to support. diff --git a/adapters/silvermob/silvermob.go b/adapters/silvermob/silvermob.go index 062264e4c6..b51207f13c 100644 --- a/adapters/silvermob/silvermob.go +++ b/adapters/silvermob/silvermob.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type SilverMobAdapter struct { diff --git a/adapters/silvermob/silvermob_test.go b/adapters/silvermob/silvermob_test.go index 217dfb7db2..991a758b4e 100644 --- a/adapters/silvermob/silvermob_test.go +++ b/adapters/silvermob/silvermob_test.go @@ -3,9 +3,9 @@ package silvermob import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/silverpush/params_test.go b/adapters/silverpush/params_test.go index 721fd69f56..d98f413a71 100644 --- a/adapters/silverpush/params_test.go +++ b/adapters/silverpush/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file intends to test static/bidder-params/silverpush.json diff --git a/adapters/silverpush/silverpush.go b/adapters/silverpush/silverpush.go index f5b9ac0588..049b0d5a93 100644 --- a/adapters/silverpush/silverpush.go +++ b/adapters/silverpush/silverpush.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const ( diff --git a/adapters/silverpush/silverpush_test.go b/adapters/silverpush/silverpush_test.go index cfb7d296f4..f953584f0b 100644 --- a/adapters/silverpush/silverpush_test.go +++ b/adapters/silverpush/silverpush_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/smaato/native.go b/adapters/smaato/native.go index ce73d3d73b..2cbcae471c 100644 --- a/adapters/smaato/native.go +++ b/adapters/smaato/native.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type nativeAd struct { diff --git a/adapters/smaato/params_test.go b/adapters/smaato/params_test.go index 99aea5af5a..7acb42c696 100644 --- a/adapters/smaato/params_test.go +++ b/adapters/smaato/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file intends to test static/bidder-params/smaato.json diff --git a/adapters/smaato/smaato.go b/adapters/smaato/smaato.go index c782e7fa18..34800102b8 100644 --- a/adapters/smaato/smaato.go +++ b/adapters/smaato/smaato.go @@ -9,13 +9,13 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) const clientVersion = "prebid_server_1.2" diff --git a/adapters/smaato/smaato_test.go b/adapters/smaato/smaato_test.go index bc1d3497af..311724ecd8 100644 --- a/adapters/smaato/smaato_test.go +++ b/adapters/smaato/smaato_test.go @@ -10,11 +10,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/smartadserver/params_test.go b/adapters/smartadserver/params_test.go index 46266e4be8..fb71edb414 100644 --- a/adapters/smartadserver/params_test.go +++ b/adapters/smartadserver/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/smartadserver.json diff --git a/adapters/smartadserver/smartadserver.go b/adapters/smartadserver/smartadserver.go index 464084fd61..1dc801a90d 100644 --- a/adapters/smartadserver/smartadserver.go +++ b/adapters/smartadserver/smartadserver.go @@ -9,11 +9,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type SmartAdserverAdapter struct { diff --git a/adapters/smartadserver/smartadserver_test.go b/adapters/smartadserver/smartadserver_test.go index bb90a4877b..51b1fb0914 100644 --- a/adapters/smartadserver/smartadserver_test.go +++ b/adapters/smartadserver/smartadserver_test.go @@ -3,9 +3,9 @@ package smartadserver import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/smarthub/params_test.go b/adapters/smarthub/params_test.go index 5a2371f8e8..18616abd0f 100644 --- a/adapters/smarthub/params_test.go +++ b/adapters/smarthub/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/smarthub/smarthub.go b/adapters/smarthub/smarthub.go index 733813bd82..7048bb0cc0 100644 --- a/adapters/smarthub/smarthub.go +++ b/adapters/smarthub/smarthub.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/smarthub/smarthub_test.go b/adapters/smarthub/smarthub_test.go index bb88ab1312..bee9c04aa8 100644 --- a/adapters/smarthub/smarthub_test.go +++ b/adapters/smarthub/smarthub_test.go @@ -3,9 +3,9 @@ package smarthub import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/smartrtb/smartrtb.go b/adapters/smartrtb/smartrtb.go index 2e498c57d7..68fd9bfccb 100644 --- a/adapters/smartrtb/smartrtb.go +++ b/adapters/smartrtb/smartrtb.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Base adapter structure. diff --git a/adapters/smartrtb/smartrtb_test.go b/adapters/smartrtb/smartrtb_test.go index 5e1fd42a29..060323a7ac 100644 --- a/adapters/smartrtb/smartrtb_test.go +++ b/adapters/smartrtb/smartrtb_test.go @@ -3,9 +3,9 @@ package smartrtb import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/smartx/params_test.go b/adapters/smartx/params_test.go index 904586b782..837c63568a 100644 --- a/adapters/smartx/params_test.go +++ b/adapters/smartx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/smartx/smartx.go b/adapters/smartx/smartx.go index 8a15bb6268..154f511f03 100644 --- a/adapters/smartx/smartx.go +++ b/adapters/smartx/smartx.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/smartx/smartx_test.go b/adapters/smartx/smartx_test.go index e04f4aa7aa..6d25752865 100644 --- a/adapters/smartx/smartx_test.go +++ b/adapters/smartx/smartx_test.go @@ -3,9 +3,9 @@ package smartx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testsDir = "smartxtest" diff --git a/adapters/smartyads/params_test.go b/adapters/smartyads/params_test.go index f33095cc51..ed49894629 100644 --- a/adapters/smartyads/params_test.go +++ b/adapters/smartyads/params_test.go @@ -4,16 +4,11 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ - `{ "host": "host", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host.example.com", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host.example.com:8080", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host-example.test", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "Host.Example.com", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "localhost:3000", "sourceid": "partner", "accountid": "hash" }`, + `{ "host": "ep1", "sourceid": "partner", "accountid": "hash" }`, } func TestValidParams(t *testing.T) { @@ -39,18 +34,8 @@ var invalidParams = []string{ `{}`, `{"adCode": "string", "seatCode": 5, "originalPublisherid": "string"}`, `{ "host": "ep1", "sourceid": "partner" }`, - `{ "host": "ep1", "accountid": "hash" }`, - `{ "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "", "sourceid": "", "accountid": "" }`, - `{ "host": "/path", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "//evil.com", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host/path", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host?query=1", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host#fragment", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "user@host", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "https://host.com", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host:notaport", "sourceid": "partner", "accountid": "hash" }`, - `{ "host": "host:8080:extra", "sourceid": "partner", "accountid": "hash" }`, + `{ "host": "ep1, "accountid": "hash" }`, + `{ "sourceid": "partner", "sourceid": "partner" }`, } func TestInvalidParams(t *testing.T) { diff --git a/adapters/smartyads/smartyads.go b/adapters/smartyads/smartyads.go index 5be15f1158..3a07edaf62 100644 --- a/adapters/smartyads/smartyads.go +++ b/adapters/smartyads/smartyads.go @@ -8,13 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type SmartyAdsAdapter struct { @@ -126,9 +125,6 @@ func (a *SmartyAdsAdapter) getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.Ext } func (a *SmartyAdsAdapter) buildEndpointURL(params *openrtb_ext.ExtSmartyAds) (string, error) { - if !urlutil.IsSafeHost(params.Host) { - return "", &errortypes.BadInput{Message: "Invalid Host"} - } endpointParams := macros.EndpointTemplateParams{Host: params.Host, SourceId: params.SourceID, AccountID: params.AccountID} return macros.ResolveMacros(a.endpoint, endpointParams) } diff --git a/adapters/smartyads/smartyads_test.go b/adapters/smartyads/smartyads_test.go index 9b7ada132b..330f3900a0 100644 --- a/adapters/smartyads/smartyads_test.go +++ b/adapters/smartyads/smartyads_test.go @@ -3,9 +3,9 @@ package smartyads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/smartyads/smartyadstest/supplemental/invalid-host.json b/adapters/smartyads/smartyadstest/supplemental/invalid-host.json deleted file mode 100644 index 10f8a8f6e8..0000000000 --- a/adapters/smartyads/smartyadstest/supplemental/invalid-host.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "some-impression-id", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "host": "evil.com/path?redirect=http://attacker.com#", - "sourceid": "partner", - "accountid": "testaccount" - } - } - } - ], - "site": { - "page": "test.com" - } - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Invalid Host", - "comparison": "literal" - } - ] -} diff --git a/adapters/smilewanted/params_test.go b/adapters/smilewanted/params_test.go index cfca29976f..78a29dc046 100644 --- a/adapters/smilewanted/params_test.go +++ b/adapters/smilewanted/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/smilewanted.json diff --git a/adapters/smilewanted/smilewanted.go b/adapters/smilewanted/smilewanted.go index 453c2ecb20..3a8efdf0bb 100644 --- a/adapters/smilewanted/smilewanted.go +++ b/adapters/smilewanted/smilewanted.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/smilewanted/smilewanted_test.go b/adapters/smilewanted/smilewanted_test.go index 43dc10a7cc..8e291eb505 100644 --- a/adapters/smilewanted/smilewanted_test.go +++ b/adapters/smilewanted/smilewanted_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/smoot/params_test.go b/adapters/smoot/params_test.go index 259e97308d..ef0ec2149b 100644 --- a/adapters/smoot/params_test.go +++ b/adapters/smoot/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/smoot/smoot.go b/adapters/smoot/smoot.go index 9a0df2b4a6..e23c2de602 100644 --- a/adapters/smoot/smoot.go +++ b/adapters/smoot/smoot.go @@ -6,10 +6,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/smoot/smoot_test.go b/adapters/smoot/smoot_test.go index 7e4d67fd0e..46c6586241 100644 --- a/adapters/smoot/smoot_test.go +++ b/adapters/smoot/smoot_test.go @@ -3,9 +3,9 @@ package smoot import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/smrtconnect/smrtconnect.go b/adapters/smrtconnect/smrtconnect.go index b462b460f0..4ecde49cea 100644 --- a/adapters/smrtconnect/smrtconnect.go +++ b/adapters/smrtconnect/smrtconnect.go @@ -6,12 +6,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/smrtconnect/smrtconnect_test.go b/adapters/smrtconnect/smrtconnect_test.go index f715f81411..2b020c1e3a 100644 --- a/adapters/smrtconnect/smrtconnect_test.go +++ b/adapters/smrtconnect/smrtconnect_test.go @@ -3,9 +3,9 @@ package smrtconnect import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/sonobi/params_test.go b/adapters/sonobi/params_test.go index eae150661f..7ffff8ffdd 100644 --- a/adapters/sonobi/params_test.go +++ b/adapters/sonobi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/sonobi.json diff --git a/adapters/sonobi/sonobi.go b/adapters/sonobi/sonobi.go index b4adb57e17..cf00595c6b 100644 --- a/adapters/sonobi/sonobi.go +++ b/adapters/sonobi/sonobi.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // SonobiAdapter - Sonobi SonobiAdapter definition diff --git a/adapters/sonobi/sonobi_test.go b/adapters/sonobi/sonobi_test.go index 35fc29b8f8..aa9f44ed7a 100644 --- a/adapters/sonobi/sonobi_test.go +++ b/adapters/sonobi/sonobi_test.go @@ -3,9 +3,9 @@ package sonobi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/sovrn/params_test.go b/adapters/sovrn/params_test.go index 873ec63a1e..021043c1c6 100644 --- a/adapters/sovrn/params_test.go +++ b/adapters/sovrn/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/sovrn/sovrn.go b/adapters/sovrn/sovrn.go index 25bbced73f..8276c07045 100644 --- a/adapters/sovrn/sovrn.go +++ b/adapters/sovrn/sovrn.go @@ -8,11 +8,11 @@ import ( "strconv" "strings" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/sovrn/sovrn_test.go b/adapters/sovrn/sovrn_test.go index 12545b3f6f..f2d61d166e 100644 --- a/adapters/sovrn/sovrn_test.go +++ b/adapters/sovrn/sovrn_test.go @@ -3,9 +3,9 @@ package sovrn import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/sovrnXsp/params_test.go b/adapters/sovrnXsp/params_test.go index 2c7270420f..91d31ec54d 100644 --- a/adapters/sovrnXsp/params_test.go +++ b/adapters/sovrnXsp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/sovrnXsp/sovrnXsp.go b/adapters/sovrnXsp/sovrnXsp.go index 2a04443233..7dc90adfd7 100644 --- a/adapters/sovrnXsp/sovrnXsp.go +++ b/adapters/sovrnXsp/sovrnXsp.go @@ -5,11 +5,11 @@ import ( "fmt" "net/http" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/sovrnXsp/sovrnXsp_test.go b/adapters/sovrnXsp/sovrnXsp_test.go index 6c7e4c546b..3a82e29a54 100644 --- a/adapters/sovrnXsp/sovrnXsp_test.go +++ b/adapters/sovrnXsp/sovrnXsp_test.go @@ -3,9 +3,9 @@ package sovrnXsp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/sparteo/params_test.go b/adapters/sparteo/params_test.go index c7b8d162de..209093d1ef 100644 --- a/adapters/sparteo/params_test.go +++ b/adapters/sparteo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/sparteo.json diff --git a/adapters/sparteo/sparteo.go b/adapters/sparteo/sparteo.go index 0a8f0fb286..100d5acc71 100644 --- a/adapters/sparteo/sparteo.go +++ b/adapters/sparteo/sparteo.go @@ -3,33 +3,29 @@ package sparteo import ( "fmt" "net/http" - "net/url" - "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { - endpoint string + endpoint string + bidderName string } type extBidWrapper struct { Prebid openrtb_ext.ExtBidPrebid `json:"prebid"` } -const unknownValue = "unknown" - func Builder(bidderName openrtb_ext.BidderName, cfg config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: cfg.Endpoint, - } - return bidder, nil + return &adapter{ + endpoint: cfg.Endpoint, + bidderName: string(bidderName), + }, nil } func parseExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpSparteo, error) { @@ -51,7 +47,6 @@ func parseExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpSparteo, error) { func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { request := *req - var errs []error request.Imp = make([]openrtb2.Imp, len(req.Imp)) copy(request.Imp, req.Imp) @@ -59,53 +54,25 @@ func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.Extra if req.Site != nil { siteCopy := *req.Site request.Site = &siteCopy - if req.Site.Publisher != nil { - pubCopy := *req.Site.Publisher - request.Site.Publisher = &pubCopy - } - } - if req.App != nil { - appCopy := *req.App - request.App = &appCopy - if req.App.Publisher != nil { - pubCopy := *req.App.Publisher - request.App.Publisher = &pubCopy - } } - var siteDomain, appDomain, bundle string - if request.Site != nil { - if sd := resolveSiteDomain(request.Site); sd != nil { - siteDomain = *sd - if siteDomain == unknownValue { - errs = append(errs, &errortypes.BadInput{ - Message: "Domain not found. Missing the site.domain or the site.page field", - }) - } - } - } else if request.App != nil { - if ad := resolveAppDomain(request.App); ad != nil { - appDomain = *ad - } - if b := resolveBundle(request.App); b != nil { - bundle = *b - if bundle == unknownValue { - errs = append(errs, &errortypes.BadInput{ - Message: "Bundle not found. Missing the app.bundle field.", - }) - } - } + if req.Site != nil && req.Site.Publisher != nil { + publisherCopy := *req.Site.Publisher + request.Site.Publisher = &publisherCopy } - var networkID string + var errs []error + var siteNetworkId string + for i, imp := range request.Imp { extImpSparteo, err := parseExt(&imp) if err != nil { errs = append(errs, err) continue } - if networkID == "" && extImpSparteo.NetworkId != "" { - networkID = extImpSparteo.NetworkId + + if siteNetworkId == "" && extImpSparteo.NetworkId != "" { + siteNetworkId = extImpSparteo.NetworkId } var extMap map[string]interface{} @@ -126,10 +93,12 @@ func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.Extra sparteoMap["params"] = paramsMap } - if bidderObj, ok := extMap["bidder"].(map[string]interface{}); ok { + bidderObj, ok := extMap["bidder"].(map[string]interface{}) + if ok { delete(extMap, "bidder") - for k, v := range bidderObj { - paramsMap[k] = v + + for key, value := range bidderObj { + paramsMap[key] = value } } @@ -138,32 +107,40 @@ func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.Extra errs = append(errs, fmt.Errorf("ignoring imp id=%s, error while marshaling updated ext, err: %s", imp.ID, err)) continue } + request.Imp[i].Ext = updatedExt } - var pub *openrtb2.Publisher - var pubExt string - - if request.Site != nil { - pub = ensurePublisher(request.Site.Publisher) - request.Site.Publisher = pub - pubExt = "site.publisher.ext" - } else if request.App != nil { - pub = ensurePublisher(request.App.Publisher) - request.App.Publisher = pub - pubExt = "app.publisher.ext" - } else { - request.Site = &openrtb2.Site{} - pub = ensurePublisher(request.Site.Publisher) - request.Site.Publisher = pub - pubExt = "site.publisher.ext" - } + if request.Site != nil && request.Site.Publisher != nil && siteNetworkId != "" { + var pubExt map[string]interface{} + if request.Site.Publisher.Ext != nil { + if err := jsonutil.Unmarshal(request.Site.Publisher.Ext, &pubExt); err != nil { + pubExt = make(map[string]interface{}) + } + } else { + pubExt = make(map[string]interface{}) + } - ext, err := updatePublisherExtension(&pub.Ext, networkID, pubExt) - if err != nil { - errs = append(errs, err) - } else { - pub.Ext = ext + var paramsMap map[string]interface{} + if raw, ok := pubExt["params"]; ok { + if paramsMap, ok = raw.(map[string]interface{}); !ok { + paramsMap = make(map[string]interface{}) + } + } else { + paramsMap = make(map[string]interface{}) + } + + paramsMap["networkId"] = siteNetworkId + pubExt["params"] = paramsMap + + updatedPubExt, err := jsonutil.Marshal(pubExt) + if err != nil { + errs = append(errs, &errortypes.BadInput{ + Message: fmt.Sprintf("Error marshaling site.publisher.ext: %s", err), + }) + } else { + request.Site.Publisher.Ext = jsonutil.RawMessage(updatedPubExt) + } } body, err := jsonutil.Marshal(request) @@ -172,14 +149,9 @@ func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.Extra return nil, errs } - uri, err := a.buildEndpointURL(networkID, siteDomain, appDomain, bundle) - if err != nil { - return nil, []error{err} - } - requestData := &adapters.RequestData{ Method: http.MethodPost, - Uri: uri, + Uri: a.endpoint, Body: body, ImpIDs: openrtb_ext.GetImpIDs(request.Imp), Headers: http.Header{ @@ -190,148 +162,6 @@ func (a *adapter) MakeRequests(req *openrtb2.BidRequest, reqInfo *adapters.Extra return []*adapters.RequestData{requestData}, errs } -func normalizeHostname(host string) string { - host = strings.TrimSpace(host) - if host == "" { - return "" - } - - u, err := url.Parse(host) - if err != nil || u.Hostname() == "" { - if i := strings.Index(host, ":"); i >= 0 { - host = host[:i] - } else if i := strings.Index(host, "/"); i >= 0 { - host = host[:i] - } - } else { - host = u.Hostname() - } - - host = strings.ToLower(host) - host = strings.TrimSuffix(host, ".") - host = strings.TrimPrefix(host, "www.") - - if host == "null" { - return "" - } - return host -} - -func resolveSiteDomain(site *openrtb2.Site) *string { - if site != nil { - if d := normalizeHostname(site.Domain); d != "" { - return ptrutil.ToPtr(d) - } - if fromPage := normalizeHostname(site.Page); fromPage != "" { - return ptrutil.ToPtr(fromPage) - } - return ptrutil.ToPtr(unknownValue) - } - return nil -} - -func resolveAppDomain(app *openrtb2.App) *string { - if app != nil { - if d := normalizeHostname(app.Domain); d != "" { - return ptrutil.ToPtr(d) - } - return ptrutil.ToPtr(unknownValue) - } - return nil -} - -func resolveBundle(app *openrtb2.App) *string { - if app == nil { - return nil - } - - raw := app.Bundle - if strings.TrimSpace(raw) == "" { - return ptrutil.ToPtr(unknownValue) - } - - b := strings.TrimSpace(raw) - if strings.EqualFold(b, "null") { - return ptrutil.ToPtr(unknownValue) - } - - return ptrutil.ToPtr(b) -} - -func ensurePublisher(p *openrtb2.Publisher) *openrtb2.Publisher { - if p == nil { - p = &openrtb2.Publisher{} - } - if p.Ext == nil { - p.Ext = jsonutil.RawMessage("{}") - } - - return p -} - -func updatePublisherExtension(targetExt *jsonutil.RawMessage, networkID, fieldPath string) ([]byte, error) { - var pubExt map[string]interface{} - if err := jsonutil.Unmarshal(*targetExt, &pubExt); err != nil { - pubExt = make(map[string]interface{}) - } - - params, ok := pubExt["params"].(map[string]interface{}) - if !ok { - params = make(map[string]interface{}) - pubExt["params"] = params - } - params["networkId"] = networkID - - updated, err := jsonutil.Marshal(pubExt) - if err != nil { - return nil, &errortypes.BadInput{ - Message: fmt.Sprintf("Error marshaling %s: %s", fieldPath, err), - } - } - return updated, nil -} - -func (a *adapter) buildEndpointURL(networkId string, siteDomain string, appDomain string, bundle string) (string, error) { - parsed, err := url.Parse(a.endpoint) - if err != nil { - return "", fmt.Errorf("invalid endpoint URL %q: %w", a.endpoint, err) - } - - hasSite := siteDomain != "" - hasAppOrBundle := appDomain != "" || bundle != "" - - var b strings.Builder - - b.WriteString("network_id=") - b.WriteString(url.QueryEscape(networkId)) - - if hasSite { - v := siteDomain - if v == "" { - v = unknownValue - } - b.WriteString("&site_domain=") - b.WriteString(url.QueryEscape(v)) - } else if hasAppOrBundle { - ad := appDomain - if ad == "" { - ad = unknownValue - } - bd := bundle - if bd == "" { - bd = unknownValue - } - - b.WriteString("&app_domain=") - b.WriteString(url.QueryEscape(ad)) - b.WriteString("&bundle=") - b.WriteString(url.QueryEscape(bd)) - } - - parsed.RawQuery = b.String() - return parsed.String(), nil -} - func (a *adapter) MakeBids(req *openrtb2.BidRequest, reqData *adapters.RequestData, respData *adapters.ResponseData) (*adapters.BidderResponse, []error) { if adapters.IsResponseStatusCodeNoContent(respData) { return nil, nil diff --git a/adapters/sparteo/sparteo_test.go b/adapters/sparteo/sparteo_test.go index 8157c89815..527f98b37e 100644 --- a/adapters/sparteo/sparteo_test.go +++ b/adapters/sparteo/sparteo_test.go @@ -2,29 +2,30 @@ package sparteo import ( "encoding/json" - "errors" "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -// TestBuilder verifies that the Builder function correctly creates a bidder instance -// and that the endpoint template renders fields using the new macros. +// TestBuilder verifies that the Builder function correctly creates a bidder instance. +// It checks for errors, ensures the returned bidder is not nil, and confirms that the endpoint +// in the adapter is set according to the configuration. func TestBuilder(t *testing.T) { - cfg := config.Adapter{ - Endpoint: "https://bid-test.sparteo.com/s2s-auction", - } - bidder, err := Builder(openrtb_ext.BidderSparteo, cfg, config.Server{}) - if assert.NoError(t, err) { - assert.NotNil(t, bidder) - } + cfg := config.Adapter{Endpoint: "https://bid-test.sparteo.com/s2s-auction"} + bidder, err := Builder(openrtb_ext.BidderSparteo, cfg, config.Server{GvlID: 1028}) + + require.NoError(t, err, "Builder returned an error") + assert.NotNil(t, bidder, "Bidder is nil") + + sparteoAdapter, ok := bidder.(*adapter) + require.True(t, ok, "Expected *adapter, got %T", bidder) + + assert.Equal(t, "https://bid-test.sparteo.com/s2s-auction", sparteoAdapter.endpoint, "Endpoint is not correctly set") } // TestJsonSamples runs JSON sample tests using the shared adapterstest framework. @@ -72,716 +73,3 @@ func TestGetMediaType_NilExt(t *testing.T) { assert.Error(t, err, "Expected error for nil extension") assert.Equal(t, openrtb_ext.BidType(""), result, "Expected empty result for nil extension") } - -// TestMakeRequests_ResolvesQueryParams verifies that the adapter correctly resolves macros in the endpoint URL for Site traffic. -func TestMakeRequests_ResolvesQueryParams(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{ - Endpoint: endpoint, - }, config.Server{GvlID: 1028}) - require.NoError(t, err, "Builder returned an error") - - in := &openrtb2.BidRequest{ - ID: "req-qp-1", - Site: &openrtb2.Site{ - Domain: "dev.sparteo.com", - }, - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`), - }, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1, "Expected exactly one outgoing request") - assert.Empty(t, errs, "Unexpected adapter errors") - - expectedURI := "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=dev.sparteo.com" - assert.Equal(t, expectedURI, reqs[0].Uri) -} - -// TestMakeRequests_AppBundleMacro verifies that the adapter correctly resolves app_domain and bundle for App traffic. -func TestMakeRequests_AppBundleMacro(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-app-bundle-1", - App: &openrtb2.App{ - Domain: "dev.sparteo.com", - Bundle: "com.sparteo.app", - Publisher: &openrtb2.Publisher{ - ID: "sparteo", - }, - }, - Imp: []openrtb2.Imp{{ - ID: "imp-1", - Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`), - }}, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - assert.Empty(t, errs) - - expected := "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&app_domain=dev.sparteo.com&bundle=com.sparteo.app" - assert.Equal(t, expected, reqs[0].Uri, "endpoint should include app_domain and bundle for App traffic") -} - -// TestMakeRequests_AppBundleMissing_AppendsUnknown verifies that when app.bundle is empty or missing we send bundle=unknown (and warn). -func TestMakeRequests_AppBundleMissing_AppendsUnknown(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-app-nobundle-1", - App: &openrtb2.App{ - Domain: "dev.sparteo.com", - Publisher: &openrtb2.Publisher{ID: "sparteo"}, - }, - Imp: []openrtb2.Imp{{ - ID: "imp-1", - Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`), - }}, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Len(t, errs, 1) - - expected := "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&app_domain=dev.sparteo.com&bundle=unknown" - assert.Equal(t, expected, reqs[0].Uri, "endpoint should contain bundle=unknown when app.bundle is empty") -} - -// TestMakeRequests_SiteDomain verifies that the adapter uses site.Domain and does not include app fields for Site traffic. -func TestMakeRequests_SiteDomain(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{ - Endpoint: endpoint, - }, config.Server{GvlID: 1028}) - require.NoError(t, err, "Builder returned an error") - - in := &openrtb2.BidRequest{ - ID: "req-fallback-1", - Site: &openrtb2.Site{ - Domain: "dev.sparteo.com", - }, - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`), - }, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1, "Expected exactly one outgoing request") - assert.Empty(t, errs, "Unexpected adapter errors") - - expectedURI := "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=dev.sparteo.com" - assert.Equal(t, expectedURI, reqs[0].Uri) -} - -// TestMakeRequests_DomainPrecedence_SiteDomainWins verifies that Site wins over App when both exist. -func TestMakeRequests_DomainPrecedence_SiteDomainWins(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-domain-1", - Site: &openrtb2.Site{ - Domain: "site.sparteo.com", - Publisher: &openrtb2.Publisher{ - Domain: "site-pub.sparteo.com", - }, - }, - App: &openrtb2.App{ - Domain: "app.sparteo.com", - Publisher: &openrtb2.Publisher{ - Domain: "app-pub.should-not-be-used", - }, - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=site.sparteo.com", - reqs[0].Uri, - ) -} - -// TestMakeRequests_SitePresentWithEmptyDomain_UsesUnknownNotApp verifies that when Site exists but has no domain/page, we send site_domain=unknown and do NOT use App. -func TestMakeRequests_SitePresentWithEmptyDomain_UsesUnknownNotApp(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-domain-2", - Site: &openrtb2.Site{ - Domain: "", - Publisher: &openrtb2.Publisher{ - Domain: "dev.sparteo.com", - }, - }, - App: &openrtb2.App{ - Domain: "app.sparteo.com", - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Len(t, errs, 1) - - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=unknown", - reqs[0].Uri, - ) -} - -// TestMakeRequests_DomainPrecedence_AppDomainWhenNoSite verifies that if there is no Site, we use app.domain (and include bundle if present). -func TestMakeRequests_DomainPrecedence_AppDomainWhenNoSite(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-domain-3", - Site: nil, - App: &openrtb2.App{ - Domain: "app.sparteo.com", - Bundle: "com.sparteo.app", - Publisher: &openrtb2.Publisher{ - Domain: "app-pub.should-not-be-used", - }, - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&app_domain=app.sparteo.com&bundle=com.sparteo.app", - reqs[0].Uri, - ) -} - -// TestMakeRequests_SitePageWhenNoSiteDomainNoApp verifies that if there is Site without domain but page is present, we use site.page. -func TestMakeRequests_SitePageWhenNoSiteDomainNoApp(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-domain-page", - Site: &openrtb2.Site{ - Domain: "", - Page: "https://www.dev.sparteo.com:3000/some/path?x=1", - }, - App: nil, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=dev.sparteo.com", - reqs[0].Uri, - ) -} - -// TestNormalizeHostname_PortAndPathAndURL verifies normalizeHostname behavior. -func TestNormalizeHostname_PortAndPathAndURL(t *testing.T) { - base := "dev.sparteo.com" - - tests := []struct { - name string - in string - out string - }{ - // Bare host + port - {"host_with_port", "www." + base + ":8080", base}, - {"host_upper_with_tls_port", "DEV.SPARTEO.COM:443", base}, - {"host_trailing_dot_with_port", base + ".:8443", base}, - - // Bare host + path - {"host_with_path", base + "/some/path?x=1", base}, - {"www_host_with_path", "www." + base + "/p", base}, - - // Bare host + port + path - {"host_with_port_and_path", base + ":8080/p?q=1", base}, - {"www_host_with_port_and_path", "www." + base + ":3000/some/path", base}, - - // Absolute URLs - {"https_url", "https://www." + base + "/x", base}, - {"http_url_with_port", "http://WWW." + base + ":8080/abc", base}, - - // Scheme-relative URL - {"scheme_relative", "//www." + base + "/x", base}, - - // Odd spacing around URLs/hosts - {"spaced_https_url", " https://www." + base + ":3000/x ", base}, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - got := normalizeHostname(tc.in) - assert.Equal(t, tc.out, got) - }) - } -} - -// --- Helper for reading publisher.ext.params.networkId in output JSON --- -func readNetworkIDFromPublisherExt(t *testing.T, ext json.RawMessage) (string, bool) { - if len(ext) == 0 { - return "", false - } - var m map[string]interface{} - require.NoError(t, json.Unmarshal(ext, &m)) - params, _ := m["params"].(map[string]interface{}) - if params == nil { - return "", false - } - val, _ := params["networkId"].(string) - if val == "" { - return "", false - } - return val, true -} - -// When site exists but site.publisher is nil, the adapter must create publisher and upsert networkId into site.publisher.ext -func TestMakeRequests_UpdatePublisherExtension_CreatesSitePublisherIfMissing(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-upsert-site", - Site: &openrtb2.Site{ - Domain: "site.sparteo.com", - Publisher: nil, - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - - require.NotNil(t, out.Site) - require.NotNil(t, out.Site.Publisher, "publisher should be created when missing") - val, ok := readNetworkIDFromPublisherExt(t, out.Site.Publisher.Ext) - require.True(t, ok, "site.publisher.ext.params.networkId should exist") - assert.Equal(t, "networkID", val) -} - -// When no site is present, create app.publisher if missing and upsert networkId into app.publisher.ext -func TestMakeRequests_UpdatePublisherExtension_CreatesAppPublisherIfMissingWhenNoSite(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-upsert-app", - Site: nil, - App: &openrtb2.App{ - Domain: "app.sparteo.com", - Bundle: "com.sparteo.app", - Publisher: nil, - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - - require.Nil(t, out.Site) - require.NotNil(t, out.App) - require.NotNil(t, out.App.Publisher, "app.publisher should be created when missing") - val, ok := readNetworkIDFromPublisherExt(t, out.App.Publisher.Ext) - require.True(t, ok, "app.publisher.ext.params.networkId should exist") - assert.Equal(t, "networkID", val) -} - -// TestMakeRequests_UpdatePublisherExtension_PrefersSiteOverApp verifies that we prefer Site when both Site and App exist; only Site should receive the networkId -func TestMakeRequests_UpdatePublisherExtension_PrefersSiteOverApp(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-upsert-prefer-site", - Site: &openrtb2.Site{ - Domain: "site.sparteo.com", - Publisher: &openrtb2.Publisher{}, - }, - App: &openrtb2.App{ - Domain: "app.sparteo.com", - Publisher: &openrtb2.Publisher{}, - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - - require.NotNil(t, out.Site) - require.NotNil(t, out.Site.Publisher) - siteVal, siteOk := readNetworkIDFromPublisherExt(t, out.Site.Publisher.Ext) - require.True(t, siteOk) - assert.Equal(t, "networkID", siteVal) - - if out.App != nil && out.App.Publisher != nil { - _, appOk := readNetworkIDFromPublisherExt(t, out.App.Publisher.Ext) - assert.False(t, appOk, "app.publisher.ext should not contain networkId when site exists") - } -} - -// TestMakeRequests_NoSiteNoApp_NoDomainParam_NoWarning verifies that with neither Site nor App we don't send domain params and produce no warnings. -func TestMakeRequests_NoSiteNoApp_NoDomainParam_NoWarning(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-domain-missing", - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - - require.Len(t, reqs, 1) - require.Len(t, errs, 0) - - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID", - reqs[0].Uri, - ) -} - -// TestMakeRequests_SitePageLiteralNull_TreatedAsMissingDomain verifies that a literal "null" in site.page is treated as an unknown site domain. -func TestMakeRequests_SitePageLiteralNull_TreatedAsMissingDomain(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s-auction" - - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - ID: "req-page-null", - Site: &openrtb2.Site{ - Domain: "", - Page: "null", - }, - Imp: []openrtb2.Imp{ - {ID: "imp-1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}, - }, - } - - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - - require.Len(t, reqs, 1) - require.Len(t, errs, 1) - assert.Equal(t, - "https://bid-test.sparteo.com/s2s-auction?network_id=networkID&site_domain=unknown", - reqs[0].Uri, - ) - - var badInput *errortypes.BadInput - require.True(t, errors.As(errs[0], &badInput)) - assert.Contains(t, badInput.Error(), "Domain not found") -} - -// TestMakeRequests_AppBundle_NormalizationVariants ensures blank/whitespace/"null" bundles normalize to "unknown" with a single warning. -func TestMakeRequests_AppBundle_NormalizationVariants(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - cases := []struct { - name string - bundle string - }{ - {"empty", ""}, - {"spaces", " "}, - {"lower_null", "null"}, - {"weird_case", "NuLl"}, - } - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - in := &openrtb2.BidRequest{ - App: &openrtb2.App{Domain: "dev.sparteo.com", Bundle: tc.bundle, Publisher: &openrtb2.Publisher{}}, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":"n"}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Len(t, errs, 1) - assert.Contains(t, reqs[0].Uri, "app_domain=dev.sparteo.com") - assert.Contains(t, reqs[0].Uri, "bundle=unknown") - var badInput *errortypes.BadInput - require.True(t, errors.As(errs[0], &badInput)) - assert.Contains(t, badInput.Error(), "Bundle not found") - }) - } -} - -// TestMakeRequests_SitePresent_IgnoresAppFields ensures when Site is present, only site_domain is sent and app fields are ignored. -func TestMakeRequests_SitePresent_IgnoresAppFields(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "site.sparteo.com"}, - App: &openrtb2.App{Domain: "app.sparteo.com", Bundle: "com.app"}, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":"N"}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - assert.Equal(t, "https://bid-test.sparteo.com/s2s?network_id=N&site_domain=site.sparteo.com", reqs[0].Uri) -} - -// TestMakeRequests_SiteWithPageFallback_IgnoresApp ensures Site.Page is used when Site.Domain is empty and App is ignored when Site exists. -func TestMakeRequests_SiteWithPageFallback_IgnoresApp(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "", Page: "https://www.example.com:8080/p"}, - App: &openrtb2.App{Domain: "app.sparteo.com", Bundle: "com.app"}, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - assert.Equal(t, "https://bid-test.sparteo.com/s2s?network_id=networkID&site_domain=example.com", reqs[0].Uri) -} - -// TestMakeRequests_AppMissingBundle_WarnsAndUnknown ensures App with missing bundle yields bundle=unknown and one bundle warning. -func TestMakeRequests_AppMissingBundle_WarnsAndUnknown(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - App: &openrtb2.App{Domain: "dev.sparteo.com", Bundle: "", Publisher: &openrtb2.Publisher{}}, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":"networkID"}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Len(t, errs, 1) - assert.Equal(t, "https://bid-test.sparteo.com/s2s?network_id=networkID&app_domain=dev.sparteo.com&bundle=unknown", reqs[0].Uri) - var badInput *errortypes.BadInput - require.True(t, errors.As(errs[0], &badInput)) - assert.Contains(t, badInput.Error(), "Bundle not found") -} - -// TestMakeRequests_ExtRewrite_MovesBidderIntoSparteoParams verifies bidder object is moved under sparteo.params and bidder is removed. -func TestMakeRequests_ExtRewrite_MovesBidderIntoSparteoParams(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "dev.sparteo.com"}, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"a":1}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - var ext map[string]any - require.NoError(t, json.Unmarshal(out.Imp[0].Ext, &ext)) - _, hasBidder := ext["bidder"] - assert.False(t, hasBidder) - sparteoNode, ok := ext["sparteo"].(map[string]any) - require.True(t, ok) - params, ok := sparteoNode["params"].(map[string]any) - require.True(t, ok) - assert.Equal(t, float64(1), params["a"]) -} - -// TestMakeRequests_ExtRewrite_PreservesExistingSparteoParams verifies existing sparteo.params keys are preserved when merging bidder fields. -func TestMakeRequests_ExtRewrite_PreservesExistingSparteoParams(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "dev.sparteo.com"}, - Imp: []openrtb2.Imp{{ - ID: "i1", - Ext: json.RawMessage(`{"sparteo":{"params":{"keep":true}},"bidder":{"add":42}}`), - }}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - var ext map[string]any - require.NoError(t, json.Unmarshal(out.Imp[0].Ext, &ext)) - sparteoNode, ok := ext["sparteo"].(map[string]any) - require.True(t, ok) - params, ok := sparteoNode["params"].(map[string]any) - require.True(t, ok) - assert.Equal(t, true, params["keep"]) - assert.Equal(t, float64(42), params["add"]) -} - -// TestMakeRequests_NetworkId_FirstNonEmptyWins verifies the first non-empty networkId across imps is used. -func TestMakeRequests_NetworkId_FirstNonEmptyWins(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "dev.sparteo.com"}, - Imp: []openrtb2.Imp{ - {ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":""}}`)}, - {ID: "i2", Ext: json.RawMessage(`{"bidder":{"networkId":"N2"}}`)}, - {ID: "i3", Ext: json.RawMessage(`{"bidder":{"networkId":"N3"}}`)}, - }, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - assert.Equal(t, "https://bid-test.sparteo.com/s2s?network_id=N2&site_domain=dev.sparteo.com", reqs[0].Uri) -} - -// TestMakeRequests_AllImpsBadExt_AggregatesErrors verifies a request is still built when all imps have bad ext and errors are aggregated. -func TestMakeRequests_AllImpsBadExt_AggregatesErrors(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Domain: "dev.sparteo.com"}, - Imp: []openrtb2.Imp{ - {ID: "i1", Ext: json.RawMessage(`not-json`)}, - {ID: "i2", Ext: json.RawMessage(`{"bidder":}`)}, - }, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Len(t, errs, 2) - assert.Equal(t, "https://bid-test.sparteo.com/s2s?network_id=&site_domain=dev.sparteo.com", reqs[0].Uri) -} - -// TestMakeRequests_UpdatePublisherExtension_PreservesOtherKeys verifies publisher.ext keeps existing keys while adding params.networkId. -func TestMakeRequests_UpdatePublisherExtension_PreservesOtherKeys(t *testing.T) { - endpoint := "https://bid-test.sparteo.com/s2s" - bidder, err := Builder(openrtb_ext.BidderSparteo, config.Adapter{Endpoint: endpoint}, config.Server{GvlID: 1028}) - require.NoError(t, err) - - startExt := json.RawMessage(`{"params":{"foo":"bar"},"other":123}`) - in := &openrtb2.BidRequest{ - Site: &openrtb2.Site{ - Domain: "dev.sparteo.com", - Publisher: &openrtb2.Publisher{Ext: startExt}, - }, - Imp: []openrtb2.Imp{{ID: "i1", Ext: json.RawMessage(`{"bidder":{"networkId":"N"}}`)}}, - } - reqs, errs := bidder.MakeRequests(in, &adapters.ExtraRequestInfo{}) - require.Len(t, reqs, 1) - require.Empty(t, errs) - - var out openrtb2.BidRequest - require.NoError(t, json.Unmarshal(reqs[0].Body, &out)) - var m map[string]any - require.NoError(t, json.Unmarshal(out.Site.Publisher.Ext, &m)) - params, _ := m["params"].(map[string]any) - require.NotNil(t, params) - assert.Equal(t, "bar", params["foo"]) - assert.Equal(t, float64(123), m["other"]) - assert.Equal(t, "N", params["networkId"]) -} - -// TestMakeBids_SkipsAudioBids verifies bids with prebid.type=audio are skipped with no returned errors. -func TestMakeBids_SkipsAudioBids(t *testing.T) { - a := &adapter{} - body := []byte(`{"cur":"USD","seatbid":[{"bid":[{"impid":"1","price":1,"crid":"c","ext":{"prebid":{"type":"audio"}}}]}]}`) - br, errs := a.MakeBids(&openrtb2.BidRequest{}, &adapters.RequestData{}, &adapters.ResponseData{StatusCode: 200, Body: body}) - require.NoError(t, nil) - require.Nil(t, errs) - require.NotNil(t, br) - assert.Equal(t, 0, len(br.Bids)) -} - -// TestMakeBids_SetsMTypeAndCurrency verifies mtype is set correctly for banner/video/native and currency is propagated. -func TestMakeBids_SetsMTypeAndCurrency(t *testing.T) { - a := &adapter{} - body := []byte(`{ - "cur":"EUR", - "seatbid":[{"bid":[ - {"impid":"b1","price":1,"crid":"c1","ext":{"prebid":{"type":"banner"}}}, - {"impid":"v1","price":2,"crid":"c2","ext":{"prebid":{"type":"video"}}}, - {"impid":"n1","price":3,"crid":"c3","ext":{"prebid":{"type":"native"}}} - ]}] - }`) - br, errs := a.MakeBids(&openrtb2.BidRequest{}, &adapters.RequestData{}, &adapters.ResponseData{StatusCode: 200, Body: body}) - require.Nil(t, errs) - require.NotNil(t, br) - require.Equal(t, "EUR", br.Currency) - require.Equal(t, 3, len(br.Bids)) - assert.Equal(t, openrtb2.MarkupBanner, br.Bids[0].Bid.MType) - assert.Equal(t, openrtb2.MarkupVideo, br.Bids[1].Bid.MType) - assert.Equal(t, openrtb2.MarkupNative, br.Bids[2].Bid.MType) -} diff --git a/adapters/sparteo/sparteotest/exemplary/banner-app.json b/adapters/sparteo/sparteotest/exemplary/banner-app.json deleted file mode 100644 index 1e88391f3e..0000000000 --- a/adapters/sparteo/sparteotest/exemplary/banner-app.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "imp": [ - { - "id": "div-banner-id", - "banner": { - "topframe": 1, - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "networkId": "networkId" - } - } - } - ], - "app": { - "domain": "dev.sparteo.com", - "bundle": "com.sparteo.app", - "publisher": { - "domain": "dev.sparteo.com", - "id": "sparteo" - } - }, - "device": { - "w": 1920, - "h": 1080, - "dnt": 0, - "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36", - "language": "fr", - "ext": { - "vpw": 1056, - "vph": 934 - }, - "sua": { - "source": 1, - "platform": { - "brand": "macOS" - }, - "browsers": [ - { - "brand": "Chromium", - "version": [ - "134" - ] - }, - { - "brand": "Not:A-Brand", - "version": [ - "24" - ] - }, - { - "brand": "Google Chrome", - "version": [ - "134" - ] - } - ], - "mobile": 0 - } - }, - "ext": { - "prebid": { - "server": { - "datacenter": "", - "externalurl": "", - "gvlid": 1028 - } - }, - "tmaxmax": 5000 - }, - "tmax": 5000 - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&app_domain=dev.sparteo.com&bundle=com.sparteo.app", - "body": { - "id": "request-id", - "imp": [ - { - "id": "div-banner-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ], - "topframe": 1 - }, - "ext": { - "sparteo": { - "params": { - "networkId": "networkId" - } - } - } - } - ], - "app": { - "domain": "dev.sparteo.com", - "bundle": "com.sparteo.app", - "publisher": { - "domain": "dev.sparteo.com", - "id": "sparteo", - "ext": { - "params": { - "networkId": "networkId" - } - } - } - }, - "device": { - "dnt": 0, - "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36", - "sua": { - "browsers": [ - { - "brand": "Chromium", - "version": [ - "134" - ] - }, - { - "brand": "Not:A-Brand", - "version": [ - "24" - ] - }, - { - "brand": "Google Chrome", - "version": [ - "134" - ] - } - ], - "platform": { - "brand": "macOS" - }, - "mobile": 0, - "source": 1 - }, - "h": 1080, - "w": 1920, - "language": "fr", - "ext": { - "vpw": 1056, - "vph": 934 - } - }, - "tmax": 5000, - "ext": { - "prebid": { - "server": { - "externalurl": "", - "gvlid": 1028, - "datacenter": "" - } - }, - "tmaxmax": 5000 - } - }, - "impIDs": [ - "div-banner-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "request-id", - "seatbid": [ - { - "seat": "sparteo", - "bid": [ - { - "id": "137dd2bd-3015-407a-ab50-384aa2c706d7", - "impid": "div-banner-id", - "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZCV7JmMwYXG9ZW1uY70tGTMBMRP9MDUyQmBeZ7UjLiZzZXG7ZXFtrC1td7VyrlVyJWGoZCQobldjLiZzZXG7ZXGUb8MjdmZjdiGoZCQoblr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F3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", - "adm": "", - "adomain": [ - "testpage-ad" - ], - "crid": "banner_creative_test", - "w": 300, - "h": 250, - "ext": { - "ft": "passthrough", - "prebid": { - "type": "banner" - } - } - } - ] - - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "id": "request-id", - "bids": [ - { - "bid": { - "id": "137dd2bd-3015-407a-ab50-384aa2c706d7", - "impid": "div-banner-id", - "mtype": 1, - "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZCV7JmMwYXG9ZW1uY70tGTMBMRP9MDUyQmBeZ7UjLiZzZXG7ZXFtrC1td7VyrlVyJWGoZCQobldjLiZzZXG7ZXGUb8MjdmZjdiGoZCQoblrDYW4uZXFfJDGfdmFfNfFfJDGuhWPfNfGjYlY4ZTi6ZD8iMCMeJTQeLRKtNWL9YS8iLzK8LTPwMzL7ZRYfJDGwhWPfNfGjYlY4ZTi6ZD8iMCMeJTQeLRKtNWL9YS8iLzK8LTPwMzL7ZRYfJDGib6LfNfGtYWMOUyFsFlQfFgnfrW4qbl06bfFsFmVib75fNfG8bltub6ruFfwfrWQ9FgnfZCVzh6QvdDFsFlAfrDF3WyGzd6HtY70tYl1tbW0uZXj9hXojdj0eXzUwFfwfd6MwJWMvbWGvJXB8YlZ8rEVyZV0jbXB9kV18LDFsFlrsb7GebDFsFmBfdy8fhWPtdlA9ZV0OPV1xLRHwFfwfdlV7ZW48ZV0BXzKwLDFsFlGoZD8vdEQaT6B9hW8KXzP8Fj9sFmByZWQzFgo2Flrsb7GebKxjrlVPdlVPdlViFgnxJDGobXBLZXZjbAByZVByZWPfNgKsFlMyZWAadCVyX7jtdDF3LS58MzYsFlGobCxeYlxjX6Bjdj0obXHfNgKsFlVzrCjtYXQjZA0yZXZjbmVjFgnwJgF5NSwfrljvrXMskV0yZXZjbmVadlA9hW1fNgKsFmrobj0yYXQjFgnwJgHyMSwfbWAyZ7juX6ByZWPfNgHuLRH8JDGfhWQadEGoY7UfNgHuLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", - "adm": "", - "adomain": [ - "testpage-ad" - ], - "crid": "banner_creative_test", - "w": 300, - "h": 250, - "ext": { - "ft": "passthrough", - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ], - "cur": "EUR" - } - ] -} \ No newline at end of file diff --git a/adapters/sparteo/sparteotest/exemplary/banner.json b/adapters/sparteo/sparteotest/exemplary/banner.json index f68f57b633..78fa09afc7 100644 --- a/adapters/sparteo/sparteotest/exemplary/banner.json +++ b/adapters/sparteo/sparteotest/exemplary/banner.json @@ -21,13 +21,13 @@ } ], "site": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "publisher": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "id": "sparteo" }, - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/" + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/" }, "device": { "w": 1920, @@ -82,7 +82,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -107,12 +107,12 @@ } ], "site": { - "domain": "dev.sparteo.com", - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/", + "domain": "dev.sparteo.com:4444", + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/", "publisher": { "id": "sparteo", - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "ext": { "params": { "networkId": "networkId" @@ -186,7 +186,7 @@ "id": "137dd2bd-3015-407a-ab50-384aa2c706d7", "impid": "div-banner-id", "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZ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j9sFmByZWQzFgo2Flrsb7GebKxjrlVPdlVPdlViFgnxJDGobXBLZXZjbAByZVByZWPfNgKsFlMyZWAadCVyX7jtdDF3LS58MzYsFlGobCxeYlxjX6Bjdj0obXHfNgKsFlVzrCjtYXQjZA0yZXZjbmVjFgnwJgF5NSwfrljvrXMskV0yZXZjbmVadlA9hW1fNgKsFmrobj0yYXQjFgnwJgHyMSwfbWAyZ7juX6ByZWPfNgHuLRH8JDGfhWQadEGoY7UfNgHuLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", "adm": "", "adomain": [ "testpage-ad" @@ -220,7 +220,7 @@ "impid": "div-banner-id", "mtype": 1, "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49Jz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WPtdlA9ZV0OPV1xLRHwFfwfdlV7ZW48ZV0BXzKwLDFsFlGoZD8vdEQaT6B9hW8KXzP8Fj9sFmByZWQzFgo2Flrsb7GebKxjrlVPdlVPdlViFgnxJDGobXBLZXZjbAByZVByZWPfNgKsFlMyZWAadCVyX7jtdDF3LS58MzYsFlGobCxeYlxjX6Bjdj0obXHfNgKsFlVzrCjtYXQjZA0yZXZjbmVjFgnwJgF5NSwfrljvrXMskV0yZXZjbmVadlA9hW1fNgKsFmrobj0yYXQjFgnwJgHyMSwfbWAyZ7juX6ByZWPfNgHuLRH8JDGfhWQadEGoY7UfNgHuLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", "adm": "", "adomain": [ "testpage-ad" diff --git a/adapters/sparteo/sparteotest/exemplary/native.json b/adapters/sparteo/sparteotest/exemplary/native.json index bcbbf8b6ab..2f5b9bcc34 100644 --- a/adapters/sparteo/sparteotest/exemplary/native.json +++ b/adapters/sparteo/sparteotest/exemplary/native.json @@ -15,13 +15,13 @@ } ], "site": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "publisher": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "id": "sparteo" }, - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/" + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/" }, "device": { "w": 1920, @@ -76,7 +76,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -95,12 +95,12 @@ } ], "site": { - "domain": "dev.sparteo.com", - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/", + "domain": "dev.sparteo.com:4444", + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/", "publisher": { "id": "sparteo", - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "ext": { "params": { "networkId": "networkId" @@ -174,7 +174,7 @@ "id": "137dd2bd-3015-407a-ab50-384aa2c706d7", "impid": "div-native-id", "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZCV7JmMwYXG9ZW1uY70tGTMBMRP9MDUyQmBeZ7UjLiZzZXG7ZXFtrC1td7VyrlVyJWGoZCQobldjLiZzZXG7ZXGUb8MjdmZjdiGoZCQoblrDYW4uZXFfJDGfdmFfNfFfJDGuhWPfNfGjYlY4ZTi6ZD8iMCM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ljvrXMskV0yZXZjbmVadlA9hW1fNgKsFmrobj0yYXQjFgnwJgHyMSwfbWAyZ7juX6ByZWPfNgHuLRH8JDGfhWQadEGoY7UfNgHuLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", "adm": "", "adomain": [ "testpage-ad" @@ -207,7 +207,7 @@ "impid": "div-native-id", "mtype": 4, "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZCV7JmMwYXG9ZW1uY70tGTMBMRP9MDUyQmBeZ7UjLiZzZXG7ZXFtrC1td7VyrlVyJWGoZCQobldjLiZzZXG7ZX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S58MzYsFlGobCxeYlxjX6Bjdj0obXHfNgKsFlVzrCjtYXQjZA0yZXZjbmVjFgnwJgF5NSwfrljvrXMskV0yZXZjbmVadlA9hW1fNgKsFmrobj0yYXQjFgnwJgHyMSwfbWAyZ7juX6ByZWPfNgHuLRH8JDGfhWQadEGoY7UfNgHuLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", "adm": "", "adomain": [ "testpage-ad" diff --git a/adapters/sparteo/sparteotest/exemplary/video.json b/adapters/sparteo/sparteotest/exemplary/video.json index 12a8c578be..f69d646309 100644 --- a/adapters/sparteo/sparteotest/exemplary/video.json +++ b/adapters/sparteo/sparteotest/exemplary/video.json @@ -43,13 +43,13 @@ } ], "site": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "publisher": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "id": "sparteo" }, - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/" + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/" }, "device": { "w": 1920, @@ -104,7 +104,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -146,12 +146,12 @@ } ], "site": { - "domain": "dev.sparteo.com", - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/", + "domain": "dev.sparteo.com:4444", + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/", "publisher": { "id": "sparteo", - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "ext": { "params": { "networkId": "networkId" @@ -225,7 +225,7 @@ "id": "137dd2bd-3015-407a-ab50-384aa2c706d7", "impid": "div-video-id", "price": 0.10797, - "nurl": "https://dev.sparteo.com/event/sparteo/0a98964d-1cf9-4802-93e9-c59c18f497fa?d=kyGjrlVurDF3FlG8d7juZXMzNlGoZA06b75fJDG9dyF3LTd9LzPxLRHzMzFzMfwfdlifNfF9L7AlLzreYS96MTH9JTP7NRdtNRU4LS8lYTPwZTMlLRPyYTUfJDGjdEPfNfFvdzGzJWA8Y6Qob75fJDG8YSF3FirvJWe9rEHtY7xoZW49JzKuLSFsFmBiFgnfZCV7JmMwYXG9ZW1uY70tNgP9MRPfJDGwrSF3Fle9rEBzGTMBGTGCGTGCZCV7JmMwYXG9ZW1uY70tGTMBMRP9MDUyQmBeZ7UjLiZzZXG7ZXFtrC1td7VyrlVyJWGoZCQobldjLiZzZXG7ZXGUb8MjdmZjdiGoZCQoblrDYW4uZXFfJDGfdmFfNfFfJDGuhWPfNfGjYlY4ZTi6ZD8iMCMeJTQeLRKtNWL9YS8iLzK8LTPwMzL7ZRYfJDGwhWPfNfGjYlY4ZTi6ZD8iMCMeJTQeLRKtNWL9YS8iLzK8LTPwMzL7ZRYfJDGib6LfNfGtYWMOUyFsFlQfFgnfrW4qbl06bfFsFmVib75fNfG8bltub6ruFfwfrWQ9Fgn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uLX9sFlGohSF3FlQorf8fYW4uZXFfJDGwbELfNjsfLzHwkRF8LDGrJDGwbXPfNjsfYlAublVyFj9sFlVsdyF3WyFzLRB5LgUwFfwfLzHwkRKwLDFsFgLwLEcxLgUfJDFzLRB5LTUwFj9sFlVtrDF3WyGfYW4uZXFfXSwfYlQzFgobFlAikW08bCjqZSFsFlAwdC4jkEVzFfwfZ6GoZDFsFl0lrC8jZCjeFfwfb74jrCAmFfwfb6BjbmcfJDGyhXMjFfwfdmVfhWMvbfFsFmMtYXG9YWQzZXG7ZXFfJDGzbWjsZXrebmQjZDFsFmVudmVskSGrJDGtYfF3ZlAsd7UsFlZ9dyF3WyGPYXMzVCeyb6VmhKZvdl8erDGrJDGydyF3LD55MSwfYlifNfFxLzriZRGfZD9zLRK8JTPwM7KtYWF8LD9zNRQeYTGgMzH7ZRdfJDGfdDF3LD5xJDGlrDF3FjBed6MUhEGvrWrnQl0ybWA9Fm9=", "adm": "", "adomain": [ "testpage-ad" diff --git a/adapters/sparteo/sparteotest/supplemental/filter-empty-seat-bids.json b/adapters/sparteo/sparteotest/supplemental/filter-empty-seat-bids.json index ba66d5820b..ded36e22d4 100644 --- a/adapters/sparteo/sparteotest/supplemental/filter-empty-seat-bids.json +++ b/adapters/sparteo/sparteotest/supplemental/filter-empty-seat-bids.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "test-request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sparteo/sparteotest/supplemental/filter-invalid-bid-type.json b/adapters/sparteo/sparteotest/supplemental/filter-invalid-bid-type.json index ab31a8e67e..851fcf1860 100644 --- a/adapters/sparteo/sparteotest/supplemental/filter-invalid-bid-type.json +++ b/adapters/sparteo/sparteotest/supplemental/filter-invalid-bid-type.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "test-request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": ["div-banner-id"] }, diff --git a/adapters/sparteo/sparteotest/supplemental/filter-no-seat-bids.json b/adapters/sparteo/sparteotest/supplemental/filter-no-seat-bids.json index 0660aee07c..21e3f35629 100644 --- a/adapters/sparteo/sparteotest/supplemental/filter-no-seat-bids.json +++ b/adapters/sparteo/sparteotest/supplemental/filter-no-seat-bids.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "test-request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sparteo/sparteotest/supplemental/invalid-bidder-ext.json b/adapters/sparteo/sparteotest/supplemental/invalid-bidder-ext.json new file mode 100644 index 0000000000..61d1d61002 --- /dev/null +++ b/adapters/sparteo/sparteotest/supplemental/invalid-bidder-ext.json @@ -0,0 +1,61 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "div-banner-id", + "banner": { + "topframe": 1, + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": "not an object" + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://bid-test.sparteo.com/s2s-auction", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "div-banner-id", + "banner": { + "topframe": 1, + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": "not an object" + } + } + ] + }, + "ImpIDs": ["div-banner-id"] + }} + ], + "expectedMakeRequestsErrors": [ + { + "value": "^ignoring imp id=div-banner-id, error while decoding impExt", + "comparison": "regex" + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 0. Run with request.debug = 1 for more info", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/sparteo/sparteotest/supplemental/invalid-json-response.json b/adapters/sparteo/sparteotest/supplemental/invalid-json-response.json index adb997a503..12ad55425b 100644 --- a/adapters/sparteo/sparteotest/supplemental/invalid-json-response.json +++ b/adapters/sparteo/sparteotest/supplemental/invalid-json-response.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "test-request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sparteo/sparteotest/supplemental/invalid-publisher-ext.json b/adapters/sparteo/sparteotest/supplemental/invalid-publisher-ext.json index 73a196772a..5d2bb2148c 100644 --- a/adapters/sparteo/sparteotest/supplemental/invalid-publisher-ext.json +++ b/adapters/sparteo/sparteotest/supplemental/invalid-publisher-ext.json @@ -21,12 +21,12 @@ } ], "site": { - "domain": "dev.sparteo.com", - "page": "https://dev.sparteo.com/page/test/", - "ref": "https://dev.sparteo.com/page/test/", + "domain": "dev.sparteo.com:4444", + "page": "https://dev.sparteo.com:4444/page/test/", + "ref": "https://dev.sparteo.com:4444/page/test/", "publisher": { "id": "sparteo", - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "ext": "not an object" } } @@ -34,7 +34,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "test-request-id", "imp": [ @@ -59,10 +59,10 @@ } ], "site": { - "domain": "dev.sparteo.com", - "page": "https://dev.sparteo.com/page/test/", + "domain": "dev.sparteo.com:4444", + "page": "https://dev.sparteo.com:4444/page/test/", "publisher": { - "domain": "dev.sparteo.com", + "domain": "dev.sparteo.com:4444", "ext": { "params": { "networkId": "networkId" @@ -70,7 +70,7 @@ }, "id": "sparteo" }, - "ref": "https://dev.sparteo.com/page/test/" + "ref": "https://dev.sparteo.com:4444/page/test/" } }, "impIDs": [ diff --git a/adapters/sparteo/sparteotest/supplemental/status_204.json b/adapters/sparteo/sparteotest/supplemental/status_204.json index 7358403bf6..171eec08ed 100644 --- a/adapters/sparteo/sparteotest/supplemental/status_204.json +++ b/adapters/sparteo/sparteotest/supplemental/status_204.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sparteo/sparteotest/supplemental/status_400.json b/adapters/sparteo/sparteotest/supplemental/status_400.json index d97b7f083c..26f24b68be 100644 --- a/adapters/sparteo/sparteotest/supplemental/status_400.json +++ b/adapters/sparteo/sparteotest/supplemental/status_400.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sparteo/sparteotest/supplemental/status_500.json b/adapters/sparteo/sparteotest/supplemental/status_500.json index bee2affa48..ec3c68e56b 100644 --- a/adapters/sparteo/sparteotest/supplemental/status_500.json +++ b/adapters/sparteo/sparteotest/supplemental/status_500.json @@ -19,15 +19,12 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com" - } + ] }, "httpCalls": [ { "expectedRequest": { - "uri": "https://bid-test.sparteo.com/s2s-auction?network_id=networkId&site_domain=dev.sparteo.com", + "uri": "https://bid-test.sparteo.com/s2s-auction", "body": { "id": "request-id", "imp": [ @@ -50,17 +47,7 @@ } } } - ], - "site": { - "domain": "dev.sparteo.com", - "publisher": { - "ext": { - "params": { - "networkId": "networkId" - } - } - } - } + ] }, "impIDs": [ "div-banner-id" diff --git a/adapters/sspBC/sspbc.go b/adapters/sspBC/sspbc.go index 36fce93ffc..4a12ddaa51 100644 --- a/adapters/sspBC/sspbc.go +++ b/adapters/sspBC/sspbc.go @@ -7,12 +7,12 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/sspBC/sspbc_test.go b/adapters/sspBC/sspbc_test.go index a2a61f74c3..f2fdc7dae6 100644 --- a/adapters/sspBC/sspbc_test.go +++ b/adapters/sspBC/sspbc_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/stackadapt/params_test.go b/adapters/stackadapt/params_test.go deleted file mode 100644 index 25cac9a467..0000000000 --- a/adapters/stackadapt/params_test.go +++ /dev/null @@ -1,60 +0,0 @@ -package stackadapt - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderStackAdapt, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected stackadapt params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderStackAdapt, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{"publisherId":"pub-123","supplyId":"ssp-1"}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","placementId":"placement-456"}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","banner":{"expdir":[1,3]}}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","bidfloor":1.5}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","placementId":"pl-1","banner":{"expdir":[1,2,3]},"bidfloor":0.5}`, -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `[]`, - `{}`, - `{"placementId":"placement-456"}`, - `{"publisherId":"pub-123"}`, - `{"supplyId":"ssp-1"}`, - `{"publisherId":""}`, - `{"publisherId":"pub-123","supplyId":""}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","bidfloor":-1}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","banner":"invalid"}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","bidfloor":"high"}`, - `{"publisherId":"pub-123","supplyId":"ssp-1","banner":{"expdir":["a"]}}`, -} diff --git a/adapters/stackadapt/stackadapt.go b/adapters/stackadapt/stackadapt.go deleted file mode 100644 index 925a3d7381..0000000000 --- a/adapters/stackadapt/stackadapt.go +++ /dev/null @@ -1,228 +0,0 @@ -package stackadapt - -import ( - "errors" - "fmt" - "net/http" - "net/url" - "strconv" - "strings" - "text/template" - - "github.com/buger/jsonparser" - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint *template.Template -} - -func Builder(_ openrtb_ext.BidderName, cfg config.Adapter, _ config.Server) (adapters.Bidder, error) { - endpointTemplate, err := template.New("endpointTemplate").Parse(cfg.Endpoint) - if err != nil { - return nil, fmt.Errorf("unable to parse endpoint url template: %w", err) - } - return &adapter{ - endpoint: endpointTemplate, - }, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - // Imp level - publisherID, supplyID, err := setImpsAndGetEndpointParams(request) - if err != nil { - return nil, []error{err} - } - - // Request level - setPublisherID(request, publisherID) - - endpointURL, err := a.buildEndpointURL(publisherID, supplyID) - if err != nil { - return nil, []error{err} - } - - body, err := jsonutil.Marshal(request) - if err != nil { - return nil, []error{fmt.Errorf("marshal bidRequest: %w", err)} - } - - return []*adapters.RequestData{{ - Method: http.MethodPost, - Uri: endpointURL, - Body: body, - Headers: http.Header{ - "Content-Type": {"application/json;charset=utf-8"}, - "Accept": {"application/json"}, - }, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - }}, nil -} - -func (a *adapter) buildEndpointURL(publisherID, supplyID string) (string, error) { - params := macros.EndpointTemplateParams{ - PublisherID: url.QueryEscape(publisherID), - SupplyId: url.QueryEscape(supplyID), - } - return macros.ResolveMacros(a.endpoint, params) -} - -func setImpsAndGetEndpointParams(request *openrtb2.BidRequest) (string, string, error) { - var publisherID, supplyID string - for i, imp := range request.Imp { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return "", "", &errortypes.BadInput{Message: fmt.Sprintf("imp[%d]: unable to unmarshal ext: %s", i, err.Error())} - } - - var saExt openrtb_ext.ExtImpStackAdapt - if err := jsonutil.Unmarshal(bidderExt.Bidder, &saExt); err != nil { - return "", "", &errortypes.BadInput{Message: fmt.Sprintf("imp[%d]: unable to unmarshal bidder ext: %s", i, err.Error())} - } - - if i == 0 { - publisherID = saExt.PublisherId - supplyID = saExt.SupplyId - } else if saExt.PublisherId != publisherID || saExt.SupplyId != supplyID { - return "", "", &errortypes.BadInput{Message: fmt.Sprintf("imp[%d]: all imps must have the same publisherId and supplyId", i)} - } - - if saExt.PlacementId != nil { - request.Imp[i].TagID = *saExt.PlacementId - } - - if saExt.BidFloor > 0 { - request.Imp[i].BidFloor = saExt.BidFloor - request.Imp[i].BidFloorCur = "USD" - } - - if saExt.Banner != nil && len(saExt.Banner.ExpDir) > 0 && request.Imp[i].Banner != nil { - bannerCopy := *request.Imp[i].Banner - bannerCopy.ExpDir = make([]adcom1.ExpandableDirection, len(saExt.Banner.ExpDir)) - for j, dir := range saExt.Banner.ExpDir { - bannerCopy.ExpDir[j] = adcom1.ExpandableDirection(dir) - } - request.Imp[i].Banner = &bannerCopy - } - } - - return publisherID, supplyID, nil -} - -func setPublisherID(request *openrtb2.BidRequest, publisherID string) { - if request.Site != nil { - siteCopy := *request.Site - if siteCopy.Publisher != nil { - publisherCopy := *siteCopy.Publisher - publisherCopy.ID = publisherID - siteCopy.Publisher = &publisherCopy - } else { - siteCopy.Publisher = &openrtb2.Publisher{ID: publisherID} - } - request.Site = &siteCopy - } else if request.App != nil { - appCopy := *request.App - if appCopy.Publisher != nil { - publisherCopy := *appCopy.Publisher - publisherCopy.ID = publisherID - appCopy.Publisher = &publisherCopy - } else { - appCopy.Publisher = &openrtb2.Publisher{ID: publisherID} - } - request.App = &appCopy - } -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - bidResponse.Currency = response.Cur - - var errs []error - for _, seatBid := range response.SeatBid { - for i := range seatBid.Bid { - bidType, err := getMediaTypeForBid(seatBid.Bid[i]) - if err != nil { - errs = append(errs, err) - continue - } - - if bidType == openrtb_ext.BidTypeNative { - seatBid.Bid[i].AdM, err = getNativeAdm(seatBid.Bid[i].AdM) - if err != nil { - errs = append(errs, err) - continue - } - } - resolveMacros(&seatBid.Bid[i]) - - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - }) - } - } - - return bidResponse, errs -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("unsupported MType %d", bid.MType), - } - } -} - -func resolveMacros(bid *openrtb2.Bid) { - if bid == nil { - return - } - price := strconv.FormatFloat(bid.Price, 'f', -1, 64) - bid.AdM = strings.ReplaceAll(bid.AdM, "${AUCTION_PRICE}", price) - bid.NURL = strings.ReplaceAll(bid.NURL, "${AUCTION_PRICE}", price) - bid.BURL = strings.ReplaceAll(bid.BURL, "${AUCTION_PRICE}", price) -} - -func getNativeAdm(adm string) (string, error) { - value, dataType, _, err := jsonparser.Get([]byte(adm), string(openrtb_ext.BidTypeNative)) - if err != nil { - if errors.Is(err, jsonparser.KeyPathNotFoundError) { - return adm, nil - } - return adm, errors.New("unable to unmarshal native adm") - } - if dataType != jsonparser.Object { - return adm, errors.New("unable to get native adm") - } - return string(value), nil -} diff --git a/adapters/stackadapt/stackadapt_test.go b/adapters/stackadapt/stackadapt_test.go deleted file mode 100644 index de323de040..0000000000 --- a/adapters/stackadapt/stackadapt_test.go +++ /dev/null @@ -1,454 +0,0 @@ -package stackadapt - -import ( - "encoding/json" - "net/http" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" -) - -const testsDir = "stackadapttest" -const testsBidderEndpoint = "http://localhost/br?publisher_id={{.PublisherID}}&supply_id={{.SupplyId}}" - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder( - openrtb_ext.BidderStackAdapt, - config.Adapter{Endpoint: testsBidderEndpoint}, - config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, testsDir, bidder) -} - -func TestGetMediaTypeForBid(t *testing.T) { - tests := []struct { - name string - mtype openrtb2.MarkupType - expectedType openrtb_ext.BidType - wantErr bool - }{ - {name: "banner", mtype: 1, expectedType: openrtb_ext.BidTypeBanner}, - {name: "video", mtype: 2, expectedType: openrtb_ext.BidTypeVideo}, - {name: "audio", mtype: 3, expectedType: openrtb_ext.BidTypeAudio}, - {name: "native", mtype: 4, expectedType: openrtb_ext.BidTypeNative}, - {name: "zero", mtype: 0, expectedType: "", wantErr: true}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - bidType, err := getMediaTypeForBid(openrtb2.Bid{MType: tt.mtype}) - if tt.wantErr { - assert.Error(t, err) - assert.Empty(t, bidType) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.expectedType, bidType) - } - }) - } -} - -func TestResolveMacros(t *testing.T) { - tests := []struct { - name string - bid *openrtb2.Bid - expectedAdM string - expectedNURL string - expectedBURL string - }{ - { - name: "nil_bid", - bid: nil, - }, - { - name: "replaces_in_all_fields", - bid: &openrtb2.Bid{ - Price: 2.50, - AdM: "price=${AUCTION_PRICE}", - NURL: "http://win?p=${AUCTION_PRICE}", - BURL: "http://bill?p=${AUCTION_PRICE}", - }, - expectedAdM: "price=2.5", - expectedNURL: "http://win?p=2.5", - expectedBURL: "http://bill?p=2.5", - }, - { - name: "multiple_macros_same_field", - bid: &openrtb2.Bid{ - Price: 1.00, - AdM: "${AUCTION_PRICE}+${AUCTION_PRICE}", - }, - expectedAdM: "1+1", - }, - { - name: "no_macros", - bid: &openrtb2.Bid{ - Price: 5.00, - AdM: "
ad
", - NURL: "http://example.com", - }, - expectedAdM: "
ad
", - expectedNURL: "http://example.com", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - resolveMacros(tt.bid) - if tt.bid == nil { - return - } - assert.Equal(t, tt.expectedAdM, tt.bid.AdM) - assert.Equal(t, tt.expectedNURL, tt.bid.NURL) - assert.Equal(t, tt.expectedBURL, tt.bid.BURL) - }) - } -} - -func TestGetNativeAdm(t *testing.T) { - tests := []struct { - name string - adm string - expectedAdm string - wantErr bool - }{ - { - name: "unwraps_native_envelope", - adm: `{"native":{"link":{"url":"https://example.com"},"assets":[{"id":1,"title":{"text":"Title"}}]}}`, - expectedAdm: `{"link":{"url":"https://example.com"},"assets":[{"id":1,"title":{"text":"Title"}}]}`, - }, - { - name: "already_unwrapped", - adm: `{"link":{"url":"https://example.com"},"assets":[{"id":1,"title":{"text":"Title"}}]}`, - expectedAdm: `{"link":{"url":"https://example.com"},"assets":[{"id":1,"title":{"text":"Title"}}]}`, - }, - { - name: "no_native_key_passthrough", - adm: `not json`, - expectedAdm: `not json`, - }, - { - name: "malformed_native_envelope", - adm: `{"native":`, - wantErr: true, - }, - { - name: "native_key_not_object", - adm: `{"native":"string_value"}`, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result, err := getNativeAdm(tt.adm) - if tt.wantErr { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.expectedAdm, result) - } - }) - } -} - -func TestSetPublisherID(t *testing.T) { - t.Run("site_without_publisher", func(t *testing.T) { - req := &openrtb2.BidRequest{Site: &openrtb2.Site{Page: "https://example.com"}} - setPublisherID(req, "pub-1") - assert.Equal(t, "pub-1", req.Site.Publisher.ID) - }) - - t.Run("site_with_existing_publisher", func(t *testing.T) { - req := &openrtb2.BidRequest{Site: &openrtb2.Site{ - Page: "https://example.com", - Publisher: &openrtb2.Publisher{ID: "old", Name: "OldPub"}, - }} - setPublisherID(req, "pub-2") - assert.Equal(t, "pub-2", req.Site.Publisher.ID) - assert.Equal(t, "OldPub", req.Site.Publisher.Name) - }) - - t.Run("app_without_publisher", func(t *testing.T) { - req := &openrtb2.BidRequest{App: &openrtb2.App{Bundle: "com.example"}} - setPublisherID(req, "app-pub-1") - assert.Equal(t, "app-pub-1", req.App.Publisher.ID) - }) - - t.Run("app_with_existing_publisher", func(t *testing.T) { - req := &openrtb2.BidRequest{App: &openrtb2.App{ - Bundle: "com.example", - Publisher: &openrtb2.Publisher{ID: "old", Name: "OldAppPub"}, - }} - setPublisherID(req, "app-pub-2") - assert.Equal(t, "app-pub-2", req.App.Publisher.ID) - assert.Equal(t, "OldAppPub", req.App.Publisher.Name) - }) - - t.Run("site_takes_precedence_over_app", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Site: &openrtb2.Site{Page: "https://example.com"}, - App: &openrtb2.App{Bundle: "com.example"}, - } - setPublisherID(req, "pub-site") - assert.Equal(t, "pub-site", req.Site.Publisher.ID) - assert.Nil(t, req.App.Publisher) - }) - - t.Run("no_site_or_app", func(t *testing.T) { - req := &openrtb2.BidRequest{} - setPublisherID(req, "pub-1") - assert.Nil(t, req.Site) - assert.Nil(t, req.App) - }) -} - -func TestSetImpsAndGetEndpointParams(t *testing.T) { - t.Run("valid_with_all_params", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Banner: &openrtb2.Banner{}, - Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1","placementId":"pl-1","bidfloor":1.5,"banner":{"expdir":[1,3]}}}`), - }}, - } - pubID, supplyID, err := setImpsAndGetEndpointParams(req) - assert.NoError(t, err) - assert.Equal(t, "pub-1", pubID) - assert.Equal(t, "ssp-1", supplyID) - assert.Equal(t, "pl-1", req.Imp[0].TagID) - assert.Equal(t, 1.5, req.Imp[0].BidFloor) - assert.Equal(t, "USD", req.Imp[0].BidFloorCur) - assert.Len(t, req.Imp[0].Banner.ExpDir, 2) - }) - - t.Run("publisher_id_and_supply_id", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-2","supplyId":"ssp-2"}}`), - }}, - } - pubID, supplyID, err := setImpsAndGetEndpointParams(req) - assert.NoError(t, err) - assert.Equal(t, "pub-2", pubID) - assert.Equal(t, "ssp-2", supplyID) - assert.Empty(t, req.Imp[0].TagID) - assert.Zero(t, req.Imp[0].BidFloor) - }) - - t.Run("invalid_ext_json", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Ext: json.RawMessage(`{invalid`), - }}, - } - _, _, err := setImpsAndGetEndpointParams(req) - assert.Error(t, err) - assert.Contains(t, err.Error(), "unable to unmarshal ext") - }) - - t.Run("invalid_bidder_ext_json", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Ext: json.RawMessage(`{"bidder":"not-an-object"}`), - }}, - } - _, _, err := setImpsAndGetEndpointParams(req) - assert.Error(t, err) - assert.Contains(t, err.Error(), "unable to unmarshal bidder ext") - }) - - t.Run("multi_imp_same_publisher_id_and_supply_id", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - {Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1"}}`)}, - {Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1"}}`)}, - }, - } - pubID, supplyID, err := setImpsAndGetEndpointParams(req) - assert.NoError(t, err) - assert.Equal(t, "pub-1", pubID) - assert.Equal(t, "ssp-1", supplyID) - }) - - t.Run("multi_imp_mismatched_publisher_id_or_supply_id", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - {Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1"}}`)}, - {Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-2","supplyId":"ssp-1"}}`)}, - }, - } - _, _, err := setImpsAndGetEndpointParams(req) - assert.Error(t, err) - assert.Contains(t, err.Error(), "all imps must have the same publisherId and supplyId") - }) - - t.Run("zero_bidfloor_not_set", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1","bidfloor":0}}`), - }}, - } - _, _, err := setImpsAndGetEndpointParams(req) - assert.NoError(t, err) - assert.Zero(t, req.Imp[0].BidFloor) - assert.Empty(t, req.Imp[0].BidFloorCur) - }) - - t.Run("expdir_ignored_without_banner", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{ - Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1","banner":{"expdir":[1,2]}}}`), - }}, - } - _, _, err := setImpsAndGetEndpointParams(req) - assert.NoError(t, err) - assert.Nil(t, req.Imp[0].Banner) - }) -} - -func TestMakeRequests(t *testing.T) { - a, err := Builder(openrtb_ext.BidderStackAdapt, config.Adapter{Endpoint: testsBidderEndpoint}, config.Server{}) - assert.NoError(t, err) - - t.Run("site_request", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1"}}`)}}, - Site: &openrtb2.Site{Page: "https://example.com"}, - } - data, errs := a.MakeRequests(req, nil) - assert.Empty(t, errs) - assert.Len(t, data, 1) - assert.Equal(t, http.MethodPost, data[0].Method) - assert.Equal(t, "http://localhost/br?publisher_id=pub-1&supply_id=ssp-1", data[0].Uri) - }) - - t.Run("app_request", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{Ext: json.RawMessage(`{"bidder":{"publisherId":"pub-1","supplyId":"ssp-1"}}`)}}, - App: &openrtb2.App{Bundle: "com.example"}, - } - data, errs := a.MakeRequests(req, nil) - assert.Empty(t, errs) - assert.Len(t, data, 1) - - var body openrtb2.BidRequest - assert.NoError(t, json.Unmarshal(data[0].Body, &body)) - assert.Equal(t, "pub-1", body.App.Publisher.ID) - assert.Equal(t, "http://localhost/br?publisher_id=pub-1&supply_id=ssp-1", data[0].Uri) - }) - - t.Run("invalid_bidder_ext_returns_error", func(t *testing.T) { - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{Ext: json.RawMessage(`{"bidder":"not-an-object"}`)}}, - Site: &openrtb2.Site{}, - } - data, errs := a.MakeRequests(req, nil) - assert.Nil(t, data) - assert.Len(t, errs, 1) - assert.Contains(t, errs[0].Error(), "unable to unmarshal bidder ext") - }) -} - -func TestBuildEndpointURL(t *testing.T) { - endpointTemplate := "http://localhost/br?publisher_id={{.PublisherID}}&supply_id={{.SupplyId}}" - a, err := Builder(openrtb_ext.BidderStackAdapt, config.Adapter{Endpoint: endpointTemplate}, config.Server{}) - assert.NoError(t, err) - - req := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{{Ext: json.RawMessage(`{"bidder":{"publisherId":"test-pub","supplyId":"test-ssp"}}`)}}, - Site: &openrtb2.Site{}, - } - data, errs := a.MakeRequests(req, nil) - assert.Empty(t, errs) - assert.Len(t, data, 1) - assert.Equal(t, "http://localhost/br?publisher_id=test-pub&supply_id=test-ssp", data[0].Uri) -} - -func TestEndpointTemplateMalformed(t *testing.T) { - _, buildErr := Builder(openrtb_ext.BidderStackAdapt, config.Adapter{ - Endpoint: "{{Malformed}}", - }, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - assert.Error(t, buildErr) -} - -func TestMakeBids(t *testing.T) { - a, err := Builder(openrtb_ext.BidderStackAdapt, - config.Adapter{Endpoint: testsBidderEndpoint}, config.Server{}) - assert.NoError(t, err) - - t.Run("204_no_content", func(t *testing.T) { - resp, errs := a.MakeBids(nil, nil, &adapters.ResponseData{StatusCode: http.StatusNoContent}) - assert.Nil(t, resp) - assert.Nil(t, errs) - }) - - t.Run("500_server_error", func(t *testing.T) { - resp, errs := a.MakeBids(nil, nil, &adapters.ResponseData{StatusCode: http.StatusInternalServerError}) - assert.Nil(t, resp) - assert.Len(t, errs, 1) - }) - - t.Run("valid_banner_bid", func(t *testing.T) { - resp, errs := a.MakeBids( - &openrtb2.BidRequest{Imp: []openrtb2.Imp{{ID: "imp-1"}}}, - nil, - &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{"cur":"USD","seatbid":[{"bid":[{"id":"bid-1","impid":"imp-1","price":1.5,"adm":"
ad
","mtype":1}]}]}`), - }, - ) - assert.Nil(t, errs) - assert.Len(t, resp.Bids, 1) - assert.Equal(t, openrtb_ext.BidTypeBanner, resp.Bids[0].BidType) - assert.Equal(t, "USD", resp.Currency) - }) - - t.Run("unsupported_mtype_skipped", func(t *testing.T) { - resp, errs := a.MakeBids( - &openrtb2.BidRequest{Imp: []openrtb2.Imp{{ID: "imp-1"}}}, - nil, - &adapters.ResponseData{ - StatusCode: http.StatusOK, - Body: []byte(`{"seatbid":[{"bid":[{"id":"bid-1","impid":"imp-1","price":1.0,"mtype":99}]}]}`), - }, - ) - assert.Len(t, errs, 1) - assert.Empty(t, resp.Bids) - }) - - t.Run("native_unwrap_and_macro_resolution", func(t *testing.T) { - nativeAdm := `{"native":{"link":{"url":"https://example.com/click"},"assets":[{"id":1,"title":{"text":"Title"}}],"imptrackers":["https://example.com/imp?p=${AUCTION_PRICE}"]}}` - body := `{"seatbid":[{"bid":[{"id":"bid-1","impid":"imp-1","price":3.5,"adm":` + mustMarshalString(nativeAdm) + `,"mtype":4}]}]}` - - resp, errs := a.MakeBids( - &openrtb2.BidRequest{Imp: []openrtb2.Imp{{ID: "imp-1"}}}, - nil, - &adapters.ResponseData{StatusCode: http.StatusOK, Body: []byte(body)}, - ) - assert.Nil(t, errs) - assert.Len(t, resp.Bids, 1) - assert.Equal(t, openrtb_ext.BidTypeNative, resp.Bids[0].BidType) - assert.NotContains(t, resp.Bids[0].Bid.AdM, `"native"`) - assert.NotContains(t, resp.Bids[0].Bid.AdM, "${AUCTION_PRICE}") - }) - - t.Run("invalid_response_body", func(t *testing.T) { - resp, errs := a.MakeBids( - &openrtb2.BidRequest{}, - nil, - &adapters.ResponseData{StatusCode: http.StatusOK, Body: []byte(`not json`)}, - ) - assert.Nil(t, resp) - assert.Len(t, errs, 1) - }) -} - -func mustMarshalString(s string) string { - b, _ := json.Marshal(s) - return string(b) -} diff --git a/adapters/stackadapt/stackadapttest/exemplary/app-banner.json b/adapters/stackadapt/stackadapttest/exemplary/app-banner.json deleted file mode 100644 index 7a4ab2487f..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/app-banner.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 320, - "h": 50 - }] - }, - "ext": { - "bidder": { - "publisherId": "app-pub-1", - "supplyId": "ssp-1", - "placementId": "app-pl-1" - } - } - }], - "app": { - "bundle": "com.example.app", - "name": "Example App" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=app-pub-1&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 320, - "h": 50 - }] - }, - "tagid": "app-pl-1", - "ext": { - "bidder": { - "publisherId": "app-pub-1", - "supplyId": "ssp-1", - "placementId": "app-pl-1" - } - } - }], - "app": { - "bundle": "com.example.app", - "name": "Example App", - "publisher": { - "id": "app-pub-1" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.50, - "adm": "
mobile-ad
", - "crid": "creative-mob-1", - "w": 320, - "h": 50, - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.5, - "adm": "
mobile-ad
", - "crid": "creative-mob-1", - "w": 320, - "h": 50, - "mtype": 1 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/exemplary/multi-imp.json b/adapters/stackadapt/stackadapttest/exemplary/multi-imp.json deleted file mode 100644 index 0e721b10c8..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/multi-imp.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }, - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1", - "placementId": "pl-1", - "banner": { - "expdir": [1, 3] - }, - "bidfloor": 1.5 - } - } - }, - { - "id": "test-imp-id-2", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [1, 2], - "w": 1920, - "h": 1080, - "api": [1, 2] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - } - ], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }, - { - "w": 728, - "h": 90 - } - ], - "expdir": [1, 3] - }, - "tagid": "pl-1", - "bidfloor": 1.5, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1", - "placementId": "pl-1", - "banner": { - "expdir": [1, 3] - }, - "bidfloor": 1.5 - } - } - }, - { - "id": "test-imp-id-2", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [1, 2], - "w": 1920, - "h": 1080, - "api": [1, 2] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - } - ], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id", "test-imp-id-2"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "
test-ad
", - "adid": "ad-123", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }] - }, - { - "bid": [{ - "id": "test-bid-id-2", - "impid": "test-imp-id-2", - "price": 5.00, - "adm": "", - "crid": "creative-456", - "w": 640, - "h": 480, - "mtype": 2 - }] - } - ] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test-ad
", - "adid": "ad-123", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }, - { - "bid": { - "id": "test-bid-id-2", - "impid": "test-imp-id-2", - "price": 5.00, - "adm": "", - "crid": "creative-456", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - } - ] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/exemplary/simple-web-audio.json b/adapters/stackadapt/stackadapttest/exemplary/simple-web-audio.json deleted file mode 100644 index 3761f08994..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/simple-web-audio.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4", "audio/mpeg", "audio/ogg"], - "minduration": 5, - "maxduration": 30, - "protocols": [3, 6, 2, 5, 7, 8] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/audio" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4", "audio/mpeg", "audio/ogg"], - "minduration": 5, - "maxduration": 30, - "protocols": [3, 6, 2, 5, 7, 8] - }, - "ext": { -"bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/audio", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 4.00, - "adm": "StackAdapt00:00:14https://example.com/audio.mp4", - "crid": "creative-101", - "mtype": 3 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 4, - "adm": "StackAdapt00:00:14https://example.com/audio.mp4", - "crid": "creative-101", - "mtype": 3 - }, - "type": "audio" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/exemplary/simple-web-banner.json b/adapters/stackadapt/stackadapttest/exemplary/simple-web-banner.json deleted file mode 100644 index 852e1e30b1..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/simple-web-banner.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }, - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1", - "placementId": "pl-1", - "banner": { - "expdir": [1, 3] - }, - "bidfloor": 1.5 - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }, - { - "w": 728, - "h": 90 - } - ], - "expdir": [1, 3] - }, - "tagid": "pl-1", - "bidfloor": 1.5, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1", - "placementId": "pl-1", - "banner": { - "expdir": [1, 3] - }, - "bidfloor": 1.5 - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "
test-ad
", - "adid": "ad-123", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
test-ad
", - "adid": "ad-123", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/exemplary/simple-web-native.json b/adapters/stackadapt/stackadapttest/exemplary/simple-web-native.json deleted file mode 100644 index 0b961d7eac..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/simple-web-native.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"required\":0,\"data\":{\"type\":2,\"len\":140}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"w\":1200,\"h\":627}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"required\":0,\"data\":{\"type\":2,\"len\":140}},{\"id\":3,\"required\":1,\"img\":{\"type\":3,\"w\":1200,\"h\":627}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3.00, - "adm": "{\"native\":{\"link\":{\"url\":\"https://example.com/click\"},\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}},{\"id\":2,\"img\":{\"url\":\"https://example.com/image.jpg\",\"w\":1200,\"h\":627}}],\"imptrackers\":[\"https://example.com/imp\"]}}", - "crid": "creative-789", - "mtype": 4 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3, - "adm": "{\"link\":{\"url\":\"https://example.com/click\"},\"assets\":[{\"id\":1,\"title\":{\"text\":\"Test Title\"}},{\"id\":2,\"img\":{\"url\":\"https://example.com/image.jpg\",\"w\":1200,\"h\":627}}],\"imptrackers\":[\"https://example.com/imp\"]}", - "crid": "creative-789", - "mtype": 4 - }, - "type": "native" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/exemplary/simple-web-video.json b/adapters/stackadapt/stackadapttest/exemplary/simple-web-video.json deleted file mode 100644 index ad7e8d8764..0000000000 --- a/adapters/stackadapt/stackadapttest/exemplary/simple-web-video.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [1, 2], - "w": 640, - "h": 480, - "api": [1, 2] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/video" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [1, 2], - "w": 640, - "h": 480, - "api": [1, 2] - }, - "ext": { -"bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/video", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 5.00, - "adm": "", - "crid": "creative-456", - "w": 640, - "h": 480, - "mtype": 2 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 5, - "adm": "", - "crid": "creative-456", - "w": 640, - "h": 480, - "mtype": 2 - }, - "type": "video" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/supplemental/app-with-existing-publisher.json b/adapters/stackadapt/stackadapttest/supplemental/app-with-existing-publisher.json deleted file mode 100644 index bccb4ef0d8..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/app-with-existing-publisher.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 320, - "h": 50 - }] - }, - "ext": { - "bidder": { - "publisherId": "app-pub-new", - "supplyId": "ssp-1" - } - } - }], - "app": { - "bundle": "com.example.app", - "name": "Example App", - "publisher": { - "id": "app-pub-old", - "name": "Existing App Publisher" - } - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=app-pub-new&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 320, - "h": 50 - }] - }, - "ext": { - "bidder": { - "publisherId": "app-pub-new", - "supplyId": "ssp-1" - } - } - }], - "app": { - "bundle": "com.example.app", - "name": "Example App", - "publisher": { - "id": "app-pub-new", - "name": "Existing App Publisher" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.5, - "adm": "
app-ad
", - "crid": "creative-app-1", - "w": 320, - "h": 50, - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 2.5, - "adm": "
app-ad
", - "crid": "creative-app-1", - "w": 320, - "h": 50, - "mtype": 1 - }, - "type": "banner" - }] - }] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/auction-price-macro.json b/adapters/stackadapt/stackadapttest/supplemental/auction-price-macro.json deleted file mode 100644 index 2e5316b457..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/auction-price-macro.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3.50, - "adm": "
ad with price ${AUCTION_PRICE}
", - "nurl": "https://example.com/win?price=${AUCTION_PRICE}", - "burl": "https://example.com/billing?price=${AUCTION_PRICE}", - "crid": "creative-macro-1", - "w": 300, - "h": 250, - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 3.5, - "adm": "
ad with price 3.5
", - "nurl": "https://example.com/win?price=3.5", - "burl": "https://example.com/billing?price=3.5", - "crid": "creative-macro-1", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }] - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/supplemental/bad-bidder-ext.json b/adapters/stackadapt/stackadapttest/supplemental/bad-bidder-ext.json deleted file mode 100644 index d0f5d3f218..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/bad-bidder-ext.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": "invalid-not-an-object" - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "expectedMakeRequestsErrors": [{ - "value": "imp[0]: unable to unmarshal bidder ext", - "comparison": "startswith" - }] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/supplemental/endpoint-param-escaping.json b/adapters/stackadapt/stackadapttest/supplemental/endpoint-param-escaping.json deleted file mode 100644 index df261cd7b3..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/endpoint-param-escaping.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub&123", - "supplyId": "ssp 1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub%26123&supply_id=ssp+1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub&123", - "supplyId": "ssp 1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub&123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - }], - "expectedBidResponses": [] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/multi-imp-mismatch.json b/adapters/stackadapt/stackadapttest/supplemental/multi-imp-mismatch.json deleted file mode 100644 index d03fc97a0e..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/multi-imp-mismatch.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "123", - "supplyId": "ssp-1" - } - } - }, - { - "id": "test-imp-id-2", - "banner": { - "format": [{ - "w": 728, - "h": 90 - }] - }, - "ext": { - "bidder": { - "publisherId": "456", - "supplyId": "ssp-1" - } - } - } - ], - "site": { - "page": "https://example.com/page" - } - }, - "expectedMakeRequestsErrors": [{ - "value": "imp[1]: all imps must have the same publisherId and supplyId", - "comparison": "literal" - }] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/native-adm-invalid.json b/adapters/stackadapt/stackadapttest/supplemental/native-adm-invalid.json deleted file mode 100644 index 725f69003f..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/native-adm-invalid.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\"}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub-123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\"}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "{\"native\":\"not-an-object\"}", - "crid": "creative-123", - "mtype": 4 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [] - }], - "expectedMakeBidsErrors": [{ - "value": "unable to get native adm", - "comparison": "literal" - }] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/no-content.json b/adapters/stackadapt/stackadapttest/supplemental/no-content.json deleted file mode 100644 index 90b21a4a38..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/no-content.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub-123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - }], - "expectedBidResponses": [] -} \ No newline at end of file diff --git a/adapters/stackadapt/stackadapttest/supplemental/site-with-existing-publisher.json b/adapters/stackadapt/stackadapttest/supplemental/site-with-existing-publisher.json deleted file mode 100644 index 1ab79a6338..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/site-with-existing-publisher.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-new", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-old", - "name": "Existing Publisher Name" - } - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub-new&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-new", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-new", - "name": "Existing Publisher Name" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "
ad
", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.5, - "adm": "
ad
", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 1 - }, - "type": "banner" - }] - }] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/status-400.json b/adapters/stackadapt/stackadapttest/supplemental/status-400.json deleted file mode 100644 index 7c8c554391..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/status-400.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub-123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 400, - "body": {} - } - }], - "expectedMakeBidsErrors": [{ - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - }] -} diff --git a/adapters/stackadapt/stackadapttest/supplemental/unsupported-mtype.json b/adapters/stackadapt/stackadapttest/supplemental/unsupported-mtype.json deleted file mode 100644 index e2a24c7728..0000000000 --- a/adapters/stackadapt/stackadapttest/supplemental/unsupported-mtype.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://localhost/br?publisher_id=pub-123&supply_id=ssp-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "format": [{ - "w": 300, - "h": 250 - }] - }, - "ext": { - "bidder": { - "publisherId": "pub-123", - "supplyId": "ssp-1" - } - } - }], - "site": { - "page": "https://example.com/page", - "publisher": { - "id": "pub-123" - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "cur": "USD", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id", - "impid": "test-imp-id", - "price": 1.50, - "adm": "some-ad", - "crid": "creative-123", - "w": 300, - "h": 250, - "mtype": 99 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [] - }], - "expectedMakeBidsErrors": [{ - "value": "unsupported MType 99", - "comparison": "literal" - }] -} \ No newline at end of file diff --git a/adapters/startio/startio.go b/adapters/startio/startio.go index 6699ab8ee3..b524a66013 100644 --- a/adapters/startio/startio.go +++ b/adapters/startio/startio.go @@ -6,11 +6,11 @@ import ( "slices" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/startio/startio_test.go b/adapters/startio/startio_test.go index 5aa321e63f..8de9e017ad 100644 --- a/adapters/startio/startio_test.go +++ b/adapters/startio/startio_test.go @@ -3,9 +3,9 @@ package startio import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/stroeerCore/params_test.go b/adapters/stroeerCore/params_test.go index 6aa2d02d7d..4050a21959 100644 --- a/adapters/stroeerCore/params_test.go +++ b/adapters/stroeerCore/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/stroeerCore/stroeercore.go b/adapters/stroeerCore/stroeercore.go index 236980fde1..57dc2b0cd7 100644 --- a/adapters/stroeerCore/stroeercore.go +++ b/adapters/stroeerCore/stroeercore.go @@ -7,11 +7,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -32,10 +32,12 @@ type bidResponse struct { Ad string `json:"ad"` CrID string `json:"crid"` Mtype string `json:"mtype"` + DSA json.RawMessage `json:"dsa"` ADomain []string `json:"adomain,omitempty"` - Ext json.RawMessage `json:"ext,omitempty"` - // Deprecated: The dsa will move to the bid response's ext. - DSA json.RawMessage `json:"dsa"` +} + +type bidExt struct { + DSA json.RawMessage `json:"dsa,omitempty"` } func (b *bidResponse) resolveMediaType() (mt openrtb2.MarkupType, bt openrtb_ext.BidType, err error) { @@ -86,7 +88,15 @@ func (a *adapter) MakeBids(bidRequest *openrtb2.BidRequest, requestData *adapter CrID: bid.CrID, MType: markupType, ADomain: bid.ADomain, - Ext: getBidExt(bid), + } + + if bid.DSA != nil { + dsaJson, err := json.Marshal(bidExt{bid.DSA}) + if err != nil { + errors = append(errors, err) + } else { + openRtbBid.Ext = dsaJson + } } bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ @@ -98,19 +108,6 @@ func (a *adapter) MakeBids(bidRequest *openrtb2.BidRequest, requestData *adapter return bidderResponse, errors } -func getBidExt(bid bidResponse) json.RawMessage { - if bid.DSA == nil { - return bid.Ext - } - extMap := map[string]json.RawMessage{} - if bid.Ext != nil { - _ = jsonutil.Unmarshal(bid.Ext, &extMap) - } - extMap["dsa"] = bid.DSA - ext, _ := json.Marshal(extMap) - return ext -} - func (a *adapter) MakeRequests(bidRequest *openrtb2.BidRequest, extraRequestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { var errors []error diff --git a/adapters/stroeerCore/stroeercore_test.go b/adapters/stroeerCore/stroeercore_test.go index 4040b34156..b0f6204880 100644 --- a/adapters/stroeerCore/stroeercore_test.go +++ b/adapters/stroeerCore/stroeercore_test.go @@ -3,9 +3,9 @@ package stroeerCore import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/stroeerCore/stroeercoretest/exemplary/bid-ext.json b/adapters/stroeerCore/stroeercoretest/exemplary/bid-ext.json deleted file mode 100644 index 43e997e25b..0000000000 --- a/adapters/stroeerCore/stroeercoretest/exemplary/bid-ext.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-id", - "cur": [ - "EUR" - ], - "imp": [ - { - "id": "1", - "banner": { - "format": [ - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "sid": "123456" - } - } - } - ], - "device": { - "ip": "123.123.123.123" - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path" - }, - "user": { - "buyeruid": "test-buyer-user-id" - }, - "regs": { - "ext": { - "dsa": { - "dsarequired": 3, - "pubrender": 0, - "datatopub": 2, - "transparency": [ - { - "domain": "example-platform.com", - "dsaparams": [ - 1 - ] - }, - { - "domain": "example-ssp.com", - "dsaparams": [ - 1, - 2 - ] - } - ] - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ] - }, - "uri": "http://localhost/s2sdsh", - "body": { - "id": "auction-id", - "cur": [ - "EUR" - ], - "imp": [ - { - "id": "1", - "tagid": "123456", - "banner": { - "format": [ - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "sid": "123456" - } - } - } - ], - "device": { - "ip": "123.123.123.123" - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path" - }, - "user": { - "buyeruid": "test-buyer-user-id" - }, - "regs": { - "ext": { - "dsa": { - "dsarequired": 3, - "pubrender": 0, - "datatopub": 2, - "transparency": [ - { - "domain": "example-platform.com", - "dsaparams": [ - 1 - ] - }, - { - "domain": "example-ssp.com", - "dsaparams": [ - 1, - 2 - ] - } - ] - } - } - } - }, - "impIDs":["1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "bids": [ - { - "id": "1829273982920-01", - "bidId": "1", - "cpm": 2, - "width": 300, - "height": 600, - "ad": "advert", - "crid": "wasd", - "mtype": "banner", - "ext": { - "other": "thing", - "dsa": { - "behalf": "Advertiser A", - "paid": "Advertiser B", - "transparency": [ - { - "domain": "example-domain.com", - "dsaparams": [ - 1, - 2 - ] - } - ], - "adrender": 1 - } - } - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "1829273982920-01", - "impid": "1", - "price": 2, - "adm": "advert", - "w": 300, - "h": 600, - "crid": "wasd", - "mtype": 1, - "ext": { - "other": "thing", - "dsa": { - "behalf": "Advertiser A", - "paid": "Advertiser B", - "transparency": [ - { - "domain": "example-domain.com", - "dsaparams": [ - 1, - 2 - ] - } - ], - "adrender": 1 - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/stroeerCore/stroeercoretest/exemplary/deprecated-json-path-for-dsa.json b/adapters/stroeerCore/stroeercoretest/exemplary/dsa.json similarity index 97% rename from adapters/stroeerCore/stroeercoretest/exemplary/deprecated-json-path-for-dsa.json rename to adapters/stroeerCore/stroeercoretest/exemplary/dsa.json index b2c21511d5..97355da905 100644 --- a/adapters/stroeerCore/stroeercoretest/exemplary/deprecated-json-path-for-dsa.json +++ b/adapters/stroeerCore/stroeercoretest/exemplary/dsa.json @@ -157,9 +157,6 @@ } ], "adrender": 1 - }, - "ext": { - "something": "else" } } ] @@ -195,8 +192,7 @@ } ], "adrender": 1 - }, - "something": "else" + } } }, "type": "banner" diff --git a/adapters/synapseHX/params_test.go b/adapters/synapseHX/params_test.go deleted file mode 100644 index b81a17f49b..0000000000 --- a/adapters/synapseHX/params_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package synapseHX - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch json-schemas. %v", err) - } - - for _, param := range validParams { - if err := validator.Validate(openrtb_ext.BidderSynapseHX, json.RawMessage(param)); err != nil { - t.Errorf("Schema rejected valid params: %s", param) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch json-schemas. %v", err) - } - - for _, param := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderSynapseHX, json.RawMessage(param)); err == nil { - t.Errorf("Schema allowed invalid params: %s", param) - } - } -} - -var validParams = []string{ - `{"tenantId":"a"}`, - `{"tenantId":"8cd85aed-25a6-4db0-ad98-4a3af1f7601c"}`, -} - -var invalidParams = []string{ - `{}`, - `{"tenantId":1}`, - `{"tenantId":""}`, -} diff --git a/adapters/synapseHX/synapseHX.go b/adapters/synapseHX/synapseHX.go deleted file mode 100644 index 2181305687..0000000000 --- a/adapters/synapseHX/synapseHX.go +++ /dev/null @@ -1,147 +0,0 @@ -package synapseHX - -import ( - "fmt" - "net/http" - "net/url" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - - return bidder, nil -} - -func (adapter *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var requests []*adapters.RequestData - - var tenantId string - - if len(request.Imp) == 0 { - return nil, []error{fmt.Errorf("request contains no impressions")} - } - - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(request.Imp[0].Ext, &bidderExt); err != nil { - return nil, []error{fmt.Errorf("failed to unmarshal bidder ext: %w", err)} - } - - var ext openrtb_ext.ExtImpSynapseHX - if err := jsonutil.Unmarshal(bidderExt.Bidder, &ext); err != nil { - return nil, []error{fmt.Errorf("failed to unmarshal bidder parameters: %w", err)} - } - - tenantId = ext.TenantID - - requestBody, err := jsonutil.Marshal(request) - if err != nil { - return nil, []error{fmt.Errorf("failed to marshal request: %w", err)} - } - - url, _ := url.Parse(adapter.endpoint) - q := url.Query() - q.Set("pid", tenantId) - url.RawQuery = q.Encode() - - requestData := &adapters.RequestData{ - Method: http.MethodPost, - Uri: url.String(), - Body: requestBody, - Headers: buildRequestHeaders(), - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - - requests = append(requests, requestData) - - return requests, nil -} - -func (adapter *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(response) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil { - return nil, []error{err} - } - - var bidResponse openrtb2.BidResponse - if err := jsonutil.Unmarshal(response.Body, &bidResponse); err != nil { - return nil, []error{&errortypes.BadInput{Message: fmt.Sprintf("failed to unmarshal response body: %v", err)}} - } - - if len(bidResponse.SeatBid) == 0 || len(bidResponse.SeatBid[0].Bid) == 0 { - return nil, nil - } - - var errs []error - bidderResponse := adapters.NewBidderResponseWithBidsCapacity(len(bidResponse.SeatBid[0].Bid)) - - for i := range bidResponse.SeatBid { - for j := range bidResponse.SeatBid[i].Bid { - bid := &bidResponse.SeatBid[i].Bid[j] - bidType, err := getMediaTypeForBid(bid) - - if err != nil { - errs = append(errs, err) - } else { - bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - }) - } - } - } - - return bidderResponse, errs -} - -func buildRequestHeaders() http.Header { - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - headers.Add("X-Openrtb-Version", "2.6") - - return headers -} - -func getMediaTypeForBid(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { - if bid.MType != 0 { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - default: - return "", fmt.Errorf("unsupported media type %d", bid.MType) - } - } - - if bid.Ext != nil { - var bidExt openrtb_ext.ExtBid - err := jsonutil.Unmarshal(bid.Ext, &bidExt) - if err == nil && bidExt.Prebid != nil { - switch bidExt.Prebid.Type { - case openrtb_ext.BidTypeBanner, openrtb_ext.BidTypeVideo: - return bidExt.Prebid.Type, nil - default: - return "", fmt.Errorf("unsupported media type \"%s\"", bidExt.Prebid.Type) - } - } - } - - return "", fmt.Errorf("failed to parse impression \"%s\" mediatype", bid.ImpID) -} diff --git a/adapters/synapseHX/synapseHX_test.go b/adapters/synapseHX/synapseHX_test.go deleted file mode 100644 index 21ea7af97c..0000000000 --- a/adapters/synapseHX/synapseHX_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package synapseHX - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderSynapseHX, config.Adapter{ - Endpoint: "http://localhost:8080/bidder/"}, config.Server{}) - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - adapterstest.RunJSONBidderTest(t, "synapseHXtest", bidder) -} diff --git a/adapters/synapseHX/synapseHXtest/exemplary/banner.json b/adapters/synapseHX/synapseHXtest/exemplary/banner.json deleted file mode 100644 index 586a35dbaf..0000000000 --- a/adapters/synapseHX/synapseHXtest/exemplary/banner.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.04, - "adm": "Ad", - "adomain": [ - "example.com" - ], - "mtype": 1 - } - ], - "seat": "seat-1" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "id": "bid-resp-id", - "bids": [ - { - "bid": { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.04, - "adm": "Ad", - "adomain": [ - "example.com" - ], - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/exemplary/video.json b/adapters/synapseHX/synapseHXtest/exemplary/video.json deleted file mode 100644 index bb4216b7c4..0000000000 --- a/adapters/synapseHX/synapseHXtest/exemplary/video.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a" - } - }, - "instl": 1, - "bidfloor": 0.2, - "bidfloorcur": "USD", - "video": { - "api": [ - 7 - ], - "battr": [ - 16 - ], - "companiontype": [ - 1, - 2 - ], - "h": 480, - "w": 320, - "skip": 1, - "mimes": [ - "video/mp4" - ], - "minduration": 5, - "maxduration": 30, - "linearity": 1, - "protocols": [ - 2, - 3, - 5, - 6 - ], - "pos": 7, - "startdelay": 0, - "placement": 4, - "skipmin": 0, - "skipafter": 0, - "companionad": [ - { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif" - ], - "api": [ - 3, - 5, - 6 - ], - "vcm": 1 - } - ], - "delivery": [], - "maxextended": 0 - }, - "metric": [ - { - "type": "viewability", - "value": 0.97, - "vendor": "ZZZ" - } - ], - "displaymanager": "ZZZ", - "displaymanagerver": "42.42.42", - "secure": 1 - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a" - } - }, - "instl": 1, - "bidfloor": 0.2, - "bidfloorcur": "USD", - "video": { - "api": [ - 7 - ], - "battr": [ - 16 - ], - "companiontype": [ - 1, - 2 - ], - "h": 480, - "w": 320, - "skip": 1, - "mimes": [ - "video/mp4" - ], - "minduration": 5, - "maxduration": 30, - "linearity": 1, - "protocols": [ - 2, - 3, - 5, - 6 - ], - "pos": 7, - "startdelay": 0, - "placement": 4, - "companionad": [ - { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif" - ], - "api": [ - 3, - 5, - 6 - ], - "vcm": 1 - } - ] - }, - "metric": [ - { - "type": "viewability", - "value": 0.97, - "vendor": "ZZZ" - } - ], - "displaymanager": "ZZZ", - "displaymanagerver": "42.42.42", - "secure": 1 - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.03, - "adm": "PrebidSample Video Ad00:00:30https://advertiser.com/video.mp4", - "adomain": [ - "example.com" - ], - "ext": { - "prebid": { - "type": "video" - } - } - } - ], - "seat": "seat-1" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "id": "bid-resp-id", - "bids": [ - { - "bid": { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.03, - "adm": "PrebidSample Video Ad00:00:30https://advertiser.com/video.mp4", - "adomain": [ - "example.com" - ], - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-empty-seatbid.json b/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-empty-seatbid.json deleted file mode 100644 index e1a55566b1..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-empty-seatbid.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-media-type.json b/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-media-type.json deleted file mode 100644 index 07050f4159..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-media-type.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.04, - "adm": "Ad", - "adomain": [ - "example.com" - ], - "ext": { - "prebid": { - "type": "audio" - } - } - } - ], - "seat": "seat-1" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [{}], - "expectedMakeBidsErrors": [ - { - "value": "unsupported media type", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-mtype.json b/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-mtype.json deleted file mode 100644 index e9c9014e77..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-mtype.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.04, - "adm": "Ad", - "adomain": [ - "example.com" - ], - "mtype": 3 - } - ], - "seat": "seat-1" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [{}], - "expectedMakeBidsErrors": [ - { - "value": "unsupported media type", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-no-media-type.json b/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-no-media-type.json deleted file mode 100644 index 4735ccd2a7..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/invalid-resp-no-media-type.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "body": { - "id": "bid-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "bid-item-id", - "impid": "imp-id", - "price": 0.04, - "adm": "Ad", - "adomain": [ - "example.com" - ] - } - ], - "seat": "seat-1" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [{}], - "expectedMakeBidsErrors": [ - { - "value": "failed to parse impression", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/request-invalid-imp-bidder-ext.json b/adapters/synapseHX/synapseHXtest/supplemental/request-invalid-imp-bidder-ext.json deleted file mode 100644 index 382433ef83..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/request-invalid-imp-bidder-ext.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": 0 - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [], - "expectedBidResponses": [], - "expectedMakeRequestsErrors": [ - { - "value": "failed to unmarshal bidder parameters", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp-ext.json b/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp-ext.json deleted file mode 100644 index dec8f4a250..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp-ext.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [], - "expectedBidResponses": [], - "expectedMakeRequestsErrors": [ - { - "value": "failed to unmarshal bidder ext", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp.json b/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp.json deleted file mode 100644 index 0217586de9..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/request-no-imp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [], - "expectedBidResponses": [], - "expectedMakeRequestsErrors": [ - { - "value": "request contains no impressions", - "comparison": "literal" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/resp-invalid-no-body.json b/adapters/synapseHX/synapseHXtest/supplemental/resp-invalid-no-body.json deleted file mode 100644 index 5c06b5add0..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/resp-invalid-no-body.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 200, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.5" - ] - } - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "failed to unmarshal response body", - "comparison": "startswith" - } - ] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/status-204.json b/adapters/synapseHX/synapseHXtest/supplemental/status-204.json deleted file mode 100644 index 2e2e89bcef..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/status-204.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 204, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - } - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/synapseHX/synapseHXtest/supplemental/status-400.json b/adapters/synapseHX/synapseHXtest/supplemental/status-400.json deleted file mode 100644 index 85ba451867..0000000000 --- a/adapters/synapseHX/synapseHXtest/supplemental/status-400.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "http://localhost:8080/bidder/?pid=a", - "body": { - "id": "auction-req-id", - "imp": [ - { - "id": "imp-id", - "ext": { - "bidder": { - "tenantId": "a", - "adUnitId": "b" - } - }, - "banner": { - "w": 320, - "h": 480, - "pos": 7, - "mimes": [ - "image/jpg", - "image/gif", - "text/html" - ], - "format": [ - { - "w": 320, - "h": 480 - } - ], - "api": [ - 5, - 7 - ], - "vcm": 1, - "id": "1" - } - } - ], - "site": { - "page": "https://example.com", - "publisher": { - "id": "publisher-id" - }, - "id": "site-id" - }, - "device": { - "ua": "Mozilla/5.0" - } - }, - "impIDs": [ - "imp-id" - ] - }, - "mockResponse": { - "status": 400, - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ] - } - } - } - ], - "expectedBidResponses": [], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "startswith" - } - ] -} diff --git a/adapters/taboola/params_test.go b/adapters/taboola/params_test.go index bd1ccddbb0..8018c4b9d9 100644 --- a/adapters/taboola/params_test.go +++ b/adapters/taboola/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/taboola/taboola.go b/adapters/taboola/taboola.go index 65b757bf3b..a11fbf6ce7 100644 --- a/adapters/taboola/taboola.go +++ b/adapters/taboola/taboola.go @@ -11,12 +11,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -239,7 +239,7 @@ func createTaboolaRequests(request *openrtb2.BidRequest) (taboolaRequests []*ope } if taboolaExt.PageType != "" { - requestExt, requestExtErr := makeRequestExt(taboolaExt.PageType, modifiedRequest.Ext) + requestExt, requestExtErr := makeRequestExt(taboolaExt.PageType) if requestExtErr == nil { modifiedRequest.Ext = requestExt } else { @@ -253,25 +253,17 @@ func createTaboolaRequests(request *openrtb2.BidRequest) (taboolaRequests []*ope return taboolaRequests, errs } -func makeRequestExt(pageType string, existingExt json.RawMessage) (json.RawMessage, error) { - extMap := make(map[string]json.RawMessage) - if len(existingExt) > 0 { - if err := jsonutil.Unmarshal(existingExt, &extMap); err != nil { - return nil, fmt.Errorf("could not unmarshal request ext: %s", err) - } +func makeRequestExt(pageType string) (json.RawMessage, error) { + requestExt := &RequestExt{ + PageType: pageType, } - pageTypeJson, err := jsonutil.Marshal(pageType) + requestExtJson, err := json.Marshal(requestExt) if err != nil { - return nil, fmt.Errorf("could not marshal pageType: %s", err) - } - extMap["pageType"] = pageTypeJson - - requestExtJson, err := jsonutil.Marshal(extMap) - if err != nil { - return nil, fmt.Errorf("could not marshal request ext: %s", err) + return nil, fmt.Errorf("could not marshal %s, err: %s", requestExt, err) } return requestExtJson, nil + } func getMediaType(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) { @@ -311,6 +303,5 @@ func resolveMacros(bid *openrtb2.Bid) { price := strconv.FormatFloat(bid.Price, 'f', -1, 64) bid.NURL = strings.Replace(bid.NURL, "${AUCTION_PRICE}", price, -1) bid.AdM = strings.Replace(bid.AdM, "${AUCTION_PRICE}", price, -1) - bid.BURL = strings.Replace(bid.BURL, "${AUCTION_PRICE}", price, -1) } } diff --git a/adapters/taboola/taboola_test.go b/adapters/taboola/taboola_test.go index 6a5a6ff316..082e480943 100644 --- a/adapters/taboola/taboola_test.go +++ b/adapters/taboola/taboola_test.go @@ -1,12 +1,11 @@ package taboola import ( - "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -21,34 +20,6 @@ func TestJsonSamples(t *testing.T) { adapterstest.RunJSONBidderTest(t, "taboolatest", bidder) } -func TestMakeRequestExt(t *testing.T) { - t.Run("merges pageType into existing ext without dropping other fields", func(t *testing.T) { - existingExt := json.RawMessage(`{"prebid":{"integration":"pbjs"}}`) - - result, err := makeRequestExt("article", existingExt) - - assert.NoError(t, err) - assert.JSONEq(t, `{"prebid":{"integration":"pbjs"},"pageType":"article"}`, string(result)) - }) - - t.Run("sets pageType when existing ext is empty", func(t *testing.T) { - result, err := makeRequestExt("article", nil) - - assert.NoError(t, err) - assert.JSONEq(t, `{"pageType":"article"}`, string(result)) - }) - - t.Run("returns error when existing ext is invalid JSON", func(t *testing.T) { - invalidExt := json.RawMessage(`not-a-json-object`) - - result, err := makeRequestExt("article", invalidExt) - - assert.Error(t, err) - assert.Contains(t, err.Error(), "could not unmarshal request ext") - assert.Nil(t, result) - }) -} - func TestEmptyExternalUrl(t *testing.T) { bidder, buildErr := Builder(openrtb_ext.BidderTaboola, config.Adapter{ Endpoint: "http://whatever.com"}, config.Server{}) diff --git a/adapters/taboola/taboolatest/exemplary/bannerResolveMacro.json b/adapters/taboola/taboolatest/exemplary/bannerResolveMacro.json index f2bf2574c6..b673096c0b 100644 --- a/adapters/taboola/taboolatest/exemplary/bannerResolveMacro.json +++ b/adapters/taboola/taboolatest/exemplary/bannerResolveMacro.json @@ -114,8 +114,7 @@ "w": 300, "h": 250, "exp": 60, - "lurl": "https://lurl.domain.com/", - "burl": "https://burl.domain.com/?wp=${AUCTION_PRICE}" + "lurl": "https://lurl.domain.com/" } ], "seat": "1111" @@ -146,8 +145,7 @@ "w": 300, "h": 250, "exp": 60, - "lurl": "https://lurl.domain.com/", - "burl": "https://burl.domain.com/?wp=2.1" + "lurl": "https://lurl.domain.com/" }, "type": "banner" } diff --git a/adapters/taboola/taboolatest/exemplary/nativeResolveMacro.json b/adapters/taboola/taboolatest/exemplary/nativeResolveMacro.json index 3a25b5688e..e30f123cc1 100644 --- a/adapters/taboola/taboolatest/exemplary/nativeResolveMacro.json +++ b/adapters/taboola/taboolatest/exemplary/nativeResolveMacro.json @@ -86,8 +86,7 @@ "cid": "cid", "crid": "crid", "lurl": "https://lurl.domain.com/", - "nurl": "nurl.com&wp=${AUCTION_PRICE}", - "burl": "https://burl.domain.com/?wp=${AUCTION_PRICE}" + "nurl": "nurl.com&wp=${AUCTION_PRICE}" } ], "seat": "1111" @@ -117,8 +116,7 @@ "cid": "cid", "crid": "crid", "lurl": "https://lurl.domain.com/", - "nurl": "nurl.com&wp=2.1", - "burl": "https://burl.domain.com/?wp=2.1" + "nurl": "nurl.com&wp=2.1" }, "type": "native" } diff --git a/adapters/taboola/taboolatest/exemplary/withPageTypeAndPrebidExt.json b/adapters/taboola/taboolatest/exemplary/withPageTypeAndPrebidExt.json deleted file mode 100644 index 4c4856e047..0000000000 --- a/adapters/taboola/taboolatest/exemplary/withPageTypeAndPrebidExt.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "mockBidRequest": { - "id": "request-id", - "imp": [ - { - "id": "impression-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "publisherId": "publisher-id", - "tagid": "tag-id", - "pageType": "article" - } - } - } - ], - "site": { - "domain": "http://domain.com", - "page": "http://page-domain.com" - }, - "device": { - "ua": "Mozilla/5.0", - "h": 300, - "w": 300 - }, - "ext": { - "prebid": { - "channel": { - "name": "web", - "version": "1.0" - }, - "integration": "pbjs", - "server": { - "externalurl": "https://pbs.example.com", - "gvlid": 42, - "datacenter": "us-east-1" - }, - "sdk": { - "renderers": [ - { - "name": "test-renderer", - "version": "1.0.0" - } - ] - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://display.whatever.com/12/publisher-id", - "body": { - "id": "request-id", - "imp": [ - { - "id": "impression-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "tagid": "tag-id", - "ext": { - "bidder": { - "publisherId": "publisher-id", - "tagid": "tag-id", - "pageType": "article" - } - } - } - ], - "site": { - "id": "publisher-id", - "name": "publisher-id", - "domain": "http://domain.com", - "page": "http://page-domain.com", - "publisher": { - "id": "publisher-id" - } - }, - "device": { - "ua": "Mozilla/5.0", - "h": 300, - "w": 300 - }, - "ext": { - "pageType": "article", - "prebid": { - "channel": { - "name": "web", - "version": "1.0" - }, - "integration": "pbjs", - "server": { - "externalurl": "https://pbs.example.com", - "gvlid": 42, - "datacenter": "us-east-1" - }, - "sdk": { - "renderers": [ - { - "name": "test-renderer", - "version": "1.0.0" - } - ] - } - } - } - }, - "impIDs": ["impression-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "123", - "seatbid": [ - { - "bid": [ - { - "id": "request-id", - "impid": "impression-id", - "price": 2.1, - "adid": "1", - "adm": "", - "adomain": ["adomain.com"], - "cid": "cid", - "crid": "crid", - "w": 300, - "h": 250, - "exp": 60 - } - ], - "seat": "1111" - } - ], - "bidid": "123", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "request-id", - "impid": "impression-id", - "price": 2.1, - "adid": "1", - "adm": "", - "adomain": ["adomain.com"], - "cid": "cid", - "crid": "crid", - "w": 300, - "h": 250, - "exp": 60 - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/taboola/utils.go b/adapters/taboola/utils.go new file mode 100644 index 0000000000..2703ec69ad --- /dev/null +++ b/adapters/taboola/utils.go @@ -0,0 +1,5 @@ +package taboola + +type RequestExt struct { + PageType string `json:"pageType,omitempty"` +} diff --git a/adapters/tadvertising_blis/params_test.go b/adapters/tadvertising_blis/params_test.go deleted file mode 100644 index 6e3d5ad138..0000000000 --- a/adapters/tadvertising_blis/params_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package tadvertising_blis - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type testSpec struct { - name string - json string - wantErr bool -} - -func testParams(t *testing.T, specs []testSpec) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json schema") - - for _, spec := range specs { - t.Run(spec.name, func(t *testing.T) { - err := validator.Validate(openrtb_ext.BidderTAdvertisingBlis, json.RawMessage(spec.json)) - if spec.wantErr { - assert.Error(t, err, "Expected error but got none for: %s", spec.json) - } else { - assert.NoError(t, err, "Unexpected error for: %s", spec.json) - } - }) - } -} - -func TestValidParams(t *testing.T) { - testParams(t, []testSpec{ - { - name: "Valid params with publisherId", - json: `{"publisherId": "1427ab10f2e448057ed3b422"}`, - }, - }) -} - -func TestInvalidParams(t *testing.T) { - testParams(t, []testSpec{ - { - name: "Empty params", - json: `{}`, - wantErr: true, - }, - { - name: "Empty publisherId", - json: `{"publisherId": ""}`, - wantErr: true, - }, - { - name: "Invalid publisherId type", - json: `{"publisherId": 123}`, - wantErr: true, - }, - { - name: "Too long publisherId", - json: `{"publisherId": "111111111111111111111111111111111"}`, - wantErr: true, - }, - }) -} diff --git a/adapters/tadvertising_blis/tadvertising_blis.go b/adapters/tadvertising_blis/tadvertising_blis.go deleted file mode 100644 index 982f73d2e3..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blis.go +++ /dev/null @@ -1,151 +0,0 @@ -package tadvertising_blis - -import ( - "fmt" - "net/http" - "strconv" - "strings" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iterutil" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{} - bidder.endpoint = config.Endpoint - return bidder, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var impExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(request.Imp[0].Ext, &impExt); err != nil { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Invalid imp.ext for impression index %d. Error Information: %v", 0, err), - }} - } - var impExtBidder openrtb_ext.ImpExtTadvertising - if err := jsonutil.Unmarshal(impExt.Bidder, &impExtBidder); err != nil { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Invalid imp.ext.bidder for impression index %d. Error Information: %v", 0, err), - }} - } - - if request.Site != nil && request.App == nil { - siteCopy := *request.Site - request.Site = &siteCopy - - if request.Site.Publisher != nil { - sitePublisherCopy := *request.Site.Publisher - request.Site.Publisher = &sitePublisherCopy - request.Site.Publisher.ID = impExtBidder.PublisherId - } else { - request.Site.Publisher = &openrtb2.Publisher{} - request.Site.Publisher.ID = impExtBidder.PublisherId - } - } else if request.App != nil { - appCopy := *request.App - request.App = &appCopy - - if request.App.Publisher != nil { - appPublisherCopy := *request.App.Publisher - request.App.Publisher = &appPublisherCopy - request.App.Publisher.ID = impExtBidder.PublisherId - } else { - request.App.Publisher = &openrtb2.Publisher{} - request.App.Publisher.ID = impExtBidder.PublisherId - } - } else { - request.Site = &openrtb2.Site{} - request.Site.Publisher = &openrtb2.Publisher{} - request.Site.Publisher.ID = impExtBidder.PublisherId - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json") - headers.Add("X-Supply-Partner-Id", impExtBidder.PublisherId) - - requestJSON, err := jsonutil.Marshal(request) - if err != nil { - return nil, []error{err} - } - - requestData := &adapters.RequestData{ - Method: http.MethodPost, - Uri: a.endpoint, - Headers: headers, - Body: requestJSON, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - - return []*adapters.RequestData{requestData}, nil -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - if response.Cur != "" { - bidResponse.Currency = response.Cur - } - - var errors []error - for seatBid := range iterutil.SlicePointerValues(response.SeatBid) { - for bid := range iterutil.SlicePointerValues(seatBid.Bid) { - resolveMacros(bid) - bidType, err := getMediaTypeForBid(bid) - if err != nil { - errors = append(errors, err) - continue - } - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - }) - } - } - return bidResponse, errors -} - -func getMediaTypeForBid(bid *openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Failed to parse media type of impression ID \"%s\"", bid.ImpID), - } - } -} - -func resolveMacros(bid *openrtb2.Bid) { - if bid != nil { - price := strconv.FormatFloat(bid.Price, 'f', -1, 64) - bid.NURL = strings.ReplaceAll(bid.NURL, "${AUCTION_PRICE}", price) - bid.AdM = strings.ReplaceAll(bid.AdM, "${AUCTION_PRICE}", price) - bid.BURL = strings.ReplaceAll(bid.BURL, "${AUCTION_PRICE}", price) - } -} diff --git a/adapters/tadvertising_blis/tadvertising_blis_test.go b/adapters/tadvertising_blis/tadvertising_blis_test.go deleted file mode 100644 index a68a35bfc1..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blis_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package tadvertising_blis - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderTAdvertisingBlis, config.Adapter{ - Endpoint: "https://example.endpoint/"}, - config.Server{ExternalUrl: "http://example.server", GvlID: 1, DataCenter: "2"}) - - require.NoError(t, buildErr) - - adapterstest.RunJSONBidderTest(t, "tadvertising_blistest", bidder) -} diff --git a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/banner.json b/adapters/tadvertising_blis/tadvertising_blistest/exemplary/banner.json deleted file mode 100644 index 78b8ccb3ee..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/banner.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/native.json b/adapters/tadvertising_blis/tadvertising_blistest/exemplary/native.json deleted file mode 100644 index 6166d024a9..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/native.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "123456789", - "imp": [ - { - "id": "testimp", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}},{\"id\":3,\"data\":{\"type\":2}}]}", - "ver": "1.2" - }, - "bidfloor": 0.98, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "cur": ["USD"], - "site": { - "publisher": { - "domain": "example.com" - }, - "page": "http://lh.example.com/prebid_server_kitchen_sink.html?pbjs_debug=true", - "cat": ["site-cat"] - }, - "device": { - "w": 1434, - "h": 686, - "geo": { - "country": "USA" - }, - "ip": "8.8.8.8" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": ["testimp"], - "body": { - "id": "123456789", - "imp": [ - { - "id": "testimp", - "native": { - "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":90}},{\"id\":2,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}},{\"id\":3,\"data\":{\"type\":2}}]}", - "ver": "1.2" - }, - "bidfloor": 0.98, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "cat": ["site-cat"], - "page": "http://lh.example.com/prebid_server_kitchen_sink.html?pbjs_debug=true", - "publisher": { - "domain": "example.com", - "id": "123" - } - }, - "device": { - "geo": { - "country": "USA" - }, - "ip": "8.8.8.8", - "h": 686, - "w": 1434 - }, - "cur": ["USD"] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "123456789", - "seatbid": [ - { - "seat": "None", - "bid": [ - { - "id": "1", - "impid": "testimp", - "price": 1.3, - "crid": "9999999", - "adomain": ["example.com"], - "cid": "999999", - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Native Ad Title\"}},{\"id\":2,\"img\":{\"url\":\"https://adserverexample.com/image.jpg\",\"w\":1200,\"h\":627}},{\"id\":3,\"data\":{\"value\":\"Sponsored\"}}],\"link\":{\"url\":\"https://clickexample.com\"},\"imptrackers\":[\"https://trackingexample.com/pixel?wp=${AUCTION_PRICE}\"]}}", - "cat": ["IAB3-1"], - "burl": "https://trackingexample.com/pixel?wp=${AUCTION_PRICE}", - "mtype": 4 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "1", - "impid": "testimp", - "price": 1.3, - "crid": "9999999", - "adomain": ["example.com"], - "cid": "999999", - "adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"title\":{\"text\":\"Native Ad Title\"}},{\"id\":2,\"img\":{\"url\":\"https://adserverexample.com/image.jpg\",\"w\":1200,\"h\":627}},{\"id\":3,\"data\":{\"value\":\"Sponsored\"}}],\"link\":{\"url\":\"https://clickexample.com\"},\"imptrackers\":[\"https://trackingexample.com/pixel?wp=1.3\"]}}", - "cat": ["IAB3-1"], - "burl": "https://trackingexample.com/pixel?wp=1.3", - "mtype": 4 - }, - "type": "native" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/video.json b/adapters/tadvertising_blis/tadvertising_blistest/exemplary/video.json deleted file mode 100644 index 352111a98e..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/exemplary/video.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "mockBidRequest": { - "id": "123456789", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "testimp", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480 - }, - "bidfloor": 0.98, - "bidfloorcur": "USD" - } - ], - "cur": [ - "USD" - ], - "site": { - "publisher": { - "domain": "example.com" - }, - "page": "http://lh.example.com/prebid_server_kitchen_sink.html?pbjs_debug=true", - "cat": [ - "site-cat" - ] - }, - "device": { - "w": 1434, - "h": 686, - "geo": { - "country": "USA" - }, - "ip": "8.8.8.8" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "testimp" - ], - "body": { - "id": "123456789", - "imp": [ - { - "id": "testimp", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480 - }, - "bidfloor": 0.98, - "bidfloorcur": "USD", - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "cat": [ - "site-cat" - ], - "page": "http://lh.example.com/prebid_server_kitchen_sink.html?pbjs_debug=true", - "publisher": { - "id": "123", - "domain": "example.com" - } - }, - "device": { - "geo": { - "country": "USA" - }, - "ip": "8.8.8.8", - "h": 686, - "w": 1434 - }, - "cur": [ - "USD" - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "123456789", - "seatbid": [ - { - "seat": "None", - "bid": [ - { - "id": "1", - "impid": "testimp", - "price": 1.5, - "crid": "9999999", - "w": 640, - "h": 480, - "adomain": ["example.com"], - "cid": "999999", - "adm": "blistracker", - "cat": ["IAB3-1"], - "burl": "https://trackingexample.com/pixel?wp=${AUCTION_PRICE}", - "mtype": 2 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "1", - "impid": "testimp", - "price": 1.5, - "crid": "9999999", - "w": 640, - "h": 480, - "adomain": ["example.com"], - "cid": "999999", - "adm": "blistracker", - "cat": ["IAB3-1"], - "burl": "https://trackingexample.com/pixel?wp=1.5", - "mtype": 2 - }, - "type": "video" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher.json deleted file mode 100644 index 427a68da63..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "site": { - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id.json deleted file mode 100644 index 06b0079923..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "site": { - "publisher": { - } - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id_in_app.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id_in_app.json deleted file mode 100644 index 5d490352a0..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_id_in_app.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "app": { - "publisher": { - } - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - }, - "app": { - "publisher": { - "id": "123" - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_in_app.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_in_app.json deleted file mode 100644 index bb88055867..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_publisher_in_app.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "app": { - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - }, - "app": { - "publisher": { - "id": "123" - } - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_site.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_site.json deleted file mode 100644 index f245874aa0..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/banner_no_site.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/bid-macro-replace.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/bid-macro-replace.json deleted file mode 100644 index de11c040f3..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/bid-macro-replace.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 2.3, - "protocol": 0, - "adm": "

I am an ad and cost ${AUCTION_PRICE}

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ], - "nurl": "https://test.com/${AUCTION_PRICE}", - "burl": "https://test.com/${AUCTION_PRICE}" - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 2.3, - "mtype": 1, - "adm": "

I am an ad and cost 2.3

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ], - "nurl": "https://test.com/2.3", - "burl": "https://test.com/2.3" - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext-bidder.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext-bidder.json deleted file mode 100644 index 2d0e1a270c..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext-bidder.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "ext": {} - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Invalid imp.ext.bidder for impression", - "comparison": "startswith" - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext.json deleted file mode 100644 index 31e261e6fa..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/invalid-imp-ext.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp" - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Invalid imp.ext for impression", - "comparison": "startswith" - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/multiImpressionsRequest.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/multiImpressionsRequest.json deleted file mode 100644 index 4108487e0e..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/multiImpressionsRequest.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id", - "bidfloor": 0, - "secure": 1 - }, - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id2", - "banner": { - "w": 300, - "h": 250, - "pos": 0, - "api": [ - ] - }, - "tagid": "test-tag-id2", - "bidfloor": 0, - "secure": 1 - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "deviceType": 2, - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "pid": "test-pid", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "coppa": 0, - "gdpr": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "headers": { - "Content-Type": ["application/json"], - "X-Supply-Partner-Id": ["123"] - }, - "impIDs": [ - "test-impression-id", - "test-impression-id2" - ], - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-impression-id", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id", - "secure": 1, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }, - { - "ext": { - "bidder": { - "publisherId": "123" - } - }, - "id": "test-impression-id2", - "banner": { - "w": 300, - "h": 250, - "pos": 0 - }, - "tagid": "test-tag-id2", - "secure": 1 - } - ], - "site": { - "publisher": { - "id": "123" - } - }, - "device": { - "devicetype": 2, - "ua": "test-user-agent", - "geo": { - "country": "US" - }, - "dnt": 0, - "lmt": 0, - "ip": "127.0.0.1", - "make": "test-make", - "model": "test-model", - "os": "test-os", - "osv": "test-osv", - "h": 1080, - "w": 1920, - "language": "en", - "ifa": "test-ifa" - }, - "test": 1, - "at": 1, - "tmax": 100, - "source": { - "fd": 1, - "tid": "test-transaction-id", - "pchain": "test-pchain", - "schain": { - "complete": 1, - "nodes": [ - { - "asi": "test-asi", - "sid": "test-sid", - "rid": "test-rid", - "name": "test-name", - "domain": "test-domain", - "hp": 1, - "ext": "test-ext" - } - ], - "ver": "1.0", - "ext": "test-ext" - }, - "ext": "test-ext" - }, - "regs": { - "gdpr": 0 - } - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "10b1e33f-fddc-4621-a472-d7bff0529cbf", - "seatbid": [ - { - "bid": [ - { - "id": "1", - "impid": "1", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - { - "id": "1", - "impid": "2", - "price": 0.78740156, - "protocol": 0, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "attr": [], - "api": 0, - "mtype": 1, - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - } - ], - "seat": "2271" - } - ], - "cur": "USD", - "ext": { - "uss": 1 - } - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "1", - "impid": "1", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - }, - { - "bid": { - "id": "1", - "impid": "2", - "price": 0.78740156, - "mtype": 1, - "adm": "

I am an ad

", - "adomain": [ - "emetriq.com" - ], - "cid": "ay35w7m", - "crid": "id8tke3f", - "w": 300, - "h": 250, - "cat": [ - "IAB2", - "IAB2-3" - ] - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-204.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-204.json deleted file mode 100644 index d75a72db37..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-204.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req", - "site": { - "page": "prebid.org" - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "body": { - "id": "test-req", - "site": { - "page": "prebid.org", - "publisher": { - "id": "123" - } - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "impIDs":["test-imp"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - } - ] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-500.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-500.json deleted file mode 100644 index 90f52ce01b..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/response-http-500.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req", - "site": { - "page": "prebid.org" - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "body": { - "id": "test-req", - "site": { - "page": "prebid.org", - "publisher": { - "id": "123" - } - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "impIDs":["test-imp"] - }, - "mockResponse": { - "status": 500, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [{ - "value": "Unexpected status code", - "comparison": "startswith" - }] -} \ No newline at end of file diff --git a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/unsupported-media-type.json b/adapters/tadvertising_blis/tadvertising_blistest/supplemental/unsupported-media-type.json deleted file mode 100644 index 8751c015e4..0000000000 --- a/adapters/tadvertising_blis/tadvertising_blistest/supplemental/unsupported-media-type.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-req", - "site": { - "page": "prebid.org" - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://example.endpoint/", - "body": { - "id": "test-req", - "site": { - "page": "prebid.org", - "publisher": { - "id": "123" - } - }, - "imp": [{ - "id": "test-imp", - "banner": { - "format": [{ - "w": 300, - "h": 600 - }] - }, - "ext": { - "bidder": { - "publisherId": "123" - } - } - }] - }, - "impIDs":["test-imp"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-req", - "seatbid": [ - { - "seat": "None", - "bid": [ - { - "id": "1", - "impid": "testimp", - "price": 1.2, - "crid": "9999999", - "w": 320, - "h": 50, - "adomain": [ - "example.com" - ], - "cid": "999999", - "adm": "\"\"", - "burl": "https://trackingexample.com/pixel?wp=${AUCTION_PRICE}", - "mtype": 6 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - ] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Failed to parse media type of impression ID \"testimp\"", - "comparison": "literal" - } - ] -} \ No newline at end of file diff --git a/adapters/tappx/params_test.go b/adapters/tappx/params_test.go index fd174f8309..07b56bf80c 100644 --- a/adapters/tappx/params_test.go +++ b/adapters/tappx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -35,21 +35,7 @@ func TestInvalidParams(t *testing.T) { var validParams = []string{ `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host.example.com"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host.example.com:8080"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host-example.test"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"Host.Example.com"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"localhost:3000"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"/path"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"//evil.com"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host/path"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host?query=1"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host#fragment"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"user@host"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"https://host.com"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host:notaport"}`, - `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"host:8080:extra"}`, + `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com"}`, `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com", "bidfloor":0.5}`, `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com", "bidfloor":0.5, "mktag":"txmk-xxxxx-xxx-xxxx"}`, `{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com", "bidfloor":0.5, "bcid":["123"]}`, diff --git a/adapters/tappx/tappx.go b/adapters/tappx/tappx.go index 51738aa09c..71bad1543b 100644 --- a/adapters/tappx/tappx.go +++ b/adapters/tappx/tappx.go @@ -11,13 +11,12 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const TAPPX_BIDDER_VERSION = "1.6" @@ -119,9 +118,7 @@ func (a *TappxAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapt }}, []error{} } -// Builds endpoint url based on adapter-specific pub settings from imp.ext. -// NOTE: The deprecated "host" param (params.Host) is intentionally unused here. -// If it is ever reintroduced, it MUST be validated with urlutil.IsSafeHost to prevent SSRF. +// Builds enpoint url based on adapter-specific pub settings from imp.ext func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test int) (string, error) { if params.Endpoint == "" { @@ -135,6 +132,7 @@ func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test in Message: "Tappx key undefined", } } + isNewEndpoint, err := regexp.Match(`^(zz|vz)[0-9]{3,}([a-z]{2,3}|test)$`, []byte(params.Endpoint)) if err != nil { return "", &errortypes.BadInput{ @@ -143,17 +141,8 @@ func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test in } var tappxHost string if isNewEndpoint { - // Defense-in-depth: the runtime regex above is stricter than IsSafeHost, - // so this check is currently unreachable. It guards against future relaxation - // of the regex inadvertently allowing SSRF via subdomain injection. - if !urlutil.IsSafeHost(params.Endpoint) { - return "", &errortypes.BadInput{ - Message: "Invalid Tappx endpoint", - } - } tappxHost = params.Endpoint + ".pub.tappx.com/rtb/" } else { - // endpoint is used as a path segment on fixed domain: ssp.api.tappx.com/rtb/v2/{endpoint} tappxHost = "ssp.api.tappx.com/rtb/v2/" } diff --git a/adapters/tappx/tappx_test.go b/adapters/tappx/tappx_test.go index 2fc8b61665..3643a58cc4 100644 --- a/adapters/tappx/tappx_test.go +++ b/adapters/tappx/tappx_test.go @@ -4,9 +4,9 @@ import ( "regexp" "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/targetVideo/params_test.go b/adapters/targetVideo/params_test.go deleted file mode 100644 index 1839f0bbe6..0000000000 --- a/adapters/targetVideo/params_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package targetVideo - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json-schemas") - - for _, validParam := range validParams { - assert.NoError(t, validator.Validate(openrtb_ext.BidderTargetVideo, json.RawMessage(validParam)), - "Schema rejected targetVideo params: %s", validParam) - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json-schemas") - - for _, invalidParam := range invalidParams { - assert.Error(t, validator.Validate(openrtb_ext.BidderTargetVideo, json.RawMessage(invalidParam)), - "Schema should have rejected unexpected params: %s", invalidParam) - } -} - -var validParams = []string{ - `{"placementId":846}`, - `{"placementId":"846"}`, -} - -var invalidParams = []string{ - `null`, - `nil`, - `undefined`, - `{"placementId": "%9"}`, - `{"publisherId": "as9""}`, - `{"placementId": true}`, - `{"placementId": ""}`, -} diff --git a/adapters/targetVideo/targetvideo.go b/adapters/targetVideo/targetvideo.go deleted file mode 100644 index a9649f0ddb..0000000000 --- a/adapters/targetVideo/targetvideo.go +++ /dev/null @@ -1,142 +0,0 @@ -package targetVideo - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var errors []error - totalImps := len(request.Imp) - adapterRequests := make([]*adapters.RequestData, 0, totalImps) - - // Split multi-imp request into multiple ad server requests. SRA is currently not recommended. - for i := 0; i < totalImps; i++ { - adapterReq, err := a.makeRequest(*request, request.Imp[i]) - if err != nil { - errors = append(errors, err) - continue - } - adapterRequests = append(adapterRequests, adapterReq) - } - - return adapterRequests, errors -} - -func (a *adapter) makeRequest(request openrtb2.BidRequest, imp openrtb2.Imp) (*adapters.RequestData, error) { - - // For now, this adapter sends one imp per request, but we still - // iterate over all imps in the request to perform the required - // imp.ext transformation. - request.Imp = []openrtb2.Imp{imp} - - for i := range request.Imp { - - var extBidder adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &extBidder); err != nil { - return nil, &errortypes.BadInput{Message: "Invalid ext.bidder"} - } - var extImpTargetVideo openrtb_ext.ExtImpTargetVideo - if err := jsonutil.Unmarshal(extBidder.Bidder, &extImpTargetVideo); err != nil { - return nil, err - } - - prebid := extBidder.Prebid - if prebid == nil { - prebid = &openrtb_ext.ExtImpPrebid{} - } - if prebid.StoredRequest == nil { - prebid.StoredRequest = &openrtb_ext.ExtStoredRequest{} - } - prebid.StoredRequest.ID = fmt.Sprintf("%d", extImpTargetVideo.PlacementId) - - var extMap map[string]json.RawMessage - if err := jsonutil.Unmarshal(imp.Ext, &extMap); err != nil { - return nil, &errortypes.BadInput{Message: fmt.Sprintf("error parsing imp.ext, err: %s", err)} - } - delete(extMap, "bidder") - - prebidRaw, err := jsonutil.Marshal(prebid) - if err != nil { - return nil, &errortypes.BadInput{Message: fmt.Sprintf("error building imp.ext.prebid, err: %s", err)} - } - extMap["prebid"] = prebidRaw - - extRaw, err := jsonutil.Marshal(extMap) - if err != nil { - return nil, &errortypes.BadInput{Message: fmt.Sprintf("error building imp.ext, err: %s", err)} - } - - request.Imp[i].Ext = extRaw - - } - - reqJSON, err := jsonutil.Marshal(request) - if err != nil { - return nil, err - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - - return &adapters.RequestData{ - Method: "POST", - Uri: a.endpoint, - Body: reqJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - }, nil -} - -func (a *adapter) MakeBids(bidReq *openrtb2.BidRequest, unused *adapters.RequestData, httpRes *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(httpRes) { - return nil, nil - } - if statusError := adapters.CheckResponseStatusCodeForErrors(httpRes); statusError != nil { - return nil, []error{statusError} - } - - bidResp, errResp := prepareBidResponse(httpRes.Body) - if errResp != nil { - return nil, []error{errResp} - } - - br := adapters.NewBidderResponse() - - for _, sb := range bidResp.SeatBid { - for i := range sb.Bid { - bid := sb.Bid[i] - br.Bids = append(br.Bids, &adapters.TypedBid{Bid: &bid, BidType: openrtb_ext.BidTypeVideo}) - br.Currency = bidResp.Cur - } - } - return br, nil -} - -func prepareBidResponse(body []byte) (openrtb2.BidResponse, error) { - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(body, &response); err != nil { - return response, err - } - return response, nil -} - -func Builder(bidderName openrtb_ext.BidderName, cfg config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: cfg.Endpoint, - } - return bidder, nil -} diff --git a/adapters/targetVideo/targetvideo_test.go b/adapters/targetVideo/targetvideo_test.go deleted file mode 100644 index 39ddd9d82b..0000000000 --- a/adapters/targetVideo/targetvideo_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package targetVideo - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderTargetVideo, config.Adapter{ - Endpoint: "http://localhost/pbs"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - require.NoError(t, buildErr, "Builder returned unexpected error") - - adapterstest.RunJSONBidderTest(t, "targetvideotest", bidder) -} diff --git a/adapters/targetVideo/targetvideotest/exemplary/app-video.json b/adapters/targetVideo/targetvideotest/exemplary/app-video.json deleted file mode 100644 index 88557a1e46..0000000000 --- a/adapters/targetVideo/targetvideotest/exemplary/app-video.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "app": { - "id": "appID", - "publisher": { - "id": "uniq_pub_id" - } - }, - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - } - } - } - ], - "device": { - "ua": "test-user-agent" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "app": { - "id": "appID", - "publisher": { - "id": "uniq_pub_id" - } - }, - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent" - }, - "cur": ["EUR"] - }, - "impIDs":["test-imp-id-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id-video", - "seatbid": [ - { - "seat": "targetVideo", - "bid": [ - { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adid": "12345678", - "adm": "test-imp-id-video", - "cid": "789", - "crid": "12345678", - "h": 360, - "w": 640 - } - ] - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids" : [{ - "bid": { - "id": "randomID", - "adid": "12345678", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "crid": "12345678", - "cid": "789", - "h": 360, - "w": 640 - }, - "type": "video" - }] - } - ] -} diff --git a/adapters/targetVideo/targetvideotest/exemplary/site-video.json b/adapters/targetVideo/targetvideotest/exemplary/site-video.json deleted file mode 100644 index fcb6e34ed3..0000000000 --- a/adapters/targetVideo/targetvideotest/exemplary/site-video.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs":["test-imp-id-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id-video", - "seatbid": [ - { - "seat": "targetVideo", - "bid": [ - { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "cid": "789", - "crid": "12345678", - "h": 360, - "w": 640 - } - ] - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids" : [{ - "bid": { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "crid": "12345678", - "cid": "789", - "h": 360, - "w": 640 - }, - "type": "video" - }] - } - ] -} diff --git a/adapters/targetVideo/targetvideotest/supplemental/204.json b/adapters/targetVideo/targetvideotest/supplemental/204.json deleted file mode 100644 index c64d797b32..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/204.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs":["test-imp-id-video"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/targetVideo/targetvideotest/supplemental/400.json b/adapters/targetVideo/targetvideotest/supplemental/400.json deleted file mode 100644 index e69838a3c1..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/400.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs":["test-imp-id-video"] - }, - "mockResponse": { - "status": 400, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/targetVideo/targetvideotest/supplemental/ext-bidder-error.json b/adapters/targetVideo/targetvideotest/supplemental/ext-bidder-error.json deleted file mode 100644 index 009d397e3f..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/ext-bidder-error.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "expectedMakeRequestsErrors": [ - { - "value": "Invalid ext.bidder", - "comparison": "literal" - } - ], - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": "invalid-ext" - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [] -} \ No newline at end of file diff --git a/adapters/targetVideo/targetvideotest/supplemental/no_seatbid.json b/adapters/targetVideo/targetvideotest/supplemental/no_seatbid.json deleted file mode 100644 index 73321a5838..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/no_seatbid.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs":["test-imp-id-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [{ - "currency": "USD" - }] -} diff --git a/adapters/targetVideo/targetvideotest/supplemental/overwrite-stored-request.json b/adapters/targetVideo/targetvideotest/supplemental/overwrite-stored-request.json deleted file mode 100644 index 1d611a7810..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/overwrite-stored-request.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - }, - "prebid": { - "storedrequest": { - "id": "existing-stored-req" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - } - } - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs": ["test-imp-id-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id-video", - "seatbid": [ - { - "seat": "targetVideo", - "bid": [ - { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "cid": "789", - "crid": "12345678", - "h": 360, - "w": 640 - } - ] - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [{ - "bid": { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "crid": "12345678", - "cid": "789", - "h": 360, - "w": 640 - }, - "type": "video" - }] - } - ] -} diff --git a/adapters/targetVideo/targetvideotest/supplemental/preserve-imp-ext-fields.json b/adapters/targetVideo/targetvideotest/supplemental/preserve-imp-ext-fields.json deleted file mode 100644 index 4db9285083..0000000000 --- a/adapters/targetVideo/targetvideotest/supplemental/preserve-imp-ext-fields.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id-video", - "cur": ["EUR"], - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "bidder": { - "placementId": "77777" - }, - "prebid": { - "is_rewarded_inventory": 1 - }, - "tid": "some-transaction-id", - "gpid": "/1234/main-player" - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": ["application/json"], - "Content-Type": ["application/json;charset=utf-8"] - }, - "uri": "http://localhost/pbs", - "body": { - "id": "test-request-id-video", - "imp": [ - { - "id": "test-imp-id-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 360 - }, - "ext": { - "prebid": { - "storedrequest": { - "id": "77777" - }, - "is_rewarded_inventory": 1 - }, - "tid": "some-transaction-id", - "gpid": "/1234/main-player" - } - } - ], - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "site": { - "domain": "www.publisher.com", - "page": "http://www.publisher.com/some/path", - "ext": { - "amp": 0 - } - }, - "cur": ["EUR"] - }, - "impIDs": ["test-imp-id-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id-video", - "seatbid": [ - { - "seat": "targetVideo", - "bid": [ - { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "cid": "789", - "crid": "12345678", - "h": 360, - "w": 640 - } - ] - } - ], - "cur": "EUR" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [{ - "bid": { - "id": "randomID", - "impid": "test-imp-id-video", - "price": 5.5, - "adm": "test-imp-id-video", - "crid": "12345678", - "cid": "789", - "h": 360, - "w": 640 - }, - "type": "video" - }] - } - ] -} diff --git a/adapters/teads/teads.go b/adapters/teads/teads.go index 81d6eb35ed..402392d1cc 100644 --- a/adapters/teads/teads.go +++ b/adapters/teads/teads.go @@ -9,12 +9,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Builder builds a new instance of the Teads adapter for the given bidder with the given config. diff --git a/adapters/teads/teads_test.go b/adapters/teads/teads_test.go index ce61f732c3..8499e6f139 100644 --- a/adapters/teads/teads_test.go +++ b/adapters/teads/teads_test.go @@ -3,9 +3,9 @@ package teads import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/teal/params_test.go b/adapters/teal/params_test.go deleted file mode 100644 index 34507b8967..0000000000 --- a/adapters/teal/params_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package teal - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderTeal, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected valid params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderTeal, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed invalid params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{"account":"abc"}`, - `{"account":"abc","placement":"def"}`, -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{}`, - `{"placement":"def"}`, - `{"account":123}`, - `{"account":""}`, - `{"account":"abc","placement":42}`, - `{"account":"abc","placement":""}`, -} diff --git a/adapters/teal/teal.go b/adapters/teal/teal.go deleted file mode 100644 index d46c5ab2ec..0000000000 --- a/adapters/teal/teal.go +++ /dev/null @@ -1,363 +0,0 @@ -package teal - -import ( - "encoding/json" - "errors" - "fmt" - "net/http" - "strings" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -const ( - msgAccountValidation = "account parameter failed validation" - msgPlacementValidation = "placement parameter failed validation" - msgImpExtParseFmt = "Error parsing imp.ext for impression %s" - msgImpExtBidderParseFmt = "Error parsing imp.ext.bidder for impression %s" - msgMixedAccountFmt = "mixed-account requests are not supported: imp %q account %q differs from request account %q" -) - -// adapter is the Teal openrtb2 bidder. -type adapter struct { - endpoint string -} - -// Builder builds a new instance of the Teal adapter for the given bidder with -// the given config. -func Builder(_ openrtb_ext.BidderName, cfg config.Adapter, _ config.Server) (adapters.Bidder, error) { - return &adapter{endpoint: cfg.Endpoint}, nil -} - -// MakeRequests transforms the openrtb2.BidRequest into a single Teal-bound HTTP -// request body: -// -// 1. Each imp's bidder-slot is decoded into ExtImpTeal and validated for -// non-blank account and (when present) non-blank placement. -// 2. Failed imps are dropped; their parse / validation errors are collected. -// 3. The first surviving imp's account is propagated to Site.Publisher.ID and -// App.Publisher.ID. Later imps must use that same account; an imp with a -// divergent account is rejected (BadInput) and dropped. -// 4. Each surviving imp gets imp.ext.prebid.storedrequest.id = placement when -// placement is set. -// 5. Request.Ext.bids is stamped with {"pbs": 1}. -// -// If no imp survives validation, returns (nil, errs) without dispatching. -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - if len(request.Imp) == 0 { - return nil, nil - } - - modifiedImps := make([]openrtb2.Imp, 0, len(request.Imp)) - var errs []error - var account string - - for i := range request.Imp { - imp := request.Imp[i] - ext, err := parseImpExt(&imp) - if err != nil { - errs = append(errs, &errortypes.BadInput{Message: err.Error()}) - continue - } - if err := validateImpExt(ext); err != nil { - errs = append(errs, &errortypes.BadInput{Message: err.Error()}) - continue - } - - // All imps in a request must agree on account, which drives the single - // request-level publisher.id. The first valid imp establishes it; a later - // imp with a different account is rejected and dropped. - if account == "" { - account = ext.Account - } else if ext.Account != account { - errs = append(errs, &errortypes.BadInput{ - Message: fmt.Sprintf(msgMixedAccountFmt, imp.ID, ext.Account, account), - }) - continue - } - - modified, err := modifyImp(&imp, ext.Placement) - if err != nil { - errs = append(errs, &errortypes.BadInput{Message: err.Error()}) - continue - } - modifiedImps = append(modifiedImps, *modified) - } - - if len(modifiedImps) == 0 { - return nil, errs - } - - modifiedRequest, err := modifyBidRequest(request, account, modifiedImps) - if err != nil { - return nil, append(errs, err) - } - - body, err := jsonutil.Marshal(modifiedRequest) - if err != nil { - return nil, append(errs, err) - } - - return []*adapters.RequestData{{ - Method: http.MethodPost, - Uri: a.endpoint, - Body: body, - Headers: standardHeaders(), - ImpIDs: openrtb_ext.GetImpIDs(modifiedRequest.Imp), - }}, errs -} - -// parseImpExt decodes imp.ext.bidder into ExtImpTeal. -func parseImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpTeal, error) { - var bidderExt adapters.ExtImpBidder - if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil { - return nil, fmt.Errorf(msgImpExtParseFmt, imp.ID) - } - var ext openrtb_ext.ExtImpTeal - if err := jsonutil.Unmarshal(bidderExt.Bidder, &ext); err != nil { - return nil, fmt.Errorf(msgImpExtBidderParseFmt, imp.ID) - } - return &ext, nil -} - -// validateImpExt requires a non-blank account and, when placement is present -// (non-nil), a non-blank placement. Absent placement is allowed. -func validateImpExt(ext *openrtb_ext.ExtImpTeal) error { - if isBlank(ext.Account) { - return errors.New(msgAccountValidation) - } - if ext.Placement != nil && isBlank(*ext.Placement) { - return errors.New(msgPlacementValidation) - } - return nil -} - -// isBlank reports whether s is empty or contains only whitespace. -func isBlank(s string) bool { - return strings.TrimSpace(s) == "" -} - -// modifyImp returns a copy of imp with imp.ext.prebid.storedrequest.id set to -// *placement. Returns the imp unchanged when placement is nil. Existing -// prebid or storedrequest sub-keys that are not JSON objects are tolerated by -// replacing them with fresh objects. -func modifyImp(imp *openrtb2.Imp, placement *string) (*openrtb2.Imp, error) { - if placement == nil { - return imp, nil - } - - ext, err := decodeJSONObject(imp.Ext) - if err != nil { - return nil, fmt.Errorf(msgImpExtParseFmt, imp.ID) - } - - prebid := decodeOrEmptyObject(ext["prebid"]) - storedRequest := decodeOrEmptyObject(prebid["storedrequest"]) - - placementJSON, err := jsonutil.Marshal(*placement) - if err != nil { - return nil, err - } - storedRequest["id"] = placementJSON - - storedRequestJSON, err := jsonutil.Marshal(storedRequest) - if err != nil { - return nil, err - } - prebid["storedrequest"] = storedRequestJSON - - prebidJSON, err := jsonutil.Marshal(prebid) - if err != nil { - return nil, err - } - ext["prebid"] = prebidJSON - - extJSON, err := jsonutil.Marshal(ext) - if err != nil { - return nil, err - } - - modified := *imp - modified.Ext = extJSON - return &modified, nil -} - -// decodeOrEmptyObject decodes raw as a JSON object map. Returns an empty map -// when raw is absent / "null" / not a JSON object. The returned map is NEVER -// nil — it is always safe to assign into. -func decodeOrEmptyObject(raw json.RawMessage) map[string]json.RawMessage { - out, _ := decodeJSONObject(raw) - return out -} - -// decodeJSONObject decodes raw into a JSON object map. Treats absent input -// AND the JSON literal `null` as "empty object". Returns the parse error -// untouched on invalid JSON or non-object root types so callers can surface a -// meaningful failure. The returned map is NEVER nil, even on error — callers -// can safely assign into it. -func decodeJSONObject(raw json.RawMessage) (map[string]json.RawMessage, error) { - if len(raw) == 0 { - return make(map[string]json.RawMessage), nil - } - var parsed map[string]json.RawMessage - if err := jsonutil.Unmarshal(raw, &parsed); err != nil { - return make(map[string]json.RawMessage), err - } - if parsed == nil { - return make(map[string]json.RawMessage), nil - } - return parsed, nil -} - -// modifyBidRequest applies the request-level mutations: -// -// - Site.Publisher.ID is overwritten with account when site is non-nil -// - App.Publisher.ID is overwritten with account when app is non-nil -// - Request.Ext.bids is stamped with {"pbs":1} -// -// Returns a value-copy with mutated fields; the caller's request is untouched. -func modifyBidRequest(request *openrtb2.BidRequest, account string, modifiedImps []openrtb2.Imp) (*openrtb2.BidRequest, error) { - modified := *request - modified.Imp = modifiedImps - - if request.Site != nil { - site := *request.Site - site.Publisher = clonePublisherWithID(site.Publisher, account) - modified.Site = &site - } - if request.App != nil { - app := *request.App - app.Publisher = clonePublisherWithID(app.Publisher, account) - modified.App = &app - } - - extJSON, err := mergeBidsPBSFlag(request.Ext) - if err != nil { - return nil, err - } - modified.Ext = extJSON - return &modified, nil -} - -// clonePublisherWithID returns a copy of publisher with ID overwritten, -// creating a fresh Publisher when publisher is nil. -func clonePublisherWithID(publisher *openrtb2.Publisher, id string) *openrtb2.Publisher { - if publisher == nil { - return &openrtb2.Publisher{ID: id} - } - pub := *publisher - pub.ID = id - return &pub -} - -// mergeBidsPBSFlag returns existingExt with the "bids" property set to -// {"pbs":1}; other ext fields are preserved. The "pbs":1 marker is a Teal-side -// reporting/billing signal — it tells Teal's exchange the request is being -// routed via prebid-server, distinguishing it from direct integrations. -func mergeBidsPBSFlag(existingExt json.RawMessage) (json.RawMessage, error) { - ext, err := decodeJSONObject(existingExt) - if err != nil { - return nil, fmt.Errorf("teal: failed parsing request.ext: %w", err) - } - // Overwrite any caller-provided ext.bids: the {"pbs":1} marker must be - // authoritative for Teal's reporting/billing pipeline, so a value set by the - // publisher or upstream middleware is intentionally replaced, not merged. - ext["bids"] = json.RawMessage(`{"pbs":1}`) - return jsonutil.Marshal(ext) -} - -// MakeBids parses the Teal bid response body and packages the bids into a -// BidderResponse. Status handling follows the canonical adapters helpers: -// 204 → no-content shortcut, 4xx/5xx → BadServerResponse, 200 → parse body. -// Bids whose media type cannot be resolved from the matching imp are skipped -// and their error collected, rather than silently mis-typed as banner. -func (a *adapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(responseData) { - return nil, nil - } - if err := adapters.CheckResponseStatusCodeForErrors(responseData); err != nil { - return nil, []error{err} - } - - var bidResponse openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &bidResponse); err != nil { - return nil, []error{&errortypes.BadServerResponse{Message: err.Error()}} - } - - impsByID := make(map[string]openrtb2.Imp, len(request.Imp)) - for _, imp := range request.Imp { - impsByID[imp.ID] = imp - } - - bidderResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - if bidResponse.Cur != "" { - bidderResponse.Currency = bidResponse.Cur - } - var errs []error - for _, seatBid := range bidResponse.SeatBid { - for i := range seatBid.Bid { - bid := &seatBid.Bid[i] - bidType, err := getBidType(bid, impsByID) - if err != nil { - errs = append(errs, err) - continue - } - bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - }) - } - } - return bidderResponse, errs -} - -// getBidType resolves the bid's media type. Teal declares multiformat-supported, -// so a single impression can carry more than one media type (e.g. banner+video); -// introspecting the imp alone cannot disambiguate which format a given bid is for. -// The authoritative signal is the response's own bid.mtype (OpenRTB 2.6), so it is -// consulted first. -// -// Only when the response omits mtype does getBidType fall back to introspecting the -// matching impression, looked up by ID via impsByID (built once in MakeBids to avoid -// a per-bid scan of request.Imp), in banner > video > native order. Audio is omitted -// because it is not in Teal's declared capabilities. -// -// When neither the bid's mtype nor a matching imp yields a recognized media type, -// getBidType returns an error so MakeBids can skip the bid and surface the problem in -// logs rather than silently mis-typing it. -func getBidType(bid *openrtb2.Bid, impsByID map[string]openrtb2.Imp) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - } - if imp, ok := impsByID[bid.ImpID]; ok { - switch { - case imp.Banner != nil: - return openrtb_ext.BidTypeBanner, nil - case imp.Video != nil: - return openrtb_ext.BidTypeVideo, nil - case imp.Native != nil: - return openrtb_ext.BidTypeNative, nil - } - } - return "", &errortypes.BadServerResponse{ - Message: fmt.Sprintf("failed to determine bid type for imp %q", bid.ImpID), - } -} - -// standardHeaders returns the headers Teal expects on every outbound request. -func standardHeaders() http.Header { - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - return headers -} diff --git a/adapters/teal/teal_test.go b/adapters/teal/teal_test.go deleted file mode 100644 index 7ca4ced1d5..0000000000 --- a/adapters/teal/teal_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package teal - -import ( - "encoding/json" - "errors" - "net/http" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -const ( - testEndpoint = "https://test.example.com/bid" - testAccount = "test-account" - testRequestID = "test-request-banner" -) - -// End-to-end MakeRequests/MakeBids behavior is exercised by the JSON fixtures -// under tealtest/exemplary and tealtest/supplemental. The Go tests below cover -// only what fixtures cannot: the Go error-TYPE contract (BadInput vs -// BadServerResponse), short-circuit edges, and error branches of unexported -// helpers that are unreachable through MakeRequests. - -func TestJsonSamples(t *testing.T) { - bidder, err := Builder(openrtb_ext.BidderTeal, config.Adapter{Endpoint: testEndpoint}, - config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - require.NoError(t, err, "Builder returned unexpected error") - adapterstest.RunJSONBidderTest(t, "tealtest", bidder) -} - -// TestErrorClassification pins the error-type contract, which the JSON fixtures -// cannot verify (they compare error messages only): MakeRequests parse / -// validation / account-divergence errors are *errortypes.BadInput; MakeBids -// transport errors are BadInput for 4xx and *errortypes.BadServerResponse for -// 5xx and unparseable bodies. -func TestErrorClassification(t *testing.T) { - bidder := newTealBidder(t) - - t.Run("imp.ext parse error is BadInput", func(t *testing.T) { - imp := openrtb2.Imp{ - ID: "impId", - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Ext: json.RawMessage(`[]`), - } - requests, errs := bidder.MakeRequests(givenBidRequest(imp), &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - assert.Contains(t, errs[0].Error(), "Error parsing imp.ext for impression impId") - }) - - t.Run("imp.ext bidder field malformed is BadInput", func(t *testing.T) { - imp := givenBannerImp("impId", json.RawMessage(`{"bidder":[]}`)) - requests, errs := bidder.MakeRequests(givenBidRequest(imp), &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - assert.Contains(t, errs[0].Error(), "Error parsing imp.ext.bidder for impression impId") - }) - - t.Run("blank account is BadInput", func(t *testing.T) { - imp := givenBannerImp("imp1", givenImpExt(t, " ", strPtr("p"))) - requests, errs := bidder.MakeRequests(givenBidRequest(imp), &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - assert.Equal(t, msgAccountValidation, errs[0].Error()) - }) - - t.Run("blank placement is BadInput", func(t *testing.T) { - imp := givenBannerImp("imp1", givenImpExt(t, "acct", strPtr(" "))) - requests, errs := bidder.MakeRequests(givenBidRequest(imp), &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - assert.Equal(t, msgPlacementValidation, errs[0].Error()) - }) - - t.Run("divergent account is BadInput", func(t *testing.T) { - first := givenBannerImp("imp1", givenImpExt(t, "acct-a", strPtr("p1"))) - second := givenBannerImp("imp2", givenImpExt(t, "acct-b", strPtr("p2"))) - requests, errs := bidder.MakeRequests(givenBidRequest(first, second), &adapters.ExtraRequestInfo{}) - require.Len(t, requests, 1, "first imp still ships") - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - assert.Contains(t, errs[0].Error(), "mixed-account requests are not supported") - }) - - t.Run("malformed request.ext propagates parse error", func(t *testing.T) { - imp := givenBannerImp("imp1", givenImpExt(t, testAccount, nil)) - req := givenBidRequest(imp) - req.Ext = json.RawMessage(`{"prebid":}`) // syntactically invalid - requests, errs := bidder.MakeRequests(req, &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - require.NotEmpty(t, errs) - assert.Contains(t, errs[len(errs)-1].Error(), "failed parsing request.ext") - }) - - t.Run("MakeBids 4xx is BadInput", func(t *testing.T) { - resp, errs := makeBidsCall(t, bidder, &openrtb2.BidRequest{}, http.StatusBadRequest, []byte(`{}`)) - assert.Nil(t, resp) - require.Len(t, errs, 1) - assert.True(t, isBadInputErr(errs[0]), "got %T", errs[0]) - }) - - t.Run("MakeBids 5xx is BadServerResponse", func(t *testing.T) { - resp, errs := makeBidsCall(t, bidder, &openrtb2.BidRequest{}, http.StatusInternalServerError, []byte(`{}`)) - assert.Nil(t, resp) - require.Len(t, errs, 1) - assert.True(t, isBadServerErr(errs[0]), "got %T", errs[0]) - }) - - t.Run("MakeBids unparseable body is BadServerResponse", func(t *testing.T) { - resp, errs := makeBidsCall(t, bidder, &openrtb2.BidRequest{}, http.StatusOK, []byte("not-json")) - assert.Nil(t, resp) - require.Len(t, errs, 1) - assert.True(t, isBadServerErr(errs[0]), "got %T", errs[0]) - }) -} - -// TestMakeRequests_NoImps — empty Imp slice returns (nil, nil) before any work -// happens. -func TestMakeRequests_NoImps(t *testing.T) { - bidder := newTealBidder(t) - requests, errs := bidder.MakeRequests(&openrtb2.BidRequest{ID: "req"}, &adapters.ExtraRequestInfo{}) - assert.Nil(t, requests) - assert.Nil(t, errs) -} - -// TestGetBidType_Undeterminable — getBidType returns an explicit error (not a -// silent banner default) when the imp is missing or declares no media type, so -// MakeBids can skip the bid and surface the issue in logs. -func TestGetBidType_Undeterminable(t *testing.T) { - bid := &openrtb2.Bid{ImpID: "imp1"} - - t.Run("imp not found", func(t *testing.T) { - _, err := getBidType(bid, map[string]openrtb2.Imp{}) - require.Error(t, err) - assert.Contains(t, err.Error(), `failed to determine bid type for imp "imp1"`) - }) - - t.Run("imp has no media type", func(t *testing.T) { - imp := openrtb2.Imp{ID: "imp1"} - _, err := getBidType(bid, map[string]openrtb2.Imp{imp.ID: imp}) - require.Error(t, err) - assert.Contains(t, err.Error(), `failed to determine bid type for imp "imp1"`) - }) -} - -// TestModifyImp_MalformedExt — modifyImp's parse-error branch. Unreachable via -// MakeRequests (parseImpExt rejects non-object imp.ext first), so it cannot be -// a fixture. -func TestModifyImp_MalformedExt(t *testing.T) { - imp := &openrtb2.Imp{ID: "broken", Ext: json.RawMessage(`not-json`)} - got, err := modifyImp(imp, strPtr("p")) - assert.Nil(t, got) - require.Error(t, err) - assert.Contains(t, err.Error(), "Error parsing imp.ext for impression broken") -} - -// TestDecodeOrEmptyObject — the non-object branch is unreachable via -// MakeRequests (parseImpExt rejects those shapes first); the returned map must -// never be nil so callers can assign into it. -func TestDecodeOrEmptyObject(t *testing.T) { - t.Run("empty raw returns empty map", func(t *testing.T) { - out := decodeOrEmptyObject(nil) - assert.NotNil(t, out) - assert.Empty(t, out) - }) - - t.Run("non-object input returns empty map", func(t *testing.T) { - out := decodeOrEmptyObject(json.RawMessage(`[1,2,3]`)) - assert.NotNil(t, out) - assert.Empty(t, out) - }) - - t.Run("valid object input returns populated map", func(t *testing.T) { - out := decodeOrEmptyObject(json.RawMessage(`{"a":1,"b":"two"}`)) - assert.Len(t, out, 2) - assert.JSONEq(t, `1`, string(out["a"])) - assert.JSONEq(t, `"two"`, string(out["b"])) - }) -} - -// TestMergeBidsPBSFlag — pins the null-handling contract: a JSON literal `null` -// (or absent) ext must route through decodeJSONObject so the receiver map is -// non-nil before `ext["bids"] = ...`, which would otherwise panic with -// "assignment to entry in nil map". -func TestMergeBidsPBSFlag(t *testing.T) { - t.Run("null ext treated as empty object", func(t *testing.T) { - out, err := mergeBidsPBSFlag(json.RawMessage(`null`)) - require.NoError(t, err) - require.NotNil(t, out) - - var decoded map[string]json.RawMessage - require.NoError(t, json.Unmarshal(out, &decoded)) - assert.Len(t, decoded, 1, "null input should produce just the bids stamp") - assert.JSONEq(t, `{"pbs":1}`, string(decoded["bids"])) - }) - - t.Run("malformed ext returns wrapped error", func(t *testing.T) { - out, err := mergeBidsPBSFlag(json.RawMessage(`{"bids":`)) - assert.Nil(t, out) - require.Error(t, err) - assert.Contains(t, err.Error(), "failed parsing request.ext") - }) -} - -// --------------------------------------------------------------------------- -// Test helpers -// --------------------------------------------------------------------------- - -// strPtr returns a pointer to s. Used for the *string Placement field. -func strPtr(s string) *string { - return &s -} - -// newTealBidder builds the adapter via the canonical Builder. -func newTealBidder(t *testing.T) adapters.Bidder { - t.Helper() - bidder, err := Builder(openrtb_ext.BidderTeal, config.Adapter{Endpoint: testEndpoint}, - config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - require.NoError(t, err) - require.NotNil(t, bidder) - return bidder -} - -// givenImpExt produces the imp.ext shape Teal expects: {"bidder": ExtImpTeal}. -func givenImpExt(t *testing.T, account string, placement *string) json.RawMessage { - t.Helper() - inner := openrtb_ext.ExtImpTeal{Account: account, Placement: placement} - innerJSON, err := json.Marshal(inner) - require.NoError(t, err) - wrapper := map[string]json.RawMessage{"bidder": innerJSON} - out, err := json.Marshal(wrapper) - require.NoError(t, err) - return out -} - -// givenBannerImp returns a single banner imp with the supplied id and ext. -func givenBannerImp(id string, ext json.RawMessage) openrtb2.Imp { - return openrtb2.Imp{ - ID: id, - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Ext: ext, - } -} - -// givenBidRequest returns a minimal site-rooted BidRequest with the given imps. -func givenBidRequest(imps ...openrtb2.Imp) *openrtb2.BidRequest { - return &openrtb2.BidRequest{ - ID: testRequestID, - Imp: imps, - Site: &openrtb2.Site{ID: "demo-site", Publisher: &openrtb2.Publisher{ID: "demo-publisher"}}, - } -} - -// makeBidsCall wires a ResponseData and invokes MakeBids. -func makeBidsCall(t *testing.T, bidder adapters.Bidder, request *openrtb2.BidRequest, status int, body []byte) (*adapters.BidderResponse, []error) { - t.Helper() - return bidder.MakeBids(request, &adapters.RequestData{Method: http.MethodPost, Uri: testEndpoint}, - &adapters.ResponseData{StatusCode: status, Body: body}) -} - -// isBadInputErr returns true if err is or wraps an *errortypes.BadInput. -func isBadInputErr(err error) bool { - var target *errortypes.BadInput - return errors.As(err, &target) -} - -// isBadServerErr returns true if err is or wraps an *errortypes.BadServerResponse. -func isBadServerErr(err error) bool { - var target *errortypes.BadServerResponse - return errors.As(err, &target) -} diff --git a/adapters/teal/tealtest/exemplary/app-publisher-rewrite.json b/adapters/teal/tealtest/exemplary/app-publisher-rewrite.json deleted file mode 100644 index 25a46fb874..0000000000 --- a/adapters/teal/tealtest/exemplary/app-publisher-rewrite.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "app": { - "id": "demo-app", - "name": "Demo App", - "bundle": "com.example.demoapp", - "publisher": { - "id": "demo-publisher" - } - }, - "device": { - "ua": "Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36", - "ip": "192.0.2.10", - "language": "en", - "ifa": "demo-ifa" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "app": { - "id": "demo-app", - "name": "Demo App", - "bundle": "com.example.demoapp", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36", - "ip": "192.0.2.10", - "language": "en", - "ifa": "demo-ifa" - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "app-bid-1", - "impid": "test-imp-banner", - "price": 3.10, - "adm": "
app-banner
", - "w": 300, - "h": 250, - "crid": "app-creative-9" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "app-bid-1", - "impid": "test-imp-banner", - "price": 3.10, - "adm": "
app-banner
", - "w": 300, - "h": 250, - "crid": "app-creative-9" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/existing-request-ext.json b/adapters/teal/tealtest/exemplary/existing-request-ext.json deleted file mode 100644 index 7c21c085f0..0000000000 --- a/adapters/teal/tealtest/exemplary/existing-request-ext.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "ext": { - "tealcustom": "preserve-me", - "prebid": { - "channel": { - "name": "web" - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - }, - "prebid": { - "channel": { - "name": "web" - } - }, - "tealcustom": "preserve-me" - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "ext-bid", - "impid": "test-imp-banner", - "price": 1.75, - "adm": "
ext-preserved
", - "w": 300, - "h": 250, - "crid": "ext-creative" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "ext-bid", - "impid": "test-imp-banner", - "price": 1.75, - "adm": "
ext-preserved
", - "w": 300, - "h": 250, - "crid": "ext-creative" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/multi-format-imp-mtype.json b/adapters/teal/tealtest/exemplary/multi-format-imp-mtype.json deleted file mode 100644 index e8114b1969..0000000000 --- a/adapters/teal/tealtest/exemplary/multi-format-imp-mtype.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-multi-format-mtype", - "imp": [ - { - "id": "test-imp-multi-format", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480 - }, - "native": { - "request": "{\"ver\":\"1.2\"}" - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-multi" - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-multi-format-mtype", - "imp": [ - { - "id": "test-imp-multi-format", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480 - }, - "native": { - "request": "{\"ver\":\"1.2\"}" - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-multi" - }, - "prebid": { - "storedrequest": { - "id": "test-placement-multi" - } - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-multi-format"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-multi-format-mtype", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-banner", - "impid": "test-imp-multi-format", - "price": 1.75, - "adm": "
Teal Banner Ad
", - "mtype": 1, - "crid": "creative-banner" - }, - { - "id": "bid-video", - "impid": "test-imp-multi-format", - "price": 2.10, - "adm": "Teal Video Ad", - "mtype": 2, - "crid": "creative-video" - }, - { - "id": "bid-native", - "impid": "test-imp-multi-format", - "price": 0.90, - "adm": "{\"native\":{\"assets\":[]}}", - "mtype": 4, - "crid": "creative-native" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-banner", - "impid": "test-imp-multi-format", - "price": 1.75, - "adm": "
Teal Banner Ad
", - "mtype": 1, - "crid": "creative-banner" - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-video", - "impid": "test-imp-multi-format", - "price": 2.10, - "adm": "Teal Video Ad", - "mtype": 2, - "crid": "creative-video" - }, - "type": "video" - }, - { - "bid": { - "id": "bid-native", - "impid": "test-imp-multi-format", - "price": 0.90, - "adm": "{\"native\":{\"assets\":[]}}", - "mtype": 4, - "crid": "creative-native" - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/multi-format-imp.json b/adapters/teal/tealtest/exemplary/multi-format-imp.json deleted file mode 100644 index 534711f492..0000000000 --- a/adapters/teal/tealtest/exemplary/multi-format-imp.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-multi-format", - "imp": [ - { - "id": "test-imp-multi-format", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-multi" - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-multi-format", - "imp": [ - { - "id": "test-imp-multi-format", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "video": { - "mimes": [ - "video/mp4" - ], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-multi" - }, - "prebid": { - "storedrequest": { - "id": "test-placement-multi" - } - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-multi-format"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-multi-format", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-multi-format", - "impid": "test-imp-multi-format", - "price": 1.75, - "adm": "
Teal Multi-Format Ad
", - "w": 300, - "h": 250, - "crid": "creative-multi" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-multi-format", - "impid": "test-imp-multi-format", - "price": 1.75, - "adm": "
Teal Multi-Format Ad
", - "w": 300, - "h": 250, - "crid": "creative-multi" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/multi-imp-same-account.json b/adapters/teal/tealtest/exemplary/multi-imp-same-account.json deleted file mode 100644 index 978b639a14..0000000000 --- a/adapters/teal/tealtest/exemplary/multi-imp-same-account.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "shared-account", - "placement": "placement-1" - } - } - }, - { - "id": "test-imp-2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "account": "shared-account", - "placement": "placement-2" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "shared-account", - "placement": "placement-1" - }, - "prebid": { - "storedrequest": { - "id": "placement-1" - } - } - } - }, - { - "id": "test-imp-2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "account": "shared-account", - "placement": "placement-2" - }, - "prebid": { - "storedrequest": { - "id": "placement-2" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "shared-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-1", "test-imp-2"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-1", - "price": 1.10, - "adm": "
imp1
", - "w": 300, - "h": 250, - "crid": "c1" - }, - { - "id": "bid-2", - "impid": "test-imp-2", - "price": 0.80, - "adm": "
imp2
", - "w": 728, - "h": 90, - "crid": "c2" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-1", - "price": 1.10, - "adm": "
imp1
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - }, - { - "bid": { - "id": "bid-2", - "impid": "test-imp-2", - "price": 0.80, - "adm": "
imp2
", - "w": 728, - "h": 90, - "crid": "c2" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/native-imp.json b/adapters/teal/tealtest/exemplary/native-imp.json deleted file mode 100644 index 10012c7001..0000000000 --- a/adapters/teal/tealtest/exemplary/native-imp.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-native", - "imp": [ - { - "id": "test-imp-native", - "native": { - "request": "{\"ver\":\"1.1\"}" - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-native" - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": {"id": "demo-publisher"} - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-native", - "imp": [ - { - "id": "test-imp-native", - "native": {"request": "{\"ver\":\"1.1\"}"}, - "ext": { - "bidder": {"account": "test-account", "placement": "test-placement-native"}, - "prebid": {"storedrequest": {"id": "test-placement-native"}} - } - } - ], - "site": {"id": "demo-site", "publisher": {"id": "test-account"}}, - "ext": {"bids": {"pbs": 1}} - }, - "impIDs": ["test-imp-native"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-native", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-native-1", - "impid": "test-imp-native", - "price": 1.0, - "adm": "{\"native\":{\"assets\":[]}}" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-native-1", - "impid": "test-imp-native", - "price": 1.0, - "adm": "{\"native\":{\"assets\":[]}}" - }, - "type": "native" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/placement-absent.json b/adapters/teal/tealtest/exemplary/placement-absent.json deleted file mode 100644 index 3271695bb5..0000000000 --- a/adapters/teal/tealtest/exemplary/placement-absent.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-no-placement", - "impid": "test-imp-banner", - "price": 0.95, - "adm": "
no-placement
", - "w": 300, - "h": 250, - "crid": "creative-np" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-no-placement", - "impid": "test-imp-banner", - "price": 0.95, - "adm": "
no-placement
", - "w": 300, - "h": 250, - "crid": "creative-np" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/preserves-existing-imp-ext-prebid.json b/adapters/teal/tealtest/exemplary/preserves-existing-imp-ext-prebid.json deleted file mode 100644 index daf2d0c2e7..0000000000 --- a/adapters/teal/tealtest/exemplary/preserves-existing-imp-ext-prebid.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "foo": "bar", - "keyword": "keep-me", - "storedrequest": { - "unrelated": "value" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "foo": "bar", - "keyword": "keep-me", - "storedrequest": { - "unrelated": "value", - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/simple-banner.json b/adapters/teal/tealtest/exemplary/simple-banner.json deleted file mode 100644 index b143c66ed8..0000000000 --- a/adapters/teal/tealtest/exemplary/simple-banner.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "test-imp-banner", - "impid": "test-imp-banner", - "price": 2.50, - "adm": "
Teal Demo Ad
", - "w": 300, - "h": 250, - "crid": "demo-creative-123", - "exp": 300, - "ext": { - "origbidcpm": 2.50, - "origbidcur": "USD", - "prebid": { - "type": "banner", - "meta": { - "adaptercode": "teal" - } - } - } - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-banner", - "impid": "test-imp-banner", - "price": 2.50, - "adm": "
Teal Demo Ad
", - "w": 300, - "h": 250, - "crid": "demo-creative-123", - "exp": 300, - "ext": { - "origbidcpm": 2.50, - "origbidcur": "USD", - "prebid": { - "type": "banner", - "meta": { - "adaptercode": "teal" - } - } - } - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/site-no-publisher.json b/adapters/teal/tealtest/exemplary/site-no-publisher.json deleted file mode 100644 index c4f4415439..0000000000 --- a/adapters/teal/tealtest/exemplary/site-no-publisher.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - {"w": 300, "h": 250} - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": {"format": [{"w": 300, "h": 250}]}, - "ext": { - "bidder": {"account": "test-account", "placement": "test-placement300x250"}, - "prebid": {"storedrequest": {"id": "test-placement300x250"}} - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "publisher": {"id": "test-account"} - }, - "ext": {"bids": {"pbs": 1}} - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 2.0, - "w": 300, - "h": 250 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 2.0, - "w": 300, - "h": 250 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/exemplary/video-imp.json b/adapters/teal/tealtest/exemplary/video-imp.json deleted file mode 100644 index de91ee3235..0000000000 --- a/adapters/teal/tealtest/exemplary/video-imp.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-video", - "imp": [ - { - "id": "test-imp-video", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "minduration": 5, - "maxduration": 30, - "protocols": [2, 3, 5, 6] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-video" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-video", - "imp": [ - { - "id": "test-imp-video", - "video": { - "mimes": ["video/mp4"], - "minduration": 5, - "maxduration": 30, - "protocols": [2, 3, 5, 6], - "w": 640, - "h": 480 - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement-video" - }, - "prebid": { - "storedrequest": { - "id": "test-placement-video" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-video", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "video-bid-1", - "impid": "test-imp-video", - "price": 4.50, - "adm": "", - "w": 640, - "h": 480, - "crid": "video-creative-22" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "video-bid-1", - "impid": "test-imp-video", - "price": 4.50, - "adm": "", - "w": 640, - "h": 480, - "crid": "video-creative-22" - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/bid-unmatched-imp-skipped.json b/adapters/teal/tealtest/supplemental/bid-unmatched-imp-skipped.json deleted file mode 100644 index fd6db866a6..0000000000 --- a/adapters/teal/tealtest/supplemental/bid-unmatched-imp-skipped.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "good-bid", - "impid": "test-imp-banner", - "price": 1.25, - "adm": "
kept
", - "w": 300, - "h": 250, - "crid": "creative-1" - }, - { - "id": "orphan-bid", - "impid": "no-such-imp", - "price": 0.99, - "adm": "
skipped
", - "crid": "creative-2" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "good-bid", - "impid": "test-imp-banner", - "price": 1.25, - "adm": "
kept
", - "w": 300, - "h": 250, - "crid": "creative-1" - }, - "type": "banner" - } - ] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "failed to determine bid type for imp \"no-such-imp\"", - "comparison": "literal" - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/both-site-and-app.json b/adapters/teal/tealtest/supplemental/both-site-and-app.json deleted file mode 100644 index c19fee1396..0000000000 --- a/adapters/teal/tealtest/supplemental/both-site-and-app.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "site-pub" - } - }, - "app": { - "id": "demo-app", - "bundle": "com.demo.app", - "publisher": { - "id": "app-pub" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "app": { - "id": "demo-app", - "bundle": "com.demo.app", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/empty-seatbid.json b/adapters/teal/tealtest/supplemental/empty-seatbid.json deleted file mode 100644 index c7b2888b70..0000000000 --- a/adapters/teal/tealtest/supplemental/empty-seatbid.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-empty-seatbid", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account" - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-empty-seatbid", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account" - } - } - } - ], - "site": { - "id": "demo-site", - "publisher": { - "id": "test-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-empty-seatbid", - "cur": "USD", - "seatbid": [] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/malformed-body.json b/adapters/teal/tealtest/supplemental/malformed-body.json deleted file mode 100644 index 1c535d52bc..0000000000 --- a/adapters/teal/tealtest/supplemental/malformed-body.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "mockBidRequest": { - "device": { - "dnt": 0, - "ip": "192.0.2.1", - "language": "en", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "id": "test-request-banner", - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - }, - "id": "test-imp-banner" - } - ], - "regs": { - "ext": { - "gdpr": 0 - } - }, - "site": { - "domain": "example.com", - "id": "demo-site", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "user": { - "id": "demo-user" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": [ - "test-imp-banner" - ] - }, - "mockResponse": { - "status": 200, - "body": "this is not json" - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/mixed-imp-partial-failure.json b/adapters/teal/tealtest/supplemental/mixed-imp-partial-failure.json deleted file mode 100644 index 7943c744a5..0000000000 --- a/adapters/teal/tealtest/supplemental/mixed-imp-partial-failure.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - }, - { - "id": "test-imp-bad", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "account": "", - "placement": "test-placement728x90" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "good-bid", - "impid": "test-imp-banner", - "price": 1.25, - "adm": "
partial-success
", - "w": 300, - "h": 250, - "crid": "creative-1" - } - ] - } - ] - } - } - } - ], - "expectedMakeRequestsErrors": [ - { - "value": "account parameter failed validation", - "comparison": "literal" - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "good-bid", - "impid": "test-imp-banner", - "price": 1.25, - "adm": "
partial-success
", - "w": 300, - "h": 250, - "crid": "creative-1" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/multi-imp-divergent-account-rejected.json b/adapters/teal/tealtest/supplemental/multi-imp-divergent-account-rejected.json deleted file mode 100644 index a4df97da64..0000000000 --- a/adapters/teal/tealtest/supplemental/multi-imp-divergent-account-rejected.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "first-account", - "placement": "placement-1" - } - } - }, - { - "id": "test-imp-2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "ext": { - "bidder": { - "account": "second-account", - "placement": "placement-2" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "first-account", - "placement": "placement-1" - }, - "prebid": { - "storedrequest": { - "id": "placement-1" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "first-account" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-1", - "price": 1.10, - "adm": "
imp1
", - "w": 300, - "h": 250, - "crid": "c1" - } - ] - } - ] - } - } - } - ], - "expectedMakeRequestsErrors": [ - { - "value": "mixed-account requests are not supported: imp \"test-imp-2\" account \"second-account\" differs from request account \"first-account\"", - "comparison": "literal" - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-1", - "price": 1.10, - "adm": "
imp1
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/multi-seatbid.json b/adapters/teal/tealtest/supplemental/multi-seatbid.json deleted file mode 100644 index 964b37c14d..0000000000 --- a/adapters/teal/tealtest/supplemental/multi-seatbid.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "multi-acct", - "placement": "pb" - } - } - }, - { - "id": "imp-video", - "video": { - "mimes": ["video/mp4"] - }, - "ext": { - "bidder": { - "account": "multi-acct", - "placement": "pv" - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "multi-acct", - "placement": "pb" - }, - "prebid": { - "storedrequest": { - "id": "pb" - } - } - } - }, - { - "id": "imp-video", - "video": { - "mimes": ["video/mp4"] - }, - "ext": { - "bidder": { - "account": "multi-acct", - "placement": "pv" - }, - "prebid": { - "storedrequest": { - "id": "pv" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "multi-acct" - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["imp-banner", "imp-video"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "EUR", - "seatbid": [ - { - "seat": "s1", - "bid": [ - { - "id": "b1", - "impid": "imp-banner", - "price": 1.00, - "adm": "
banner
", - "w": 300, - "h": 250, - "crid": "c1" - }, - { - "id": "b2", - "impid": "imp-video", - "price": 2.00, - "adm": "", - "crid": "c2" - } - ] - }, - { - "seat": "s2", - "bid": [ - { - "id": "b3", - "impid": "imp-banner", - "price": 1.50, - "adm": "
banner2
", - "w": 300, - "h": 250, - "crid": "c3" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "EUR", - "bids": [ - { - "bid": { - "id": "b1", - "impid": "imp-banner", - "price": 1.00, - "adm": "
banner
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - }, - { - "bid": { - "id": "b2", - "impid": "imp-video", - "price": 2.00, - "adm": "", - "crid": "c2" - }, - "type": "video" - }, - { - "bid": { - "id": "b3", - "impid": "imp-banner", - "price": 1.50, - "adm": "
banner2
", - "w": 300, - "h": 250, - "crid": "c3" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/no-response-body.json b/adapters/teal/tealtest/supplemental/no-response-body.json deleted file mode 100644 index 203d5674b5..0000000000 --- a/adapters/teal/tealtest/supplemental/no-response-body.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "mockBidRequest": { - "device": { - "dnt": 0, - "ip": "192.0.2.1", - "language": "en", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "id": "test-request-banner", - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - }, - "id": "test-imp-banner" - } - ], - "regs": { - "ext": { - "gdpr": 0 - } - }, - "site": { - "domain": "example.com", - "id": "demo-site", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "user": { - "id": "demo-user" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": [ - "test-imp-banner" - ] - }, - "mockResponse": { - "status": 200 - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found", - "comparison": "startswith" - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/no-site-no-app.json b/adapters/teal/tealtest/supplemental/no-site-no-app.json deleted file mode 100644 index 051e8f026e..0000000000 --- a/adapters/teal/tealtest/supplemental/no-site-no-app.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": ["test-imp-banner"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-banner", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-banner", - "price": 1.50, - "adm": "
ad
", - "w": 300, - "h": 250, - "crid": "c1" - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/status-204.json b/adapters/teal/tealtest/supplemental/status-204.json deleted file mode 100644 index 22cdc1ad7d..0000000000 --- a/adapters/teal/tealtest/supplemental/status-204.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "mockBidRequest": { - "device": { - "dnt": 0, - "ip": "192.0.2.1", - "language": "en", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "id": "test-request-banner", - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - }, - "id": "test-imp-banner" - } - ], - "regs": { - "ext": { - "gdpr": 0 - } - }, - "site": { - "domain": "example.com", - "id": "demo-site", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "user": { - "id": "demo-user" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": [ - "test-imp-banner" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} diff --git a/adapters/teal/tealtest/supplemental/status-400.json b/adapters/teal/tealtest/supplemental/status-400.json deleted file mode 100644 index 28b430674c..0000000000 --- a/adapters/teal/tealtest/supplemental/status-400.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "mockBidRequest": { - "device": { - "dnt": 0, - "ip": "192.0.2.1", - "language": "en", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "id": "test-request-banner", - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - }, - "id": "test-imp-banner" - } - ], - "regs": { - "ext": { - "gdpr": 0 - } - }, - "site": { - "domain": "example.com", - "id": "demo-site", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "user": { - "id": "demo-user" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": [ - "test-imp-banner" - ] - }, - "mockResponse": { - "status": 400, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/teal/tealtest/supplemental/status-404.json b/adapters/teal/tealtest/supplemental/status-404.json deleted file mode 100644 index 9e3c8f9a63..0000000000 --- a/adapters/teal/tealtest/supplemental/status-404.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "mockBidRequest": { - "device": { - "dnt": 0, - "ip": "192.0.2.1", - "language": "en", - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - }, - "id": "test-request-banner", - "imp": [ - { - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - } - }, - "id": "test-imp-banner" - } - ], - "regs": { - "ext": { - "gdpr": 0 - } - }, - "site": { - "domain": "example.com", - "id": "demo-site", - "page": "https://example.com/demo", - "publisher": { - "id": "demo-publisher" - } - }, - "user": { - "id": "demo-user" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://test.example.com/bid", - "body": { - "id": "test-request-banner", - "imp": [ - { - "id": "test-imp-banner", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "account": "test-account", - "placement": "test-placement300x250" - }, - "prebid": { - "storedrequest": { - "id": "test-placement300x250" - } - } - } - } - ], - "site": { - "id": "demo-site", - "domain": "example.com", - "page": "https://example.com/demo", - "publisher": { - "id": "test-account" - } - }, - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", - "ip": "192.0.2.1", - "language": "en", - "dnt": 0 - }, - "user": { - "id": "demo-user" - }, - "regs": { - "ext": { - "gdpr": 0 - } - }, - "ext": { - "bids": { - "pbs": 1 - } - } - }, - "impIDs": [ - "test-imp-banner" - ] - }, - "mockResponse": { - "status": 404, - "body": {} - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 404. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} diff --git a/adapters/telaria/params_test.go b/adapters/telaria/params_test.go index 1ed6d600ed..7b1dfe0854 100644 --- a/adapters/telaria/params_test.go +++ b/adapters/telaria/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/telaria/telaria.go b/adapters/telaria/telaria.go index 1969ed5a52..1805bfaea0 100644 --- a/adapters/telaria/telaria.go +++ b/adapters/telaria/telaria.go @@ -7,11 +7,11 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const Endpoint = "https://ads.tremorhub.com/ad/rtb/prebid" diff --git a/adapters/telaria/telaria_test.go b/adapters/telaria/telaria_test.go index 73fbed3d08..8c55e7b900 100644 --- a/adapters/telaria/telaria_test.go +++ b/adapters/telaria/telaria_test.go @@ -3,9 +3,9 @@ package telaria import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/teqblaze/params_test.go b/adapters/teqblaze/params_test.go index ac99ad6657..2c86ea1485 100644 --- a/adapters/teqblaze/params_test.go +++ b/adapters/teqblaze/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/teqblaze/teqblaze.go b/adapters/teqblaze/teqblaze.go index 203ca847c3..b6e391bb85 100644 --- a/adapters/teqblaze/teqblaze.go +++ b/adapters/teqblaze/teqblaze.go @@ -5,10 +5,10 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/teqblaze/teqblaze_test.go b/adapters/teqblaze/teqblaze_test.go index 22537c07e3..f4a3cdca92 100644 --- a/adapters/teqblaze/teqblaze_test.go +++ b/adapters/teqblaze/teqblaze_test.go @@ -3,9 +3,9 @@ package teqblaze import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/theadx/params_test.go b/adapters/theadx/params_test.go index 764d5edc32..09440b335c 100644 --- a/adapters/theadx/params_test.go +++ b/adapters/theadx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/theadx.json diff --git a/adapters/theadx/theadx.go b/adapters/theadx/theadx.go index 5460daa83a..34b1e1a3b4 100644 --- a/adapters/theadx/theadx.go +++ b/adapters/theadx/theadx.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/theadx/theadx_test.go b/adapters/theadx/theadx_test.go index 170a3150d1..a945bd15fe 100644 --- a/adapters/theadx/theadx_test.go +++ b/adapters/theadx/theadx_test.go @@ -3,9 +3,9 @@ package theadx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/thetradedesk/params_test.go b/adapters/thetradedesk/params_test.go index 1cf105857c..b0829fb290 100644 --- a/adapters/thetradedesk/params_test.go +++ b/adapters/thetradedesk/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/thetradedesk/thetradedesk.go b/adapters/thetradedesk/thetradedesk.go index 46c1cb0649..f3d81d2a06 100644 --- a/adapters/thetradedesk/thetradedesk.go +++ b/adapters/thetradedesk/thetradedesk.go @@ -10,11 +10,11 @@ import ( "strings" "text/template" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) @@ -204,8 +204,6 @@ func getBidType(markupType openrtb2.MarkupType) (openrtb_ext.BidType, error) { return openrtb_ext.BidTypeVideo, nil case openrtb2.MarkupNative: return openrtb_ext.BidTypeNative, nil - case openrtb2.MarkupAudio: - return openrtb_ext.BidTypeAudio, nil default: return "", fmt.Errorf("unsupported mtype: %d", markupType) } diff --git a/adapters/thetradedesk/thetradedesk_test.go b/adapters/thetradedesk/thetradedesk_test.go index c667850a6b..dec4652ce7 100644 --- a/adapters/thetradedesk/thetradedesk_test.go +++ b/adapters/thetradedesk/thetradedesk_test.go @@ -3,15 +3,15 @@ package thetradedesk import ( "encoding/json" "errors" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" "net/http" "testing" "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -100,14 +100,6 @@ func TestGetBidType(t *testing.T) { expectedBidTypeId: openrtb_ext.BidTypeNative, wantErr: false, }, - { - name: "audio", - args: args{ - markupType: openrtb2.MarkupAudio, - }, - expectedBidTypeId: openrtb_ext.BidTypeAudio, - wantErr: false, - }, { name: "invalid", args: args{ diff --git a/adapters/thetradedesk/thetradedesktest/exemplary/simple-audio.json b/adapters/thetradedesk/thetradedesktest/exemplary/simple-audio.json deleted file mode 100644 index 6de40fa579..0000000000 --- a/adapters/thetradedesk/thetradedesktest/exemplary/simple-audio.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "ttd.com" - }, - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4"] - }, - "ext": { - "bidder": { - "publisherId": "123456" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "https://direct.adsrvr.org/bid/bidder/ttd", - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ] - }, - "body": { - "id": "test-request-id", - "site": { - "id": "site-id", - "page": "ttd.com", - "publisher": { - "id": "123456" - } - }, - "imp": [ - { - "id": "test-imp-id", - "audio": { - "mimes": ["audio/mp4"] - }, - "ext": { - "bidder": { - "publisherId": "123456" - } - } - } - ] - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "test-slot-id", - "impid": "test-imp-id", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-audio", - "ext": { - "prebid": { - "type": "audio" - } - }, - "mtype": 3 - } - ] - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-slot-id", - "impid": "test-imp-id", - "price": 0.1, - "crid": "creative-123", - "adm": "some-test-ad-audio", - "ext": { - "prebid": { - "type": "audio" - } - }, - "mtype": 3 - }, - "type": "audio" - } - ] - } - ] -} diff --git a/adapters/tpmn/params_test.go b/adapters/tpmn/params_test.go index a7159abc4e..674da5fb65 100644 --- a/adapters/tpmn/params_test.go +++ b/adapters/tpmn/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/tpmn/tpmn.go b/adapters/tpmn/tpmn.go index 95e2d03d35..262fc28ac6 100644 --- a/adapters/tpmn/tpmn.go +++ b/adapters/tpmn/tpmn.go @@ -7,10 +7,10 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // TpmnAdapter struct diff --git a/adapters/tpmn/tpmn_test.go b/adapters/tpmn/tpmn_test.go index f207467fb1..865771e89c 100644 --- a/adapters/tpmn/tpmn_test.go +++ b/adapters/tpmn/tpmn_test.go @@ -3,9 +3,9 @@ package tpmn import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/tradplus/params_test.go b/adapters/tradplus/params_test.go index 7a537e911e..aa92db4a2f 100644 --- a/adapters/tradplus/params_test.go +++ b/adapters/tradplus/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { @@ -35,13 +35,9 @@ func TestInvalidParams(t *testing.T) { } var validParams = []string{ - `{"accountId": "11233"}`, `{"accountId": "11233", "zoneId": ""}`, - `{"accountId": "11233", "zoneId": "host"}`, - `{"accountId": "aaa", "zoneId": "host.example.com"}`, - `{"accountId": "aa", "zoneId": "host-example.test"}`, - `{"accountId": "aaa", "zoneId": "Host.Example.com"}`, - `{"accountId": "aaa", "zoneId": "localhost"}`, + `{"accountId": "aaa", "zoneId": "us"}`, + `{"accountId": "aa", "accountId": "sin"}`, } var invalidParams = []string{ @@ -54,14 +50,4 @@ var invalidParams = []string{ `{"accountId": null}`, `{"zoneId": "aaa"}`, `{"zoneId": null}`, - `{"accountId": "aaa", "zoneId": "/path"}`, - `{"accountId": "aaa", "zoneId": "//evil.com"}`, - `{"accountId": "aaa", "zoneId": "host/path"}`, - `{"accountId": "aaa", "zoneId": "host?query=1"}`, - `{"accountId": "aaa", "zoneId": "host#fragment"}`, - `{"accountId": "aaa", "zoneId": "user@host"}`, - `{"accountId": "aaa", "zoneId": "https://host.com"}`, - `{"accountId": "aaa", "zoneId": "host:notaport"}`, - `{"accountId": "aaa", "zoneId": "host:8080:extra"}`, - `{"accountId": "aaa", "zoneId": "host:8080"}`, } diff --git a/adapters/tradplus/tradplus.go b/adapters/tradplus/tradplus.go index 4c1d08f404..4800c73e84 100644 --- a/adapters/tradplus/tradplus.go +++ b/adapters/tradplus/tradplus.go @@ -7,13 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -87,9 +86,6 @@ func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpTradPlus, error) { } func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtImpTradPlus) (string, error) { - if params.ZoneID != "" && !urlutil.IsSafeHost(params.ZoneID) { - return "", &errortypes.BadInput{Message: "Invalid ZoneID"} - } endpointParams := macros.EndpointTemplateParams{ AccountID: params.AccountID, ZoneID: params.ZoneID, diff --git a/adapters/tradplus/tradplus_test.go b/adapters/tradplus/tradplus_test.go index 38dc571e04..e081607f4e 100644 --- a/adapters/tradplus/tradplus_test.go +++ b/adapters/tradplus/tradplus_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/tradplus/tradplustest/supplemental/invalid-zoneid.json b/adapters/tradplus/tradplustest/supplemental/invalid-zoneid.json deleted file mode 100644 index 75ebc22bd5..0000000000 --- a/adapters/tradplus/tradplustest/supplemental/invalid-zoneid.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{"w": 300, "h": 50}] - }, - "ext": { - "bidder": { - "accountId": "testaccount", - "zoneId": "evil.com/path?redirect=http://attacker.com#" - } - } - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "Invalid ZoneID", - "comparison": "literal" - } - ] -} diff --git a/adapters/trafficgate/params_test.go b/adapters/trafficgate/params_test.go index 0a0d34ea04..0667a8bc5a 100644 --- a/adapters/trafficgate/params_test.go +++ b/adapters/trafficgate/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TestValidParams makes sure that the trafficgate schema accepts all imp.ext fields which we intend to support. @@ -36,12 +36,7 @@ func TestInvalidParams(t *testing.T) { } var validParams = []string{ - `{"placementId": "11", "host": "host"}`, - `{"placementId": "11", "host": "host.example.com"}`, - `{"placementId": "11", "host": "host.example.com:8080"}`, - `{"placementId": "11", "host": "host-example.test"}`, - `{"placementId": "11", "host": "Host.Example.com"}`, - `{"placementId": "11", "host": "localhost:3000"}`, + `{"placementId": "11", "host": "example"}`, } var invalidParams = []string{ @@ -50,13 +45,4 @@ var invalidParams = []string{ `{"placement_id": 346, "host": ""}`, `{"placementID": "", "HOST": "example"}`, `{"placementId": 234}`, - `{"placementId": "11", "host": "/path"}`, - `{"placementId": "11", "host": "//evil.com"}`, - `{"placementId": "11", "host": "host/path"}`, - `{"placementId": "11", "host": "host?query=1"}`, - `{"placementId": "11", "host": "host#fragment"}`, - `{"placementId": "11", "host": "user@host"}`, - `{"placementId": "11", "host": "https://host.com"}`, - `{"placementId": "11", "host": "host:notaport"}`, - `{"placementId": "11", "host": "host:8080:extra"}`, } diff --git a/adapters/trafficgate/trafficgate.go b/adapters/trafficgate/trafficgate.go index 741b70745f..d4d181399d 100644 --- a/adapters/trafficgate/trafficgate.go +++ b/adapters/trafficgate/trafficgate.go @@ -7,13 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { @@ -154,9 +153,6 @@ func getBidderParams(imp *openrtb2.Imp) (*openrtb_ext.ExtImpTrafficGate, error) Message: "Bidder parameters required", } } - if !urlutil.IsSafeHost(TrafficGateExt.Host) { - return nil, &errortypes.BadInput{Message: "Invalid Host"} - } return &TrafficGateExt, nil } diff --git a/adapters/trafficgate/trafficgate_test.go b/adapters/trafficgate/trafficgate_test.go index de5c0459cb..df932538d9 100644 --- a/adapters/trafficgate/trafficgate_test.go +++ b/adapters/trafficgate/trafficgate_test.go @@ -3,9 +3,9 @@ package trafficgate import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/trafficgate/trafficgatetest/supplemental/invalid-host.json b/adapters/trafficgate/trafficgatetest/supplemental/invalid-host.json deleted file mode 100644 index fa4589e99d..0000000000 --- a/adapters/trafficgate/trafficgatetest/supplemental/invalid-host.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - } - ] - }, - "ext": { - "bidder": { - "placementId": "1", - "host": "evil.com/path?redirect=http://attacker.com#" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.test.app" - } - }, - "httpCalls": [], - "expectedMakeRequestsErrors": [ - { - "value": "Invalid Host", - "comparison": "literal" - } - ] -} diff --git a/adapters/triplelift/triplelift.go b/adapters/triplelift/triplelift.go index fc5f4c641e..c5d89cd250 100644 --- a/adapters/triplelift/triplelift.go +++ b/adapters/triplelift/triplelift.go @@ -4,14 +4,13 @@ import ( "encoding/json" "fmt" "net/http" - "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type TripleliftAdapter struct { @@ -34,7 +33,7 @@ func getBidType(ext TripleliftRespExt) openrtb_ext.BidType { return openrtb_ext.BidTypeBanner } -func processImp(imp *openrtb2.Imp, reqInfo *adapters.ExtraRequestInfo) error { +func processImp(imp *openrtb2.Imp) error { // get the triplelift extension var ext adapters.ExtImpBidder var tlext openrtb_ext.ExtImpTriplelift @@ -49,35 +48,15 @@ func processImp(imp *openrtb2.Imp, reqInfo *adapters.ExtraRequestInfo) error { } imp.TagID = tlext.InvCode // floor is optional - if tlext.Floor != nil { + if tlext.Floor == nil { + return nil + } else { imp.BidFloor = *tlext.Floor } - // Normalize bid floor to USD - TLX expects USD - if err := resolveBidFloorCurrency(imp, reqInfo); err != nil { - return err - } // no error return nil } -// Normalize imp.BidFloor to USD -func resolveBidFloorCurrency(imp *openrtb2.Imp, reqInfo *adapters.ExtraRequestInfo) error { - if imp.BidFloor <= 0 { - return nil - } - if imp.BidFloorCur != "" && strings.ToUpper(imp.BidFloorCur) != "USD" { - converted, err := reqInfo.ConvertCurrency(imp.BidFloor, imp.BidFloorCur, "USD") - if err != nil { - return &errortypes.BadInput{ - Message: fmt.Sprintf("Unable to convert bid floor from %s to USD: %s", imp.BidFloorCur, err.Error()), - } - } - imp.BidFloor = converted - } - imp.BidFloorCur = "USD" - return nil -} - func (a *TripleliftAdapter) MakeRequests(request *openrtb2.BidRequest, extra *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { errs := make([]error, 0, len(request.Imp)+1) reqs := make([]*adapters.RequestData, 0, 1) @@ -87,7 +66,7 @@ func (a *TripleliftAdapter) MakeRequests(request *openrtb2.BidRequest, extra *ad var validImps []openrtb2.Imp // pre-process the imps for _, imp := range tlRequest.Imp { - if err := processImp(&imp, extra); err == nil { + if err := processImp(&imp); err == nil { validImps = append(validImps, imp) } else { errs = append(errs, err) @@ -147,9 +126,6 @@ func (a *TripleliftAdapter) MakeBids(internalRequest *openrtb2.BidRequest, exter count := getBidCount(bidResp) bidResponse := adapters.NewBidderResponseWithBidsCapacity(count) - // Bids are always denominated in USD - bidResponse.Currency = "USD" - for _, sb := range bidResp.SeatBid { for i := 0; i < len(sb.Bid); i++ { bid := sb.Bid[i] diff --git a/adapters/triplelift/triplelift_currency_test.go b/adapters/triplelift/triplelift_currency_test.go deleted file mode 100644 index 76611bd35b..0000000000 --- a/adapters/triplelift/triplelift_currency_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package triplelift - -import ( - "errors" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" -) - -type mockCurrencyConversion struct { - mock.Mock -} - -func (m *mockCurrencyConversion) GetRate(from, to string) (float64, error) { - args := m.Called(from, to) - return args.Get(0).(float64), args.Error(1) -} - -func (m *mockCurrencyConversion) GetRates() *map[string]map[string]float64 { - args := m.Called() - return args.Get(0).(*map[string]map[string]float64) -} - -var currencyTestCases = map[string]struct { - imp openrtb2.Imp - setMock func(m *mock.Mock) - expectedImp openrtb2.Imp - assertError assert.ErrorAssertionFunc -}{ - "no floor, no currency": { - imp: openrtb2.Imp{BidFloor: 0, BidFloorCur: ""}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 0, BidFloorCur: ""}, - assertError: assert.NoError, - }, - "floor, empty currency (implicit USD)": { - imp: openrtb2.Imp{BidFloor: 1.25, BidFloorCur: ""}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 1.25, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "USD floor, no conversion needed": { - imp: openrtb2.Imp{BidFloor: 2.0, BidFloorCur: "USD"}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 2.0, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "usd lowercase - no conversion needed": { - imp: openrtb2.Imp{BidFloor: 2.0, BidFloorCur: "usd"}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 2.0, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "EUR floor converts to USD": { - imp: openrtb2.Imp{BidFloor: 1.0, BidFloorCur: "EUR"}, - setMock: func(m *mock.Mock) { - m.On("GetRate", "EUR", "USD").Return(1.1, nil) - }, - expectedImp: openrtb2.Imp{BidFloor: 1.1, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "unknown currency returns error": { - imp: openrtb2.Imp{BidFloor: 1.0, BidFloorCur: "ABC"}, - setMock: func(m *mock.Mock) { - m.On("GetRate", "ABC", "USD").Return(0.0, errors.New("conversion rate not found")) - }, - expectedImp: openrtb2.Imp{BidFloor: 1.0, BidFloorCur: "ABC"}, - assertError: assert.Error, - }, -} - -func TestResolveBidFloorCurrency(t *testing.T) { - for name, tc := range currencyTestCases { - t.Run(name, func(t *testing.T) { - imp := tc.imp - mockConversions := &mockCurrencyConversion{} - tc.setMock(&mockConversions.Mock) - - reqInfo := adapters.ExtraRequestInfo{CurrencyConversions: mockConversions} - err := resolveBidFloorCurrency(&imp, &reqInfo) - - tc.assertError(t, err) - assert.Equal(t, tc.expectedImp.BidFloor, imp.BidFloor) - assert.Equal(t, tc.expectedImp.BidFloorCur, imp.BidFloorCur) - mockConversions.AssertExpectations(t) - }) - } -} diff --git a/adapters/triplelift/triplelift_test.go b/adapters/triplelift/triplelift_test.go index 547c8609bb..1fd5fc8d55 100644 --- a/adapters/triplelift/triplelift_test.go +++ b/adapters/triplelift/triplelift_test.go @@ -3,9 +3,9 @@ package triplelift import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/triplelift/triplelifttest/exemplary/optional-params.json b/adapters/triplelift/triplelifttest/exemplary/optional-params.json index 52e253ee37..33da6cb296 100644 --- a/adapters/triplelift/triplelifttest/exemplary/optional-params.json +++ b/adapters/triplelift/triplelifttest/exemplary/optional-params.json @@ -48,7 +48,6 @@ }, "tagid": "foo", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "foo", diff --git a/adapters/triplelift/triplelifttest/exemplary/simple-banner-eur-floor.json b/adapters/triplelift/triplelifttest/exemplary/simple-banner-eur-floor.json deleted file mode 100644 index 0415711292..0000000000 --- a/adapters/triplelift/triplelifttest/exemplary/simple-banner-eur-floor.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "cur": ["USD"], - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [{ "w": 300, "h": 250 }] - }, - "bidfloor": 1.0, - "bidfloorcur": "EUR", - "ext": { - "bidder": { "inventoryCode": "aa" } - } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { "EUR": { "USD": 1.1 } }, - "usepbsrates": false - } - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?sra=1&supplier_id=20", - "body": { - "id": "test-request-id", - "cur": ["USD"], - "imp": [ - { - "id": "test-imp-id", - "banner": { "format": [{ "w": 300, "h": 250 }] }, - "bidfloor": 1.1, - "bidfloorcur": "USD", - "tagid": "aa", - "ext": { "bidder": { "inventoryCode": "aa" } } - } - ], - "ext": { - "prebid": { - "currency": { - "rates": { "EUR": { "USD": 1.1 } }, - "usepbsrates": false - } - } - } - }, - "impIDs": ["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [{ - "seat": "958", - "bid": [{ - "id": "b1", "impid": "test-imp-id", "price": 1.5, - "adm": "some-ad", "crid": "cr1", "w": 300, "h": 250, - "ext": { "triplelift_pb": { "format": 2 } } - }] - }], - "bidid": "auction-id" - } - } - } - ], - "expectedBidResponses": [{ - "currency": "USD", - "bids": [{ - "bid": { - "id": "b1", "impid": "test-imp-id", "price": 1.5, - "adm": "some-ad", "crid": "cr1", "w": 300, "h": 250, - "ext": { "triplelift_pb": { "format": 2 } } - }, - "type": "banner" - }] - }] -} diff --git a/adapters/triplelift/triplelifttest/exemplary/simple-video.json b/adapters/triplelift/triplelifttest/exemplary/simple-video.json index 66f9eac6c5..8d63b9acf3 100644 --- a/adapters/triplelift/triplelifttest/exemplary/simple-video.json +++ b/adapters/triplelift/triplelifttest/exemplary/simple-video.json @@ -40,7 +40,6 @@ { "tagid": "aaw", "bidfloor": 0.10, - "bidfloorcur": "USD", "id": "test-imp-id", "video": { "mimes": [ diff --git a/adapters/triplelift/triplelifttest/supplemental/video-format-11.json b/adapters/triplelift/triplelifttest/supplemental/video-format-11.json index a1c631bf35..372cc51ea0 100644 --- a/adapters/triplelift/triplelifttest/supplemental/video-format-11.json +++ b/adapters/triplelift/triplelifttest/supplemental/video-format-11.json @@ -31,7 +31,6 @@ { "tagid": "aaw", "bidfloor": 0.10, - "bidfloorcur": "USD", "id": "test-imp-id", "video": { "mimes": [ "video/mp4"], diff --git a/adapters/triplelift/triplelifttest/supplemental/video-format-12.json b/adapters/triplelift/triplelifttest/supplemental/video-format-12.json index 026dabbb14..f2b55a0401 100644 --- a/adapters/triplelift/triplelifttest/supplemental/video-format-12.json +++ b/adapters/triplelift/triplelifttest/supplemental/video-format-12.json @@ -31,7 +31,6 @@ { "tagid": "aaw", "bidfloor": 0.10, - "bidfloorcur": "USD", "id": "test-imp-id", "video": { "mimes": [ "video/mp4"], diff --git a/adapters/triplelift/triplelifttest/supplemental/video-format-17.json b/adapters/triplelift/triplelifttest/supplemental/video-format-17.json index f4a591cf40..26dcc943af 100644 --- a/adapters/triplelift/triplelifttest/supplemental/video-format-17.json +++ b/adapters/triplelift/triplelifttest/supplemental/video-format-17.json @@ -31,7 +31,6 @@ { "tagid": "aaw", "bidfloor": 0.10, - "bidfloorcur": "USD", "id": "test-imp-id", "video": { "mimes": [ "video/mp4"], diff --git a/adapters/triplelift_native/params_test.go b/adapters/triplelift_native/params_test.go index 1b65fc46fc..743c3d87ed 100644 --- a/adapters/triplelift_native/params_test.go +++ b/adapters/triplelift_native/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/triplelift_native/triplelift_native.go b/adapters/triplelift_native/triplelift_native.go index 1e102f0d2d..1d4c6bf638 100644 --- a/adapters/triplelift_native/triplelift_native.go +++ b/adapters/triplelift_native/triplelift_native.go @@ -4,14 +4,13 @@ import ( "encoding/json" "fmt" "net/http" - "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type TripleliftNativeAdapter struct { @@ -48,7 +47,7 @@ func getBidType(ext TripleliftRespExt) openrtb_ext.BidType { return openrtb_ext.BidTypeNative } -func processImp(imp *openrtb2.Imp, request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) error { +func processImp(imp *openrtb2.Imp, request *openrtb2.BidRequest) error { // get the triplelift extension var ext ExtImp var tlext openrtb_ext.ExtImpTriplelift @@ -70,33 +69,11 @@ func processImp(imp *openrtb2.Imp, request *openrtb2.BidRequest, reqInfo *adapte } // floor is optional - if tlext.Floor != nil { - imp.BidFloor = *tlext.Floor - } - - // Normalize bid floor to USD - if err := resolveBidFloorCurrency(imp, reqInfo); err != nil { - return err - } - - return nil -} - -// Normalize imp.BidFloor to USD -func resolveBidFloorCurrency(imp *openrtb2.Imp, reqInfo *adapters.ExtraRequestInfo) error { - if imp.BidFloor <= 0 { + if tlext.Floor == nil { return nil } - if imp.BidFloorCur != "" && strings.ToUpper(imp.BidFloorCur) != "USD" { - converted, err := reqInfo.ConvertCurrency(imp.BidFloor, imp.BidFloorCur, "USD") - if err != nil { - return &errortypes.BadInput{ - Message: fmt.Sprintf("Unable to convert bid floor from %s to USD: %s", imp.BidFloorCur, err.Error()), - } - } - imp.BidFloor = converted - } - imp.BidFloorCur = "USD" + imp.BidFloor = *tlext.Floor + return nil } @@ -136,7 +113,7 @@ func (a *TripleliftNativeAdapter) MakeRequests(request *openrtb2.BidRequest, ext var validImps []openrtb2.Imp // pre-process the imps for _, imp := range tlRequest.Imp { - if err := processImp(&imp, request, extra); err == nil { + if err := processImp(&imp, request); err == nil { validImps = append(validImps, imp) } else { errs = append(errs, err) @@ -209,9 +186,6 @@ func (a *TripleliftNativeAdapter) MakeBids(internalRequest *openrtb2.BidRequest, count := getBidCount(bidResp) bidResponse := adapters.NewBidderResponseWithBidsCapacity(count) - // Bids are always denominated in USD - bidResponse.Currency = "USD" - for _, sb := range bidResp.SeatBid { for i := 0; i < len(sb.Bid); i++ { bid := sb.Bid[i] diff --git a/adapters/triplelift_native/triplelift_native_currency_test.go b/adapters/triplelift_native/triplelift_native_currency_test.go deleted file mode 100644 index 8a194bc9b1..0000000000 --- a/adapters/triplelift_native/triplelift_native_currency_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package triplelift_native - -import ( - "errors" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" -) - -type mockCurrencyConversion struct { - mock.Mock -} - -func (m *mockCurrencyConversion) GetRate(from, to string) (float64, error) { - args := m.Called(from, to) - return args.Get(0).(float64), args.Error(1) -} - -func (m *mockCurrencyConversion) GetRates() *map[string]map[string]float64 { - args := m.Called() - return args.Get(0).(*map[string]map[string]float64) -} - -func TestResolveBidFloorCurrency(t *testing.T) { - cases := map[string]struct { - imp openrtb2.Imp - setMock func(m *mock.Mock) - expectedImp openrtb2.Imp - assertError assert.ErrorAssertionFunc - }{ - "no floor": { - imp: openrtb2.Imp{BidFloor: 0, BidFloorCur: "EUR"}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 0, BidFloorCur: "EUR"}, - assertError: assert.NoError, - }, - "USD floor passthrough": { - imp: openrtb2.Imp{BidFloor: 3.0, BidFloorCur: "USD"}, - setMock: func(m *mock.Mock) {}, - expectedImp: openrtb2.Imp{BidFloor: 3.0, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "EUR converts to USD": { - imp: openrtb2.Imp{BidFloor: 2.0, BidFloorCur: "EUR"}, - setMock: func(m *mock.Mock) { - m.On("GetRate", "EUR", "USD").Return(1.08, nil) - }, - expectedImp: openrtb2.Imp{BidFloor: 2.16, BidFloorCur: "USD"}, - assertError: assert.NoError, - }, - "conversion error": { - imp: openrtb2.Imp{BidFloor: 1.0, BidFloorCur: "XYZ"}, - setMock: func(m *mock.Mock) { - m.On("GetRate", "XYZ", "USD").Return(0.0, errors.New("rate not found")) - }, - expectedImp: openrtb2.Imp{BidFloor: 1.0, BidFloorCur: "XYZ"}, - assertError: assert.Error, - }, - } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - imp := tc.imp - m := &mockCurrencyConversion{} - tc.setMock(&m.Mock) - reqInfo := adapters.ExtraRequestInfo{CurrencyConversions: m} - err := resolveBidFloorCurrency(&imp, &reqInfo) - tc.assertError(t, err) - assert.Equal(t, tc.expectedImp.BidFloor, imp.BidFloor) - assert.Equal(t, tc.expectedImp.BidFloorCur, imp.BidFloorCur) - m.AssertExpectations(t) - }) - } -} diff --git a/adapters/triplelift_native/triplelift_native_test.go b/adapters/triplelift_native/triplelift_native_test.go index e3f3b7958c..651890b01e 100644 --- a/adapters/triplelift_native/triplelift_native_test.go +++ b/adapters/triplelift_native/triplelift_native_test.go @@ -3,9 +3,9 @@ package triplelift_native import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn-no-tag-code.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn-no-tag-code.json index e6a91ded53..6950942f19 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn-no-tag-code.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn-no-tag-code.json @@ -36,7 +36,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn.json index 570456c8bb..420cab5aff 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/app-msn.json @@ -36,7 +36,6 @@ }, "tagid": "bar", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/app.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/app.json index c6a36ee0af..d1cd72947b 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/app.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/app.json @@ -36,7 +36,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn-no-tag-code.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn-no-tag-code.json index 8ad19e9eef..48162742a1 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn-no-tag-code.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn-no-tag-code.json @@ -36,7 +36,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn.json index dbb1091f4f..5aaa5a1ddc 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/site-msn.json @@ -36,7 +36,6 @@ }, "tagid": "bar", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/exemplary/site.json b/adapters/triplelift_native/triplelift_nativetest/exemplary/site.json index a281ab34e4..d273f4d411 100644 --- a/adapters/triplelift_native/triplelift_nativetest/exemplary/site.json +++ b/adapters/triplelift_native/triplelift_nativetest/exemplary/site.json @@ -36,7 +36,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/supplemental/app-publisher-no-domain.json b/adapters/triplelift_native/triplelift_nativetest/supplemental/app-publisher-no-domain.json index 65e5cfe6df..ac119354c3 100644 --- a/adapters/triplelift_native/triplelift_nativetest/supplemental/app-publisher-no-domain.json +++ b/adapters/triplelift_native/triplelift_nativetest/supplemental/app-publisher-no-domain.json @@ -34,7 +34,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/supplemental/effective-publisher-allowed.json b/adapters/triplelift_native/triplelift_nativetest/supplemental/effective-publisher-allowed.json index c5d3337d1a..74ac929478 100644 --- a/adapters/triplelift_native/triplelift_nativetest/supplemental/effective-publisher-allowed.json +++ b/adapters/triplelift_native/triplelift_nativetest/supplemental/effective-publisher-allowed.json @@ -41,7 +41,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/triplelift_native/triplelift_nativetest/supplemental/site-publisher-no-domain.json b/adapters/triplelift_native/triplelift_nativetest/supplemental/site-publisher-no-domain.json index 2e3a4d0fa5..d44ae442fa 100644 --- a/adapters/triplelift_native/triplelift_nativetest/supplemental/site-publisher-no-domain.json +++ b/adapters/triplelift_native/triplelift_nativetest/supplemental/site-publisher-no-domain.json @@ -35,7 +35,6 @@ }, "tagid": "invcode", "bidfloor": 20, - "bidfloorcur": "USD", "ext": { "bidder": { "inventoryCode": "invcode", diff --git a/adapters/trustedstack/params_test.go b/adapters/trustedstack/params_test.go index dee7427456..a38e0bb722 100644 --- a/adapters/trustedstack/params_test.go +++ b/adapters/trustedstack/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/trustedstack.json diff --git a/adapters/trustedstack/trustedstack.go b/adapters/trustedstack/trustedstack.go index 0d795620cd..7c2fd4df50 100644 --- a/adapters/trustedstack/trustedstack.go +++ b/adapters/trustedstack/trustedstack.go @@ -7,10 +7,10 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/trustedstack/trustedstack_test.go b/adapters/trustedstack/trustedstack_test.go index 223c97b974..d12202802e 100644 --- a/adapters/trustedstack/trustedstack_test.go +++ b/adapters/trustedstack/trustedstack_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/trustx/params_test.go b/adapters/trustx/params_test.go deleted file mode 100644 index 6c785e4174..0000000000 --- a/adapters/trustx/params_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package trustx - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -// This file actually intends to test static/bidder-params/trustx.json -// -// These also validate the format of the external API: request.imp[i].ext.prebid.bidder.trustx - -// TestValidParams makes sure that the trustx schema accepts all imp.ext fields which we intend to support. -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json-schemas") - - for _, validParam := range validParams { - err := validator.Validate(openrtb_ext.BidderTrustX, json.RawMessage(validParam)) - require.NoError(t, err, "Schema rejected trustx params: %s", validParam) - } -} - -// TestInvalidParams makes sure that the trustx schema rejects all the imp.ext fields we don't support. -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - require.NoError(t, err, "Failed to fetch the json-schemas") - - for _, invalidParam := range invalidParams { - err := validator.Validate(openrtb_ext.BidderTrustX, json.RawMessage(invalidParam)) - require.Error(t, err, "Schema allowed unexpected params: %s", invalidParam) - } -} - -var validParams = []string{ - `{}`, - `{"uid": 1234}`, - `{"uid": 1234, "keywords":{"site": {}, "user": {}}}`, -} -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{"uid": "invalid_type"}`, - `{"keywords": "invalid_type"}`, -} diff --git a/adapters/trustx/trustx.go b/adapters/trustx/trustx.go deleted file mode 100644 index a36a1985f6..0000000000 --- a/adapters/trustx/trustx.go +++ /dev/null @@ -1,216 +0,0 @@ -package trustx - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -type impExt struct { - Prebid *openrtb_ext.ExtImpPrebid `json:"prebid,omitempty"` - Bidder json.RawMessage `json:"bidder"` - Data *impExtData `json:"data,omitempty"` - Gpid string `json:"gpid,omitempty"` -} - -type impExtData struct { - PbAdslot string `json:"pbadslot,omitempty"` - AdServer *impExtDataAdServer `json:"adserver,omitempty"` -} - -type impExtDataAdServer struct { - Name string `json:"name,omitempty"` - AdSlot string `json:"adslot,omitempty"` -} - -type bidExt struct { - Bidder bidExtBidder `json:"bidder,omitempty"` -} - -type bidExtBidder struct { - TrustX bidExtBidderTrustX `json:"trustx,omitempty"` -} - -type bidExtBidderTrustX struct { - NetworkName string `json:"networkName,omitempty"` -} - -type adapter struct { - endpoint string -} - -// Builder builds a new instance of the TRUSTX adapter for the given bidder with the given config. -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var errs []error - for i := range request.Imp { - err := setImpExtData(&request.Imp[i]) - if err != nil { - errs = append(errs, err) - return nil, errs - } - } - - body, err := jsonutil.Marshal(request) - if err != nil { - errs = append(errs, err) - return nil, errs - } - - reqs := make([]*adapters.RequestData, 0, 1) - requestData := &adapters.RequestData{ - Method: http.MethodPost, - Uri: a.endpoint, - Body: body, - Headers: getHeaders(request), - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - } - reqs = append(reqs, requestData) - - return reqs, errs -} - -func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if adapters.IsResponseStatusCodeNoContent(response) { - return nil, nil - } - - if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil { - return nil, []error{err} - } - - var resp openrtb2.BidResponse - if err := jsonutil.Unmarshal(response.Body, &resp); err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: "Bad Server Response", - }} - } - - var bidErrors []error - bidderResponse := adapters.NewBidderResponseWithBidsCapacity(1) - for i := range resp.SeatBid { - seatBid := &resp.SeatBid[i] - for j := range seatBid.Bid { - bid := &seatBid.Bid[j] - typedBid, err := getTypedBid(bid) - if err != nil { - bidErrors = append(bidErrors, err) - continue - } - bidderResponse.Bids = append(bidderResponse.Bids, typedBid) - } - } - - return bidderResponse, bidErrors -} - -func setImpExtData(imp *openrtb2.Imp) error { - var ext impExt - if err := jsonutil.Unmarshal(imp.Ext, &ext); err != nil { - //if unmarshalling fails, proceed with the request - return nil - } - if ext.Data != nil && ext.Data.AdServer != nil && ext.Data.AdServer.AdSlot != "" { - ext.Gpid = ext.Data.AdServer.AdSlot - extJSON, err := jsonutil.Marshal(ext) - if err != nil { - return err - } - imp.Ext = extJSON - } - return nil -} - -func getHeaders(request *openrtb2.BidRequest) http.Header { - headers := http.Header{} - headers.Set("Content-Type", "application/json;charset=utf-8") - headers.Set("Accept", "application/json") - headers.Set("X-Openrtb-Version", "2.6") - - if request.Site != nil { - if request.Site.Ref != "" { - headers.Set("Referer", request.Site.Ref) - } - if request.Site.Domain != "" { - headers.Set("Origin", request.Site.Domain) - } - } - - if request.Device != nil { - if len(request.Device.IP) > 0 { - headers.Set("X-Forwarded-For", request.Device.IP) - } - - if len(request.Device.IPv6) > 0 { - headers.Set("X-Forwarded-For", request.Device.IPv6) - } - - if len(request.Device.UA) > 0 { - headers.Set("User-Agent", request.Device.UA) - } - } - - return headers -} - -func getTypedBid(bid *openrtb2.Bid) (*adapters.TypedBid, error) { - var bidType openrtb_ext.BidType - switch bid.MType { - case openrtb2.MarkupBanner: - bidType = openrtb_ext.BidTypeBanner - case openrtb2.MarkupVideo: - bidType = openrtb_ext.BidTypeVideo - default: - return nil, &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unsupported MType: %v", bid.MType), - } - } - - var extBidPrebidVideo *openrtb_ext.ExtBidPrebidVideo - if bidType == openrtb_ext.BidTypeVideo { - extBidPrebidVideo = &openrtb_ext.ExtBidPrebidVideo{} - if len(bid.Cat) > 0 { - extBidPrebidVideo.PrimaryCategory = bid.Cat[0] - } - if bid.Dur > 0 { - extBidPrebidVideo.Duration = int(bid.Dur) - } - } - return &adapters.TypedBid{ - Bid: bid, - BidType: bidType, - BidVideo: extBidPrebidVideo, - BidMeta: getBidMeta(bid.Ext), - }, nil -} - -func getBidMeta(ext json.RawMessage) *openrtb_ext.ExtBidPrebidMeta { - if ext == nil { - return nil - } - var be bidExt - - if err := jsonutil.Unmarshal(ext, &be); err != nil { - return nil - } - var bidMeta *openrtb_ext.ExtBidPrebidMeta - if be.Bidder.TrustX.NetworkName != "" { - bidMeta = &openrtb_ext.ExtBidPrebidMeta{ - NetworkName: be.Bidder.TrustX.NetworkName, - } - } - return bidMeta -} diff --git a/adapters/trustx/trustx_test.go b/adapters/trustx/trustx_test.go deleted file mode 100644 index f3fe9d45e1..0000000000 --- a/adapters/trustx/trustx_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package trustx - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/stretchr/testify/require" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderTrustX, config.Adapter{ - Endpoint: "https://test.localhost.com"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - require.NoError(t, buildErr, "Builder returned unexpected error") - adapterstest.RunJSONBidderTest(t, "trustxtest", bidder) -} diff --git a/adapters/trustx/trustxtest/exemplary/multiple-imp-types.json b/adapters/trustx/trustxtest/exemplary/multiple-imp-types.json deleted file mode 100644 index 6e0f3511ee..0000000000 --- a/adapters/trustx/trustxtest/exemplary/multiple-imp-types.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - }, - { - "id": "test-imp-2", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Origin": [ - "test-domain.com" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - }, - { - "id": "test-imp-2", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "device": { - "ip": "123.123.123.123", - "ua": "ua" - }, - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index" - } - }, - "impIDs": [ - "test-imp", - "test-imp-2" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - }, - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d708", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d223", - "price": 10, - "impid": "test-imp-2", - "adm": "", - "mtype": 1 - } - ], - "seat": "trustx" - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - }, - "type": "video", - "video": { - "duration": 15, - "primary_category": "IAB3-8" - } - }, - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d708", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d223", - "price": 10, - "impid": "test-imp-2", - "adm": "", - "mtype": 1 - }, - "type": "banner" - } - ] - } - ] -} - diff --git a/adapters/trustx/trustxtest/exemplary/simple-app-banner.json b/adapters/trustx/trustxtest/exemplary/simple-app-banner.json deleted file mode 100644 index 14351d090d..0000000000 --- a/adapters/trustx/trustxtest/exemplary/simple-app-banner.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "data": { - "adserver": { - "adslot": "test_ad_slot" - } - }, - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ua": "ua", - "ip": "123.123.123.123" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "uri": "https://test.localhost.com", - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "gpid": "test_ad_slot", - "data": { - "adserver": { - "adslot": "test_ad_slot" - } - }, - "bidder": { - "uid": 1234 - } - } - } - ], - "device": { - "ua": "ua", - "ip": "123.123.123.123" - }, - "app": { - "bundle": "app-bundle" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1, - "ext": { - "bidder": { - "trustx": { - "networkName": "test-network" - } - } - } - } - ] - } - ], - "seat": "trustx" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1, - "ext": { - "bidder": { - "trustx": { - "networkName": "test-network" - } - } - } - }, - "meta": { - "networkName": "test-network" - }, - "type": "banner" - } - ], - "seat": "trustx" - } - ] -} diff --git a/adapters/trustx/trustxtest/exemplary/simple-app-video.json b/adapters/trustx/trustxtest/exemplary/simple-app-video.json deleted file mode 100644 index 5bd5deee4c..0000000000 --- a/adapters/trustx/trustxtest/exemplary/simple-app-video.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - } - ], - "seat": "trustx" - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - }, - "type": "video", - "video": { - "duration": 15, - "primary_category": "IAB3-8" - } - } - ] - } - ] -} - diff --git a/adapters/trustx/trustxtest/exemplary/simple-web-banner.json b/adapters/trustx/trustxtest/exemplary/simple-web-banner.json deleted file mode 100644 index 5771a229b9..0000000000 --- a/adapters/trustx/trustxtest/exemplary/simple-web-banner.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index", - "ref": "https://example.com/page" - }, - "device": { - "ua": "ua", - "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Origin": [ - "test-domain.com" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - ], - "Referer": [ - "https://example.com/page" - ] - }, - "uri": "https://test.localhost.com", - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index", - "ref": "https://example.com/page" - }, - "device": { - "ua": "ua", - "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1 - } - ] - } - ], - "seat": "trustx" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1 - }, - "type": "banner" - } - ], - "seat": "trustx" - } - ] -} diff --git a/adapters/trustx/trustxtest/exemplary/simple-web-video.json b/adapters/trustx/trustxtest/exemplary/simple-web-video.json deleted file mode 100644 index aee0c04e99..0000000000 --- a/adapters/trustx/trustxtest/exemplary/simple-web-video.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Origin": [ - "test-domain.com" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request", - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - } - ], - "seat": "trustx" - } - ] - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "w": 1920, - "h": 1080, - "mtype": 2, - "dur": 15, - "cat": [ - "IAB3-8" - ] - }, - "type": "video", - "video": { - "duration": 15, - "primary_category": "IAB3-8" - } - } - ] - } - ] -} - diff --git a/adapters/trustx/trustxtest/supplemental/bad-server-response.json b/adapters/trustx/trustxtest/supplemental/bad-server-response.json deleted file mode 100644 index 7f5221585c..0000000000 --- a/adapters/trustx/trustxtest/supplemental/bad-server-response.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "w": 1920, - "h": 1080, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "w": 1920, - "h": 1080, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": "invalid response" - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Bad Server Response", - "comparison": "literal" - } - ] -} - diff --git a/adapters/trustx/trustxtest/supplemental/invalid-bid-ext.json b/adapters/trustx/trustxtest/supplemental/invalid-bid-ext.json deleted file mode 100644 index 17f20ad731..0000000000 --- a/adapters/trustx/trustxtest/supplemental/invalid-bid-ext.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ua": "ua", - "ip": "123.123.123.123" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "uri": "https://test.localhost.com", - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "device": { - "ua": "ua", - "ip": "123.123.123.123" - }, - "app": { - "bundle": "app-bundle" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1, - "ext": { - "bidder": { - "trustx": { - "networkName": 1 - } - } - } - } - ] - } - ], - "seat": "trustx" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1, - "ext": { - "bidder": { - "trustx": { - "networkName": 1 - } - } - } - }, - "type": "banner", - "meta": {} - } - ], - "seat": "trustx" - } - ] -} diff --git a/adapters/trustx/trustxtest/supplemental/invalid-imp-ext.json b/adapters/trustx/trustxtest/supplemental/invalid-imp-ext.json deleted file mode 100644 index 8260bae301..0000000000 --- a/adapters/trustx/trustxtest/supplemental/invalid-imp-ext.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "tagid": "123", - "banner": { - "w": 300, - "h": 250 - }, - "ext": 1 - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index", - "ref": "https://example.com/page" - }, - "device": { - "ua": "ua", - "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Origin": [ - "test-domain.com" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - ], - "Referer": [ - "https://example.com/page" - ] - }, - "uri": "https://test.localhost.com", - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "tagid": "123", - "banner": { - "w": 300, - "h": 250 - }, - "ext": 1 - } - ], - "site": { - "domain": "test-domain.com", - "page": "http://test-domain.com/index", - "ref": "https://example.com/page" - }, - "device": { - "ua": "ua", - "ipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "cur": "USD", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1 - } - ] - } - ], - "seat": "trustx" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "crid": "4235d4b1-e2a6-9bbb-a34c-766714c2d221", - "price": 10, - "impid": "test-imp", - "adm": "", - "mtype": 1 - }, - "type": "banner" - } - ], - "seat": "trustx" - } - ] -} diff --git a/adapters/trustx/trustxtest/supplemental/no-content-response.json b/adapters/trustx/trustxtest/supplemental/no-content-response.json deleted file mode 100644 index 5d65dc0e73..0000000000 --- a/adapters/trustx/trustxtest/supplemental/no-content-response.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "mimes": [ - "video/mp4" - ], - "w": 1920, - "h": 1080 - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 204 - } - } - ], - "expectedBidResponses": [] -} - diff --git a/adapters/trustx/trustxtest/supplemental/unsupported-mtype.json b/adapters/trustx/trustxtest/supplemental/unsupported-mtype.json deleted file mode 100644 index 0596f43cf5..0000000000 --- a/adapters/trustx/trustxtest/supplemental/unsupported-mtype.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "w": 1920, - "h": 1080, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "method": "POST", - "uri": "https://test.localhost.com", - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "X-Openrtb-Version": [ - "2.6" - ], - "User-Agent": [ - "ua" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "body": { - "id": "test-request", - "imp": [ - { - "id": "test-imp", - "video": { - "w": 1920, - "h": 1080, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "uid": 1234 - } - } - } - ], - "app": { - "bundle": "app-bundle" - }, - "device": { - "ip": "123.123.123.123", - "ua": "ua" - } - }, - "impIDs": [ - "test-imp" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request", - "seatbid": [ - { - "bid": [ - { - "id": "2315f4a3-f2c4-8cac-69de-985272e1d706", - "impid": "test-imp", - "price": 10, - "adm": "test-ad", - "crid": "creative", - "w": 1920, - "h": 1080, - "mtype": 0, - "dur": 15 - } - ], - "seat": "trustx" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [] - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unsupported MType: 0", - "comparison": "literal" - } - ] -} - diff --git a/adapters/ucfunnel/params_test.go b/adapters/ucfunnel/params_test.go index ca9556ff6b..47954e8aad 100644 --- a/adapters/ucfunnel/params_test.go +++ b/adapters/ucfunnel/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/ucfunnel.json diff --git a/adapters/ucfunnel/ucfunnel.go b/adapters/ucfunnel/ucfunnel.go index e48c3dd158..efee7736d4 100644 --- a/adapters/ucfunnel/ucfunnel.go +++ b/adapters/ucfunnel/ucfunnel.go @@ -7,11 +7,11 @@ import ( "net/url" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type UcfunnelAdapter struct { diff --git a/adapters/ucfunnel/ucfunnel_test.go b/adapters/ucfunnel/ucfunnel_test.go index 0e0500a0ea..ec1b777c79 100644 --- a/adapters/ucfunnel/ucfunnel_test.go +++ b/adapters/ucfunnel/ucfunnel_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/undertone/params_test.go b/adapters/undertone/params_test.go index 126a8c4afa..dad74a08e8 100644 --- a/adapters/undertone/params_test.go +++ b/adapters/undertone/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/undertone/undertone.go b/adapters/undertone/undertone.go index 522a4a8857..91b2527c6d 100644 --- a/adapters/undertone/undertone.go +++ b/adapters/undertone/undertone.go @@ -8,11 +8,11 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const adapterId = 4 diff --git a/adapters/undertone/undertone_test.go b/adapters/undertone/undertone_test.go index 5c55412184..45281a1d15 100644 --- a/adapters/undertone/undertone_test.go +++ b/adapters/undertone/undertone_test.go @@ -3,9 +3,9 @@ package undertone import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/unicorn/params_test.go b/adapters/unicorn/params_test.go index 8080688400..89768ea824 100644 --- a/adapters/unicorn/params_test.go +++ b/adapters/unicorn/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/unicorn/unicorn.go b/adapters/unicorn/unicorn.go index ebaaab17fc..a957cff9a1 100644 --- a/adapters/unicorn/unicorn.go +++ b/adapters/unicorn/unicorn.go @@ -8,11 +8,11 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/unicorn/unicorn_test.go b/adapters/unicorn/unicorn_test.go index 646001927f..a83951277f 100644 --- a/adapters/unicorn/unicorn_test.go +++ b/adapters/unicorn/unicorn_test.go @@ -3,9 +3,9 @@ package unicorn import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/unruly/params_test.go b/adapters/unruly/params_test.go index cbda246310..132afee8e1 100644 --- a/adapters/unruly/params_test.go +++ b/adapters/unruly/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/unruly/unruly.go b/adapters/unruly/unruly.go index 4acf708f25..c8e73de99b 100644 --- a/adapters/unruly/unruly.go +++ b/adapters/unruly/unruly.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/unruly/unruly_test.go b/adapters/unruly/unruly_test.go index dc86bb3e68..e3df3d8881 100644 --- a/adapters/unruly/unruly_test.go +++ b/adapters/unruly/unruly_test.go @@ -3,9 +3,9 @@ package unruly import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/vidazoo/params_test.go b/adapters/vidazoo/params_test.go index 42d77bdd6c..cfd3e9b5d4 100644 --- a/adapters/vidazoo/params_test.go +++ b/adapters/vidazoo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/vidazoo/vidazoo.go b/adapters/vidazoo/vidazoo.go index 645a867733..8150f4ff4b 100644 --- a/adapters/vidazoo/vidazoo.go +++ b/adapters/vidazoo/vidazoo.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/vidazoo/vidazoo_test.go b/adapters/vidazoo/vidazoo_test.go index 49116c425f..5d6090de95 100644 --- a/adapters/vidazoo/vidazoo_test.go +++ b/adapters/vidazoo/vidazoo_test.go @@ -3,9 +3,9 @@ package vidazoo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/videobyte/params_test.go b/adapters/videobyte/params_test.go index 977409c11c..ffb37f88d9 100644 --- a/adapters/videobyte/params_test.go +++ b/adapters/videobyte/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/videobyte.json diff --git a/adapters/videobyte/videobyte.go b/adapters/videobyte/videobyte.go index 5968d9257b..ed79c6525b 100644 --- a/adapters/videobyte/videobyte.go +++ b/adapters/videobyte/videobyte.go @@ -6,11 +6,11 @@ import ( "net/http" "net/url" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" ) diff --git a/adapters/videobyte/videobyte_test.go b/adapters/videobyte/videobyte_test.go index cd5cdf5124..2d1d2a07fd 100644 --- a/adapters/videobyte/videobyte_test.go +++ b/adapters/videobyte/videobyte_test.go @@ -3,9 +3,9 @@ package videobyte import ( "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/videoheroes/params_test.go b/adapters/videoheroes/params_test.go index f927d5724c..e8af1f1fcf 100644 --- a/adapters/videoheroes/params_test.go +++ b/adapters/videoheroes/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/videoheroes/videoheroes.go b/adapters/videoheroes/videoheroes.go index 80956d56dc..8d1d7450cb 100755 --- a/adapters/videoheroes/videoheroes.go +++ b/adapters/videoheroes/videoheroes.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/videoheroes/videoheroes_test.go b/adapters/videoheroes/videoheroes_test.go index c999441007..3545b601dc 100644 --- a/adapters/videoheroes/videoheroes_test.go +++ b/adapters/videoheroes/videoheroes_test.go @@ -3,9 +3,9 @@ package videoheroes import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/vidoomy/params_test.go b/adapters/vidoomy/params_test.go index 1052816be5..b3801c637c 100644 --- a/adapters/vidoomy/params_test.go +++ b/adapters/vidoomy/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/vidoomy.json diff --git a/adapters/vidoomy/vidoomy.go b/adapters/vidoomy/vidoomy.go index c7dda9c774..b39448a414 100644 --- a/adapters/vidoomy/vidoomy.go +++ b/adapters/vidoomy/vidoomy.go @@ -7,12 +7,12 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type adapter struct { diff --git a/adapters/vidoomy/vidoomy_test.go b/adapters/vidoomy/vidoomy_test.go index c6950cf8b4..ef561b596b 100644 --- a/adapters/vidoomy/vidoomy_test.go +++ b/adapters/vidoomy/vidoomy_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestVidoomyBidderEndpointConfig(t *testing.T) { diff --git a/adapters/visiblemeasures/params_test.go b/adapters/visiblemeasures/params_test.go index e4bbbe2885..b4e5bb66c1 100644 --- a/adapters/visiblemeasures/params_test.go +++ b/adapters/visiblemeasures/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/visiblemeasures/visiblemeasures.go b/adapters/visiblemeasures/visiblemeasures.go index a024c5e3a4..100ba03e59 100644 --- a/adapters/visiblemeasures/visiblemeasures.go +++ b/adapters/visiblemeasures/visiblemeasures.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/visiblemeasures/visiblemeasures_test.go b/adapters/visiblemeasures/visiblemeasures_test.go index 718c4b2dea..8203893835 100644 --- a/adapters/visiblemeasures/visiblemeasures_test.go +++ b/adapters/visiblemeasures/visiblemeasures_test.go @@ -3,9 +3,9 @@ package visiblemeasures import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/visx/params_test.go b/adapters/visx/params_test.go index de8925866e..1355d6f8d9 100644 --- a/adapters/visx/params_test.go +++ b/adapters/visx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/visx/visx.go b/adapters/visx/visx.go index 2014ef3a63..36f62ab298 100644 --- a/adapters/visx/visx.go +++ b/adapters/visx/visx.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type VisxAdapter struct { diff --git a/adapters/visx/visx_test.go b/adapters/visx/visx_test.go index dd1dd999f7..d2adffddce 100644 --- a/adapters/visx/visx_test.go +++ b/adapters/visx/visx_test.go @@ -3,9 +3,9 @@ package visx import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/vox/params_test.go b/adapters/vox/params_test.go index 5438bc9dff..536503555e 100644 --- a/adapters/vox/params_test.go +++ b/adapters/vox/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/vox/vox.go b/adapters/vox/vox.go index 5918e2dba9..3e5f03aa6e 100644 --- a/adapters/vox/vox.go +++ b/adapters/vox/vox.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/vox/vox_test.go b/adapters/vox/vox_test.go index 4e057e2b27..dce89de3af 100644 --- a/adapters/vox/vox_test.go +++ b/adapters/vox/vox_test.go @@ -3,9 +3,9 @@ package vox import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/vrtcal/params_test.go b/adapters/vrtcal/params_test.go index 1e0aa94874..8ba180db2b 100644 --- a/adapters/vrtcal/params_test.go +++ b/adapters/vrtcal/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) //Vrtcal doesn't currently require any custom fields. This file is included for conformity only diff --git a/adapters/vrtcal/vrtcal.go b/adapters/vrtcal/vrtcal.go index d342fc44c1..e0df0bca95 100644 --- a/adapters/vrtcal/vrtcal.go +++ b/adapters/vrtcal/vrtcal.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type VrtcalAdapter struct { diff --git a/adapters/vrtcal/vrtcal_test.go b/adapters/vrtcal/vrtcal_test.go index 72efdd5f18..59d29aaee3 100644 --- a/adapters/vrtcal/vrtcal_test.go +++ b/adapters/vrtcal/vrtcal_test.go @@ -3,9 +3,9 @@ package vrtcal import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/vungle/param_test.go b/adapters/vungle/param_test.go index 114637d27d..7053669edf 100644 --- a/adapters/vungle/param_test.go +++ b/adapters/vungle/param_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/vungle/vungle.go b/adapters/vungle/vungle.go index cbd8102d81..eac9eb6b3c 100644 --- a/adapters/vungle/vungle.go +++ b/adapters/vungle/vungle.go @@ -9,10 +9,10 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const SupportedCurrency = "USD" diff --git a/adapters/vungle/vungle_test.go b/adapters/vungle/vungle_test.go index 687edb21bc..740208dbe0 100644 --- a/adapters/vungle/vungle_test.go +++ b/adapters/vungle/vungle_test.go @@ -3,9 +3,9 @@ package vungle import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/xeworks/params_test.go b/adapters/xeworks/params_test.go index 0581e0570f..0ce8d99f48 100644 --- a/adapters/xeworks/params_test.go +++ b/adapters/xeworks/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validParams = []string{ diff --git a/adapters/xeworks/xeworks.go b/adapters/xeworks/xeworks.go index 10598b6750..bd9d179528 100644 --- a/adapters/xeworks/xeworks.go +++ b/adapters/xeworks/xeworks.go @@ -7,12 +7,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type bidType struct { diff --git a/adapters/xeworks/xeworks_test.go b/adapters/xeworks/xeworks_test.go index f8c566fe42..842045af1d 100644 --- a/adapters/xeworks/xeworks_test.go +++ b/adapters/xeworks/xeworks_test.go @@ -3,9 +3,9 @@ package xeworks import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/yahooAds/params_test.go b/adapters/yahooAds/params_test.go index 9da14a18b0..42a5c16ae7 100644 --- a/adapters/yahooAds/params_test.go +++ b/adapters/yahooAds/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/yahooAds.json diff --git a/adapters/yahooAds/promote_regs_test.go b/adapters/yahooAds/promote_regs_test.go deleted file mode 100644 index 6ed9a428a7..0000000000 --- a/adapters/yahooAds/promote_regs_test.go +++ /dev/null @@ -1,256 +0,0 @@ -package yahooAds - -import ( - "encoding/json" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -func regsExt(j string) *openrtb2.Regs { - return &openrtb2.Regs{Ext: []byte(j)} -} - -// TestPromoteRegsExtTo26 exercises the regs.ext promotion in isolation; the -// JSON fixtures cover the same logic end-to-end through MakeRequests. -func TestPromoteRegsExtTo26(t *testing.T) { - tests := []struct { - name string - inRegs *openrtb2.Regs - wantGPP string - wantGPPSID []int8 - wantExt string // expected regs.ext JSON when it should remain - wantNoExt bool // expect regs.ext to be empty/nil after the call - wantRegsUnchanged bool - wantWarning bool // expect one errortypes.Warning - }{ - { - name: "nil_regs", - inRegs: nil, - wantRegsUnchanged: true, - }, - { - name: "regs_without_ext", - inRegs: &openrtb2.Regs{}, - wantNoExt: true, - wantRegsUnchanged: true, - }, - { - name: "regs_with_empty_ext_bytes", - inRegs: &openrtb2.Regs{Ext: []byte{}}, - wantNoExt: true, - wantRegsUnchanged: true, - }, - { - name: "regs_with_empty_object_ext", - inRegs: regsExt(`{}`), - wantExt: `{}`, - wantRegsUnchanged: true, - }, - { - name: "regs_ext_array_not_object", - inRegs: regsExt(`[1,2,3]`), - wantExt: `[1,2,3]`, - wantRegsUnchanged: true, - wantWarning: true, - }, - { - name: "regs_ext_number_not_object", - inRegs: regsExt(`42`), - wantExt: `42`, - wantRegsUnchanged: true, - wantWarning: true, - }, - { - name: "promote_gpp_only", - inRegs: regsExt(`{"gpp":"DBA"}`), - wantGPP: "DBA", - wantNoExt: true, - }, - { - name: "promote_gpp_sid_only", - inRegs: regsExt(`{"gpp_sid":[6,7]}`), - wantGPPSID: []int8{6, 7}, - wantNoExt: true, - }, - { - name: "promote_both_gpp_fields_together", - inRegs: regsExt(`{"gpp":"X","gpp_sid":[6]}`), - wantGPP: "X", - wantGPPSID: []int8{6}, - wantNoExt: true, - }, - { - name: "promote_with_unrelated_sibling_gpc", - inRegs: regsExt(`{"gpp":"X","gpp_sid":[6],"gpc":"1"}`), - wantGPP: "X", - wantGPPSID: []int8{6}, - wantExt: `{"gpc":"1"}`, - }, - { - name: "promote_gpp_keep_dsa_object_in_ext", - inRegs: regsExt(`{"gpp":"X","dsa":{"dsarequired":1}}`), - wantGPP: "X", - wantExt: `{"dsa":{"dsarequired":1}}`, - }, - { - name: "wrong_type_gpp_number_stays_in_ext", - inRegs: regsExt(`{"gpp":123,"gpp_sid":[6]}`), - wantGPPSID: []int8{6}, - wantExt: `{"gpp":123}`, - }, - { - name: "wrong_type_gpp_sid_string_stays_in_ext", - inRegs: regsExt(`{"gpp":"X","gpp_sid":"oops"}`), - wantGPP: "X", - wantExt: `{"gpp_sid":"oops"}`, - }, - { - name: "wrong_type_only_regs_untouched", - inRegs: regsExt(`{"gpp":123}`), - wantExt: `{"gpp":123}`, - wantRegsUnchanged: true, - }, - { - name: "promote_gpp_empty_string_consumed", - inRegs: regsExt(`{"gpp":""}`), - wantGPP: "", - wantNoExt: true, - }, - { - name: "promote_gpp_sid_empty_array", - inRegs: regsExt(`{"gpp_sid":[]}`), - wantGPPSID: []int8{}, - wantNoExt: true, - }, - { - name: "top_gpp_already_set_ext_duplicate_stripped", - inRegs: &openrtb2.Regs{ - GPP: "EXISTING", - Ext: []byte(`{"gpp":"EXT_VALUE"}`), - }, - wantGPP: "EXISTING", - wantNoExt: true, - }, - { - name: "top_gpp_sid_already_set_ext_duplicate_stripped", - inRegs: &openrtb2.Regs{ - GPPSID: []int8{1, 2}, - Ext: []byte(`{"gpp_sid":[6]}`), - }, - wantGPPSID: []int8{1, 2}, - wantNoExt: true, - }, - { - name: "top_gpp_set_duplicate_stripped_sibling_kept", - inRegs: &openrtb2.Regs{ - GPP: "KEEP", - Ext: []byte(`{"gpp":"stale","gpc":"1"}`), - }, - wantGPP: "KEEP", - wantExt: `{"gpc":"1"}`, - }, - { - name: "top_gpp_set_wrong_typed_duplicate_also_stripped", - inRegs: &openrtb2.Regs{ - GPP: "KEEP", - Ext: []byte(`{"gpp":123}`), - }, - wantGPP: "KEEP", - wantNoExt: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, warnings := promoteRegsExtTo26(tt.inRegs) - - if tt.wantWarning { - require.Len(t, warnings, 1) - assert.IsType(t, &errortypes.Warning{}, warnings[0]) - } else { - assert.Empty(t, warnings) - } - - if tt.wantRegsUnchanged { - assert.Same(t, tt.inRegs, got, "regs pointer should NOT change for no-op input") - } else { - assert.NotSame(t, tt.inRegs, got, "regs should be swapped to a fresh copy after promotion") - } - - if got == nil { - return - } - - assert.Equal(t, tt.wantGPP, got.GPP, "regs.gpp") - assert.Equal(t, tt.wantGPPSID, got.GPPSID, "regs.gpp_sid") - - switch { - case tt.wantNoExt: - assert.Empty(t, got.Ext, "regs.ext should be empty/nil") - case tt.wantExt != "": - var gotExt, wantExt any - require.NoError(t, json.Unmarshal(got.Ext, &gotExt), "regs.ext should be valid JSON") - require.NoError(t, json.Unmarshal([]byte(tt.wantExt), &wantExt)) - assert.Equal(t, wantExt, gotExt, "regs.ext content") - default: - t.Fatal("test case must set wantNoExt or wantExt") - } - }) - } -} - -// The original *Regs must never be mutated: other adapters and per-impression -// copies must keep seeing the publisher's original request shape. -func TestPromoteRegsExtTo26_DoesNotMutateOriginalRegs(t *testing.T) { - originalExt := []byte(`{"gpp":"X","gpp_sid":[6],"gpc":"1"}`) - originalRegs := &openrtb2.Regs{Ext: append([]byte(nil), originalExt...)} - - beforeGPP := originalRegs.GPP - beforeGPPSID := append([]int8(nil), originalRegs.GPPSID...) - beforeExt := append([]byte(nil), originalRegs.Ext...) - - got, warnings := promoteRegsExtTo26(originalRegs) - - assert.Empty(t, warnings) - assert.Equal(t, beforeGPP, originalRegs.GPP, "original Regs.GPP was mutated") - assert.Equal(t, beforeGPPSID, originalRegs.GPPSID, "original Regs.GPPSID was mutated") - assert.Equal(t, beforeExt, []byte(originalRegs.Ext), "original Regs.Ext bytes were mutated") - - assert.NotSame(t, originalRegs, got, "promoted regs should be a fresh copy") - assert.Equal(t, "X", got.GPP) - assert.Equal(t, []int8{6}, got.GPPSID) - assert.JSONEq(t, `{"gpc":"1"}`, string(got.Ext), "gpc stays in ext") -} - -// A regs.ext warning must not drop the impression: the bid request still goes -// out, with regs.ext passed through untouched. -func TestMakeRequestsMalformedRegsExtWarning(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderYahooAds, config.Adapter{}, config.Server{}) - require.NoError(t, buildErr) - - request := &openrtb2.BidRequest{ - ID: "test-request-id", - Imp: []openrtb2.Imp{{ - ID: "test-imp-id", - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Ext: []byte(`{"bidder":{"dcn":"dcn1","pos":"pos2"}}`), - }}, - Site: &openrtb2.Site{ID: "test-site-id"}, - Regs: &openrtb2.Regs{Ext: []byte(`[1,2,3]`)}, - } - - reqs, errs := bidder.MakeRequests(request, &adapters.ExtraRequestInfo{}) - - require.Len(t, errs, 1) - assert.IsType(t, &errortypes.Warning{}, errs[0]) - require.Len(t, reqs, 1, "impression must not be dropped on a regs.ext warning") - assert.Contains(t, string(reqs[0].Body), `"ext":[1,2,3]`, "regs.ext should pass through untouched") -} diff --git a/adapters/yahooAds/yahooAds.go b/adapters/yahooAds/yahooAds.go index 18c94aa985..4a03bc3e7f 100644 --- a/adapters/yahooAds/yahooAds.go +++ b/adapters/yahooAds/yahooAds.go @@ -6,12 +6,12 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type adapter struct { @@ -26,17 +26,12 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E headers.Add("Content-Type", "application/json;charset=utf-8") headers.Add("Accept", "application/json") - headers.Add("x-openrtb-version", "2.6") + headers.Add("x-openrtb-version", "2.5") if request.Device != nil && request.Device.UA != "" { headers.Set("User-Agent", request.Device.UA) } - // Regs depends only on request-level data, so promote once and reuse the - // result for every per-impression copy. - promotedRegs, regsWarnings := promoteRegsExtTo26(request.Regs) - errors = append(errors, regsWarnings...) - for idx, imp := range request.Imp { var bidderExt adapters.ExtImpBidder err := jsonutil.Unmarshal(imp.Ext, &bidderExt) @@ -62,7 +57,6 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E // each split request is only associated to a single impression reqCopy := *request reqCopy.Imp = []openrtb2.Imp{imp} - reqCopy.Regs = promotedRegs if request.Site != nil { siteCopy := *request.Site @@ -178,73 +172,37 @@ func changeRequestForBidService(request *openrtb2.BidRequest, extension *openrtb } } - return nil -} - -// promoteRegsExtTo26 moves regs.ext.{gpp, gpp_sid} to their top-level fields -// when the publisher sent them in ext and the top-level field is empty. -// When the top-level field is already set, the ext duplicate is removed so -// only the authoritative top-level value ships. A regs.ext that is not a JSON -// object is passed through untouched with a non-fatal warning. -func promoteRegsExtTo26(regs *openrtb2.Regs) (*openrtb2.Regs, []error) { - if regs == nil || len(regs.Ext) == 0 { - return regs, nil - } - - var regsExt map[string]json.RawMessage - if err := jsonutil.Unmarshal(regs.Ext, ®sExt); err != nil { - return regs, []error{&errortypes.Warning{ - Message: "regs.ext is not a JSON object; skipped OpenRTB 2.6 regs promotion", - }} - } - - regsCopy := *regs - modified := false - - if raw, ok := regsExt["gpp"]; ok { - if regsCopy.GPP == "" { - var v string - if err := jsonutil.Unmarshal(raw, &v); err == nil { - regsCopy.GPP = v - delete(regsExt, "gpp") - modified = true - } - } else { - delete(regsExt, "gpp") - modified = true + if request.Regs != nil && request.Regs.GPP != "" { + requestRegs := *request.Regs + if requestRegs.Ext == nil { + requestRegs.Ext = json.RawMessage("{}") } - } - - if raw, ok := regsExt["gpp_sid"]; ok { - if len(regsCopy.GPPSID) == 0 { - var v []int8 - if err := jsonutil.Unmarshal(raw, &v); err == nil { - regsCopy.GPPSID = v - delete(regsExt, "gpp_sid") - modified = true + var regsExt map[string]json.RawMessage + err := jsonutil.Unmarshal(requestRegs.Ext, ®sExt) + if err != nil { + return err + } + regsExt["gpp"], err = json.Marshal(&requestRegs.GPP) + if err != nil { + return fmt.Errorf("failed to marshal requestRegs.GPP: %v", err) + } + if requestRegs.GPPSID != nil { + regsExt["gpp_sid"], err = json.Marshal(&requestRegs.GPPSID) + if err != nil { + return err } - } else { - delete(regsExt, "gpp_sid") - modified = true } - } - - if !modified { - return regs, nil - } - if len(regsExt) == 0 { - regsCopy.Ext = nil - } else { - // stdlib json.Marshal is used because it writes a nil RawMessage as null. - newExt, err := json.Marshal(regsExt) + requestRegs.Ext, err = json.Marshal(®sExt) if err != nil { - return regs, nil + return err } - regsCopy.Ext = newExt + requestRegs.GPP = "" + requestRegs.GPPSID = nil + request.Regs = &requestRegs } - return ®sCopy, nil + return nil } func validateBanner(banner *openrtb2.Banner) error { diff --git a/adapters/yahooAds/yahooAds_test.go b/adapters/yahooAds/yahooAds_test.go index 6b07ef32c1..0eaf711faf 100644 --- a/adapters/yahooAds/yahooAds_test.go +++ b/adapters/yahooAds/yahooAds_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestYahooAdsBidderEndpointConfig(t *testing.T) { diff --git a/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json index 2b2a451cb1..6b61861d9b 100644 --- a/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json @@ -39,7 +39,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json index 8253ac8853..3d0b4a37b0 100644 --- a/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json @@ -39,7 +39,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json index e30a70df25..9f9d188d00 100644 --- a/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json @@ -47,7 +47,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json b/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json index b5e83649f0..5e0820761d 100644 --- a/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json @@ -38,7 +38,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json b/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json index c5f3f47c01..a831dba64b 100644 --- a/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json @@ -38,7 +38,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-promoted.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-promoted.json deleted file mode 100644 index cd29e6cde9..0000000000 --- a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-promoted.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ] - }, - "tagid": "123", - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos2" - } - } - } - ], - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "ip": "127.0.0.1" - }, - "site": { - "id": "test-site-id" - }, - "regs": { - "ext": { - "gpp": "header~1YNN", - "gpp_sid": [ - 6 - ], - "gpc": "1" - } - } - }, - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "", - "body": { - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "ip": "127.0.0.1" - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "pos2", - "banner": { - "format": [ - { - "w": 728, - "h": 90 - } - ], - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos2" - } - } - } - ], - "site": { - "id": "dcn1" - }, - "regs": { - "gpp": "header~1YNN", - "gpp_sid": [ - 6 - ], - "ext": { - "gpc": "1" - } - } - }, - "impIDs": [ - "test-imp-id" - ] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "yahooAds", - "bid": [ - { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.500000, - "adm": "some-test-ad", - "crid": "crid_10", - "h": 90, - "w": 728 - } - ] - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 728, - "h": 90 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-duplicate-stripped.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json similarity index 97% rename from adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-duplicate-stripped.json rename to adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json index bcd41b7e56..950796692a 100644 --- a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-ext-duplicate-stripped.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json @@ -47,7 +47,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", @@ -78,9 +78,9 @@ "id": "dcn1" }, "regs": { - "gpp": "header~1YNN", - "gpp_sid": [6], "ext": { + "gpp": "header~1YNN", + "gpp_sid": [6], "param1": "val1" } } diff --git a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json index d8b9c22a32..73012144fb 100644 --- a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json @@ -43,7 +43,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", @@ -74,8 +74,10 @@ "id": "dcn1" }, "regs": { - "gpp": "header~1YNN", - "gpp_sid": [6] + "ext": { + "gpp": "header~1YNN", + "gpp_sid": [6] + } } }, "impIDs":["test-imp-id"] diff --git a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json index 92b575369f..513e37f9f1 100644 --- a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json @@ -40,7 +40,7 @@ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" ], "X-Openrtb-Version": [ - "2.6" + "2.5" ] }, "uri": "", diff --git a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-two-imps-shared-regs.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-two-imps-shared-regs.json deleted file mode 100644 index eddd62ee93..0000000000 --- a/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-two-imps-shared-regs.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-1", - "banner": { - "format": [{"w": 300, "h": 250}] - }, - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos2" - } - } - }, - { - "id": "test-imp-2", - "banner": { - "format": [{"w": 728, "h": 90}] - }, - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos3" - } - } - } - ], - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "ip": "127.0.0.1" - }, - "site": { - "id": "test-site-id" - }, - "regs": { - "ext": { - "gpp": "header~1YNN", - "gpp_sid": [6], - "gpc": "1" - } - } - }, - - "httpCalls": [ - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "", - "body": { - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "ip": "127.0.0.1" - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-1", - "tagid": "pos2", - "banner": { - "format": [{"w": 300, "h": 250}], - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos2" - } - } - } - ], - "site": { - "id": "dcn1" - }, - "regs": { - "gpp": "header~1YNN", - "gpp_sid": [6], - "ext": { - "gpc": "1" - } - } - }, - "impIDs": ["test-imp-1"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "yahooAds", - "bid": [{ - "id": "bid-1", - "impid": "test-imp-1", - "price": 0.500000, - "adm": "some-test-ad", - "crid": "crid_10", - "h": 250, - "w": 300 - }] - } - ], - "cur": "USD" - } - } - }, - { - "expectedRequest": { - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json;charset=utf-8" - ], - "User-Agent": [ - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" - ], - "X-Openrtb-Version": [ - "2.6" - ] - }, - "uri": "", - "body": { - "device": { - "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "ip": "127.0.0.1" - }, - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-2", - "tagid": "pos3", - "banner": { - "format": [{"w": 728, "h": 90}], - "w": 728, - "h": 90 - }, - "ext": { - "bidder": { - "dcn": "dcn1", - "pos": "pos3" - } - } - } - ], - "site": { - "id": "dcn1" - }, - "regs": { - "gpp": "header~1YNN", - "gpp_sid": [6], - "ext": { - "gpc": "1" - } - } - }, - "impIDs": ["test-imp-2"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "yahooAds", - "bid": [{ - "id": "bid-2", - "impid": "test-imp-2", - "price": 0.750000, - "adm": "some-test-ad-2", - "crid": "crid_11", - "h": 90, - "w": 728 - }] - } - ], - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-1", - "impid": "test-imp-1", - "price": 0.5, - "adm": "some-test-ad", - "crid": "crid_10", - "w": 300, - "h": 250 - }, - "type": "banner" - } - ] - }, - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "bid-2", - "impid": "test-imp-2", - "price": 0.75, - "adm": "some-test-ad-2", - "crid": "crid_11", - "w": 728, - "h": 90 - }, - "type": "banner" - } - ] - } - ] -} diff --git a/adapters/yandex/params_test.go b/adapters/yandex/params_test.go index d3b872728c..0805be1988 100644 --- a/adapters/yandex/params_test.go +++ b/adapters/yandex/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/yandex/yandex.go b/adapters/yandex/yandex.go index e26aba5e94..c6a99e5a2e 100644 --- a/adapters/yandex/yandex.go +++ b/adapters/yandex/yandex.go @@ -11,12 +11,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/adapters/yandex/yandex_test.go b/adapters/yandex/yandex_test.go index 29a7feff16..7635b1a1b9 100644 --- a/adapters/yandex/yandex_test.go +++ b/adapters/yandex/yandex_test.go @@ -3,9 +3,9 @@ package yandex import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/yeahmobi/params_test.go b/adapters/yeahmobi/params_test.go index 8366c19260..2b47316df2 100644 --- a/adapters/yeahmobi/params_test.go +++ b/adapters/yeahmobi/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/yeahmobi/yeahmobi.go b/adapters/yeahmobi/yeahmobi.go index f3b314ad92..934cee5c27 100644 --- a/adapters/yeahmobi/yeahmobi.go +++ b/adapters/yeahmobi/yeahmobi.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/yeahmobi/yeahmobi_test.go b/adapters/yeahmobi/yeahmobi_test.go index 452ec6e781..d822b32d67 100644 --- a/adapters/yeahmobi/yeahmobi_test.go +++ b/adapters/yeahmobi/yeahmobi_test.go @@ -3,9 +3,9 @@ package yeahmobi import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/yieldlab/params_test.go b/adapters/yieldlab/params_test.go index 6ac8fa727b..ac65adc0fe 100644 --- a/adapters/yieldlab/params_test.go +++ b/adapters/yieldlab/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/yieldlab.json diff --git a/adapters/yieldlab/types.go b/adapters/yieldlab/types.go index 4740b042ec..57ee15c923 100644 --- a/adapters/yieldlab/types.go +++ b/adapters/yieldlab/types.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type bidResponse struct { diff --git a/adapters/yieldlab/yieldlab.go b/adapters/yieldlab/yieldlab.go index 4193547117..4466e548af 100644 --- a/adapters/yieldlab/yieldlab.go +++ b/adapters/yieldlab/yieldlab.go @@ -12,12 +12,12 @@ import ( "golang.org/x/text/currency" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) // YieldlabAdapter connects the Yieldlab API to prebid server diff --git a/adapters/yieldlab/yieldlab_test.go b/adapters/yieldlab/yieldlab_test.go index b9fe8ed8a5..1bea9b12ea 100644 --- a/adapters/yieldlab/yieldlab_test.go +++ b/adapters/yieldlab/yieldlab_test.go @@ -8,9 +8,9 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const testURL = "https://ad.yieldlab.net/testing/" diff --git a/adapters/yieldmo/params_test.go b/adapters/yieldmo/params_test.go index 7c9224180c..baa566cf71 100644 --- a/adapters/yieldmo/params_test.go +++ b/adapters/yieldmo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // This file actually intends to test static/bidder-params/yieldmo.json diff --git a/adapters/yieldmo/yieldmo.go b/adapters/yieldmo/yieldmo.go index c4ea2c66d9..0725f7920c 100644 --- a/adapters/yieldmo/yieldmo.go +++ b/adapters/yieldmo/yieldmo.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type YieldmoAdapter struct { diff --git a/adapters/yieldmo/yieldmo_test.go b/adapters/yieldmo/yieldmo_test.go index 62ec8d5dd8..668e0a375e 100644 --- a/adapters/yieldmo/yieldmo_test.go +++ b/adapters/yieldmo/yieldmo_test.go @@ -3,9 +3,9 @@ package yieldmo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/yieldone/params_test.go b/adapters/yieldone/params_test.go index 9f493a6d18..5632546ac3 100644 --- a/adapters/yieldone/params_test.go +++ b/adapters/yieldone/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/yieldone/yieldone.go b/adapters/yieldone/yieldone.go index 5227861c4b..b1aa646538 100644 --- a/adapters/yieldone/yieldone.go +++ b/adapters/yieldone/yieldone.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type YieldoneAdapter struct { diff --git a/adapters/yieldone/yieldone_test.go b/adapters/yieldone/yieldone_test.go index c729049201..a9831561d4 100644 --- a/adapters/yieldone/yieldone_test.go +++ b/adapters/yieldone/yieldone_test.go @@ -3,9 +3,9 @@ package yieldone import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adapters/zentotem/zentotem.go b/adapters/zentotem/zentotem.go index 428cc2c449..65c067443e 100644 --- a/adapters/zentotem/zentotem.go +++ b/adapters/zentotem/zentotem.go @@ -4,9 +4,9 @@ import ( "encoding/json" "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type adapter struct { diff --git a/adapters/zentotem/zentotem_test.go b/adapters/zentotem/zentotem_test.go index 2b14a34924..cf608c4a41 100644 --- a/adapters/zentotem/zentotem_test.go +++ b/adapters/zentotem/zentotem_test.go @@ -2,9 +2,9 @@ package zentotem import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "testing" ) diff --git a/adapters/zeroclickfraud/params_test.go b/adapters/zeroclickfraud/params_test.go deleted file mode 100644 index 14682e83bb..0000000000 --- a/adapters/zeroclickfraud/params_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package zeroclickfraud - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/openrtb_ext" -) - -var validParams = []string{ - `{ "host": "host", "sourceId": 1 }`, - `{ "host": "host.example.com", "sourceId": 1 }`, - `{ "host": "host.example.com:8080", "sourceId": 1 }`, - `{ "host": "host-example.test", "sourceId": 1 }`, - `{ "host": "Host.Example.com", "sourceId": 1 }`, - `{ "host": "localhost:3000", "sourceId": 1 }`, -} - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderZeroClickFraud, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected ZeroClickFraud params: %s", validParam) - } - } -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{}`, - `{ "sourceId": 1 }`, - `{ "host": "host" }`, - `{ "host": "", "sourceId": 1 }`, - `{ "host": "/path", "sourceId": 1 }`, - `{ "host": "//evil.com", "sourceId": 1 }`, - `{ "host": "host/path", "sourceId": 1 }`, - `{ "host": "host?query=1", "sourceId": 1 }`, - `{ "host": "host#fragment", "sourceId": 1 }`, - `{ "host": "user@host", "sourceId": 1 }`, - `{ "host": "https://host.com", "sourceId": 1 }`, - `{ "host": "host:notaport", "sourceId": 1 }`, - `{ "host": "host:8080:extra", "sourceId": 1 }`, -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderZeroClickFraud, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} diff --git a/adapters/zeroclickfraud/zeroclickfraud.go b/adapters/zeroclickfraud/zeroclickfraud.go index 0bda7b3687..eecd1dd858 100644 --- a/adapters/zeroclickfraud/zeroclickfraud.go +++ b/adapters/zeroclickfraud/zeroclickfraud.go @@ -8,13 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/urlutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ZeroClickFraudAdapter struct { @@ -150,7 +149,7 @@ func getBidderParams(imp *openrtb2.Imp) (*openrtb_ext.ExtImpZeroClickFraud, erro } } - if !urlutil.IsSafeHost(zeroclickfraudExt.Host) { + if len(zeroclickfraudExt.Host) < 1 { return nil, &errortypes.BadInput{ Message: "Invalid/Missing Host", } diff --git a/adapters/zeroclickfraud/zeroclickfraud_test.go b/adapters/zeroclickfraud/zeroclickfraud_test.go index d10b226bc7..363f37c0e1 100644 --- a/adapters/zeroclickfraud/zeroclickfraud_test.go +++ b/adapters/zeroclickfraud/zeroclickfraud_test.go @@ -3,9 +3,9 @@ package zeroclickfraud import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/zeta_global_ssp/params_test.go b/adapters/zeta_global_ssp/params_test.go index a1c26968b9..d665d3da0f 100644 --- a/adapters/zeta_global_ssp/params_test.go +++ b/adapters/zeta_global_ssp/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/zeta_global_ssp/zeta_global_ssp.go b/adapters/zeta_global_ssp/zeta_global_ssp.go index 9f491ed2b5..59a912c162 100644 --- a/adapters/zeta_global_ssp/zeta_global_ssp.go +++ b/adapters/zeta_global_ssp/zeta_global_ssp.go @@ -8,12 +8,12 @@ import ( "text/template" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/zeta_global_ssp/zeta_global_ssp_test.go b/adapters/zeta_global_ssp/zeta_global_ssp_test.go index d68b55b85a..f7e9b36698 100644 --- a/adapters/zeta_global_ssp/zeta_global_ssp_test.go +++ b/adapters/zeta_global_ssp/zeta_global_ssp_test.go @@ -3,9 +3,9 @@ package zeta_global_ssp import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adapters/zmaticoo/params_test.go b/adapters/zmaticoo/params_test.go index 1360bfbe96..c6c462155a 100644 --- a/adapters/zmaticoo/params_test.go +++ b/adapters/zmaticoo/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestValidParams(t *testing.T) { diff --git a/adapters/zmaticoo/zmaticoo.go b/adapters/zmaticoo/zmaticoo.go index 93703d5f72..9e0da9e449 100644 --- a/adapters/zmaticoo/zmaticoo.go +++ b/adapters/zmaticoo/zmaticoo.go @@ -6,11 +6,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type adapter struct { diff --git a/adapters/zmaticoo/zmaticoo_test.go b/adapters/zmaticoo/zmaticoo_test.go index 7bd5c6f674..df12c1e1b6 100644 --- a/adapters/zmaticoo/zmaticoo_test.go +++ b/adapters/zmaticoo/zmaticoo_test.go @@ -3,9 +3,9 @@ package zmaticoo import ( "testing" - "github.com/prebid/prebid-server/v4/adapters/adapterstest" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func TestJsonSamples(t *testing.T) { diff --git a/adservertargeting/adservertargeting.go b/adservertargeting/adservertargeting.go index 993d6387bd..3ab7cefe6c 100644 --- a/adservertargeting/adservertargeting.go +++ b/adservertargeting/adservertargeting.go @@ -7,7 +7,7 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type DataSource string diff --git a/adservertargeting/adservertargeting_test.go b/adservertargeting/adservertargeting_test.go index 10e3090d29..8ba3c256b3 100644 --- a/adservertargeting/adservertargeting_test.go +++ b/adservertargeting/adservertargeting_test.go @@ -7,8 +7,8 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/adservertargeting/reqcache.go b/adservertargeting/reqcache.go index c1b701bdf3..03c87f024c 100644 --- a/adservertargeting/reqcache.go +++ b/adservertargeting/reqcache.go @@ -5,7 +5,7 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type requestCache struct { diff --git a/adservertargeting/requestlookup.go b/adservertargeting/requestlookup.go index 99545b8161..6829971651 100644 --- a/adservertargeting/requestlookup.go +++ b/adservertargeting/requestlookup.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/buger/jsonparser" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func getAdServerTargeting(reqWrapper *openrtb_ext.RequestWrapper) ([]openrtb_ext.AdServerTarget, error) { diff --git a/adservertargeting/requestlookup_test.go b/adservertargeting/requestlookup_test.go index c588cdf30d..22f914ac79 100644 --- a/adservertargeting/requestlookup_test.go +++ b/adservertargeting/requestlookup_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adservertargeting/respdataprocessor.go b/adservertargeting/respdataprocessor.go index 489e5fc7b6..beeaae68de 100644 --- a/adservertargeting/respdataprocessor.go +++ b/adservertargeting/respdataprocessor.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) diff --git a/adservertargeting/respdataprocessor_test.go b/adservertargeting/respdataprocessor_test.go index 90215a4f1d..973f9b801e 100644 --- a/adservertargeting/respdataprocessor_test.go +++ b/adservertargeting/respdataprocessor_test.go @@ -8,7 +8,7 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/adservertargeting/utils.go b/adservertargeting/utils.go index 9286c896be..7cd4a826b9 100644 --- a/adservertargeting/utils.go +++ b/adservertargeting/utils.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/buger/jsonparser" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func splitAndGet(path string, data []byte, delimiter string) (string, error) { diff --git a/amp/parse.go b/amp/parse.go index 5437ed3f91..2a86bc7b6b 100644 --- a/amp/parse.go +++ b/amp/parse.go @@ -10,10 +10,10 @@ import ( tcf2 "github.com/prebid/go-gdpr/vendorconsent/tcf2" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - "github.com/prebid/prebid-server/v4/privacy/gdpr" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + "github.com/prebid/prebid-server/v3/privacy/gdpr" ) // Params defines the parameters of an AMP request. diff --git a/amp/parse_test.go b/amp/parse_test.go index 671d9b0f05..65b69012b4 100644 --- a/amp/parse_test.go +++ b/amp/parse_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - "github.com/prebid/prebid-server/v4/privacy/gdpr" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + "github.com/prebid/prebid-server/v3/privacy/gdpr" "github.com/stretchr/testify/assert" ) diff --git a/analytics/agma/agma_module.go b/analytics/agma/agma_module.go index 518956d58d..1e544fe606 100644 --- a/analytics/agma/agma_module.go +++ b/analytics/agma/agma_module.go @@ -13,10 +13,10 @@ import ( "github.com/benbjohnson/clock" "github.com/docker/go-units" "github.com/prebid/go-gdpr/vendorconsent" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type httpSender = func(payload []byte) error diff --git a/analytics/agma/agma_module_test.go b/analytics/agma/agma_module_test.go index 20325ebb53..61a6e52755 100644 --- a/analytics/agma/agma_module_test.go +++ b/analytics/agma/agma_module_test.go @@ -11,9 +11,9 @@ import ( "github.com/benbjohnson/clock" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/analytics/agma/model.go b/analytics/agma/model.go index b48d39aebd..112ce961a0 100644 --- a/analytics/agma/model.go +++ b/analytics/agma/model.go @@ -5,8 +5,8 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type EventType string diff --git a/analytics/agma/model_test.go b/analytics/agma/model_test.go index 35340bd274..925856b87b 100644 --- a/analytics/agma/model_test.go +++ b/analytics/agma/model_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/analytics/agma/sender.go b/analytics/agma/sender.go index 28a0825b07..e3f9c76852 100644 --- a/analytics/agma/sender.go +++ b/analytics/agma/sender.go @@ -10,9 +10,9 @@ import ( "net/url" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/version" ) func compressToGZIP(requestBody []byte) ([]byte, error) { diff --git a/analytics/agma/sender_test.go b/analytics/agma/sender_test.go index e4a2553c9e..1d23e6b6a9 100644 --- a/analytics/agma/sender_test.go +++ b/analytics/agma/sender_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/analytics/build/build.go b/analytics/build/build.go index 5851739108..faef6239a5 100644 --- a/analytics/build/build.go +++ b/analytics/build/build.go @@ -4,16 +4,16 @@ import ( "encoding/json" "github.com/benbjohnson/clock" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/analytics/agma" - "github.com/prebid/prebid-server/v4/analytics/clients" - "github.com/prebid/prebid-server/v4/analytics/filesystem" - "github.com/prebid/prebid-server/v4/analytics/pubstack" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/analytics/agma" + "github.com/prebid/prebid-server/v3/analytics/clients" + "github.com/prebid/prebid-server/v3/analytics/filesystem" + "github.com/prebid/prebid-server/v3/analytics/pubstack" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" ) // Modules that need to be logged to need to be initialized here diff --git a/analytics/build/build_test.go b/analytics/build/build_test.go index 7c6751b722..ae16e0f749 100644 --- a/analytics/build/build_test.go +++ b/analytics/build/build_test.go @@ -1,18 +1,18 @@ package build import ( - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/iputil" "net/http" "os" "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/analytics/build/msp_plugin.go b/analytics/build/msp_plugin.go index 2269d33022..ddca06b5df 100644 --- a/analytics/build/msp_plugin.go +++ b/analytics/build/msp_plugin.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/golang/glog" - "github.com/prebid/prebid-server/v4/analytics" - mspPlugin "github.com/prebid/prebid-server/v4/msp/plugin" + "github.com/prebid/prebid-server/v3/analytics" + mspPlugin "github.com/prebid/prebid-server/v3/msp/plugin" ) type PluginBuilder interface { diff --git a/analytics/core.go b/analytics/core.go index a2b8162c0c..25ff46c824 100644 --- a/analytics/core.go +++ b/analytics/core.go @@ -4,9 +4,9 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Module must be implemented by analytics modules to extract the required information and logging @@ -82,8 +82,9 @@ type CookieSyncBidder struct { } type UsersyncInfo struct { - URL string `json:"url,omitempty"` - Type string `json:"type,omitempty"` + URL string `json:"url,omitempty"` + Type string `json:"type,omitempty"` + SupportCORS bool `json:"supportCORS,omitempty"` } // NotificationEvent object of a transaction at /event diff --git a/analytics/filesystem/file_module.go b/analytics/filesystem/file_module.go index 0342ee9f33..f2ab3c63d9 100644 --- a/analytics/filesystem/file_module.go +++ b/analytics/filesystem/file_module.go @@ -6,9 +6,9 @@ import ( cglog "github.com/chasex/glog" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type RequestType string diff --git a/analytics/filesystem/file_module_test.go b/analytics/filesystem/file_module_test.go index ff5a139ddd..0e502cfb9e 100644 --- a/analytics/filesystem/file_module_test.go +++ b/analytics/filesystem/file_module_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/mock" "github.com/prebid/openrtb/v20/openrtb2" diff --git a/analytics/filesystem/model.go b/analytics/filesystem/model.go index eec6fd7645..aed111dd10 100644 --- a/analytics/filesystem/model.go +++ b/analytics/filesystem/model.go @@ -4,10 +4,10 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type logAuction struct { diff --git a/analytics/pubstack/config.go b/analytics/pubstack/config.go index 6548cbc0f5..38ca4cb139 100644 --- a/analytics/pubstack/config.go +++ b/analytics/pubstack/config.go @@ -9,7 +9,7 @@ import ( "time" "github.com/docker/go-units" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) func fetchConfig(client *http.Client, endpoint *url.URL) (*Configuration, error) { diff --git a/analytics/pubstack/configupdate.go b/analytics/pubstack/configupdate.go index d570d28da1..166e69554d 100644 --- a/analytics/pubstack/configupdate.go +++ b/analytics/pubstack/configupdate.go @@ -6,7 +6,7 @@ import ( "net/url" "time" - "github.com/prebid/prebid-server/v4/util/task" + "github.com/prebid/prebid-server/v3/util/task" ) // ConfigUpdateTask publishes configurations until the stop channel is signaled. diff --git a/analytics/pubstack/eventchannel/eventchannel.go b/analytics/pubstack/eventchannel/eventchannel.go index 7879a6d9d4..bde37ee546 100644 --- a/analytics/pubstack/eventchannel/eventchannel.go +++ b/analytics/pubstack/eventchannel/eventchannel.go @@ -7,7 +7,7 @@ import ( "time" "github.com/benbjohnson/clock" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) type Metrics struct { diff --git a/analytics/pubstack/eventchannel/sender.go b/analytics/pubstack/eventchannel/sender.go index 3ea79e2109..61587ea941 100644 --- a/analytics/pubstack/eventchannel/sender.go +++ b/analytics/pubstack/eventchannel/sender.go @@ -8,7 +8,7 @@ import ( "net/url" "path" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) type Sender = func(payload []byte) error diff --git a/analytics/pubstack/helpers/json.go b/analytics/pubstack/helpers/json.go index ba02a34a26..fbdc173219 100644 --- a/analytics/pubstack/helpers/json.go +++ b/analytics/pubstack/helpers/json.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func JsonifyAuctionObject(ao *analytics.AuctionObject, scope string) ([]byte, error) { diff --git a/analytics/pubstack/helpers/json_test.go b/analytics/pubstack/helpers/json_test.go index 82f56e1bc3..1e6282078c 100644 --- a/analytics/pubstack/helpers/json_test.go +++ b/analytics/pubstack/helpers/json_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" + "github.com/prebid/prebid-server/v3/analytics" "github.com/stretchr/testify/assert" ) diff --git a/analytics/pubstack/helpers/model.go b/analytics/pubstack/helpers/model.go index cdba835e43..7dad2f7dad 100644 --- a/analytics/pubstack/helpers/model.go +++ b/analytics/pubstack/helpers/model.go @@ -4,10 +4,10 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type logAuction struct { diff --git a/analytics/pubstack/pubstack_module.go b/analytics/pubstack/pubstack_module.go index 965774043a..9a8116951d 100644 --- a/analytics/pubstack/pubstack_module.go +++ b/analytics/pubstack/pubstack_module.go @@ -10,10 +10,10 @@ import ( "time" "github.com/benbjohnson/clock" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/analytics/pubstack/eventchannel" - "github.com/prebid/prebid-server/v4/analytics/pubstack/helpers" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/analytics/pubstack/eventchannel" + "github.com/prebid/prebid-server/v3/analytics/pubstack/helpers" + "github.com/prebid/prebid-server/v3/logger" ) type Configuration struct { diff --git a/analytics/pubstack/pubstack_module_test.go b/analytics/pubstack/pubstack_module_test.go index ff590010f6..e2b4e118c6 100644 --- a/analytics/pubstack/pubstack_module_test.go +++ b/analytics/pubstack/pubstack_module_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/benbjohnson/clock" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/analytics/runner.go b/analytics/runner.go index 42b422d55e..d10370e485 100644 --- a/analytics/runner.go +++ b/analytics/runner.go @@ -1,7 +1,7 @@ package analytics import ( - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/privacy" ) type Runner interface { diff --git a/bidadjustment/apply.go b/bidadjustment/apply.go index d3063709ee..864d6bf6fb 100644 --- a/bidadjustment/apply.go +++ b/bidadjustment/apply.go @@ -3,8 +3,8 @@ package bidadjustment import ( "math" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const ( diff --git a/bidadjustment/apply_test.go b/bidadjustment/apply_test.go index 529a5ab527..1a9bf75a20 100644 --- a/bidadjustment/apply_test.go +++ b/bidadjustment/apply_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/bidadjustment/build_rules.go b/bidadjustment/build_rules.go index fbde258440..2d0ac7c4cd 100644 --- a/bidadjustment/build_rules.go +++ b/bidadjustment/build_rules.go @@ -1,8 +1,8 @@ package bidadjustment import ( - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const ( diff --git a/bidadjustment/build_rules_test.go b/bidadjustment/build_rules_test.go index fd7346c2ac..29864bcdbc 100644 --- a/bidadjustment/build_rules_test.go +++ b/bidadjustment/build_rules_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/bidadjustment/validate.go b/bidadjustment/validate.go index dd59f12af0..b5383b4d1b 100644 --- a/bidadjustment/validate.go +++ b/bidadjustment/validate.go @@ -3,7 +3,7 @@ package bidadjustment import ( "math" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Validate checks whether all provided bid adjustments are valid or not against the requirements defined in the issue diff --git a/bidadjustment/validate_test.go b/bidadjustment/validate_test.go index 2ac39bddd7..dedcddc9af 100644 --- a/bidadjustment/validate_test.go +++ b/bidadjustment/validate_test.go @@ -3,7 +3,7 @@ package bidadjustment import ( "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/config/account.go b/config/account.go index 58b699b6da..2d2bfb5cd8 100644 --- a/config/account.go +++ b/config/account.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/iputil" ) // ChannelType enumerates the values of integrations Prebid Server can configure for an account @@ -41,7 +41,7 @@ type Account struct { GDPR AccountGDPR `mapstructure:"gdpr" json:"gdpr"` DebugAllow bool `mapstructure:"debug_allow" json:"debug_allow"` DefaultIntegration string `mapstructure:"default_integration" json:"default_integration"` - CookieSync AccountCookieSync `mapstructure:"cookie_sync" json:"cookie_sync"` + CookieSync CookieSync `mapstructure:"cookie_sync" json:"cookie_sync"` Events Events `mapstructure:"events" json:"events"` // Don't enable this feature. It is still under developmment - https://github.com/prebid/prebid-server/issues/1725 TruncateTargetAttribute *int `mapstructure:"truncate_target_attr" json:"truncate_target_attr"` AlternateBidderCodes *openrtb_ext.ExtAlternateBidderCodes `mapstructure:"alternatebiddercodes" json:"alternatebiddercodes"` @@ -56,14 +56,12 @@ type Account struct { TargetingPrefix string `mapstructure:"targeting_prefix" json:"targeting_prefix"` } -// AccountCookieSync represents the account-level defaults for the cookie sync endpoint. -type AccountCookieSync struct { - DefaultLimit *int `mapstructure:"default_limit" json:"default_limit"` - MaxLimit *int `mapstructure:"max_limit" json:"max_limit"` - DefaultCoopSync *bool `mapstructure:"default_coop_sync" json:"default_coop_sync"` - PriorityGroups [][]string `mapstructure:"priority_groups" json:"priority_groups"` - PriorityGroupsOnly *bool `mapstructure:"priority_groups_only" json:"priority_groups_only"` - DisabledIFrameBidders []string `mapstructure:"disabled_iframe_bidders" json:"disabled_iframe_bidders"` +// CookieSync represents the account-level defaults for the cookie sync endpoint. +type CookieSync struct { + DefaultLimit *int `mapstructure:"default_limit" json:"default_limit"` + MaxLimit *int `mapstructure:"max_limit" json:"max_limit"` + DefaultCoopSync *bool `mapstructure:"default_coop_sync" json:"default_coop_sync"` + PriorityGroups [][]string `mapstructure:"priority_groups" json:"priority_groups"` } // AccountCCPA represents account-specific CCPA configuration diff --git a/config/account_module_decoder.go b/config/account_module_decoder.go index 20d62e6de4..950460cc50 100644 --- a/config/account_module_decoder.go +++ b/config/account_module_decoder.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/mitchellh/mapstructure" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // AccountModulesHookFunc returns a mapstructure.DecodeHookFuncType that converts diff --git a/config/account_test.go b/config/account_test.go index 8e6d484724..0e1d366caf 100644 --- a/config/account_test.go +++ b/config/account_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/config/bidderinfo.go b/config/bidderinfo.go index e2455136b2..98cabd47df 100644 --- a/config/bidderinfo.go +++ b/config/bidderinfo.go @@ -8,11 +8,11 @@ import ( "strings" "text/template" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/sliceutil" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/sliceutil" validator "github.com/asaskevich/govalidator" "gopkg.in/yaml.v3" @@ -133,6 +133,9 @@ type Syncer struct { // ExternalURL is available as a macro to the RedirectURL template. ExternalURL string `yaml:"externalUrl" mapstructure:"external_url"` + // SupportCORS identifies if CORS is supported for the user syncing endpoints. + SupportCORS *bool `yaml:"supportCors" mapstructure:"support_cors"` + // FormatOverride allows a bidder to override their callback type "b" for iframe, "i" for redirect FormatOverride string `yaml:"formatOverride" mapstructure:"format_override"` @@ -157,6 +160,7 @@ func (s *Syncer) Equal(other *Syncer) bool { s.IFrame.Equal(other.IFrame) && s.Redirect.Equal(other.Redirect) && s.ExternalURL == other.ExternalURL && + ptrutil.Equal(s.SupportCORS, other.SupportCORS) && s.FormatOverride == other.FormatOverride && ptrutil.Equal(s.Enabled, other.Enabled) && s.SkipWhen.Equal(other.SkipWhen) @@ -273,6 +277,7 @@ func (s *Syncer) Defined() bool { s.IFrame != nil || s.Redirect != nil || s.ExternalURL != "" || + s.SupportCORS != nil || s.FormatOverride != "" || s.SkipWhen != nil } @@ -381,9 +386,6 @@ func processBidderAliases(aliasNillableFieldsByBidder map[string]aliasNillableFi } parentBidderInfo := bidderInfos[aliasBidderInfo.AliasOf] - // Note: The aliasBidderInfo.GVLVendorID is intentionally never set to the parent's - // GVLVendorID. Each alias must declare its own GVL Vendor ID, as inheriting from the - // parent is not safe for legal reasons. if aliasBidderInfo.AppSecret == "" { aliasBidderInfo.AppSecret = parentBidderInfo.AppSecret } @@ -402,6 +404,9 @@ func processBidderAliases(aliasNillableFieldsByBidder map[string]aliasNillableFi if aliasBidderInfo.ExtraAdapterInfo == "" { aliasBidderInfo.ExtraAdapterInfo = parentBidderInfo.ExtraAdapterInfo } + if aliasBidderInfo.GVLVendorID == 0 { + aliasBidderInfo.GVLVendorID = parentBidderInfo.GVLVendorID + } if aliasBidderInfo.Maintainer == nil { aliasBidderInfo.Maintainer = parentBidderInfo.Maintainer } @@ -472,17 +477,17 @@ func validateAliases(aliasBidderInfo BidderInfo, infos BidderInfos, bidderName s } if aliasBidderInfo.WhiteLabelOnly { - return fmt.Errorf("bidder '%s' is an alias and cannot be set as white label only", bidderName) + return fmt.Errorf("bidder: %s is an alias and cannot be set as white label only", bidderName) } parentBidder, parentBidderFound := infos[aliasBidderInfo.AliasOf] if !parentBidderFound { - return fmt.Errorf("alias '%s' references a nonexistent bidder '%s'", bidderName, aliasBidderInfo.AliasOf) + return fmt.Errorf("bidder: %s not found for an alias: %s", aliasBidderInfo.AliasOf, bidderName) } if len(parentBidder.AliasOf) > 0 { - return fmt.Errorf("alias '%s' cannot reference another alias '%s'", bidderName, aliasBidderInfo.AliasOf) + return fmt.Errorf("bidder: %s cannot be an alias of an alias: %s", aliasBidderInfo.AliasOf, bidderName) } return nil @@ -827,8 +832,8 @@ func (s *Syncer) Override(original *Syncer) *Syncer { copy.ExternalURL = s.ExternalURL } - if s.Enabled != nil { - copy.Enabled = s.Enabled + if s.SupportCORS != nil { + copy.SupportCORS = s.SupportCORS } return © diff --git a/config/bidderinfo_test.go b/config/bidderinfo_test.go index ac90a2de84..8c251842c7 100644 --- a/config/bidderinfo_test.go +++ b/config/bidderinfo_test.go @@ -7,8 +7,8 @@ import ( "gopkg.in/yaml.v3" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -73,6 +73,7 @@ aliasOf: bidderA func TestLoadBidderInfoFromDisk(t *testing.T) { // should appear in result in mixed case bidder := "stroeerCore" + trueValue := true adapterConfigs := make(map[string]Adapter) adapterConfigs[strings.ToLower(bidder)] = Adapter{} @@ -114,6 +115,7 @@ func TestLoadBidderInfoFromDisk(t *testing.T) { ExternalURL: "https://redirect.host", UserMacro: "#UID", }, + SupportCORS: &trueValue, }, }, } @@ -253,7 +255,7 @@ func TestProcessBidderInfo(t *testing.T) { }, }, ExtraAdapterInfo: "extra-info", - GVLVendorID: 0, + GVLVendorID: 42, Maintainer: &MaintainerInfo{ Email: "some-email@domain.com", }, @@ -390,7 +392,6 @@ func TestProcessAliasBidderInfo(t *testing.T) { } bidderB := parentWithSyncerKey bidderB.AliasOf = "bidderA" - bidderB.GVLVendorID = 0 bidderB.Syncer = &Syncer{ Key: bidderB.Syncer.Key, } @@ -515,7 +516,7 @@ func TestProcessAliasBidderInfo(t *testing.T) { AliasOf: "bidderA", }, }, - expectedErr: errors.New("alias 'bidderB' references a nonexistent bidder 'bidderA'"), + expectedErr: errors.New("bidder: bidderA not found for an alias: bidderB"), }, { description: "bidder info not found for an alias", @@ -697,21 +698,21 @@ func TestValidateAliases(t *testing.T) { bidderName: "b", bidderInfo: BidderInfo{AliasOf: "nonexistent"}, bidderInfos: BidderInfos{}, - expectedErr: errors.New("alias 'b' references a nonexistent bidder 'nonexistent'"), + expectedErr: errors.New("bidder: nonexistent not found for an alias: b"), // does this make sense? should it be reversed? }, { name: "alias-of-alias", bidderName: "b", bidderInfo: BidderInfo{AliasOf: "a"}, bidderInfos: BidderInfos{"a": BidderInfo{AliasOf: "foo"}}, - expectedErr: errors.New("alias 'b' cannot reference another alias 'a'"), + expectedErr: errors.New("bidder: a cannot be an alias of an alias: b"), // does this make sense? should it be reversed? }, { name: "whitelabelonly", bidderName: "b", bidderInfo: BidderInfo{AliasOf: "a", WhiteLabelOnly: true}, bidderInfos: BidderInfos{"a": BidderInfo{}}, - expectedErr: errors.New("bidder 'b' is an alias and cannot be set as white label only"), + expectedErr: errors.New("bidder: b is an alias and cannot be set as white label only"), }, } @@ -1401,6 +1402,11 @@ func TestBidderInfoValidationNegative(t *testing.T) { } func TestSyncerOverride(t *testing.T) { + var ( + trueValue = true + falseValue = false + ) + testCases := []struct { description string givenOriginal *Syncer @@ -1461,36 +1467,18 @@ func TestSyncerOverride(t *testing.T) { givenOverride: &Syncer{ExternalURL: "override"}, expected: &Syncer{ExternalURL: "override"}, }, + { + description: "Override SupportCORS", + givenOriginal: &Syncer{SupportCORS: &trueValue}, + givenOverride: &Syncer{SupportCORS: &falseValue}, + expected: &Syncer{SupportCORS: &falseValue}, + }, { description: "Override Partial - Other Fields Untouched", givenOriginal: &Syncer{Key: "originalKey", ExternalURL: "originalExternalURL"}, givenOverride: &Syncer{ExternalURL: "overrideExternalURL"}, expected: &Syncer{Key: "originalKey", ExternalURL: "overrideExternalURL"}, }, - { - description: "Override Enabled - True To False", - givenOriginal: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(true)}, - givenOverride: &Syncer{Enabled: ptrutil.ToPtr(false)}, - expected: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(false)}, - }, - { - description: "Override Enabled - False To True", - givenOriginal: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(false)}, - givenOverride: &Syncer{Enabled: ptrutil.ToPtr(true)}, - expected: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(true)}, - }, - { - description: "Override Enabled - Nil Preserves Original", - givenOriginal: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(true)}, - givenOverride: &Syncer{}, - expected: &Syncer{Key: "originalKey", Enabled: ptrutil.ToPtr(true)}, - }, - { - description: "Override Enabled - Set On Nil Original", - givenOriginal: nil, - givenOverride: &Syncer{Enabled: ptrutil.ToPtr(false)}, - expected: &Syncer{Enabled: ptrutil.ToPtr(false)}, - }, } for _, test := range testCases { @@ -1727,6 +1715,18 @@ func TestSyncerEqual(t *testing.T) { }, expected: false, }, + { + name: "different-support-cors", + syncer1: &Syncer{ + Key: "key", + SupportCORS: ptrutil.ToPtr(true), + }, + syncer2: &Syncer{ + Key: "key", + SupportCORS: ptrutil.ToPtr(false), + }, + expected: false, + }, { name: "different-format-override", syncer1: &Syncer{ @@ -1782,6 +1782,7 @@ func TestSyncerEqual(t *testing.T) { UserMacro: "$UID", }, ExternalURL: "https://external.com", + SupportCORS: ptrutil.ToPtr(true), FormatOverride: "i", Enabled: ptrutil.ToPtr(true), SkipWhen: &SkipWhen{ @@ -1802,6 +1803,7 @@ func TestSyncerEqual(t *testing.T) { UserMacro: "$UID", }, ExternalURL: "https://external.com", + SupportCORS: ptrutil.ToPtr(true), FormatOverride: "i", Enabled: ptrutil.ToPtr(true), SkipWhen: &SkipWhen{ @@ -2071,6 +2073,11 @@ func TestSyncerDefined(t *testing.T) { givenSyncer: &Syncer{ExternalURL: "anyURL"}, expected: true, }, + { + name: "supportscors-only", + givenSyncer: &Syncer{SupportCORS: ptrutil.ToPtr(false)}, + expected: true, + }, { name: "formatoverride-only", givenSyncer: &Syncer{FormatOverride: "anyFormat"}, diff --git a/config/compression.go b/config/compression.go index c99a893ca9..c838e3390a 100644 --- a/config/compression.go +++ b/config/compression.go @@ -1,6 +1,6 @@ package config -import "github.com/prebid/prebid-server/v4/util/httputil" +import "github.com/prebid/prebid-server/v3/util/httputil" type Compression struct { Request CompressionInfo `mapstructure:"request"` diff --git a/config/compression_test.go b/config/compression_test.go index 23f4bb5fa4..78e7b6468e 100644 --- a/config/compression_test.go +++ b/config/compression_test.go @@ -3,7 +3,7 @@ package config import ( "testing" - "github.com/prebid/prebid-server/v4/util/httputil" + "github.com/prebid/prebid-server/v3/util/httputil" "github.com/stretchr/testify/assert" ) diff --git a/config/config.go b/config/config.go index 9a2fdee131..7550217d68 100644 --- a/config/config.go +++ b/config/config.go @@ -11,10 +11,10 @@ import ( "github.com/prebid/go-gdpr/consentconstants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/spf13/viper" ) @@ -51,12 +51,8 @@ type Configuration struct { CategoryMapping StoredRequests `mapstructure:"category_mapping"` VTrack VTrack `mapstructure:"vtrack"` Event Event `mapstructure:"event"` - Video Video `mapstructure:"video"` Accounts StoredRequests `mapstructure:"accounts"` UserSync UserSync `mapstructure:"user_sync"` - // CookieSync holds host-level cookie sync settings that are always enforced and - // cannot be overridden by account configuration. - CookieSync CookieSync `mapstructure:"cookie_sync"` // Note that StoredVideo refers to stored video requests, and has nothing to do with caching video creatives. StoredVideo StoredRequests `mapstructure:"stored_video_req"` StoredResponses StoredRequests `mapstructure:"stored_responses"` @@ -84,6 +80,8 @@ type Configuration struct { AccountDefaults Account `mapstructure:"account_defaults"` // accountDefaultsJSON is the internal serialized form of AccountDefaults used for json merge accountDefaultsJSON json.RawMessage + // CertsUseSystem will use the host OS certificates instead of embedded certs. + CertsUseSystem bool `mapstructure:"certificates_use_system"` // Local private file containing SSL certificates PemCertsFile string `mapstructure:"certificates_file"` // Custom headers to handle request timeouts from queueing infrastructure @@ -277,7 +275,6 @@ type GDPR struct { NonStandardPublisherMap map[string]struct{} TCF2 TCF2 `mapstructure:"tcf2"` AMPException bool `mapstructure:"amp_exception"` // Deprecated: Use account-level GDPR settings (gdpr.integration_enabled.amp) instead - LiveGVLRefreshInterval int `mapstructure:"live_gvl_refresh_interval_seconds"` // EEACountries (EEA = European Economic Area) are a list of countries where we should assume GDPR applies. // If the gdpr flag is unset in a request, but geo.country is set, we will assume GDPR applies if and only // if the country matches one on this list. If both the GDPR flag and country are not set, we default @@ -560,10 +557,6 @@ type Event struct { TimeoutMS int64 `mapstructure:"timeout_ms"` } -type Video struct { - EnableDeprecatedEndpoint bool `mapstructure:"enable_deprecated_endpoint"` -} - type HostCookie struct { Domain string `mapstructure:"domain"` Family string `mapstructure:"family"` @@ -613,7 +606,7 @@ type DisabledMetrics struct { AdapterConnectionMetrics bool `mapstructure:"adapter_connections_metrics"` // True if we don't want to collect metrics on dial time and dial errors - AdapterConnectionDialMetrics bool `mapstructure:"adapter_connections_dial_metrics"` + AdapterConnectionDialMetrics bool `mapstructure:"adapter_connection_dial_metrics"` // True if we don't want to collect the per adapter buyer UID scrubbed metric AdapterBuyerUIDScrubbed bool `mapstructure:"adapter_buyeruid_scrubbed"` @@ -1017,7 +1010,7 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) { v.SetDefault("metrics.disabled_metrics.account_debug", true) v.SetDefault("metrics.disabled_metrics.account_stored_responses", true) v.SetDefault("metrics.disabled_metrics.adapter_connections_metrics", true) - v.SetDefault("metrics.disabled_metrics.adapter_connections_dial_metrics", true) + v.SetDefault("metrics.disabled_metrics.adapter_connection_dial_metrics", true) v.SetDefault("metrics.disabled_metrics.adapter_buyeruid_scrubbed", true) v.SetDefault("metrics.disabled_metrics.adapter_gdpr_request_blocked", false) v.SetDefault("metrics.influxdb.host", "") @@ -1059,7 +1052,7 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) { v.SetDefault("stored_requests.directorypath", "./stored_requests/data/by_id") v.SetDefault("stored_requests.http.endpoint", "") v.SetDefault("stored_requests.http.amp_endpoint", "") - v.SetDefault("stored_requests.http.use_rfc3986_compliant_request_builder", true) + v.SetDefault("stored_requests.http.use_rfc3986_compliant_request_builder", false) v.SetDefault("stored_requests.in_memory_cache.type", "none") v.SetDefault("stored_requests.in_memory_cache.ttl_seconds", 0) v.SetDefault("stored_requests.in_memory_cache.request_cache_size_bytes", 0) @@ -1143,14 +1136,12 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) { v.SetDefault("event.timeout_ms", 1000) - v.SetDefault("video.enable_deprecated_endpoint", false) - v.SetDefault("user_sync.priority_groups", [][]string{}) v.SetDefault("accounts.filesystem.enabled", false) v.SetDefault("accounts.filesystem.directorypath", "./stored_requests/data/by_id") v.SetDefault("accounts.http.endpoint", "") - v.SetDefault("accounts.http.use_rfc3986_compliant_request_builder", true) + v.SetDefault("accounts.http.use_rfc3986_compliant_request_builder", false) v.SetDefault("accounts.in_memory_cache.type", "none") v.SetDefault("accounts.in_memory_cache.ttl_seconds", 0) v.SetDefault("accounts.in_memory_cache.size_bytes", 0) @@ -1191,7 +1182,6 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) { v.SetDefault("gdpr.timeouts_ms.init_vendorlist_fetches", 0) v.SetDefault("gdpr.timeouts_ms.active_vendorlist_fetch", 0) v.SetDefault("gdpr.non_standard_publishers", []string{""}) - v.SetDefault("gdpr.live_gvl_refresh_interval_seconds", 86400) // 1 day v.SetDefault("gdpr.tcf2.enabled", true) v.SetDefault("gdpr.tcf2.purpose1.enforce_vendors", true) v.SetDefault("gdpr.tcf2.purpose2.enforce_vendors", true) @@ -1274,6 +1264,7 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) { v.SetDefault("compression.response.enable_gzip", false) v.SetDefault("compression.request.enable_gzip", false) + v.SetDefault("certificates_use_system", false) v.SetDefault("certificates_file", "") v.SetDefault("auto_gen_source_tid", true) @@ -1395,7 +1386,6 @@ func setBidderDefaults(v *viper.Viper, bidder string) { v.BindEnv(adapterCfgPrefix + ".openrtb.version") v.BindEnv(adapterCfgPrefix + ".openrtb.gpp-supported") - v.BindEnv(adapterCfgPrefix + ".usersync.enabled") v.BindEnv(adapterCfgPrefix + ".usersync.key") v.BindEnv(adapterCfgPrefix + ".usersync.default") v.BindEnv(adapterCfgPrefix + ".usersync.iframe.url") diff --git a/config/config_test.go b/config/config_test.go index 6bb206f41f..3d7a0408b3 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) @@ -158,7 +158,7 @@ func TestDefaults(t *testing.T) { cmpBools(t, "account_debug", true, cfg.Metrics.Disabled.AccountDebug) cmpBools(t, "account_stored_responses", true, cfg.Metrics.Disabled.AccountStoredResponses) cmpBools(t, "adapter_connections_metrics", true, cfg.Metrics.Disabled.AdapterConnectionMetrics) - cmpBools(t, "adapter_connections_dial_metrics", true, cfg.Metrics.Disabled.AdapterConnectionDialMetrics) + cmpBools(t, "adapter_connection_dial_metrics", true, cfg.Metrics.Disabled.AdapterConnectionDialMetrics) cmpBools(t, "adapter_buyeruid_scrubbed", true, cfg.Metrics.Disabled.AdapterBuyerUIDScrubbed) cmpBools(t, "adapter_gdpr_request_blocked", false, cfg.Metrics.Disabled.AdapterGDPRRequestBlocked) cmpStrings(t, "certificates_file", "", cfg.PemCertsFile) @@ -167,12 +167,11 @@ func TestDefaults(t *testing.T) { cmpStrings(t, "stored_requests.filesystem.directorypath", "./stored_requests/data/by_id", cfg.StoredRequests.Files.Path) cmpStrings(t, "stored_requests.http.endpoint", "", cfg.StoredRequests.HTTP.Endpoint) cmpStrings(t, "stored_requests.http.amp_endpoint", "", cfg.StoredRequests.HTTP.AmpEndpoint) - cmpBools(t, "stored_requests.http.use_rfc3986_compliant_request_builder", true, cfg.StoredRequests.HTTP.UseRfcCompliantBuilder) - cmpBools(t, "video.enable_deprecated_endpoint", false, cfg.Video.EnableDeprecatedEndpoint) + cmpBools(t, "stored_requests.http.use_rfc3986_compliant_request_builder", false, cfg.StoredRequests.HTTP.UseRfcCompliantBuilder) cmpBools(t, "accounts.filesystem.enabled", false, cfg.Accounts.Files.Enabled) cmpStrings(t, "accounts.filesystem.directorypath", "./stored_requests/data/by_id", cfg.Accounts.Files.Path) cmpStrings(t, "accounts.http.endpoint", "", cfg.Accounts.HTTP.Endpoint) - cmpBools(t, "accounts.http.use_rfc3986_compliant_request_builder", true, cfg.Accounts.HTTP.UseRfcCompliantBuilder) + cmpBools(t, "accounts.http.use_rfc3986_compliant_request_builder", false, cfg.Accounts.HTTP.UseRfcCompliantBuilder) cmpStrings(t, "accounts.in_memory_cache.type", "none", cfg.Accounts.InMemoryCache.Type) cmpInts(t, "accounts.in_memory_cache.ttl_seconds", 0, cfg.Accounts.InMemoryCache.TTL) cmpInts(t, "accounts.in_memory_cache.size_bytes", 0, cfg.Accounts.InMemoryCache.Size) @@ -255,7 +254,6 @@ func TestDefaults(t *testing.T) { cmpInts(t, "analytics.agma.buffers.count", 100, cfg.Analytics.Agma.Buffers.EventCount) cmpStrings(t, "analytics.agma.buffers.timeout", "15m", cfg.Analytics.Agma.Buffers.Timeout) cmpInts(t, "analytics.agma.accounts", 0, len(cfg.Analytics.Agma.Accounts)) - cmpInts(t, "gdpr.live_gvl_refresh_interval_seconds", 86400, cfg.GDPR.LiveGVLRefreshInterval) expectedTCF2 := TCF2{ Enabled: true, Purpose1: TCF2Purpose{ @@ -371,7 +369,7 @@ accounts: directorypath: "./example_directory" http: endpoint: "https://prebid.org" - use_rfc3986_compliant_request_builder: false + use_rfc3986_compliant_request_builder: true in_memory_cache: type: "lru" ttl_seconds: 300 @@ -388,7 +386,6 @@ gdpr: default_value: "1" non_standard_publishers: ["pub1", "pub2"] eea_countries: ["eea1", "eea2"] - live_gvl_refresh_interval_seconds: 3600 tcf2: purpose1: enforce_vendors: false @@ -425,14 +422,10 @@ gdpr: vendor_exceptions: ["foo10"] special_feature1: vendor_exceptions: ["fooSP1"] -video: - enable_deprecated_endpoint: true ccpa: enforce: true lmt: enforce: true -cookie_sync: - disabled_iframe_bidders: ["hostBidder1", "hostBidder2"] host_cookie: cookie_name: userid family: prebid @@ -491,7 +484,7 @@ metrics: account_debug: false account_stored_responses: false adapter_connections_metrics: true - adapter_connections_dial_metrics: true + adapter_connection_dial_metrics: true adapter_buyeruid_scrubbed: false adapter_gdpr_request_blocked: true account_modules_metrics: true @@ -607,6 +600,7 @@ analytics: - code: agma-code publisher_id: publisher-id site_app_id: site-or-app-id +certificates_use_system: true `) func cmpStrings(t *testing.T, key, expected, actual string) { @@ -653,7 +647,6 @@ func TestFullConfig(t *testing.T) { cmpStrings(t, "cookie family", "prebid", cfg.HostCookie.Family) cmpStrings(t, "opt out", "http://prebid.org/optout", cfg.HostCookie.OptOutURL) cmpStrings(t, "opt in", "http://prebid.org/optin", cfg.HostCookie.OptInURL) - assert.Equal(t, []string{"hostBidder1", "hostBidder2"}, cfg.CookieSync.DisabledIFrameBidders, "cookie_sync.disabled_iframe_bidders") cmpStrings(t, "external url", "http://prebid-server.prebid.org/", cfg.ExternalURL) cmpStrings(t, "host", "prebid-server.prebid.org", cfg.Host) cmpInts(t, "port", 1234, cfg.Port) @@ -664,11 +657,11 @@ func TestFullConfig(t *testing.T) { cmpInts(t, "stored_request_timeout_ms", 75, cfg.StoredRequestsTimeout) cmpStrings(t, "stored_requests.http.endpoint", "", cfg.StoredRequests.HTTP.Endpoint) cmpStrings(t, "stored_requests.http.amp_endpoint", "", cfg.StoredRequests.HTTP.AmpEndpoint) - cmpBools(t, "stored_requests.http.use_rfc3986_compliant_request_builder", true, cfg.StoredRequests.HTTP.UseRfcCompliantBuilder) + cmpBools(t, "stored_requests.http.use_rfc3986_compliant_request_builder", false, cfg.StoredRequests.HTTP.UseRfcCompliantBuilder) cmpBools(t, "accounts.filesystem.enabled", true, cfg.Accounts.Files.Enabled) cmpStrings(t, "accounts.filesystem.directorypath", "./example_directory", cfg.Accounts.Files.Path) cmpStrings(t, "accounts.http.endpoint", "https://prebid.org", cfg.Accounts.HTTP.Endpoint) - cmpBools(t, "accounts.http.use_rfc3986_compliant_request_builder", false, cfg.Accounts.HTTP.UseRfcCompliantBuilder) + cmpBools(t, "accounts.http.use_rfc3986_compliant_request_builder", true, cfg.Accounts.HTTP.UseRfcCompliantBuilder) cmpStrings(t, "accounts.in_memory_cache.type", "lru", cfg.Accounts.InMemoryCache.Type) cmpInts(t, "accounts.in_memory_cache.ttl_seconds", 300, cfg.Accounts.InMemoryCache.TTL) cmpInts(t, "accounts.in_memory_cache.size_bytes", 1000, cfg.Accounts.InMemoryCache.Size) @@ -693,8 +686,6 @@ func TestFullConfig(t *testing.T) { cmpInts(t, "http_client_cache.idle_connection_timeout_seconds", 3, cfg.CacheClient.IdleConnTimeout) cmpInts(t, "gdpr.host_vendor_id", 15, cfg.GDPR.HostVendorID) cmpStrings(t, "gdpr.default_value", "1", cfg.GDPR.DefaultValue) - cmpInts(t, "gdpr.live_gvl_refresh_interval_seconds", 3600, cfg.GDPR.LiveGVLRefreshInterval) - cmpBools(t, "video.enable_deprecated_endpoint", true, cfg.Video.EnableDeprecatedEndpoint) cmpStrings(t, "host_schain_node.asi", "pbshostcompany.com", cfg.HostSChainNode.ASI) cmpStrings(t, "host_schain_node.sid", "00001", cfg.HostSChainNode.SID) cmpStrings(t, "host_schain_node.rid", "BidRequest", cfg.HostSChainNode.RID) @@ -930,7 +921,7 @@ func TestFullConfig(t *testing.T) { cmpBools(t, "account_debug", false, cfg.Metrics.Disabled.AccountDebug) cmpBools(t, "account_stored_responses", false, cfg.Metrics.Disabled.AccountStoredResponses) cmpBools(t, "adapter_connections_metrics", true, cfg.Metrics.Disabled.AdapterConnectionMetrics) - cmpBools(t, "adapter_connections_dial_metrics", true, cfg.Metrics.Disabled.AdapterConnectionDialMetrics) + cmpBools(t, "adapter_connection_dial_metrics", true, cfg.Metrics.Disabled.AdapterConnectionDialMetrics) cmpBools(t, "adapter_buyeruid_scrubbed", false, cfg.Metrics.Disabled.AdapterBuyerUIDScrubbed) cmpBools(t, "adapter_gdpr_request_blocked", true, cfg.Metrics.Disabled.AdapterGDPRRequestBlocked) cmpStrings(t, "certificates_file", "/etc/ssl/cert.pem", cfg.PemCertsFile) @@ -958,6 +949,7 @@ func TestFullConfig(t *testing.T) { cmpStrings(t, "analytics.agma.accounts.0.publisher_id", "publisher-id", cfg.Analytics.Agma.Accounts[0].PublisherId) cmpStrings(t, "analytics.agma.accounts.0.code", "agma-code", cfg.Analytics.Agma.Accounts[0].Code) cmpStrings(t, "analytics.agma.accounts.0.site_app_id", "site-or-app-id", cfg.Analytics.Agma.Accounts[0].SiteAppId) + cmpBools(t, "certificates_use_system", true, cfg.CertsUseSystem) } func TestValidateConfig(t *testing.T) { @@ -1029,6 +1021,8 @@ func TestMigrateConfigFromEnv(t *testing.T) { } func TestUserSyncFromEnv(t *testing.T) { + truePtr := true + // setup env vars for testing if oldval, ok := os.LookupEnv("PBS_ADAPTERS_BIDDER1_USERSYNC_REDIRECT_URL"); ok { defer os.Setenv("PBS_ADAPTERS_BIDDER1_USERSYNC_REDIRECT_URL", oldval) @@ -1054,28 +1048,22 @@ func TestUserSyncFromEnv(t *testing.T) { defer os.Unsetenv("PBS_ADAPTERS_BIDDER2_USERSYNC_IFRAME_URL") } - if oldval, ok := os.LookupEnv("PBS_ADAPTERS_BIDDER2_USERSYNC_ENABLED"); ok { - defer os.Setenv("PBS_ADAPTERS_BIDDER2_USERSYNC_ENABLED", oldval) - } else { - defer os.Unsetenv("PBS_ADAPTERS_BIDDER2_USERSYNC_ENABLED") - } - // set new os.Setenv("PBS_ADAPTERS_BIDDER1_USERSYNC_REDIRECT_URL", "http://some.url/sync?redirect={{.RedirectURL}}") os.Setenv("PBS_ADAPTERS_BIDDER1_USERSYNC_REDIRECT_USER_MACRO", "[UID]") os.Setenv("PBS_ADAPTERS_BIDDER1_USERSYNC_SUPPORT_CORS", "true") os.Setenv("PBS_ADAPTERS_BIDDER2_USERSYNC_IFRAME_URL", "http://somedifferent.url/sync?redirect={{.RedirectURL}}") - os.Setenv("PBS_ADAPTERS_BIDDER2_USERSYNC_ENABLED", "false") cfg, _ := newDefaultConfig(t) assert.Equal(t, "http://some.url/sync?redirect={{.RedirectURL}}", cfg.BidderInfos["bidder1"].Syncer.Redirect.URL) assert.Equal(t, "[UID]", cfg.BidderInfos["bidder1"].Syncer.Redirect.UserMacro) assert.Nil(t, cfg.BidderInfos["bidder1"].Syncer.IFrame) + assert.Equal(t, &truePtr, cfg.BidderInfos["bidder1"].Syncer.SupportCORS) assert.Equal(t, "http://somedifferent.url/sync?redirect={{.RedirectURL}}", cfg.BidderInfos["bidder2"].Syncer.IFrame.URL) assert.Nil(t, cfg.BidderInfos["bidder2"].Syncer.Redirect) - assert.Equal(t, ptrutil.ToPtr(false), cfg.BidderInfos["bidder2"].Syncer.Enabled) + assert.Nil(t, cfg.BidderInfos["bidder2"].Syncer.SupportCORS) } func TestBidderInfoFromEnv(t *testing.T) { diff --git a/config/stored_requests.go b/config/stored_requests.go index 92eab4ea8e..73acc1bf06 100644 --- a/config/stored_requests.go +++ b/config/stored_requests.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) // DataType constants diff --git a/config/structlog.go b/config/structlog.go index d89af631e5..6faec25cc5 100644 --- a/config/structlog.go +++ b/config/structlog.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - logInternal "github.com/prebid/prebid-server/v4/logger" + logInternal "github.com/prebid/prebid-server/v3/logger" ) type logMsg func(string, ...interface{}) @@ -37,10 +37,6 @@ func logGeneralWithLogger(v reflect.Value, prefix string, logger logMsg) { logger("%s: %f", prefix, v.Float()) case reflect.Bool: logger("%s: %t", prefix, v.Bool()) - case reflect.Ptr: - if v.Elem().IsValid() { - logGeneralWithLogger(v.Elem(), prefix, logger) - } default: // logString, by using v.String(), will not fail, and indicate what additional cases we need to handle logger("%s: %s", prefix, v.String()) @@ -49,7 +45,7 @@ func logGeneralWithLogger(v reflect.Value, prefix string, logger logMsg) { func logStructWithLogger(v reflect.Value, prefix string, logger logMsg) { if v.Kind() != reflect.Struct { - logInternal.Fatalf("LogStruct called on type %s, which is not a struct!", v.Type().String()) + logInternal.Fatalf("LogStruct called on type %s, whuch is not a struct!", v.Type().String()) } t := v.Type() for i := 0; i < t.NumField(); i++ { @@ -64,7 +60,7 @@ func logStructWithLogger(v reflect.Value, prefix string, logger logMsg) { func logMapWithLogger(v reflect.Value, prefix string, logger logMsg) { if v.Kind() != reflect.Map { - logInternal.Fatalf("LogMap called on type %s, which is not a map!", v.Type().String()) + logInternal.Fatalf("LogMap called on type %s, whuch is not a map!", v.Type().String()) } for _, k := range v.MapKeys() { if k.Kind() == reflect.String && !allowedName(k.String()) { diff --git a/config/structlog_test.go b/config/structlog_test.go index d0e3c91da9..d7ed720c73 100644 --- a/config/structlog_test.go +++ b/config/structlog_test.go @@ -8,13 +8,11 @@ import ( ) type testStruct struct { - Myint int `mapstructure:"this_int"` - Mystring string `mapstructure:"mystring"` - Flag bool - Sub innerStruct `mapstructure:"sub"` - Caps map[string]string - NestedStruct *nestedStruct - NillableStruct *nestedStruct + Myint int `mapstructure:"this_int"` + Mystring string `mapstructure:"mystring"` + Flag bool + Sub innerStruct `mapstructure:"sub"` + Caps map[string]string } type innerStruct struct { @@ -22,17 +20,12 @@ type innerStruct struct { password string `mapstructure:"password"` } -type nestedStruct struct { - var1 string -} - var expected string = `this_int: 5 mystring: foobar ((Flag)): false sub.int1: 3 sub.password: ((Caps))[Alabama]: Montgomery -((NestedStruct)).((var1)): abc ` func TestBasic(t *testing.T) { @@ -53,8 +46,6 @@ func TestBasic(t *testing.T) { Caps: map[string]string{ "Alabama": "Montgomery", }, - NestedStruct: &nestedStruct{var1: "abc"}, - NillableStruct: nil, } logStructWithLogger(reflect.ValueOf(testCfg), "", mylogger) diff --git a/config/test/bidder-info-valid/stroeerCore.yaml b/config/test/bidder-info-valid/stroeerCore.yaml index 47314187ba..ef95d2388a 100644 --- a/config/test/bidder-info-valid/stroeerCore.yaml +++ b/config/test/bidder-info-valid/stroeerCore.yaml @@ -27,4 +27,5 @@ userSync: url: "https://foo.com/sync?mode=redirect&r={{.RedirectURL}}" redirectUrl: "{{.ExternalURL}}/setuid/redirect" externalUrl: "https://redirect.host" - userMacro: "#UID" \ No newline at end of file + userMacro: "#UID" + supportCors: true \ No newline at end of file diff --git a/config/usersync.go b/config/usersync.go index 7fed692cef..d490853d08 100644 --- a/config/usersync.go +++ b/config/usersync.go @@ -12,12 +12,3 @@ type UserSync struct { type UserSyncCooperative struct { EnabledByDefault bool `mapstructure:"default"` } - -// CookieSync specifies host-level cookie sync settings that are always enforced by the -// host operator. These settings cannot be overridden by account configuration and are -// unioned with any account-level restrictions. -type CookieSync struct { - // DisabledIFrameBidders lists bidders for which iframe cookie syncs are disabled for - // every account. Use "*" to disable iframe syncs for all bidders. - DisabledIFrameBidders []string `mapstructure:"disabled_iframe_bidders" json:"disabled_iframe_bidders"` -} diff --git a/currency/currency.go b/currency/currency.go index 236c2235db..b4d886274e 100644 --- a/currency/currency.go +++ b/currency/currency.go @@ -1,7 +1,7 @@ package currency import ( - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func GetAuctionCurrencyRates(currencyConverter *RateConverter, requestRates *openrtb_ext.ExtRequestCurrency) Conversions { diff --git a/currency/currency_test.go b/currency/currency_test.go index f8ceb3ac27..c29c8d18e7 100644 --- a/currency/currency_test.go +++ b/currency/currency_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/currency/rate_converter.go b/currency/rate_converter.go index ba7639df9b..c791c9b665 100644 --- a/currency/rate_converter.go +++ b/currency/rate_converter.go @@ -8,10 +8,10 @@ import ( "sync/atomic" "time" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) // RateConverter holds the currencies conversion rates dictionary diff --git a/currency/rate_converter_test.go b/currency/rate_converter_test.go index c218128dda..0698a7ba27 100644 --- a/currency/rate_converter_test.go +++ b/currency/rate_converter_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/util/task" + "github.com/prebid/prebid-server/v3/util/task" "github.com/stretchr/testify/assert" ) diff --git a/currency/rates_test.go b/currency/rates_test.go index f922fa62a9..555d299d21 100644 --- a/currency/rates_test.go +++ b/currency/rates_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "golang.org/x/text/currency" ) diff --git a/currency/validation.go b/currency/validation.go index 45b2522a59..5e23362e5b 100644 --- a/currency/validation.go +++ b/currency/validation.go @@ -5,8 +5,8 @@ import ( "golang.org/x/text/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // ValidateCustomRates throws a bad input error if any of the 3-digit currency codes found in diff --git a/currency/validation_test.go b/currency/validation_test.go index fd22c2efd2..0edd5c89a3 100644 --- a/currency/validation_test.go +++ b/currency/validation_test.go @@ -3,8 +3,8 @@ package currency import ( "testing" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/dsa/validate.go b/dsa/validate.go index 09f97456f4..3dce2fba1c 100644 --- a/dsa/validate.go +++ b/dsa/validate.go @@ -3,9 +3,9 @@ package dsa import ( "errors" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Required values representing whether a DSA object is required diff --git a/dsa/validate_test.go b/dsa/validate_test.go index 104ef1154c..e0af9bc80a 100644 --- a/dsa/validate_test.go +++ b/dsa/validate_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/dsa/writer.go b/dsa/writer.go index 9e5d164e76..33d0bda6d3 100644 --- a/dsa/writer.go +++ b/dsa/writer.go @@ -1,8 +1,8 @@ package dsa import ( - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Writer is used to write the default DSA to the request (req.regs.ext.dsa) diff --git a/dsa/writer_test.go b/dsa/writer_test.go index 04826c408a..bbe82e0b69 100644 --- a/dsa/writer_test.go +++ b/dsa/writer_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/cookie_sync.go b/endpoints/cookie_sync.go index 27ba40f0e8..a90bc6117d 100644 --- a/endpoints/cookie_sync.go +++ b/endpoints/cookie_sync.go @@ -8,7 +8,6 @@ import ( "io" "math" "net/http" - "slices" "strconv" "strings" "time" @@ -16,24 +15,23 @@ import ( "github.com/julienschmidt/httprouter" gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - gppPrivacy "github.com/prebid/prebid-server/v4/privacy/gpp" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" - stringutil "github.com/prebid/prebid-server/v4/util/stringutil" - "github.com/prebid/prebid-server/v4/util/timeutil" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + gppPrivacy "github.com/prebid/prebid-server/v3/privacy/gpp" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/jsonutil" + stringutil "github.com/prebid/prebid-server/v3/util/stringutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) const receiveCookieDeprecation = "receive-cookie-deprecation" @@ -169,9 +167,6 @@ func (c *cookieSyncEndpoint) parseRequest(r *http.Request) (usersync.Request, ma return usersync.Request{}, macros.UserSyncPrivacy{}, account, err } - disabledIFrameBidders := mergeDisabledIFrameBidders(c.config.CookieSync.DisabledIFrameBidders, account.CookieSync.DisabledIFrameBidders) - syncTypeFilter = applyDisabledIFrameBidders(syncTypeFilter, disabledIFrameBidders) - gdprRequestInfo := gdpr.RequestInfo{ Consent: privacyMacros.GDPRConsent, GDPRSignal: gdprSignal, @@ -188,9 +183,8 @@ func (c *cookieSyncEndpoint) parseRequest(r *http.Request) (usersync.Request, ma rx := usersync.Request{ Bidders: request.Bidders, Cooperative: usersync.Cooperative{ - Enabled: (request.CooperativeSync != nil && *request.CooperativeSync) || (request.CooperativeSync == nil && c.config.UserSync.Cooperative.EnabledByDefault), - PriorityGroups: c.findPriorityGroups(account.CookieSync), - PriorityGroupsOnly: ptrutil.ValueOrDefault(account.CookieSync.PriorityGroupsOnly), + Enabled: (request.CooperativeSync != nil && *request.CooperativeSync) || (request.CooperativeSync == nil && c.config.UserSync.Cooperative.EnabledByDefault), + PriorityGroups: c.findPriorityGroups(account.CookieSync), }, Debug: request.Debug, Limit: limit, @@ -296,7 +290,7 @@ func (c *cookieSyncEndpoint) writeParseRequestErrorMetrics(err error) { } } -func (c *cookieSyncEndpoint) setLimit(request cookieSyncRequest, cookieSyncConfig config.AccountCookieSync) cookieSyncRequest { +func (c *cookieSyncEndpoint) setLimit(request cookieSyncRequest, cookieSyncConfig config.CookieSync) cookieSyncRequest { limit := getEffectiveLimit(request.Limit, cookieSyncConfig.DefaultLimit) maxLimit := getEffectiveMaxLimit(cookieSyncConfig.MaxLimit) if maxLimit < limit { @@ -331,7 +325,7 @@ func getEffectiveMaxLimit(maxLimit *int) int { return math.MaxInt } -func (c *cookieSyncEndpoint) setCooperativeSync(request cookieSyncRequest, cookieSyncConfig config.AccountCookieSync) cookieSyncRequest { +func (c *cookieSyncEndpoint) setCooperativeSync(request cookieSyncRequest, cookieSyncConfig config.CookieSync) cookieSyncRequest { if request.CooperativeSync == nil && cookieSyncConfig.DefaultCoopSync != nil { request.CooperativeSync = cookieSyncConfig.DefaultCoopSync } @@ -339,7 +333,7 @@ func (c *cookieSyncEndpoint) setCooperativeSync(request cookieSyncRequest, cooki return request } -func (c *cookieSyncEndpoint) findPriorityGroups(accountCookieSyncConfig config.AccountCookieSync) [][]string { +func (c *cookieSyncEndpoint) findPriorityGroups(accountCookieSyncConfig config.CookieSync) [][]string { // Account-level config takes precedence over global config, which will be deprecated in the future if accountCookieSyncConfig.DefaultCoopSync != nil { return accountCookieSyncConfig.PriorityGroups @@ -347,60 +341,6 @@ func (c *cookieSyncEndpoint) findPriorityGroups(accountCookieSyncConfig config.A return c.config.UserSync.PriorityGroups } -// mergeDisabledIFrameBidders returns the union of the host-level and account-level -// disabled iframe bidder lists. Host-level entries are always enforced and cannot be -// overridden by account configuration. Duplicates are removed while preserving order, -// with host entries taking precedence. -func mergeDisabledIFrameBidders(host, account []string) []string { - if len(host) == 0 { - return account - } - if len(account) == 0 { - return host - } - - merged := make([]string, 0, len(host)+len(account)) - seen := make(map[string]struct{}, len(host)+len(account)) - for _, bidder := range host { - if _, ok := seen[bidder]; !ok { - seen[bidder] = struct{}{} - merged = append(merged, bidder) - } - } - for _, bidder := range account { - if _, ok := seen[bidder]; !ok { - seen[bidder] = struct{}{} - merged = append(merged, bidder) - } - } - return merged -} - -// applyDisabledIFrameBidders enforces iframe cookie sync restrictions from the union of -// host-level and account-level configuration. -// The disabledIFrameBidders slice supports two formats, matching the filterSettings convention: -// - "*" (string): disables iframe syncs for all bidders -// - ["bidderA", "bidderB"] (array): disables iframe syncs for specific bidders only -// When specific bidders are disabled, a CompositeFilter ANDs the request-level filter with the -// configured filter, ensuring configuration can only further restrict — never broaden — -// what the request's filterSettings allows. Redirect syncs are never affected. -func applyDisabledIFrameBidders(syncTypeFilter usersync.SyncTypeFilter, disabledIFrameBidders []string) usersync.SyncTypeFilter { - if len(disabledIFrameBidders) == 0 { - return syncTypeFilter - } - - if slices.Contains(disabledIFrameBidders, "*") { - syncTypeFilter.IFrame = usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude) - } else { - syncTypeFilter.IFrame = usersync.CompositeFilter{ - RequestFilter: syncTypeFilter.IFrame, - AccountFilter: usersync.NewSpecificBidderFilter(disabledIFrameBidders, usersync.BidderFilterModeExclude), - } - } - - return syncTypeFilter -} - func parseTypeFilter(request *cookieSyncRequestFilterSettings) (usersync.SyncTypeFilter, error) { syncTypeFilter := usersync.SyncTypeFilter{ IFrame: cookieSyncBidderFilterAllowAll, @@ -526,8 +466,9 @@ func (c *cookieSyncEndpoint) handleResponse(w http.ResponseWriter, tf usersync.S BidderCode: syncerChoice.Bidder, NoCookie: true, UsersyncInfo: cookieSyncResponseSync{ - URL: sync.URL, - Type: string(sync.Type), + URL: sync.URL, + Type: string(sync.Type), + SupportCORS: sync.SupportCORS, }, }) } @@ -595,8 +536,9 @@ func mapBidderStatusToAnalytics(from []cookieSyncResponseBidder) []*analytics.Co BidderCode: b.BidderCode, NoCookie: b.NoCookie, UsersyncInfo: &analytics.UsersyncInfo{ - URL: b.UsersyncInfo.URL, - Type: b.UsersyncInfo.Type, + URL: b.UsersyncInfo.URL, + Type: b.UsersyncInfo.Type, + SupportCORS: b.UsersyncInfo.SupportCORS, }, } } @@ -662,8 +604,9 @@ type cookieSyncResponseBidder struct { } type cookieSyncResponseSync struct { - URL string `json:"url,omitempty"` - Type string `json:"type,omitempty"` + URL string `json:"url,omitempty"` + Type string `json:"type,omitempty"` + SupportCORS bool `json:"supportCORS,omitempty"` } type cookieSyncResponseDebug struct { diff --git a/endpoints/cookie_sync_test.go b/endpoints/cookie_sync_test.go index 5c022895a0..6fc56f797b 100644 --- a/endpoints/cookie_sync_test.go +++ b/endpoints/cookie_sync_test.go @@ -15,17 +15,17 @@ import ( "testing/iotest" "time" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -114,7 +114,7 @@ func TestNewCookieSyncEndpoint(t *testing.T) { func TestCookieSyncHandle(t *testing.T) { syncTypeExpected := []usersync.SyncType{usersync.SyncTypeIFrame, usersync.SyncTypeRedirect} - sync := usersync.Sync{URL: "aURL", Type: usersync.SyncTypeRedirect} + sync := usersync.Sync{URL: "aURL", Type: usersync.SyncTypeRedirect, SupportCORS: true} syncer := MockSyncer{} syncer.On("GetSync", syncTypeExpected, macros.UserSyncPrivacy{}).Return(sync, nil).Maybe() @@ -144,7 +144,7 @@ func TestCookieSyncHandle(t *testing.T) { }, expectedStatusCode: 200, expectedBody: `{"status":"ok","bidder_status":[` + - `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect"}}` + + `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect","supportCORS":true}}` + `]}` + "\n", setMetricsExpectations: func(m *metrics.MetricsEngineMock) { m.On("RecordCookieSync", metrics.CookieSyncOK).Once() @@ -158,7 +158,7 @@ func TestCookieSyncHandle(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect", SupportCORS: true}, }, }, } @@ -176,7 +176,7 @@ func TestCookieSyncHandle(t *testing.T) { }, expectedStatusCode: 200, expectedBody: `{"status":"no_cookie","bidder_status":[` + - `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect"}}` + + `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect","supportCORS":true}}` + `]}` + "\n", setMetricsExpectations: func(m *metrics.MetricsEngineMock) { m.On("RecordCookieSync", metrics.CookieSyncOK).Once() @@ -190,7 +190,7 @@ func TestCookieSyncHandle(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect", SupportCORS: true}, }, }, } @@ -277,7 +277,7 @@ func TestCookieSyncHandle(t *testing.T) { }, expectedStatusCode: 200, expectedBody: `{"status":"ok","bidder_status":[` + - `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect"}}` + + `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect","supportCORS":true}}` + `],"debug":[{"bidder":"a","error":"Already in sync"}]}` + "\n", setMetricsExpectations: func(m *metrics.MetricsEngineMock) { m.On("RecordCookieSync", metrics.CookieSyncOK).Once() @@ -291,7 +291,7 @@ func TestCookieSyncHandle(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect", SupportCORS: true}, }, }, } @@ -313,7 +313,7 @@ func TestCookieSyncHandle(t *testing.T) { expectedStatusCode: 200, expectedCookieDeprecationHeader: true, expectedBody: `{"status":"ok","bidder_status":[` + - `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect"}}` + + `{"bidder":"a","no_cookie":true,"usersync":{"url":"aURL","type":"redirect","supportCORS":true}}` + `]}` + "\n", setMetricsExpectations: func(m *metrics.MetricsEngineMock) { m.On("RecordCookieSync", metrics.CookieSyncOK).Once() @@ -327,7 +327,7 @@ func TestCookieSyncHandle(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "redirect", SupportCORS: true}, }, }, } @@ -588,7 +588,6 @@ func TestCookieSyncParseRequest(t *testing.T) { testCases := []struct { description string givenConfig config.UserSync - givenCookieSyncConfig config.CookieSync givenBody io.Reader givenGDPRConfig config.GDPR givenCCPAEnabled bool @@ -1109,78 +1108,6 @@ func TestCookieSyncParseRequest(t *testing.T) { expectedError: errCookieSyncAccountBlocked.Error(), givenAccountRequired: true, }, - { - description: "IFrame Disabled For All Bidders Via Account Config Wildcard", - givenBody: strings.NewReader(`{` + - `"bidders":["a", "b"],` + - `"account":"IFrameDisabledAllAccount"` + - `}`), - givenGDPRConfig: config.GDPR{Enabled: true, DefaultValue: "0"}, - givenCCPAEnabled: true, - givenConfig: config.UserSync{ - PriorityGroups: [][]string{{"a", "b", "c"}}, - Cooperative: config.UserSyncCooperative{ - EnabledByDefault: false, - }, - }, - expectedPrivacy: macros.UserSyncPrivacy{}, - expectedRequest: usersync.Request{ - Bidders: []string{"a", "b"}, - Cooperative: usersync.Cooperative{ - Enabled: true, - PriorityGroups: nil, - }, - Limit: 20, - Privacy: usersyncPrivacy{ - gdprPermissions: &fakePermissions{}, - activityRequest: emptyActivityPoliciesRequest, - gdprSignal: -1, - }, - SyncTypeFilter: usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - }, - { - description: "IFrame Disabled For Specific Bidders", - givenBody: strings.NewReader(`{` + - `"bidders":["biddera", "bidderb"],` + - `"account":"IFrameDisabledAccount"` + - `}`), - givenGDPRConfig: config.GDPR{Enabled: true, DefaultValue: "0"}, - givenCCPAEnabled: true, - givenConfig: config.UserSync{ - PriorityGroups: [][]string{{"biddera", "bidderb", "bidderc"}}, - Cooperative: config.UserSyncCooperative{ - EnabledByDefault: false, - }, - }, - givenCookieSyncConfig: config.CookieSync{ - DisabledIFrameBidders: []string{"bidderb"}, - }, - expectedPrivacy: macros.UserSyncPrivacy{}, - expectedRequest: usersync.Request{ - Bidders: []string{"biddera", "bidderb"}, - Cooperative: usersync.Cooperative{ - Enabled: true, - PriorityGroups: nil, - }, - Limit: 20, - Privacy: usersyncPrivacy{ - gdprPermissions: &fakePermissions{}, - activityRequest: emptyActivityPoliciesRequest, - gdprSignal: -1, - }, - SyncTypeFilter: usersync.SyncTypeFilter{ - IFrame: usersync.CompositeFilter{ - RequestFilter: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - AccountFilter: usersync.NewSpecificBidderFilter([]string{"bidderb", "biddera"}, usersync.BidderFilterModeExclude), - }, - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - }, } for _, test := range testCases { @@ -1201,7 +1128,6 @@ func TestCookieSyncParseRequest(t *testing.T) { endpoint := cookieSyncEndpoint{ config: &config.Configuration{ UserSync: test.givenConfig, - CookieSync: test.givenCookieSyncConfig, AccountRequired: test.givenAccountRequired, }, privacyConfig: usersyncPrivacyConfig{ @@ -1213,8 +1139,6 @@ func TestCookieSyncParseRequest(t *testing.T) { accountsFetcher: FakeAccountsFetcher{AccountData: map[string]json.RawMessage{ "TestAccount": testAccountData, "DisabledAccount": json.RawMessage(`{"disabled":true}`), - "IFrameDisabledAccount": json.RawMessage(`{"cookie_sync": {"default_limit": 20, "max_limit": 30, "default_coop_sync": true, "disabled_iframe_bidders": ["biddera"]}}`), - "IFrameDisabledAllAccount": json.RawMessage(`{"cookie_sync": {"default_limit": 20, "max_limit": 30, "default_coop_sync": true, "disabled_iframe_bidders": ["*"]}}`), "ValidAccountInvalidActivities": json.RawMessage(`{"privacy":{"allowactivities":{"syncUser":{"rules":[{"condition":{"componentName": ["bidderA.bidderB.bidderC"]}}]}}}}`), }}, } @@ -1382,7 +1306,7 @@ func TestSetLimit(t *testing.T) { Limit: nil, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultLimit: nil, MaxLimit: nil, }, @@ -1397,7 +1321,7 @@ func TestSetLimit(t *testing.T) { Limit: intNegative, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultLimit: int20, }, }, @@ -1411,7 +1335,7 @@ func TestSetLimit(t *testing.T) { Limit: int0, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultLimit: int20, }, }, @@ -1425,7 +1349,7 @@ func TestSetLimit(t *testing.T) { Limit: int10, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultLimit: int20, MaxLimit: int30, }, @@ -1440,7 +1364,7 @@ func TestSetLimit(t *testing.T) { Limit: int30, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultLimit: int20, MaxLimit: int10, }, @@ -1455,7 +1379,7 @@ func TestSetLimit(t *testing.T) { Limit: intMax, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{}, + CookieSync: config.CookieSync{}, }, expectedRequest: cookieSyncRequest{ Limit: intMax, @@ -1488,7 +1412,7 @@ func TestSetCooperativeSync(t *testing.T) { CooperativeSync: nil, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultCoopSync: nil, }, }, @@ -1502,7 +1426,7 @@ func TestSetCooperativeSync(t *testing.T) { CooperativeSync: nil, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultCoopSync: &coopSyncTrue, }, }, @@ -1516,7 +1440,7 @@ func TestSetCooperativeSync(t *testing.T) { CooperativeSync: &coopSyncTrue, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultCoopSync: nil, }, }, @@ -1530,7 +1454,7 @@ func TestSetCooperativeSync(t *testing.T) { CooperativeSync: &coopSyncFalse, }, givenAccount: &config.Account{ - CookieSync: config.AccountCookieSync{ + CookieSync: config.CookieSync{ DefaultCoopSync: &coopSyncTrue, }, }, @@ -1613,188 +1537,6 @@ func TestCookieSyncWriteParseRequestErrorMetrics(t *testing.T) { } } -func TestMergeDisabledIFrameBidders(t *testing.T) { - testCases := map[string]struct { - givenHost []string - givenAccount []string - expected []string - }{ - "both_nil": { - givenHost: nil, - givenAccount: nil, - expected: nil, - }, - "host_only": { - givenHost: []string{"bidderA", "bidderB"}, - givenAccount: nil, - expected: []string{"bidderA", "bidderB"}, - }, - "account_only": { - givenHost: nil, - givenAccount: []string{"bidderA", "bidderB"}, - expected: []string{"bidderA", "bidderB"}, - }, - "union": { - givenHost: []string{"bidderA"}, - givenAccount: []string{"bidderB"}, - expected: []string{"bidderA", "bidderB"}, - }, - "dedupe_host_precedence": { - givenHost: []string{"bidderA", "bidderB"}, - givenAccount: []string{"bidderB", "bidderC"}, - expected: []string{"bidderA", "bidderB", "bidderC"}, - }, - "wildcard_from_host": { - givenHost: []string{"*"}, - givenAccount: []string{"bidderA"}, - expected: []string{"*", "bidderA"}, - }, - "wildcard_from_account": { - givenHost: []string{"bidderA"}, - givenAccount: []string{"*"}, - expected: []string{"bidderA", "*"}, - }, - "wildcard_not_first_in_host": { - givenHost: []string{"bidderA", "*", "bidderB"}, - givenAccount: []string{"bidderC"}, - expected: []string{"bidderA", "*", "bidderB", "bidderC"}, - }, - "wildcard_not_first_in_account": { - givenHost: []string{"bidderA"}, - givenAccount: []string{"bidderB", "*"}, - expected: []string{"bidderA", "bidderB", "*"}, - }, - "wildcard_in_both_deduped": { - givenHost: []string{"bidderA", "*"}, - givenAccount: []string{"*", "bidderB"}, - expected: []string{"bidderA", "*", "bidderB"}, - }, - } - - for name, test := range testCases { - t.Run(name, func(t *testing.T) { - result := mergeDisabledIFrameBidders(test.givenHost, test.givenAccount) - assert.Equal(t, test.expected, result) - }) - } -} - -func TestApplyDisabledIFrameBidders(t *testing.T) { - allowAll := usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - } - - testCases := map[string]struct { - givenFilter usersync.SyncTypeFilter - givenBidders []string - expectedIFrame map[string]bool - expectedRedirect map[string]bool - expectedExactSync *usersync.SyncTypeFilter - }{ - "nil": { - givenFilter: allowAll, - givenBidders: nil, - expectedExactSync: &usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - "empty": { - givenFilter: allowAll, - givenBidders: []string{}, - expectedExactSync: &usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - "wildcard": { - givenFilter: allowAll, - givenBidders: []string{"*"}, - expectedExactSync: &usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - "specific_bidders": { - givenFilter: allowAll, - givenBidders: []string{"bidderA", "bidderB"}, - expectedIFrame: map[string]bool{ - "biddera": false, - "bidderb": false, - "bidderc": true, - }, - expectedRedirect: map[string]bool{ - "biddera": true, - }, - }, - // wildcard in givenBidders overrides the request-level redirect filter - "wildcard_overrides_request_filter": { - givenFilter: usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - Redirect: usersync.NewSpecificBidderFilter([]string{"biddera"}, usersync.BidderFilterModeExclude), - }, - givenBidders: []string{"*"}, - expectedExactSync: &usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude), - Redirect: usersync.NewSpecificBidderFilter([]string{"biddera"}, usersync.BidderFilterModeExclude), - }, - }, - // request already excludes all iframe; account restriction still results in all blocked - "request_excludes_all": { - givenFilter: usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - givenBidders: []string{"bidderA"}, - expectedIFrame: map[string]bool{ - "biddera": false, - "bidderb": false, - }, - }, - // request includes specific bidders; account disables one of them - "request_includes_specific": { - givenFilter: usersync.SyncTypeFilter{ - IFrame: usersync.NewSpecificBidderFilter([]string{"bidderA", "bidderB"}, usersync.BidderFilterModeInclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - givenBidders: []string{"bidderA"}, - expectedIFrame: map[string]bool{ - "biddera": false, - "bidderb": true, - "bidderc": false, - }, - }, - // wildcard takes precedence when mixed with specific bidders - "wildcard_with_specific": { - givenFilter: allowAll, - givenBidders: []string{"*", "biddera"}, - expectedExactSync: &usersync.SyncTypeFilter{ - IFrame: usersync.NewUniformBidderFilter(usersync.BidderFilterModeExclude), - Redirect: usersync.NewUniformBidderFilter(usersync.BidderFilterModeInclude), - }, - }, - } - - for name, test := range testCases { - t.Run(name, func(t *testing.T) { - result := applyDisabledIFrameBidders(test.givenFilter, test.givenBidders) - - if test.expectedExactSync != nil { - assert.Equal(t, *test.expectedExactSync, result) - } - - for bidder, expected := range test.expectedIFrame { - assert.Equal(t, expected, result.IFrame.Allowed(bidder), "IFrame.Allowed(%s)", bidder) - } - - for bidder, expected := range test.expectedRedirect { - assert.Equal(t, expected, result.Redirect.Allowed(bidder), "Redirect.Allowed(%s)", bidder) - } - }) - } -} - func TestParseTypeFilter(t *testing.T) { testCases := []struct { description string @@ -2051,12 +1793,12 @@ func TestCookieSyncHandleResponse(t *testing.T) { privacyMacros := macros.UserSyncPrivacy{USPrivacy: "anyConsent"} // The & in the URL is necessary to test proper JSON encoding. - syncA := usersync.Sync{URL: "https://syncA.com/sync?a=1&b=2", Type: usersync.SyncTypeRedirect} + syncA := usersync.Sync{URL: "https://syncA.com/sync?a=1&b=2", Type: usersync.SyncTypeRedirect, SupportCORS: true} syncerA := MockSyncer{} syncerA.On("GetSync", syncTypeExpected, privacyMacros).Return(syncA, nil).Maybe() // The & in the URL is necessary to test proper JSON encoding. - syncB := usersync.Sync{URL: "https://syncB.com/sync?a=1&b=2", Type: usersync.SyncTypeRedirect} + syncB := usersync.Sync{URL: "https://syncB.com/sync?a=1&b=2", Type: usersync.SyncTypeRedirect, SupportCORS: false} syncerB := MockSyncer{} syncerB.On("GetSync", syncTypeExpected, privacyMacros).Return(syncB, nil).Maybe() @@ -2095,7 +1837,7 @@ func TestCookieSyncHandleResponse(t *testing.T) { givenCookieHasSyncs: true, givenSyncersChosen: []usersync.SyncerChoice{{Bidder: "foo", Syncer: &syncerA}}, expectedJSON: `{"status":"ok","bidder_status":[` + - `{"bidder":"foo","no_cookie":true,"usersync":{"url":"https://syncA.com/sync?a=1&b=2","type":"redirect"}}` + + `{"bidder":"foo","no_cookie":true,"usersync":{"url":"https://syncA.com/sync?a=1&b=2","type":"redirect","supportCORS":true}}` + `]}` + "\n", expectedAnalytics: analytics.CookieSyncObject{ Status: 200, @@ -2103,7 +1845,7 @@ func TestCookieSyncHandleResponse(t *testing.T) { { BidderCode: "foo", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncA.com/sync?a=1&b=2", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncA.com/sync?a=1&b=2", Type: "redirect", SupportCORS: true}, }, }, }, @@ -2113,7 +1855,7 @@ func TestCookieSyncHandleResponse(t *testing.T) { givenCookieHasSyncs: true, givenSyncersChosen: []usersync.SyncerChoice{{Bidder: "foo", Syncer: &syncerA}, {Bidder: "bar", Syncer: &syncerB}}, expectedJSON: `{"status":"ok","bidder_status":[` + - `{"bidder":"foo","no_cookie":true,"usersync":{"url":"https://syncA.com/sync?a=1&b=2","type":"redirect"}},` + + `{"bidder":"foo","no_cookie":true,"usersync":{"url":"https://syncA.com/sync?a=1&b=2","type":"redirect","supportCORS":true}},` + `{"bidder":"bar","no_cookie":true,"usersync":{"url":"https://syncB.com/sync?a=1&b=2","type":"redirect"}}` + `]}` + "\n", expectedAnalytics: analytics.CookieSyncObject{ @@ -2122,12 +1864,12 @@ func TestCookieSyncHandleResponse(t *testing.T) { { BidderCode: "foo", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncA.com/sync?a=1&b=2", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncA.com/sync?a=1&b=2", Type: "redirect", SupportCORS: true}, }, { BidderCode: "bar", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncB.com/sync?a=1&b=2", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncB.com/sync?a=1&b=2", Type: "redirect", SupportCORS: false}, }, }, }, @@ -2145,7 +1887,7 @@ func TestCookieSyncHandleResponse(t *testing.T) { { BidderCode: "bar", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncB.com/sync?a=1&b=2", Type: "redirect"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "https://syncB.com/sync?a=1&b=2", Type: "redirect", SupportCORS: false}, }, }, }, @@ -2214,14 +1956,14 @@ func TestMapBidderStatusToAnalytics(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: cookieSyncResponseSync{URL: "aURL", Type: "aType"}, + UsersyncInfo: cookieSyncResponseSync{URL: "aURL", Type: "aType", SupportCORS: false}, }, }, expected: []*analytics.CookieSyncBidder{ { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "aType"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "aType", SupportCORS: false}, }, }, }, @@ -2231,24 +1973,24 @@ func TestMapBidderStatusToAnalytics(t *testing.T) { { BidderCode: "a", NoCookie: true, - UsersyncInfo: cookieSyncResponseSync{URL: "aURL", Type: "aType"}, + UsersyncInfo: cookieSyncResponseSync{URL: "aURL", Type: "aType", SupportCORS: false}, }, { BidderCode: "b", NoCookie: false, - UsersyncInfo: cookieSyncResponseSync{URL: "bURL", Type: "bType"}, + UsersyncInfo: cookieSyncResponseSync{URL: "bURL", Type: "bType", SupportCORS: true}, }, }, expected: []*analytics.CookieSyncBidder{ { BidderCode: "a", NoCookie: true, - UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "aType"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "aURL", Type: "aType", SupportCORS: false}, }, { BidderCode: "b", NoCookie: false, - UsersyncInfo: &analytics.UsersyncInfo{URL: "bURL", Type: "bType"}, + UsersyncInfo: &analytics.UsersyncInfo{URL: "bURL", Type: "bType", SupportCORS: true}, }, }, }, @@ -2775,7 +2517,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { testCases := []struct { description string givenGlobalConfig config.UserSync - givenAccountCookieSync config.AccountCookieSync + givenAccountCookieSync config.CookieSync expectedPriorityGroups [][]string }{ { @@ -2783,7 +2525,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: [][]string{{"global1", "global2"}, {"global3"}}, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: ptrutil.ToPtr(true), PriorityGroups: [][]string{{"account1", "account2"}, {"account3"}}, }, @@ -2794,7 +2536,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: [][]string{{"global1", "global2"}, {"global3"}}, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: ptrutil.ToPtr(false), PriorityGroups: [][]string{{"account1", "account2"}, {"account3"}}, }, @@ -2805,7 +2547,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: [][]string{{"global1", "global2"}, {"global3"}}, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: nil, PriorityGroups: [][]string{{"account1", "account2"}, {"account3"}}, }, @@ -2816,7 +2558,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: [][]string{{"global1", "global2"}, {"global3"}}, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: ptrutil.ToPtr(true), PriorityGroups: [][]string{}, }, @@ -2827,7 +2569,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: [][]string{{"global1", "global2"}, {"global3"}}, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: ptrutil.ToPtr(true), PriorityGroups: nil, }, @@ -2838,7 +2580,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { givenGlobalConfig: config.UserSync{ PriorityGroups: nil, }, - givenAccountCookieSync: config.AccountCookieSync{ + givenAccountCookieSync: config.CookieSync{ DefaultCoopSync: nil, PriorityGroups: [][]string{{"account1", "account2"}}, }, @@ -2861,7 +2603,7 @@ func TestCookieSyncFindPriorityGroups(t *testing.T) { } // createAccountJSON creates a JSON representation of account config for testing -func createAccountJSON(priorityGroups [][]string, defaultCoopSync *bool, priorityGroupsOnly *bool) json.RawMessage { +func createAccountJSON(priorityGroups [][]string, defaultCoopSync *bool) json.RawMessage { account := map[string]interface{}{ "cookie_sync": map[string]interface{}{ "priority_groups": priorityGroups, @@ -2872,10 +2614,6 @@ func createAccountJSON(priorityGroups [][]string, defaultCoopSync *bool, priorit account["cookie_sync"].(map[string]interface{})["default_coop_sync"] = *defaultCoopSync } - if priorityGroupsOnly != nil { - account["cookie_sync"].(map[string]interface{})["priority_groups_only"] = *priorityGroupsOnly - } - jsonData, _ := json.Marshal(account) return json.RawMessage(jsonData) } @@ -2883,15 +2621,15 @@ func createAccountJSON(priorityGroups [][]string, defaultCoopSync *bool, priorit func TestCookieSyncPriorityGroupsIntegration(t *testing.T) { // Setup test syncers syncerA := MockSyncer{} - syncerA.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderA.com", Type: usersync.SyncTypeRedirect}, nil).Maybe() + syncerA.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderA.com", Type: usersync.SyncTypeRedirect, SupportCORS: false}, nil).Maybe() syncerA.On("Key").Return("appnexus").Maybe() syncerA.On("SupportsType", mock.Anything).Return(true).Maybe() syncerB := MockSyncer{} - syncerB.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderB.com", Type: usersync.SyncTypeRedirect}, nil).Maybe() + syncerB.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderB.com", Type: usersync.SyncTypeRedirect, SupportCORS: false}, nil).Maybe() syncerB.On("Key").Return("rubicon").Maybe() syncerB.On("SupportsType", mock.Anything).Return(true).Maybe() syncerC := MockSyncer{} - syncerC.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderC.com", Type: usersync.SyncTypeRedirect}, nil).Maybe() + syncerC.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderC.com", Type: usersync.SyncTypeRedirect, SupportCORS: false}, nil).Maybe() syncerC.On("Key").Return("pubmatic").Maybe() syncerC.On("SupportsType", mock.Anything).Return(true).Maybe() // Need to choose real bidder names because the standard chooser is hardcoded to validate against them @@ -2914,15 +2652,13 @@ func TestCookieSyncPriorityGroupsIntegration(t *testing.T) { } testCases := []struct { - description string - givenRequestBody string - givenAccountPriorityGroups [][]string - givenAccountDefaultCoopSync *bool - givenAccountPriorityGroupsOnly *bool - givenGlobalPriorityGroups [][]string - givenCooperativeEnabledByDef bool - shouldContainBidders []string - shouldNotContainBidders []string + description string + givenRequestBody string + givenAccountPriorityGroups [][]string + givenAccountDefaultCoopSync *bool + givenGlobalPriorityGroups [][]string + givenCooperativeEnabledByDef bool + shouldContainBidders []string }{ { description: "Account-level priority groups used with cooperative sync enabled", @@ -2977,31 +2713,6 @@ func TestCookieSyncPriorityGroupsIntegration(t *testing.T) { givenCooperativeEnabledByDef: false, shouldContainBidders: []string{"appnexus", "rubicon", "pubmatic"}, }, - { - description: "Priority groups only — remaining bidders excluded", - givenRequestBody: `{"bidders":["appnexus"], "coopSync": true, "limit": 10, "account": "test_account"}`, - givenAccountPriorityGroups: [][]string{ - {"rubicon"}, - }, - givenAccountDefaultCoopSync: ptrutil.ToPtr(true), - givenAccountPriorityGroupsOnly: ptrutil.ToPtr(true), - givenGlobalPriorityGroups: [][]string{{"ignored"}}, - givenCooperativeEnabledByDef: false, - shouldContainBidders: []string{"appnexus", "rubicon"}, - shouldNotContainBidders: []string{"pubmatic"}, - }, - { - description: "Priority groups only false — remaining bidders included", - givenRequestBody: `{"bidders":["appnexus"], "coopSync": true, "limit": 10, "account": "test_account"}`, - givenAccountPriorityGroups: [][]string{ - {"rubicon"}, - }, - givenAccountDefaultCoopSync: ptrutil.ToPtr(true), - givenAccountPriorityGroupsOnly: ptrutil.ToPtr(false), - givenGlobalPriorityGroups: [][]string{{"ignored"}}, - givenCooperativeEnabledByDef: false, - shouldContainBidders: []string{"appnexus", "rubicon", "pubmatic"}, - }, } for _, tc := range testCases { @@ -3039,7 +2750,7 @@ func TestCookieSyncPriorityGroupsIntegration(t *testing.T) { &mockAnalytics, &FakeAccountsFetcher{ AccountData: map[string]json.RawMessage{ - "test_account": createAccountJSON(tc.givenAccountPriorityGroups, tc.givenAccountDefaultCoopSync, tc.givenAccountPriorityGroupsOnly), + "test_account": createAccountJSON(tc.givenAccountPriorityGroups, tc.givenAccountDefaultCoopSync), }, }, bidders, @@ -3069,11 +2780,6 @@ func TestCookieSyncPriorityGroupsIntegration(t *testing.T) { for _, expected := range tc.shouldContainBidders { assert.Contains(t, actualBidders, expected, "Expected bidder %s to be present in response", expected) } - - // Check that excluded bidders are not present - for _, excluded := range tc.shouldNotContainBidders { - assert.NotContains(t, actualBidders, excluded, "Bidder %s should not be present in response", excluded) - } }) } } @@ -3082,7 +2788,7 @@ func TestCookieSyncPriorityGroupsEdgeCases(t *testing.T) { // Setup basic syncers syncerA := MockSyncer{} syncerA.On("Key").Return("bidderA") - syncerA.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderA.com", Type: usersync.SyncTypeRedirect}, nil).Maybe() + syncerA.On("GetSync", mock.Anything, mock.Anything).Return(usersync.Sync{URL: "https://sync.bidderA.com", Type: usersync.SyncTypeRedirect, SupportCORS: false}, nil).Maybe() syncerA.On("SupportsType", mock.Anything).Return(true).Maybe() syncersByBidder := map[string]usersync.Syncer{ @@ -3217,7 +2923,7 @@ func TestCookieSyncPriorityGroupsEdgeCases(t *testing.T) { &mockAnalytics, &FakeAccountsFetcher{ AccountData: map[string]json.RawMessage{ - "test_account": createAccountJSON(tc.givenAccountPriorityGroups, tc.givenAccountDefaultCoopSync, nil), + "test_account": createAccountJSON(tc.givenAccountPriorityGroups, tc.givenAccountDefaultCoopSync), }, }, bidders, diff --git a/endpoints/currency_rates.go b/endpoints/currency_rates.go index c6cacc6738..f7d20cd79b 100644 --- a/endpoints/currency_rates.go +++ b/endpoints/currency_rates.go @@ -4,9 +4,9 @@ import ( "net/http" "time" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // currencyRatesInfo holds currency rates information. diff --git a/endpoints/currency_rates_test.go b/endpoints/currency_rates_test.go index 21d314a9f9..00da093a2d 100644 --- a/endpoints/currency_rates_test.go +++ b/endpoints/currency_rates_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/currency" + "github.com/prebid/prebid-server/v3/currency" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/events/account_test.go b/endpoints/events/account_test.go index cbd0a5c818..b379621b06 100644 --- a/endpoints/events/account_test.go +++ b/endpoints/events/account_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/endpoints/events/event.go b/endpoints/events/event.go index c1a253b3d3..fa2fca2f96 100644 --- a/endpoints/events/event.go +++ b/endpoints/events/event.go @@ -10,17 +10,17 @@ import ( "time" "unicode" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/julienschmidt/httprouter" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/httputil" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/httputil" ) const ( diff --git a/endpoints/events/event_test.go b/endpoints/events/event_test.go index 8a32da7b25..eb52d8c128 100644 --- a/endpoints/events/event_test.go +++ b/endpoints/events/event_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/events/vtrack.go b/endpoints/events/vtrack.go index 9a2e6ce5f3..ff846f694f 100644 --- a/endpoints/events/vtrack.go +++ b/endpoints/events/vtrack.go @@ -10,16 +10,16 @@ import ( "time" "github.com/julienschmidt/httprouter" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/jsonutil" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/endpoints/events/vtrack_test.go b/endpoints/events/vtrack_test.go index 0648bdbbb4..1345d563db 100644 --- a/endpoints/events/vtrack_test.go +++ b/endpoints/events/vtrack_test.go @@ -12,11 +12,11 @@ import ( "strings" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/getuids.go b/endpoints/getuids.go index ecc176b07a..dac114da22 100644 --- a/endpoints/getuids.go +++ b/endpoints/getuids.go @@ -4,8 +4,8 @@ import ( "net/http" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/usersync" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/usersync" "encoding/json" ) diff --git a/endpoints/getuids_test.go b/endpoints/getuids_test.go index 6b0ff5a7cc..1092c51f79 100644 --- a/endpoints/getuids_test.go +++ b/endpoints/getuids_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/info/bidders.go b/endpoints/info/bidders.go index 67b9887314..d5f6ea330f 100644 --- a/endpoints/info/bidders.go +++ b/endpoints/info/bidders.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) var invalidEnabledOnlyMsg = []byte(`Invalid value for 'enabledonly' query param, must be of boolean type`) diff --git a/endpoints/info/bidders_detail.go b/endpoints/info/bidders_detail.go index 5bf97f3cea..1a0936a07b 100644 --- a/endpoints/info/bidders_detail.go +++ b/endpoints/info/bidders_detail.go @@ -7,10 +7,10 @@ import ( "strings" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/endpoints/info/bidders_detail_test.go b/endpoints/info/bidders_detail_test.go index 2ee6df0f56..d98e9ec094 100644 --- a/endpoints/info/bidders_detail_test.go +++ b/endpoints/info/bidders_detail_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/info/bidders_test.go b/endpoints/info/bidders_test.go index 9a30c28756..20b5ea0401 100644 --- a/endpoints/info/bidders_test.go +++ b/endpoints/info/bidders_test.go @@ -6,7 +6,7 @@ import ( "net/http/httptest" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/openrtb2/amp_auction.go b/endpoints/openrtb2/amp_auction.go index cb494d2876..48a80d9cab 100644 --- a/endpoints/openrtb2/amp_auction.go +++ b/endpoints/openrtb2/amp_auction.go @@ -15,29 +15,29 @@ import ( "github.com/julienschmidt/httprouter" "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/util/uuidutil" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/util/uuidutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/amp" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/version" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/amp" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/version" ) const defaultAmpRequestTimeoutMillis = 900 diff --git a/endpoints/openrtb2/amp_auction_test.go b/endpoints/openrtb2/amp_auction_test.go index cb31a2b6ed..126d86802b 100644 --- a/endpoints/openrtb2/amp_auction_test.go +++ b/endpoints/openrtb2/amp_auction_test.go @@ -19,23 +19,23 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/amp" - "github.com/prebid/prebid-server/v4/analytics" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/amp" + "github.com/prebid/prebid-server/v3/analytics" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // TestGoodRequests makes sure that the auction runs properly-formatted stored bids correctly. @@ -2491,7 +2491,7 @@ func TestAmpAuctionDebugWarningsOnly(t *testing.T) { ) for _, test := range testCases { - httpReq := httptest.NewRequest("GET", "/openrtb2/auction/amp"+test.requestURLArguments, nil) + httpReq := httptest.NewRequest("GET", fmt.Sprintf("/openrtb2/auction/amp"+test.requestURLArguments), nil) test.addRequestHeaders(httpReq) recorder := httptest.NewRecorder() diff --git a/endpoints/openrtb2/auction.go b/endpoints/openrtb2/auction.go index 5df5cceba7..4a75a70957 100644 --- a/endpoints/openrtb2/auction.go +++ b/endpoints/openrtb2/auction.go @@ -21,38 +21,38 @@ import ( "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/bidadjustment" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacysandbox" - "github.com/prebid/prebid-server/v4/schain" + "github.com/prebid/prebid-server/v3/bidadjustment" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacysandbox" + "github.com/prebid/prebid-server/v3/schain" "golang.org/x/net/publicsuffix" jsonpatch "gopkg.in/evanphx/json-patch.v5" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - "github.com/prebid/prebid-server/v4/privacy/lmt" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/httputil" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/uuidutil" - "github.com/prebid/prebid-server/v4/version" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + "github.com/prebid/prebid-server/v3/privacy/lmt" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/httputil" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/uuidutil" + "github.com/prebid/prebid-server/v3/version" ) const ampChannel = "amp" diff --git a/endpoints/openrtb2/auction_benchmark_test.go b/endpoints/openrtb2/auction_benchmark_test.go index 7d963393b8..ab8cb4863a 100644 --- a/endpoints/openrtb2/auction_benchmark_test.go +++ b/endpoints/openrtb2/auction_benchmark_test.go @@ -10,18 +10,18 @@ import ( "testing" "time" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/macros" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/usersync" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/macros" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/usersync" ) // benchmarkTestServer returns the header bidding test ad. This response was scraped from a real appnexus server response. diff --git a/endpoints/openrtb2/auction_test.go b/endpoints/openrtb2/auction_test.go index b196f59066..1bf947f453 100644 --- a/endpoints/openrtb2/auction_test.go +++ b/endpoints/openrtb2/auction_test.go @@ -23,25 +23,25 @@ import ( "github.com/julienschmidt/httprouter" gpplib "github.com/prebid/go-gpp" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/analytics" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/analytics" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/openrtb2/interstitial.go b/endpoints/openrtb2/interstitial.go index 7f39af0013..4cb9482c0d 100644 --- a/endpoints/openrtb2/interstitial.go +++ b/endpoints/openrtb2/interstitial.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func processInterstitials(req *openrtb_ext.RequestWrapper) error { diff --git a/endpoints/openrtb2/interstitial_test.go b/endpoints/openrtb2/interstitial_test.go index 5f4e4e154f..d5276d18db 100644 --- a/endpoints/openrtb2/interstitial_test.go +++ b/endpoints/openrtb2/interstitial_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/endpoints/openrtb2/test_utils.go b/endpoints/openrtb2/test_utils.go index d0316db77c..e320a940e6 100644 --- a/endpoints/openrtb2/test_utils.go +++ b/endpoints/openrtb2/test_utils.go @@ -18,29 +18,29 @@ import ( "github.com/julienschmidt/httprouter" "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/openrtb/v20/openrtb3" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/analytics" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - pbc "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/uuidutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/analytics" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + pbc "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/uuidutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) diff --git a/endpoints/openrtb2/video_auction.go b/endpoints/openrtb2/video_auction.go index 04dffb1dda..047511f379 100644 --- a/endpoints/openrtb2/video_auction.go +++ b/endpoints/openrtb2/video_auction.go @@ -16,29 +16,29 @@ import ( "github.com/gofrs/uuid" "github.com/julienschmidt/httprouter" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" jsonpatch "gopkg.in/evanphx/json-patch.v5" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/iputil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/uuidutil" - "github.com/prebid/prebid-server/v4/version" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/iputil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/uuidutil" + "github.com/prebid/prebid-server/v3/version" ) var defaultRequestTimeout int64 = 5000 @@ -122,12 +122,6 @@ func NewVideoEndpoint( func (deps *endpointDeps) VideoAuctionEndpoint(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { start := time.Now() - if !deps.cfg.Video.EnableDeprecatedEndpoint { - w.WriteHeader(http.StatusNotImplemented) - w.Write([]byte("The video endpoint is deprecated and will be removed in 5.0. You may re-enable it via the host configuration setting video.enable_deprecated_endpoint")) - return - } - vo := analytics.VideoObject{ Status: http.StatusOK, Errors: make([]error, 0), diff --git a/endpoints/openrtb2/video_auction_test.go b/endpoints/openrtb2/video_auction_test.go index 1a4d4f9934..cd3e0d9c37 100644 --- a/endpoints/openrtb2/video_auction_test.go +++ b/endpoints/openrtb2/video_auction_test.go @@ -11,21 +11,21 @@ import ( "strings" "testing" - "github.com/prebid/prebid-server/v4/analytics" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/analytics" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" @@ -1273,7 +1273,7 @@ func mockDepsWithMetrics(t *testing.T, ex *mockExchangeVideo) (*endpointDeps, *m &mockVideoStoredReqFetcher{}, &mockVideoStoredReqFetcher{}, &mockAccountFetcher{data: mockVideoAccountData}, - &config.Configuration{Video: config.Video{EnableDeprecatedEndpoint: true}, MaxRequestSize: maxSize}, + &config.Configuration{MaxRequestSize: maxSize}, metrics, mockModule, map[string]string{}, @@ -1324,7 +1324,7 @@ func mockDeps(t *testing.T, ex *mockExchangeVideo) *endpointDeps { &mockVideoStoredReqFetcher{}, &mockVideoStoredReqFetcher{}, &mockAccountFetcher{data: mockVideoAccountData}, - &config.Configuration{Video: config.Video{EnableDeprecatedEndpoint: true}, MaxRequestSize: maxSize}, + &config.Configuration{MaxRequestSize: maxSize}, &metricsConfig.NilMetricsEngine{}, analyticsBuild.New(&config.Analytics{}), map[string]string{}, @@ -1349,7 +1349,7 @@ func mockDepsAppendBidderNames(t *testing.T, ex *mockExchangeAppendBidderNames) &mockVideoStoredReqFetcher{}, &mockVideoStoredReqFetcher{}, empty_fetcher.EmptyFetcher{}, - &config.Configuration{Video: config.Video{EnableDeprecatedEndpoint: true}, MaxRequestSize: maxSize}, + &config.Configuration{MaxRequestSize: maxSize}, &metricsConfig.NilMetricsEngine{}, analyticsBuild.New(&config.Analytics{}), map[string]string{}, @@ -1376,7 +1376,7 @@ func mockDepsNoBids(t *testing.T, ex *mockExchangeVideoNoBids) *endpointDeps { &mockVideoStoredReqFetcher{}, &mockVideoStoredReqFetcher{}, empty_fetcher.EmptyFetcher{}, - &config.Configuration{Video: config.Video{EnableDeprecatedEndpoint: true}, MaxRequestSize: maxSize}, + &config.Configuration{MaxRequestSize: maxSize}, &metricsConfig.NilMetricsEngine{}, analyticsBuild.New(&config.Analytics{}), map[string]string{}, @@ -1548,37 +1548,3 @@ func TestVideoRequestValidationFailed(t *testing.T) { assert.Equal(t, 500, recorder.Code, "Should catch error in request") assert.Equal(t, "Critical error while running the video endpoint: request.tmax must be nonnegative. Got -2", errorMessage, "Incorrect request validation message") } - -func TestVideoEndpointDisabled(t *testing.T) { - ex := &mockExchangeVideo{} - req := httptest.NewRequest("POST", "/openrtb2/video", strings.NewReader("{}")) - recorder := httptest.NewRecorder() - - deps := &endpointDeps{ - fakeUUIDGenerator{}, - ex, - ortb.NewRequestValidator(openrtb_ext.BuildBidderMap(), map[string]string{}, mockBidderParamValidator{}), - &mockVideoStoredReqFetcher{}, - &mockVideoStoredReqFetcher{}, - &mockAccountFetcher{data: mockVideoAccountData}, - &config.Configuration{Video: config.Video{EnableDeprecatedEndpoint: false}, MaxRequestSize: maxSize}, - &metricsConfig.NilMetricsEngine{}, - analyticsBuild.New(&config.Analytics{}), - map[string]string{}, - false, - []byte{}, - openrtb_ext.BuildBidderMap(), - ex.cache, - regexp.MustCompile(`[<>]`), - hardcodedResponseIPValidator{response: true}, - empty_fetcher.EmptyFetcher{}, - hooks.EmptyPlanBuilder{}, - nil, - openrtb_ext.NormalizeBidderName, - } - - deps.VideoAuctionEndpoint(recorder, req, nil) - - assert.Equal(t, http.StatusNotImplemented, recorder.Code, "Expected 501 status code when video endpoint is disabled") - assert.Equal(t, "The video endpoint is deprecated and will be removed in 5.0. You may re-enable it via the host configuration setting video.enable_deprecated_endpoint", recorder.Body.String(), "Unexpected error message") -} diff --git a/endpoints/setuid.go b/endpoints/setuid.go index dcefe4f645..8358761003 100644 --- a/endpoints/setuid.go +++ b/endpoints/setuid.go @@ -12,19 +12,19 @@ import ( "github.com/julienschmidt/httprouter" gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" - accountService "github.com/prebid/prebid-server/v4/account" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - gppPrivacy "github.com/prebid/prebid-server/v4/privacy/gpp" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/httputil" - stringutil "github.com/prebid/prebid-server/v4/util/stringutil" + accountService "github.com/prebid/prebid-server/v3/account" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + gppPrivacy "github.com/prebid/prebid-server/v3/privacy/gpp" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/httputil" + stringutil "github.com/prebid/prebid-server/v3/util/stringutil" ) const ( diff --git a/endpoints/setuid_test.go b/endpoints/setuid_test.go index 015566e5c0..78944da7c4 100644 --- a/endpoints/setuid_test.go +++ b/endpoints/setuid_test.go @@ -12,18 +12,18 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/analytics" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/usersync" + "github.com/prebid/prebid-server/v3/analytics" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/usersync" "github.com/stretchr/testify/assert" - metricsConf "github.com/prebid/prebid-server/v4/metrics/config" + metricsConf "github.com/prebid/prebid-server/v3/metrics/config" ) func TestSetUIDEndpoint(t *testing.T) { diff --git a/endpoints/version.go b/endpoints/version.go index 8a1f15599f..b947c771fb 100644 --- a/endpoints/version.go +++ b/endpoints/version.go @@ -4,8 +4,8 @@ import ( "encoding/json" "net/http" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const versionEndpointValueNotSet = "not-set" diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index c8da847f76..e6bba140a5 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -1,278 +1,270 @@ package exchange import ( - "github.com/prebid/prebid-server/v4/adapters" - ttx "github.com/prebid/prebid-server/v4/adapters/33across" - "github.com/prebid/prebid-server/v4/adapters/aax" - "github.com/prebid/prebid-server/v4/adapters/aceex" - "github.com/prebid/prebid-server/v4/adapters/acuityads" - "github.com/prebid/prebid-server/v4/adapters/adagio" - "github.com/prebid/prebid-server/v4/adapters/adelement" - "github.com/prebid/prebid-server/v4/adapters/adf" - "github.com/prebid/prebid-server/v4/adapters/adgeneration" - "github.com/prebid/prebid-server/v4/adapters/adhese" - "github.com/prebid/prebid-server/v4/adapters/adkernel" - "github.com/prebid/prebid-server/v4/adapters/adkernelAdn" - "github.com/prebid/prebid-server/v4/adapters/adman" - "github.com/prebid/prebid-server/v4/adapters/admatic" - "github.com/prebid/prebid-server/v4/adapters/admixer" - "github.com/prebid/prebid-server/v4/adapters/adnuntius" - "github.com/prebid/prebid-server/v4/adapters/adot" - "github.com/prebid/prebid-server/v4/adapters/adpone" - "github.com/prebid/prebid-server/v4/adapters/adprime" - "github.com/prebid/prebid-server/v4/adapters/adquery" - "github.com/prebid/prebid-server/v4/adapters/adrino" - "github.com/prebid/prebid-server/v4/adapters/adtarget" - "github.com/prebid/prebid-server/v4/adapters/adtelligent" - "github.com/prebid/prebid-server/v4/adapters/adtonos" - "github.com/prebid/prebid-server/v4/adapters/adtrgtme" - "github.com/prebid/prebid-server/v4/adapters/aduptech" - "github.com/prebid/prebid-server/v4/adapters/advangelists" - "github.com/prebid/prebid-server/v4/adapters/adverxo" - "github.com/prebid/prebid-server/v4/adapters/adview" - "github.com/prebid/prebid-server/v4/adapters/adxcg" - "github.com/prebid/prebid-server/v4/adapters/adyoulike" - "github.com/prebid/prebid-server/v4/adapters/afront" - "github.com/prebid/prebid-server/v4/adapters/aidem" - "github.com/prebid/prebid-server/v4/adapters/aja" - "github.com/prebid/prebid-server/v4/adapters/akcelo" - "github.com/prebid/prebid-server/v4/adapters/algorix" - "github.com/prebid/prebid-server/v4/adapters/alkimi" - alliance_gravity "github.com/prebid/prebid-server/v4/adapters/alliance_gravity" - "github.com/prebid/prebid-server/v4/adapters/amx" - "github.com/prebid/prebid-server/v4/adapters/apacdex" - "github.com/prebid/prebid-server/v4/adapters/appnexus" - "github.com/prebid/prebid-server/v4/adapters/appush" - "github.com/prebid/prebid-server/v4/adapters/aso" - "github.com/prebid/prebid-server/v4/adapters/audienceNetwork" - "github.com/prebid/prebid-server/v4/adapters/automatad" - "github.com/prebid/prebid-server/v4/adapters/avocet" - "github.com/prebid/prebid-server/v4/adapters/axis" - "github.com/prebid/prebid-server/v4/adapters/axonix" - "github.com/prebid/prebid-server/v4/adapters/beachfront" - "github.com/prebid/prebid-server/v4/adapters/beintoo" - "github.com/prebid/prebid-server/v4/adapters/bematterfull" - "github.com/prebid/prebid-server/v4/adapters/beop" - "github.com/prebid/prebid-server/v4/adapters/between" - "github.com/prebid/prebid-server/v4/adapters/beyondmedia" - "github.com/prebid/prebid-server/v4/adapters/bidmachine" - "github.com/prebid/prebid-server/v4/adapters/bidmatic" - "github.com/prebid/prebid-server/v4/adapters/bidmyadz" - "github.com/prebid/prebid-server/v4/adapters/bidscube" - "github.com/prebid/prebid-server/v4/adapters/bidstack" - "github.com/prebid/prebid-server/v4/adapters/bidtheatre" - "github.com/prebid/prebid-server/v4/adapters/bigoad" - "github.com/prebid/prebid-server/v4/adapters/blasto" - "github.com/prebid/prebid-server/v4/adapters/bliink" - "github.com/prebid/prebid-server/v4/adapters/blis" - "github.com/prebid/prebid-server/v4/adapters/blue" - "github.com/prebid/prebid-server/v4/adapters/bluesea" - "github.com/prebid/prebid-server/v4/adapters/bmtm" - "github.com/prebid/prebid-server/v4/adapters/boldwin" - "github.com/prebid/prebid-server/v4/adapters/boldwin_rapid" - "github.com/prebid/prebid-server/v4/adapters/brave" - "github.com/prebid/prebid-server/v4/adapters/bwx" - cadentaperturemx "github.com/prebid/prebid-server/v4/adapters/cadent_aperture_mx" - "github.com/prebid/prebid-server/v4/adapters/ccx" - "github.com/prebid/prebid-server/v4/adapters/clydo" - "github.com/prebid/prebid-server/v4/adapters/cointraffic" - "github.com/prebid/prebid-server/v4/adapters/coinzilla" - "github.com/prebid/prebid-server/v4/adapters/colossus" - "github.com/prebid/prebid-server/v4/adapters/compass" - "github.com/prebid/prebid-server/v4/adapters/concert" - "github.com/prebid/prebid-server/v4/adapters/connatix" - "github.com/prebid/prebid-server/v4/adapters/connectad" - "github.com/prebid/prebid-server/v4/adapters/consumable" - "github.com/prebid/prebid-server/v4/adapters/contxtful" - "github.com/prebid/prebid-server/v4/adapters/conversant" - "github.com/prebid/prebid-server/v4/adapters/copper6ssp" - "github.com/prebid/prebid-server/v4/adapters/cpmstar" - "github.com/prebid/prebid-server/v4/adapters/criteo" - "github.com/prebid/prebid-server/v4/adapters/cwire" - "github.com/prebid/prebid-server/v4/adapters/datablocks" - "github.com/prebid/prebid-server/v4/adapters/decenterads" - "github.com/prebid/prebid-server/v4/adapters/deepintent" - "github.com/prebid/prebid-server/v4/adapters/definemedia" - "github.com/prebid/prebid-server/v4/adapters/dianomi" - "github.com/prebid/prebid-server/v4/adapters/displayio" - "github.com/prebid/prebid-server/v4/adapters/dmx" - "github.com/prebid/prebid-server/v4/adapters/driftpixel" - evolution "github.com/prebid/prebid-server/v4/adapters/e_volution" - "github.com/prebid/prebid-server/v4/adapters/edge226" - "github.com/prebid/prebid-server/v4/adapters/elementaltv" - "github.com/prebid/prebid-server/v4/adapters/emtv" - "github.com/prebid/prebid-server/v4/adapters/eplanning" - "github.com/prebid/prebid-server/v4/adapters/epom" - "github.com/prebid/prebid-server/v4/adapters/escalax" - "github.com/prebid/prebid-server/v4/adapters/eskimi" - "github.com/prebid/prebid-server/v4/adapters/exco" - "github.com/prebid/prebid-server/v4/adapters/ezoic" - "github.com/prebid/prebid-server/v4/adapters/feedad" - "github.com/prebid/prebid-server/v4/adapters/flatads" - "github.com/prebid/prebid-server/v4/adapters/flipp" - "github.com/prebid/prebid-server/v4/adapters/freewheelssp" - "github.com/prebid/prebid-server/v4/adapters/frvradn" - "github.com/prebid/prebid-server/v4/adapters/fwssp" - "github.com/prebid/prebid-server/v4/adapters/gamma" - "github.com/prebid/prebid-server/v4/adapters/gamoshi" - "github.com/prebid/prebid-server/v4/adapters/globalsun" - "github.com/prebid/prebid-server/v4/adapters/goldbach" - "github.com/prebid/prebid-server/v4/adapters/grid" - "github.com/prebid/prebid-server/v4/adapters/gumgum" - "github.com/prebid/prebid-server/v4/adapters/huaweiads" - "github.com/prebid/prebid-server/v4/adapters/imds" - "github.com/prebid/prebid-server/v4/adapters/impactify" - "github.com/prebid/prebid-server/v4/adapters/improvedigital" - "github.com/prebid/prebid-server/v4/adapters/infytv" - "github.com/prebid/prebid-server/v4/adapters/inmobi" - "github.com/prebid/prebid-server/v4/adapters/insticator" - "github.com/prebid/prebid-server/v4/adapters/intenze" - "github.com/prebid/prebid-server/v4/adapters/interactiveoffers" - "github.com/prebid/prebid-server/v4/adapters/invibes" - "github.com/prebid/prebid-server/v4/adapters/iqx" - "github.com/prebid/prebid-server/v4/adapters/iqzone" - "github.com/prebid/prebid-server/v4/adapters/ix" - "github.com/prebid/prebid-server/v4/adapters/jixie" - "github.com/prebid/prebid-server/v4/adapters/kargo" - "github.com/prebid/prebid-server/v4/adapters/kayzen" - "github.com/prebid/prebid-server/v4/adapters/kidoz" - "github.com/prebid/prebid-server/v4/adapters/kiviads" - "github.com/prebid/prebid-server/v4/adapters/kobler" - "github.com/prebid/prebid-server/v4/adapters/krushmedia" - "github.com/prebid/prebid-server/v4/adapters/kueezrtb" - "github.com/prebid/prebid-server/v4/adapters/lemmadigital" - "github.com/prebid/prebid-server/v4/adapters/limelightDigital" - lmkiviads "github.com/prebid/prebid-server/v4/adapters/lm_kiviads" - "github.com/prebid/prebid-server/v4/adapters/lockerdome" - "github.com/prebid/prebid-server/v4/adapters/logan" - "github.com/prebid/prebid-server/v4/adapters/logicad" - "github.com/prebid/prebid-server/v4/adapters/loopme" - "github.com/prebid/prebid-server/v4/adapters/loyal" - "github.com/prebid/prebid-server/v4/adapters/lunamedia" - "github.com/prebid/prebid-server/v4/adapters/mabidder" - "github.com/prebid/prebid-server/v4/adapters/madsense" - "github.com/prebid/prebid-server/v4/adapters/madvertise" - "github.com/prebid/prebid-server/v4/adapters/marsmedia" - "github.com/prebid/prebid-server/v4/adapters/mediago" - "github.com/prebid/prebid-server/v4/adapters/medianet" - "github.com/prebid/prebid-server/v4/adapters/mediasquare" - "github.com/prebid/prebid-server/v4/adapters/melozen" - "github.com/prebid/prebid-server/v4/adapters/metax" - "github.com/prebid/prebid-server/v4/adapters/mgid" - "github.com/prebid/prebid-server/v4/adapters/mgidX" - "github.com/prebid/prebid-server/v4/adapters/minutemedia" - "github.com/prebid/prebid-server/v4/adapters/missena" - "github.com/prebid/prebid-server/v4/adapters/mobfoxpb" - "github.com/prebid/prebid-server/v4/adapters/mobilefuse" - "github.com/prebid/prebid-server/v4/adapters/mobkoi" - "github.com/prebid/prebid-server/v4/adapters/motorik" - "github.com/prebid/prebid-server/v4/adapters/msft" - "github.com/prebid/prebid-server/v4/adapters/nativery" - "github.com/prebid/prebid-server/v4/adapters/nativo" - "github.com/prebid/prebid-server/v4/adapters/nextmillennium" - "github.com/prebid/prebid-server/v4/adapters/nexx360" - "github.com/prebid/prebid-server/v4/adapters/nobid" - "github.com/prebid/prebid-server/v4/adapters/ogury" - "github.com/prebid/prebid-server/v4/adapters/oms" - "github.com/prebid/prebid-server/v4/adapters/onetag" - "github.com/prebid/prebid-server/v4/adapters/openweb" - "github.com/prebid/prebid-server/v4/adapters/openx" - "github.com/prebid/prebid-server/v4/adapters/operaads" - "github.com/prebid/prebid-server/v4/adapters/optidigital" - "github.com/prebid/prebid-server/v4/adapters/oraki" - "github.com/prebid/prebid-server/v4/adapters/orbidder" - "github.com/prebid/prebid-server/v4/adapters/outbrain" - "github.com/prebid/prebid-server/v4/adapters/ownadx" - "github.com/prebid/prebid-server/v4/adapters/pangle" - "github.com/prebid/prebid-server/v4/adapters/pgamssp" - "github.com/prebid/prebid-server/v4/adapters/pixfuture" - "github.com/prebid/prebid-server/v4/adapters/playdigo" - "github.com/prebid/prebid-server/v4/adapters/proxistore" - "github.com/prebid/prebid-server/v4/adapters/pubmatic" - "github.com/prebid/prebid-server/v4/adapters/pubnative" - "github.com/prebid/prebid-server/v4/adapters/pubrise" - "github.com/prebid/prebid-server/v4/adapters/pulsepoint" - "github.com/prebid/prebid-server/v4/adapters/pwbid" - "github.com/prebid/prebid-server/v4/adapters/qt" - "github.com/prebid/prebid-server/v4/adapters/readpeak" - "github.com/prebid/prebid-server/v4/adapters/rediads" - "github.com/prebid/prebid-server/v4/adapters/relevantdigital" - "github.com/prebid/prebid-server/v4/adapters/resetdigital" - "github.com/prebid/prebid-server/v4/adapters/revcontent" - "github.com/prebid/prebid-server/v4/adapters/richaudience" - "github.com/prebid/prebid-server/v4/adapters/rise" - "github.com/prebid/prebid-server/v4/adapters/roulax" - "github.com/prebid/prebid-server/v4/adapters/rtbhouse" - "github.com/prebid/prebid-server/v4/adapters/rtbstack" - "github.com/prebid/prebid-server/v4/adapters/rubicon" - salunamedia "github.com/prebid/prebid-server/v4/adapters/sa_lunamedia" - "github.com/prebid/prebid-server/v4/adapters/scalibur" - "github.com/prebid/prebid-server/v4/adapters/seedingAlliance" - "github.com/prebid/prebid-server/v4/adapters/seedtag" - "github.com/prebid/prebid-server/v4/adapters/sharethrough" - "github.com/prebid/prebid-server/v4/adapters/showheroes" - "github.com/prebid/prebid-server/v4/adapters/silvermob" - "github.com/prebid/prebid-server/v4/adapters/silverpush" - "github.com/prebid/prebid-server/v4/adapters/smaato" - "github.com/prebid/prebid-server/v4/adapters/smartadserver" - "github.com/prebid/prebid-server/v4/adapters/smarthub" - "github.com/prebid/prebid-server/v4/adapters/smartrtb" - "github.com/prebid/prebid-server/v4/adapters/smartx" - "github.com/prebid/prebid-server/v4/adapters/smartyads" - "github.com/prebid/prebid-server/v4/adapters/smilewanted" - "github.com/prebid/prebid-server/v4/adapters/smoot" - "github.com/prebid/prebid-server/v4/adapters/smrtconnect" - "github.com/prebid/prebid-server/v4/adapters/sonobi" - "github.com/prebid/prebid-server/v4/adapters/sovrn" - "github.com/prebid/prebid-server/v4/adapters/sovrnXsp" - "github.com/prebid/prebid-server/v4/adapters/sparteo" - "github.com/prebid/prebid-server/v4/adapters/sspBC" - "github.com/prebid/prebid-server/v4/adapters/stackadapt" - "github.com/prebid/prebid-server/v4/adapters/startio" - "github.com/prebid/prebid-server/v4/adapters/stroeerCore" - "github.com/prebid/prebid-server/v4/adapters/synapseHX" - "github.com/prebid/prebid-server/v4/adapters/taboola" - "github.com/prebid/prebid-server/v4/adapters/tadvertising_blis" - "github.com/prebid/prebid-server/v4/adapters/tappx" - "github.com/prebid/prebid-server/v4/adapters/targetVideo" - "github.com/prebid/prebid-server/v4/adapters/teads" - "github.com/prebid/prebid-server/v4/adapters/teal" - "github.com/prebid/prebid-server/v4/adapters/telaria" - "github.com/prebid/prebid-server/v4/adapters/teqblaze" - "github.com/prebid/prebid-server/v4/adapters/theadx" - "github.com/prebid/prebid-server/v4/adapters/thetradedesk" - "github.com/prebid/prebid-server/v4/adapters/tpmn" - "github.com/prebid/prebid-server/v4/adapters/tradplus" - "github.com/prebid/prebid-server/v4/adapters/trafficgate" - "github.com/prebid/prebid-server/v4/adapters/triplelift" - "github.com/prebid/prebid-server/v4/adapters/triplelift_native" - "github.com/prebid/prebid-server/v4/adapters/trustedstack" - "github.com/prebid/prebid-server/v4/adapters/trustx" - "github.com/prebid/prebid-server/v4/adapters/ucfunnel" - "github.com/prebid/prebid-server/v4/adapters/undertone" - "github.com/prebid/prebid-server/v4/adapters/unicorn" - "github.com/prebid/prebid-server/v4/adapters/unruly" - "github.com/prebid/prebid-server/v4/adapters/vidazoo" - "github.com/prebid/prebid-server/v4/adapters/videobyte" - "github.com/prebid/prebid-server/v4/adapters/videoheroes" - "github.com/prebid/prebid-server/v4/adapters/vidoomy" - "github.com/prebid/prebid-server/v4/adapters/visiblemeasures" - "github.com/prebid/prebid-server/v4/adapters/visx" - "github.com/prebid/prebid-server/v4/adapters/vox" - "github.com/prebid/prebid-server/v4/adapters/vrtcal" - "github.com/prebid/prebid-server/v4/adapters/vungle" - "github.com/prebid/prebid-server/v4/adapters/xeworks" - "github.com/prebid/prebid-server/v4/adapters/yahooAds" - "github.com/prebid/prebid-server/v4/adapters/yandex" - "github.com/prebid/prebid-server/v4/adapters/yeahmobi" - "github.com/prebid/prebid-server/v4/adapters/yieldlab" - "github.com/prebid/prebid-server/v4/adapters/yieldmo" - "github.com/prebid/prebid-server/v4/adapters/yieldone" - "github.com/prebid/prebid-server/v4/adapters/zentotem" - "github.com/prebid/prebid-server/v4/adapters/zeroclickfraud" - "github.com/prebid/prebid-server/v4/adapters/zeta_global_ssp" - "github.com/prebid/prebid-server/v4/adapters/zmaticoo" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + ttx "github.com/prebid/prebid-server/v3/adapters/33across" + "github.com/prebid/prebid-server/v3/adapters/aax" + "github.com/prebid/prebid-server/v3/adapters/aceex" + "github.com/prebid/prebid-server/v3/adapters/acuityads" + "github.com/prebid/prebid-server/v3/adapters/adagio" + "github.com/prebid/prebid-server/v3/adapters/adelement" + "github.com/prebid/prebid-server/v3/adapters/adf" + "github.com/prebid/prebid-server/v3/adapters/adgeneration" + "github.com/prebid/prebid-server/v3/adapters/adhese" + "github.com/prebid/prebid-server/v3/adapters/adkernel" + "github.com/prebid/prebid-server/v3/adapters/adkernelAdn" + "github.com/prebid/prebid-server/v3/adapters/adman" + "github.com/prebid/prebid-server/v3/adapters/admatic" + "github.com/prebid/prebid-server/v3/adapters/admixer" + "github.com/prebid/prebid-server/v3/adapters/adnuntius" + "github.com/prebid/prebid-server/v3/adapters/adocean" + "github.com/prebid/prebid-server/v3/adapters/adoppler" + "github.com/prebid/prebid-server/v3/adapters/adot" + "github.com/prebid/prebid-server/v3/adapters/adpone" + "github.com/prebid/prebid-server/v3/adapters/adprime" + "github.com/prebid/prebid-server/v3/adapters/adquery" + "github.com/prebid/prebid-server/v3/adapters/adrino" + "github.com/prebid/prebid-server/v3/adapters/ads_interactive" + "github.com/prebid/prebid-server/v3/adapters/adsinteractive" + "github.com/prebid/prebid-server/v3/adapters/adtarget" + "github.com/prebid/prebid-server/v3/adapters/adtelligent" + "github.com/prebid/prebid-server/v3/adapters/adtonos" + "github.com/prebid/prebid-server/v3/adapters/adtrgtme" + "github.com/prebid/prebid-server/v3/adapters/aduptech" + "github.com/prebid/prebid-server/v3/adapters/advangelists" + "github.com/prebid/prebid-server/v3/adapters/adverxo" + "github.com/prebid/prebid-server/v3/adapters/adview" + "github.com/prebid/prebid-server/v3/adapters/adxcg" + "github.com/prebid/prebid-server/v3/adapters/adyoulike" + "github.com/prebid/prebid-server/v3/adapters/afront" + "github.com/prebid/prebid-server/v3/adapters/aidem" + "github.com/prebid/prebid-server/v3/adapters/aja" + "github.com/prebid/prebid-server/v3/adapters/akcelo" + "github.com/prebid/prebid-server/v3/adapters/algorix" + "github.com/prebid/prebid-server/v3/adapters/alkimi" + "github.com/prebid/prebid-server/v3/adapters/amx" + "github.com/prebid/prebid-server/v3/adapters/apacdex" + "github.com/prebid/prebid-server/v3/adapters/appnexus" + "github.com/prebid/prebid-server/v3/adapters/appush" + "github.com/prebid/prebid-server/v3/adapters/aso" + "github.com/prebid/prebid-server/v3/adapters/audienceNetwork" + "github.com/prebid/prebid-server/v3/adapters/automatad" + "github.com/prebid/prebid-server/v3/adapters/avocet" + "github.com/prebid/prebid-server/v3/adapters/axis" + "github.com/prebid/prebid-server/v3/adapters/axonix" + "github.com/prebid/prebid-server/v3/adapters/beachfront" + "github.com/prebid/prebid-server/v3/adapters/beintoo" + "github.com/prebid/prebid-server/v3/adapters/bematterfull" + "github.com/prebid/prebid-server/v3/adapters/between" + "github.com/prebid/prebid-server/v3/adapters/beyondmedia" + "github.com/prebid/prebid-server/v3/adapters/bidmachine" + "github.com/prebid/prebid-server/v3/adapters/bidmatic" + "github.com/prebid/prebid-server/v3/adapters/bidmyadz" + "github.com/prebid/prebid-server/v3/adapters/bidscube" + "github.com/prebid/prebid-server/v3/adapters/bidstack" + "github.com/prebid/prebid-server/v3/adapters/bidtheatre" + "github.com/prebid/prebid-server/v3/adapters/bigoad" + "github.com/prebid/prebid-server/v3/adapters/blasto" + "github.com/prebid/prebid-server/v3/adapters/bliink" + "github.com/prebid/prebid-server/v3/adapters/blis" + "github.com/prebid/prebid-server/v3/adapters/blue" + "github.com/prebid/prebid-server/v3/adapters/bluesea" + "github.com/prebid/prebid-server/v3/adapters/bmtm" + "github.com/prebid/prebid-server/v3/adapters/boldwin" + "github.com/prebid/prebid-server/v3/adapters/boldwin_rapid" + "github.com/prebid/prebid-server/v3/adapters/brave" + "github.com/prebid/prebid-server/v3/adapters/bwx" + cadentaperturemx "github.com/prebid/prebid-server/v3/adapters/cadent_aperture_mx" + "github.com/prebid/prebid-server/v3/adapters/ccx" + "github.com/prebid/prebid-server/v3/adapters/clydo" + "github.com/prebid/prebid-server/v3/adapters/cointraffic" + "github.com/prebid/prebid-server/v3/adapters/coinzilla" + "github.com/prebid/prebid-server/v3/adapters/colossus" + "github.com/prebid/prebid-server/v3/adapters/compass" + "github.com/prebid/prebid-server/v3/adapters/concert" + "github.com/prebid/prebid-server/v3/adapters/connatix" + "github.com/prebid/prebid-server/v3/adapters/connectad" + "github.com/prebid/prebid-server/v3/adapters/consumable" + "github.com/prebid/prebid-server/v3/adapters/contxtful" + "github.com/prebid/prebid-server/v3/adapters/conversant" + "github.com/prebid/prebid-server/v3/adapters/copper6ssp" + "github.com/prebid/prebid-server/v3/adapters/cpmstar" + "github.com/prebid/prebid-server/v3/adapters/criteo" + "github.com/prebid/prebid-server/v3/adapters/cwire" + "github.com/prebid/prebid-server/v3/adapters/datablocks" + "github.com/prebid/prebid-server/v3/adapters/decenterads" + "github.com/prebid/prebid-server/v3/adapters/deepintent" + "github.com/prebid/prebid-server/v3/adapters/definemedia" + "github.com/prebid/prebid-server/v3/adapters/dianomi" + "github.com/prebid/prebid-server/v3/adapters/displayio" + "github.com/prebid/prebid-server/v3/adapters/dmx" + "github.com/prebid/prebid-server/v3/adapters/driftpixel" + "github.com/prebid/prebid-server/v3/adapters/dxkulture" + evolution "github.com/prebid/prebid-server/v3/adapters/e_volution" + "github.com/prebid/prebid-server/v3/adapters/edge226" + "github.com/prebid/prebid-server/v3/adapters/emtv" + "github.com/prebid/prebid-server/v3/adapters/eplanning" + "github.com/prebid/prebid-server/v3/adapters/epom" + "github.com/prebid/prebid-server/v3/adapters/escalax" + "github.com/prebid/prebid-server/v3/adapters/exco" + "github.com/prebid/prebid-server/v3/adapters/feedad" + "github.com/prebid/prebid-server/v3/adapters/flatads" + "github.com/prebid/prebid-server/v3/adapters/flipp" + "github.com/prebid/prebid-server/v3/adapters/freewheelssp" + "github.com/prebid/prebid-server/v3/adapters/frvradn" + "github.com/prebid/prebid-server/v3/adapters/fwssp" + "github.com/prebid/prebid-server/v3/adapters/gamma" + "github.com/prebid/prebid-server/v3/adapters/gamoshi" + "github.com/prebid/prebid-server/v3/adapters/globalsun" + "github.com/prebid/prebid-server/v3/adapters/goldbach" + "github.com/prebid/prebid-server/v3/adapters/gothamads" + "github.com/prebid/prebid-server/v3/adapters/grid" + "github.com/prebid/prebid-server/v3/adapters/gumgum" + "github.com/prebid/prebid-server/v3/adapters/huaweiads" + "github.com/prebid/prebid-server/v3/adapters/imds" + "github.com/prebid/prebid-server/v3/adapters/impactify" + "github.com/prebid/prebid-server/v3/adapters/improvedigital" + "github.com/prebid/prebid-server/v3/adapters/infytv" + "github.com/prebid/prebid-server/v3/adapters/inmobi" + "github.com/prebid/prebid-server/v3/adapters/insticator" + "github.com/prebid/prebid-server/v3/adapters/interactiveoffers" + "github.com/prebid/prebid-server/v3/adapters/intertech" + "github.com/prebid/prebid-server/v3/adapters/invibes" + "github.com/prebid/prebid-server/v3/adapters/iqx" + "github.com/prebid/prebid-server/v3/adapters/iqzone" + "github.com/prebid/prebid-server/v3/adapters/ix" + "github.com/prebid/prebid-server/v3/adapters/jixie" + "github.com/prebid/prebid-server/v3/adapters/kargo" + "github.com/prebid/prebid-server/v3/adapters/kayzen" + "github.com/prebid/prebid-server/v3/adapters/kidoz" + "github.com/prebid/prebid-server/v3/adapters/kiviads" + "github.com/prebid/prebid-server/v3/adapters/kobler" + "github.com/prebid/prebid-server/v3/adapters/krushmedia" + "github.com/prebid/prebid-server/v3/adapters/kueezrtb" + "github.com/prebid/prebid-server/v3/adapters/lemmadigital" + "github.com/prebid/prebid-server/v3/adapters/limelightDigital" + lmkiviads "github.com/prebid/prebid-server/v3/adapters/lm_kiviads" + "github.com/prebid/prebid-server/v3/adapters/lockerdome" + "github.com/prebid/prebid-server/v3/adapters/logan" + "github.com/prebid/prebid-server/v3/adapters/logicad" + "github.com/prebid/prebid-server/v3/adapters/loopme" + "github.com/prebid/prebid-server/v3/adapters/loyal" + "github.com/prebid/prebid-server/v3/adapters/lunamedia" + "github.com/prebid/prebid-server/v3/adapters/mabidder" + "github.com/prebid/prebid-server/v3/adapters/madsense" + "github.com/prebid/prebid-server/v3/adapters/madvertise" + "github.com/prebid/prebid-server/v3/adapters/marsmedia" + "github.com/prebid/prebid-server/v3/adapters/mediago" + "github.com/prebid/prebid-server/v3/adapters/medianet" + "github.com/prebid/prebid-server/v3/adapters/mediasquare" + "github.com/prebid/prebid-server/v3/adapters/melozen" + "github.com/prebid/prebid-server/v3/adapters/metax" + "github.com/prebid/prebid-server/v3/adapters/mgid" + "github.com/prebid/prebid-server/v3/adapters/mgidX" + "github.com/prebid/prebid-server/v3/adapters/minutemedia" + "github.com/prebid/prebid-server/v3/adapters/missena" + "github.com/prebid/prebid-server/v3/adapters/mobfoxpb" + "github.com/prebid/prebid-server/v3/adapters/mobilefuse" + "github.com/prebid/prebid-server/v3/adapters/mobkoi" + "github.com/prebid/prebid-server/v3/adapters/motorik" + "github.com/prebid/prebid-server/v3/adapters/msft" + "github.com/prebid/prebid-server/v3/adapters/nativery" + "github.com/prebid/prebid-server/v3/adapters/nativo" + "github.com/prebid/prebid-server/v3/adapters/nextmillennium" + "github.com/prebid/prebid-server/v3/adapters/nexx360" + "github.com/prebid/prebid-server/v3/adapters/nobid" + "github.com/prebid/prebid-server/v3/adapters/ogury" + "github.com/prebid/prebid-server/v3/adapters/oms" + "github.com/prebid/prebid-server/v3/adapters/onetag" + "github.com/prebid/prebid-server/v3/adapters/openweb" + "github.com/prebid/prebid-server/v3/adapters/openx" + "github.com/prebid/prebid-server/v3/adapters/operaads" + "github.com/prebid/prebid-server/v3/adapters/optidigital" + "github.com/prebid/prebid-server/v3/adapters/oraki" + "github.com/prebid/prebid-server/v3/adapters/orbidder" + "github.com/prebid/prebid-server/v3/adapters/outbrain" + "github.com/prebid/prebid-server/v3/adapters/ownadx" + "github.com/prebid/prebid-server/v3/adapters/pangle" + "github.com/prebid/prebid-server/v3/adapters/pgamssp" + "github.com/prebid/prebid-server/v3/adapters/playdigo" + "github.com/prebid/prebid-server/v3/adapters/pubmatic" + "github.com/prebid/prebid-server/v3/adapters/pubnative" + "github.com/prebid/prebid-server/v3/adapters/pubrise" + "github.com/prebid/prebid-server/v3/adapters/pulsepoint" + "github.com/prebid/prebid-server/v3/adapters/pwbid" + "github.com/prebid/prebid-server/v3/adapters/qt" + "github.com/prebid/prebid-server/v3/adapters/readpeak" + "github.com/prebid/prebid-server/v3/adapters/rediads" + "github.com/prebid/prebid-server/v3/adapters/relevantdigital" + "github.com/prebid/prebid-server/v3/adapters/resetdigital" + "github.com/prebid/prebid-server/v3/adapters/revcontent" + "github.com/prebid/prebid-server/v3/adapters/richaudience" + "github.com/prebid/prebid-server/v3/adapters/rise" + "github.com/prebid/prebid-server/v3/adapters/roulax" + "github.com/prebid/prebid-server/v3/adapters/rtbhouse" + "github.com/prebid/prebid-server/v3/adapters/rubicon" + salunamedia "github.com/prebid/prebid-server/v3/adapters/sa_lunamedia" + "github.com/prebid/prebid-server/v3/adapters/screencore" + "github.com/prebid/prebid-server/v3/adapters/seedingAlliance" + "github.com/prebid/prebid-server/v3/adapters/seedtag" + "github.com/prebid/prebid-server/v3/adapters/sharethrough" + "github.com/prebid/prebid-server/v3/adapters/showheroes" + "github.com/prebid/prebid-server/v3/adapters/silvermob" + "github.com/prebid/prebid-server/v3/adapters/silverpush" + "github.com/prebid/prebid-server/v3/adapters/smaato" + "github.com/prebid/prebid-server/v3/adapters/smartadserver" + "github.com/prebid/prebid-server/v3/adapters/smarthub" + "github.com/prebid/prebid-server/v3/adapters/smartrtb" + "github.com/prebid/prebid-server/v3/adapters/smartx" + "github.com/prebid/prebid-server/v3/adapters/smartyads" + "github.com/prebid/prebid-server/v3/adapters/smilewanted" + "github.com/prebid/prebid-server/v3/adapters/smoot" + "github.com/prebid/prebid-server/v3/adapters/smrtconnect" + "github.com/prebid/prebid-server/v3/adapters/sonobi" + "github.com/prebid/prebid-server/v3/adapters/sovrn" + "github.com/prebid/prebid-server/v3/adapters/sovrnXsp" + "github.com/prebid/prebid-server/v3/adapters/sparteo" + "github.com/prebid/prebid-server/v3/adapters/sspBC" + "github.com/prebid/prebid-server/v3/adapters/startio" + "github.com/prebid/prebid-server/v3/adapters/stroeerCore" + "github.com/prebid/prebid-server/v3/adapters/taboola" + "github.com/prebid/prebid-server/v3/adapters/tappx" + "github.com/prebid/prebid-server/v3/adapters/teads" + "github.com/prebid/prebid-server/v3/adapters/telaria" + "github.com/prebid/prebid-server/v3/adapters/teqblaze" + "github.com/prebid/prebid-server/v3/adapters/theadx" + "github.com/prebid/prebid-server/v3/adapters/thetradedesk" + "github.com/prebid/prebid-server/v3/adapters/tpmn" + "github.com/prebid/prebid-server/v3/adapters/tradplus" + "github.com/prebid/prebid-server/v3/adapters/trafficgate" + "github.com/prebid/prebid-server/v3/adapters/triplelift" + "github.com/prebid/prebid-server/v3/adapters/triplelift_native" + "github.com/prebid/prebid-server/v3/adapters/trustedstack" + "github.com/prebid/prebid-server/v3/adapters/ucfunnel" + "github.com/prebid/prebid-server/v3/adapters/undertone" + "github.com/prebid/prebid-server/v3/adapters/unicorn" + "github.com/prebid/prebid-server/v3/adapters/unruly" + "github.com/prebid/prebid-server/v3/adapters/vidazoo" + "github.com/prebid/prebid-server/v3/adapters/videobyte" + "github.com/prebid/prebid-server/v3/adapters/videoheroes" + "github.com/prebid/prebid-server/v3/adapters/vidoomy" + "github.com/prebid/prebid-server/v3/adapters/visiblemeasures" + "github.com/prebid/prebid-server/v3/adapters/visx" + "github.com/prebid/prebid-server/v3/adapters/vox" + "github.com/prebid/prebid-server/v3/adapters/vrtcal" + "github.com/prebid/prebid-server/v3/adapters/vungle" + "github.com/prebid/prebid-server/v3/adapters/xeworks" + "github.com/prebid/prebid-server/v3/adapters/yahooAds" + "github.com/prebid/prebid-server/v3/adapters/yandex" + "github.com/prebid/prebid-server/v3/adapters/yeahmobi" + "github.com/prebid/prebid-server/v3/adapters/yieldlab" + "github.com/prebid/prebid-server/v3/adapters/yieldmo" + "github.com/prebid/prebid-server/v3/adapters/yieldone" + "github.com/prebid/prebid-server/v3/adapters/zentotem" + "github.com/prebid/prebid-server/v3/adapters/zeroclickfraud" + "github.com/prebid/prebid-server/v3/adapters/zeta_global_ssp" + "github.com/prebid/prebid-server/v3/adapters/zmaticoo" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Adapter registration is kept in this separate file for ease of use and to aid @@ -295,11 +287,15 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAdmatic: admatic.Builder, openrtb_ext.BidderAdmixer: admixer.Builder, openrtb_ext.BidderAdnuntius: adnuntius.Builder, + openrtb_ext.BidderAdOcean: adocean.Builder, + openrtb_ext.BidderAdoppler: adoppler.Builder, openrtb_ext.BidderAdot: adot.Builder, openrtb_ext.BidderAdpone: adpone.Builder, openrtb_ext.BidderAdprime: adprime.Builder, openrtb_ext.BidderAdquery: adquery.Builder, openrtb_ext.BidderAdrino: adrino.Builder, + openrtb_ext.BidderAdsInteractive: ads_interactive.Builder, + openrtb_ext.BidderAdsinteractive: adsinteractive.Builder, openrtb_ext.BidderAdtarget: adtarget.Builder, openrtb_ext.BidderAdtrgtme: adtrgtme.Builder, openrtb_ext.BidderAdtelligent: adtelligent.Builder, @@ -316,7 +312,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAkcelo: akcelo.Builder, openrtb_ext.BidderAlgorix: algorix.Builder, openrtb_ext.BidderAlkimi: alkimi.Builder, - openrtb_ext.BidderAllianceGravity: alliance_gravity.Builder, openrtb_ext.BidderAMX: amx.Builder, openrtb_ext.BidderApacdex: apacdex.Builder, openrtb_ext.BidderAppnexus: appnexus.Builder, @@ -330,7 +325,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderBeachfront: beachfront.Builder, openrtb_ext.BidderBeintoo: beintoo.Builder, openrtb_ext.BidderBematterfull: bematterfull.Builder, - openrtb_ext.BidderBeop: beop.Builder, openrtb_ext.BidderBetween: between.Builder, openrtb_ext.BidderBeyondMedia: beyondmedia.Builder, openrtb_ext.BidderBidmachine: bidmachine.Builder, @@ -375,17 +369,15 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderDisplayio: displayio.Builder, openrtb_ext.BidderEdge226: edge226.Builder, openrtb_ext.BidderDmx: dmx.Builder, + openrtb_ext.BidderDXKulture: dxkulture.Builder, openrtb_ext.BidderDriftPixel: driftpixel.Builder, - openrtb_ext.BidderElementalTV: elementaltv.Builder, openrtb_ext.BidderEmtv: emtv.Builder, openrtb_ext.BidderEmxDigital: cadentaperturemx.Builder, openrtb_ext.BidderEPlanning: eplanning.Builder, openrtb_ext.BidderEpom: epom.Builder, openrtb_ext.BidderEscalax: escalax.Builder, - openrtb_ext.BidderEskimi: eskimi.Builder, openrtb_ext.BidderExco: exco.Builder, openrtb_ext.BidderEVolution: evolution.Builder, - openrtb_ext.BidderEzoic: ezoic.Builder, openrtb_ext.BidderFeedAd: feedad.Builder, openrtb_ext.BidderFlatads: flatads.Builder, openrtb_ext.BidderFlipp: flipp.Builder, @@ -396,6 +388,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderGamoshi: gamoshi.Builder, openrtb_ext.BidderGlobalsun: globalsun.Builder, openrtb_ext.BidderGoldbach: goldbach.Builder, + openrtb_ext.BidderGothamads: gothamads.Builder, openrtb_ext.BidderGrid: grid.Builder, openrtb_ext.BidderGumGum: gumgum.Builder, openrtb_ext.BidderHuaweiAds: huaweiads.Builder, @@ -405,8 +398,8 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderInfyTV: infytv.Builder, openrtb_ext.BidderInMobi: inmobi.Builder, openrtb_ext.BidderInsticator: insticator.Builder, - openrtb_ext.BidderIntenze: intenze.Builder, openrtb_ext.BidderInteractiveoffers: interactiveoffers.Builder, + openrtb_ext.BidderIntertech: intertech.Builder, openrtb_ext.BidderInvibes: invibes.Builder, openrtb_ext.BidderIQX: iqx.Builder, openrtb_ext.BidderIQZone: iqzone.Builder, @@ -466,9 +459,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderOwnAdx: ownadx.Builder, openrtb_ext.BidderPangle: pangle.Builder, openrtb_ext.BidderPGAMSsp: pgamssp.Builder, - openrtb_ext.BidderPixfuture: pixfuture.Builder, openrtb_ext.BidderPlaydigo: playdigo.Builder, - openrtb_ext.BidderProxistore: proxistore.Builder, openrtb_ext.BidderPubmatic: pubmatic.Builder, openrtb_ext.BidderPubnative: pubnative.Builder, openrtb_ext.BidderPubrise: pubrise.Builder, @@ -484,12 +475,11 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderRise: rise.Builder, openrtb_ext.BidderRoulax: roulax.Builder, openrtb_ext.BidderRTBHouse: rtbhouse.Builder, - openrtb_ext.BidderRTBStack: rtbstack.Builder, openrtb_ext.BidderRubicon: rubicon.Builder, openrtb_ext.BidderSeedingAlliance: seedingAlliance.Builder, openrtb_ext.BidderSeedtag: seedtag.Builder, openrtb_ext.BidderSaLunaMedia: salunamedia.Builder, - openrtb_ext.BidderScalibur: scalibur.Builder, + openrtb_ext.BidderScreencore: screencore.Builder, openrtb_ext.BidderSharethrough: sharethrough.Builder, openrtb_ext.BidderShowheroes: showheroes.Builder, openrtb_ext.BidderSilverMob: silvermob.Builder, @@ -508,16 +498,11 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderSovrnXsp: sovrnXsp.Builder, openrtb_ext.BidderSparteo: sparteo.Builder, openrtb_ext.BidderSspBC: sspBC.Builder, - openrtb_ext.BidderStackAdapt: stackadapt.Builder, openrtb_ext.BidderStartIO: startio.Builder, openrtb_ext.BidderStroeerCore: stroeerCore.Builder, - openrtb_ext.BidderSynapseHX: synapseHX.Builder, openrtb_ext.BidderTaboola: taboola.Builder, - openrtb_ext.BidderTAdvertisingBlis: tadvertising_blis.Builder, openrtb_ext.BidderTappx: tappx.Builder, - openrtb_ext.BidderTargetVideo: targetVideo.Builder, openrtb_ext.BidderTeads: teads.Builder, - openrtb_ext.BidderTeal: teal.Builder, openrtb_ext.BidderTelaria: telaria.Builder, openrtb_ext.BidderTeqBlaze: teqblaze.Builder, openrtb_ext.BidderTheadx: theadx.Builder, @@ -528,7 +513,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderTriplelift: triplelift.Builder, openrtb_ext.BidderTripleliftNative: triplelift_native.Builder, openrtb_ext.BidderTrustedstack: trustedstack.Builder, - openrtb_ext.BidderTrustX: trustx.Builder, openrtb_ext.BidderUcfunnel: ucfunnel.Builder, openrtb_ext.BidderUndertone: undertone.Builder, openrtb_ext.BidderUnicorn: unicorn.Builder, diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go index fbc87b08ae..fb47a9e458 100644 --- a/exchange/adapter_util.go +++ b/exchange/adapter_util.go @@ -5,10 +5,10 @@ import ( "net/http" "strings" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func BuildAdapters(client *http.Client, cfg *config.Configuration, infos config.BidderInfos, me metrics.MetricsEngine) (map[openrtb_ext.BidderName]AdaptedBidder, map[openrtb_ext.BidderName]struct{}, []error) { @@ -128,13 +128,6 @@ func GetDisabledBidderWarningMessages(infos config.BidderInfos) map[string]strin "nanointeractive": `Bidder "nanointeractive" is no longer available in Prebid Server. Please update your configuration.`, "bizzclick": `Bidder "bizzclick" is no longer available in Prebid Server. Please update your configuration. "bizzclick" has been renamed to "blasto".`, "liftoff": `Bidder "liftoff" is no longer available in Prebid Server. If you're looking to use the Vungle Exchange adapter, please rename it to "vungle" in your configuration.`, - "gothamads": `Bidder "gothamads" is no longer available in Prebid Server. Please rename it to "intenze" in your configuration.`, - "intertech": `Bidder "intertech" is no longer available in Prebid Server. Please update your configuration.`, - "adocean": `Bidder "adocean" is no longer available in Prebid Server. Please update your configuration.`, - "dxkulture": `Bidder "dxkulture" is no longer available in Prebid Server. Please update your configuration.`, - "mobupps": `Bidder "mobupps" is no longer available in Prebid Server. Please update your configuration.`, - "vimayx": `Bidder "vimayx" is no longer available in Prebid Server. Please update your configuration.`, - "adoppler": `Bidder "adoppler" is no longer available in Prebid Server. If you're looking to use the Adoppler adapter, please rename it to "elementaltv" in your configuration.`, } return mergeRemovedAndDisabledBidderWarningMessages(removed, infos) diff --git a/exchange/adapter_util_test.go b/exchange/adapter_util_test.go index cf06957d8c..9827758356 100644 --- a/exchange/adapter_util_test.go +++ b/exchange/adapter_util_test.go @@ -6,12 +6,12 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adapters/appnexus" - "github.com/prebid/prebid-server/v4/adapters/rubicon" - "github.com/prebid/prebid-server/v4/config" - metrics "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/appnexus" + "github.com/prebid/prebid-server/v3/adapters/rubicon" + "github.com/prebid/prebid-server/v3/config" + metrics "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/exchange/auction.go b/exchange/auction.go index 6a5cc8b280..ff1e28302c 100644 --- a/exchange/auction.go +++ b/exchange/auction.go @@ -12,11 +12,11 @@ import ( uuid "github.com/gofrs/uuid" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const ( diff --git a/exchange/auction_response.go b/exchange/auction_response.go index 592e89eaa6..67ab2dc4bb 100644 --- a/exchange/auction_response.go +++ b/exchange/auction_response.go @@ -2,7 +2,7 @@ package exchange import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // AuctionResponse contains OpenRTB Bid Response object and its extension (un-marshalled) object diff --git a/exchange/auction_test.go b/exchange/auction_test.go index 95ee6d3710..188e4d30ea 100644 --- a/exchange/auction_test.go +++ b/exchange/auction_test.go @@ -12,12 +12,12 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/exchange/bidder.go b/exchange/bidder.go index 87d3eaa719..264a03d46e 100644 --- a/exchange/bidder.go +++ b/exchange/bidder.go @@ -19,25 +19,25 @@ import ( "sync/atomic" "time" - "github.com/prebid/prebid-server/v4/bidadjustment" - "github.com/prebid/prebid-server/v4/config/util" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - loggerI "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/bidadjustment" + "github.com/prebid/prebid-server/v3/config/util" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + loggerI "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/version" "github.com/prebid/openrtb/v20/adcom1" nativeRequests "github.com/prebid/openrtb/v20/native1/request" nativeResponse "github.com/prebid/openrtb/v20/native1/response" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "golang.org/x/net/context/ctxhttp" ) @@ -616,7 +616,7 @@ func (bidder *BidderAdapter) doRequestImpl(ctx context.Context, req *adapters.Re httpResp, err := ctxhttp.Do(ctx, bidder.Client, httpReq) if err != nil { bidder.logHealthCheck(false) - if errors.Is(err, context.DeadlineExceeded) { + if err == context.DeadlineExceeded { err = &errortypes.Timeout{Message: err.Error()} var corebidder adapters.Bidder = bidder.Bidder // The bidder adapter normally stores an info-aware bidder (a bidder wrapper) @@ -631,6 +631,7 @@ func (bidder *BidderAdapter) doRequestImpl(ctx context.Context, req *adapters.Re // a loop of trying to report timeouts to the timeout notifications. go bidder.doTimeoutNotification(tb, req, logger) } + } return &httpCallInfo{ request: req, diff --git a/exchange/bidder_health_test.go b/exchange/bidder_health_test.go index 0bf46b5afc..1fa7748923 100644 --- a/exchange/bidder_health_test.go +++ b/exchange/bidder_health_test.go @@ -6,9 +6,9 @@ import ( "sync" "testing" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/exchange/bidder_test.go b/exchange/bidder_test.go index 3fd7f51300..eb061ee691 100644 --- a/exchange/bidder_test.go +++ b/exchange/bidder_test.go @@ -25,20 +25,20 @@ import ( nativeRequests "github.com/prebid/openrtb/v20/native1/request" nativeResponse "github.com/prebid/openrtb/v20/native1/response" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/version" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/exchange/bidder_validate_bids.go b/exchange/bidder_validate_bids.go index c4541a3a7d..5c5da548cb 100644 --- a/exchange/bidder_validate_bids.go +++ b/exchange/bidder_validate_bids.go @@ -7,12 +7,12 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/openrtb_ext" goCurrency "golang.org/x/text/currency" ) diff --git a/exchange/bidder_validate_bids_test.go b/exchange/bidder_validate_bids_test.go index 777c0a504f..b611ca8175 100644 --- a/exchange/bidder_validate_bids_test.go +++ b/exchange/bidder_validate_bids_test.go @@ -5,12 +5,12 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/exchange/entities/entities.go b/exchange/entities/entities.go index cb5b6c4cdf..808125f1c1 100644 --- a/exchange/entities/entities.go +++ b/exchange/entities/entities.go @@ -2,7 +2,7 @@ package entities import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // PbsOrtbSeatBid is a SeatBid returned by an AdaptedBidder. diff --git a/exchange/events.go b/exchange/events.go index 75334f6c5d..20150f90b9 100644 --- a/exchange/events.go +++ b/exchange/events.go @@ -3,14 +3,14 @@ package exchange import ( "time" - "github.com/prebid/prebid-server/v4/exchange/entities" + "github.com/prebid/prebid-server/v3/exchange/entities" jsonpatch "gopkg.in/evanphx/json-patch.v5" - "github.com/prebid/prebid-server/v4/analytics" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/endpoints/events" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/analytics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/endpoints/events" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // eventTracking has configuration fields needed for adding event tracking to an auction response diff --git a/exchange/events_test.go b/exchange/events_test.go index e8ac475150..3f35ef517d 100644 --- a/exchange/events_test.go +++ b/exchange/events_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/exchange/exchange.go b/exchange/exchange.go index 1452c04928..ef24e3fc9c 100644 --- a/exchange/exchange.go +++ b/exchange/exchange.go @@ -14,31 +14,31 @@ import ( "strings" "time" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/adservertargeting" - "github.com/prebid/prebid-server/v4/bidadjustment" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/dsa" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/firstpartydata" - "github.com/prebid/prebid-server/v4/floors" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/maputil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adservertargeting" + "github.com/prebid/prebid-server/v3/bidadjustment" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/dsa" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/firstpartydata" + "github.com/prebid/prebid-server/v3/floors" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/maputil" "github.com/buger/jsonparser" "github.com/gofrs/uuid" diff --git a/exchange/exchange_test.go b/exchange/exchange_test.go index 7770a2ec34..0a41e6ac0f 100644 --- a/exchange/exchange_test.go +++ b/exchange/exchange_test.go @@ -20,30 +20,30 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - metricsConf "github.com/prebid/prebid-server/v4/metrics/config" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - pbc "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/file_fetcher" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + metricsConf "github.com/prebid/prebid-server/v3/metrics/config" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + pbc "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/file_fetcher" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" jsonpatch "gopkg.in/evanphx/json-patch.v5" @@ -5996,7 +5996,7 @@ func (e mockUpdateBidRequestHook) HandleBidderRequestHook(_ context.Context, mct }, hookstage.MutationUpdate, "bidRequest", "site.domain", ) - mctx.ModuleContext.Set("some-ctx", "some-ctx") + mctx.ModuleContext = map[string]interface{}{"some-ctx": "some-ctx"} return hookstage.HookResult[hookstage.BidderRequestPayload]{ChangeSet: c, ModuleContext: mctx.ModuleContext}, nil } diff --git a/exchange/msp_bidders.go b/exchange/msp_bidders.go index 209d0bd35b..359d7615c3 100644 --- a/exchange/msp_bidders.go +++ b/exchange/msp_bidders.go @@ -2,11 +2,11 @@ package exchange import ( "github.com/golang/glog" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" - mspPlugin "github.com/prebid/prebid-server/v4/msp/plugin" + mspPlugin "github.com/prebid/prebid-server/v3/msp/plugin" ) type PluginBuilder interface { diff --git a/exchange/non_bid_reason.go b/exchange/non_bid_reason.go index 04f18d9c86..05d4ea3ee6 100644 --- a/exchange/non_bid_reason.go +++ b/exchange/non_bid_reason.go @@ -5,7 +5,7 @@ import ( "net" "syscall" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) // SeatNonBid list the reasons why bid was not resulted in positive bid diff --git a/exchange/non_bid_reason_test.go b/exchange/non_bid_reason_test.go index 5c30dde969..fb9c5e434f 100644 --- a/exchange/non_bid_reason_test.go +++ b/exchange/non_bid_reason_test.go @@ -6,7 +6,7 @@ import ( "syscall" "testing" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" "github.com/stretchr/testify/assert" ) diff --git a/exchange/price_granularity.go b/exchange/price_granularity.go index d471085dbb..b1d5073cd3 100644 --- a/exchange/price_granularity.go +++ b/exchange/price_granularity.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // GetPriceBucket is the externally facing function for computing CPM buckets diff --git a/exchange/price_granularity_test.go b/exchange/price_granularity_test.go index ca18d7ae78..277696b88d 100644 --- a/exchange/price_granularity_test.go +++ b/exchange/price_granularity_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/exchange/seat_non_bids.go b/exchange/seat_non_bids.go index d62dcb7f81..fd6fd1da3f 100644 --- a/exchange/seat_non_bids.go +++ b/exchange/seat_non_bids.go @@ -1,8 +1,8 @@ package exchange import ( - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type SeatNonBidBuilder map[string][]openrtb_ext.NonBid diff --git a/exchange/seat_non_bids_test.go b/exchange/seat_non_bids_test.go index a6ec99fb10..4a8f9e8f78 100644 --- a/exchange/seat_non_bids_test.go +++ b/exchange/seat_non_bids_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/exchange/targeting.go b/exchange/targeting.go index 468f42d457..d39c2cba0a 100644 --- a/exchange/targeting.go +++ b/exchange/targeting.go @@ -5,7 +5,7 @@ import ( "strconv" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const MaxKeyLength = 20 diff --git a/exchange/targeting_test.go b/exchange/targeting_test.go index a3625ab3ad..7fe26c4bad 100644 --- a/exchange/targeting_test.go +++ b/exchange/targeting_test.go @@ -8,16 +8,16 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" diff --git a/exchange/tmax_adjustments.go b/exchange/tmax_adjustments.go index 7fe69b3906..0d0fa31fdc 100644 --- a/exchange/tmax_adjustments.go +++ b/exchange/tmax_adjustments.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) type TmaxAdjustmentsPreprocessed struct { diff --git a/exchange/tmax_adjustments_test.go b/exchange/tmax_adjustments_test.go index 6a3041c0a5..7925233987 100644 --- a/exchange/tmax_adjustments_test.go +++ b/exchange/tmax_adjustments_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/exchange/utils.go b/exchange/utils.go index ce590dd057..7606cd4248 100644 --- a/exchange/utils.go +++ b/exchange/utils.go @@ -13,20 +13,20 @@ import ( gppConstants "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/firstpartydata" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/privacy/ccpa" - "github.com/prebid/prebid-server/v4/privacy/lmt" - "github.com/prebid/prebid-server/v4/schain" - "github.com/prebid/prebid-server/v4/stored_responses" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/firstpartydata" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/privacy/ccpa" + "github.com/prebid/prebid-server/v3/privacy/lmt" + "github.com/prebid/prebid-server/v3/schain" + "github.com/prebid/prebid-server/v3/stored_responses" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) var errInvalidRequestExt = errors.New("request.ext is invalid") @@ -157,7 +157,6 @@ func (rs *requestSplitter) cleanOpenRTBRequests(ctx context.Context, reqWrapperCopy := req.CloneAndClearImpWrappers() bidRequestCopy := *req.BidRequest reqWrapperCopy.BidRequest = &bidRequestCopy - reqWrapperCopy.Imp = imps coreBidder, isRequestAlias := resolveBidder(bidder, requestAliases) @@ -849,14 +848,11 @@ func removeUnpermissionedEids(reqWrapper *openrtb_ext.RequestWrapper, bidder str return nil } - // clone User before mutating EIDs to avoid corrupting the shared pointer - userCopy := *reqWrapper.User if len(eidsAllowed) == 0 { - userCopy.EIDs = nil + reqWrapper.User.EIDs = nil } else { - userCopy.EIDs = eidsAllowed + reqWrapper.User.EIDs = eidsAllowed } - reqWrapper.User = &userCopy return nil } diff --git a/exchange/utils_test.go b/exchange/utils_test.go index 71938e102f..3585c71be3 100644 --- a/exchange/utils_test.go +++ b/exchange/utils_test.go @@ -10,15 +10,15 @@ import ( gpplib "github.com/prebid/go-gpp" "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/firstpartydata" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/firstpartydata" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -3143,138 +3143,10 @@ func TestRemoveUnpermissionedEids(t *testing.T) { User: &openrtb2.User{EIDs: test.expectedUserEids}, } - originalUser := reqWrapper.User - resultErr := removeUnpermissionedEids(&reqWrapper, bidder) assert.NoError(t, resultErr, test.description) assert.Equal(t, expectedRequest, reqWrapper.BidRequest) - - eidsRemoved := len(test.userEids) > 0 && len(test.expectedUserEids) != len(test.userEids) - if eidsRemoved { - assert.NotSame(t, originalUser, reqWrapper.User, "User must be cloned when EIDs are removed to avoid corrupting shared state") - } - }) - } -} - -// TestCleanOpenRTBRequestsEidPermissionsRaceCondition is a regression test for issue #4792. -// -// cleanOpenRTBRequests splits a single request into per-bidder requests with a -// shallow struct copy (bidRequestCopy := *req.BidRequest). Because User is a -// pointer, every per-bidder copy used to share the same *openrtb2.User, and -// removeUnpermissionedEids mutated User.EIDs in place. The result was that a -// permitted bidder could intermittently lose its EID depending on Go map -// iteration order (the order bidders are processed in the impsByBidder loop). -// -// This test runs cleanOpenRTBRequests many times so the map iteration order -// varies, and asserts the permitted bidder ALWAYS retains the EID while -// non-permitted bidders ALWAYS have it stripped. -func TestCleanOpenRTBRequestsEidPermissionsRaceCondition(t *testing.T) { - const ( - permittedBidder = "bidderA" - eidSource = "source1" - iterations = 10 - ) - permittedBidders := []string{permittedBidder} - deniedBidders := []string{"bidderB", "bidderC"} - - buildAuctionRequest := func() AuctionRequest { - bidRequest := &openrtb2.BidRequest{ - ID: "race-cond", - User: &openrtb2.User{ - EIDs: []openrtb2.EID{ - {Source: eidSource, UIDs: []openrtb2.UID{{ID: "shared-id", AType: 1}}}, - }, - }, - Imp: []openrtb2.Imp{ - { - ID: "imp-1", - Banner: &openrtb2.Banner{Format: []openrtb2.Format{{W: 300, H: 250}}}, - Ext: json.RawMessage(`{"prebid":{"bidder":{` + - `"bidderA":{"placementId":"1"},` + - `"bidderB":{"placementId":"2"},` + - `"bidderC":{"placementId":"3"}}}}`), - }, - }, - } - - reqWrapper := &openrtb_ext.RequestWrapper{BidRequest: bidRequest} - reqExt, err := reqWrapper.GetRequestExt() - require.NoError(t, err) - reqExt.SetPrebid(&openrtb_ext.ExtRequestPrebid{ - Data: &openrtb_ext.ExtRequestPrebidData{ - EidPermissions: []openrtb_ext.ExtRequestPrebidDataEidPermission{ - {Source: eidSource, Bidders: []string{permittedBidder}}, - }, - }, }) - require.NoError(t, reqWrapper.RebuildRequest()) - - return AuctionRequest{ - BidRequestWrapper: reqWrapper, - UserSyncs: &emptyUsersync{}, - TCF2Config: gdpr.NewTCF2Config(config.TCF2{}, config.AccountGDPR{}), - } - } - - gdprPermissionsBuilder := fakePermissionsBuilder{ - permissions: &permissionsMock{ - allowAllBidders: true, - }, - }.Builder - - // Mark all bidders as ORTB 2.6 so their EIDs stay in user.eids instead of - // being down-converted into user.ext.eids, keeping the assertion simple. - bidderInfo := config.BidderInfos{ - permittedBidder: {OpenRTB: &config.OpenRTBInfo{Version: "2.6"}}, - } - for _, b := range deniedBidders { - bidderInfo[b] = config.BidderInfo{OpenRTB: &config.OpenRTBInfo{Version: "2.6"}} - } - - eidSources := func(user *openrtb2.User) []string { - if user == nil { - return nil - } - sources := make([]string, 0, len(user.EIDs)) - for _, eid := range user.EIDs { - sources = append(sources, eid.Source) - } - return sources - } - - for i := 0; i < iterations; i++ { - reqSplitter := &requestSplitter{ - bidderToSyncerKey: map[string]string{}, - me: &metrics.MetricsEngineMock{}, - privacyConfig: config.Privacy{}, - gdprPermsBuilder: gdprPermissionsBuilder, - hostSChainNode: nil, - bidderInfo: bidderInfo, - } - - bidderRequests, _, errs := reqSplitter.cleanOpenRTBRequests(context.Background(), buildAuctionRequest(), nil, map[string]float64{}) - require.Empty(t, errs, "iteration %d returned errors", i) - require.Len(t, bidderRequests, len(permittedBidders)+len(deniedBidders), "iteration %d produced unexpected number of bidder requests", i) - - seen := make(map[string]bool, len(bidderRequests)) - for _, br := range bidderRequests { - bidder := string(br.BidderName) - seen[bidder] = true - sources := eidSources(br.BidRequest.User) - if bidder == permittedBidder { - assert.Contains(t, sources, eidSource, - "iteration %d: permitted bidder %q must retain EID %q (sources=%v)", i, bidder, eidSource, sources) - } else { - assert.NotContains(t, sources, eidSource, - "iteration %d: non-permitted bidder %q must not receive EID %q (sources=%v)", i, bidder, eidSource, sources) - } - } - - assert.True(t, seen[permittedBidder], "iteration %d: permitted bidder %q missing from results", i, permittedBidder) - for _, b := range deniedBidders { - assert.True(t, seen[b], "iteration %d: bidder %q missing from results", i, b) - } } } diff --git a/experiment/adscert/SignerLogger.go b/experiment/adscert/SignerLogger.go index d2ba706e82..798e9bd2a1 100644 --- a/experiment/adscert/SignerLogger.go +++ b/experiment/adscert/SignerLogger.go @@ -3,7 +3,7 @@ package adscert import ( "fmt" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) type SignerLogger struct { diff --git a/experiment/adscert/inprocesssigner.go b/experiment/adscert/inprocesssigner.go index a8d0ac7244..ee5f4905d2 100644 --- a/experiment/adscert/inprocesssigner.go +++ b/experiment/adscert/inprocesssigner.go @@ -8,7 +8,7 @@ import ( "github.com/IABTechLab/adscert/pkg/adscert/discovery" "github.com/IABTechLab/adscert/pkg/adscert/signatory" "github.com/benbjohnson/clock" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) // inProcessSigner holds the signatory to add adsCert header to requests using in process go library diff --git a/experiment/adscert/remotesigner.go b/experiment/adscert/remotesigner.go index 0576d39976..c441bbebb6 100644 --- a/experiment/adscert/remotesigner.go +++ b/experiment/adscert/remotesigner.go @@ -6,7 +6,7 @@ import ( "github.com/IABTechLab/adscert/pkg/adscert/api" "github.com/IABTechLab/adscert/pkg/adscert/signatory" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/experiment/adscert/signer.go b/experiment/adscert/signer.go index 44003cd88c..f7ea9a4254 100644 --- a/experiment/adscert/signer.go +++ b/experiment/adscert/signer.go @@ -6,7 +6,7 @@ import ( "github.com/IABTechLab/adscert/pkg/adscert/api" "github.com/IABTechLab/adscert/pkg/adscert/logger" "github.com/IABTechLab/adscert/pkg/adscert/signatory" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) const SignHeader = "X-Ads-Cert-Auth" diff --git a/experiment/adscert/signer_test.go b/experiment/adscert/signer_test.go index 596922be34..3e08d0f6ba 100644 --- a/experiment/adscert/signer_test.go +++ b/experiment/adscert/signer_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/IABTechLab/adscert/pkg/adscert/api" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/firstpartydata/first_party_data.go b/firstpartydata/first_party_data.go index 44a451600a..c91a0689b8 100644 --- a/firstpartydata/first_party_data.go +++ b/firstpartydata/first_party_data.go @@ -9,10 +9,10 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" jsonpatch "gopkg.in/evanphx/json-patch.v5" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) var ( diff --git a/firstpartydata/first_party_data_test.go b/firstpartydata/first_party_data_test.go index ef88e79a59..3e4ff174ee 100644 --- a/firstpartydata/first_party_data_test.go +++ b/firstpartydata/first_party_data_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/floors/enforce.go b/floors/enforce.go index f55d80e07c..f72d2bb72c 100644 --- a/floors/enforce.go +++ b/floors/enforce.go @@ -6,10 +6,10 @@ import ( "math/rand" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Enforce does floors enforcement for bids from all bidders based on floors provided in request, account level floors config diff --git a/floors/enforce_test.go b/floors/enforce_test.go index c839188d7b..3da86e2d74 100644 --- a/floors/enforce_test.go +++ b/floors/enforce_test.go @@ -7,11 +7,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/floors/fetcher.go b/floors/fetcher.go index ac62931a39..c3d2a02f78 100644 --- a/floors/fetcher.go +++ b/floors/fetcher.go @@ -14,11 +14,11 @@ import ( "github.com/alitto/pond" validator "github.com/asaskevich/govalidator" "github.com/coocood/freecache" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/timeutil" ) var refetchCheckInterval = 300 diff --git a/floors/fetcher_test.go b/floors/fetcher_test.go index 41bff4e2ad..83876dc48b 100644 --- a/floors/fetcher_test.go +++ b/floors/fetcher_test.go @@ -12,12 +12,12 @@ import ( "github.com/alitto/pond" "github.com/coocood/freecache" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - metricsConf "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + metricsConf "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/timeutil" "github.com/stretchr/testify/assert" ) diff --git a/floors/floors.go b/floors/floors.go index 658bf756ec..5bcd2e5e62 100644 --- a/floors/floors.go +++ b/floors/floors.go @@ -6,10 +6,10 @@ import ( "math/rand" "strings" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type Price struct { diff --git a/floors/floors_test.go b/floors/floors_test.go index fecdad24c5..8d73a5de0a 100644 --- a/floors/floors_test.go +++ b/floors/floors_test.go @@ -7,11 +7,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/floors/rule.go b/floors/rule.go index 4e85328878..fb3130c609 100644 --- a/floors/rule.go +++ b/floors/rule.go @@ -8,10 +8,10 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const ( diff --git a/floors/rule_test.go b/floors/rule_test.go index d5d65f0e2f..dc46e05993 100644 --- a/floors/rule_test.go +++ b/floors/rule_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/floors/validate.go b/floors/validate.go index 74db164062..140df7def3 100644 --- a/floors/validate.go +++ b/floors/validate.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) var validSchemaDimensions = map[string]struct{}{ diff --git a/floors/validate_test.go b/floors/validate_test.go index 37418ea5eb..36c1c73e0b 100644 --- a/floors/validate_test.go +++ b/floors/validate_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/aggregated_config.go b/gdpr/aggregated_config.go index c0f40f4a6d..3df5fdc7ff 100644 --- a/gdpr/aggregated_config.go +++ b/gdpr/aggregated_config.go @@ -3,8 +3,8 @@ package gdpr import ( "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // TCF2ConfigReader is an interface to access TCF2 configurations diff --git a/gdpr/aggregated_config_test.go b/gdpr/aggregated_config_test.go index 44cd07efcf..f577772cb6 100644 --- a/gdpr/aggregated_config_test.go +++ b/gdpr/aggregated_config_test.go @@ -5,8 +5,8 @@ import ( "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/basic_enforcement_test.go b/gdpr/basic_enforcement_test.go index b4ed2aeb3d..7bb0076940 100644 --- a/gdpr/basic_enforcement_test.go +++ b/gdpr/basic_enforcement_test.go @@ -6,7 +6,7 @@ import ( "github.com/prebid/go-gdpr/consentconstants" "github.com/prebid/go-gdpr/vendorconsent" tcf2 "github.com/prebid/go-gdpr/vendorconsent/tcf2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/full_enforcement_test.go b/gdpr/full_enforcement_test.go index 10c8463f37..eed86bf238 100644 --- a/gdpr/full_enforcement_test.go +++ b/gdpr/full_enforcement_test.go @@ -8,8 +8,8 @@ import ( tcf2 "github.com/prebid/go-gdpr/vendorconsent/tcf2" "github.com/prebid/go-gdpr/vendorlist" "github.com/prebid/go-gdpr/vendorlist2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/gdpr.go b/gdpr/gdpr.go index 633741a752..26e04e0b95 100644 --- a/gdpr/gdpr.go +++ b/gdpr/gdpr.go @@ -3,9 +3,9 @@ package gdpr import ( "context" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type Permissions interface { @@ -35,16 +35,16 @@ type RequestInfo struct { } // NewPermissionsBuilder takes host config data used to configure the builder function it returns -func NewPermissionsBuilder(cfg config.GDPR, gvlVendorIDs map[openrtb_ext.BidderName]uint16, validGVLVendorIDs *LiveGVLVendorIDs, vendorListFetcher VendorListFetcher, me metrics.MetricsEngine) PermissionsBuilder { +func NewPermissionsBuilder(cfg config.GDPR, gvlVendorIDs map[openrtb_ext.BidderName]uint16, vendorListFetcher VendorListFetcher, me metrics.MetricsEngine) PermissionsBuilder { return func(tcf2Cfg TCF2ConfigReader, requestInfo RequestInfo) Permissions { purposeEnforcerBuilder := NewPurposeEnforcerBuilder(tcf2Cfg) - return NewPermissions(cfg, tcf2Cfg, gvlVendorIDs, validGVLVendorIDs, vendorListFetcher, purposeEnforcerBuilder, requestInfo, me) + return NewPermissions(cfg, tcf2Cfg, gvlVendorIDs, vendorListFetcher, purposeEnforcerBuilder, requestInfo, me) } } // NewPermissions gets a per-request Permissions object that can then be used to check GDPR permissions for a given bidder. -func NewPermissions(cfg config.GDPR, tcf2Config TCF2ConfigReader, vendorIDs map[openrtb_ext.BidderName]uint16, validGVLVendorIDs *LiveGVLVendorIDs, fetcher VendorListFetcher, purposeEnforcerBuilder PurposeEnforcerBuilder, requestInfo RequestInfo, metricsEngine metrics.MetricsEngine) Permissions { +func NewPermissions(cfg config.GDPR, tcf2Config TCF2ConfigReader, vendorIDs map[openrtb_ext.BidderName]uint16, fetcher VendorListFetcher, purposeEnforcerBuilder PurposeEnforcerBuilder, requestInfo RequestInfo, metricsEngine metrics.MetricsEngine) Permissions { if !cfg.Enabled { return &AlwaysAllow{} } @@ -55,7 +55,6 @@ func NewPermissions(cfg config.GDPR, tcf2Config TCF2ConfigReader, vendorIDs map[ hostVendorID: cfg.HostVendorID, nonStandardPublishers: cfg.NonStandardPublisherMap, cfg: tcf2Config, - validGVLVendorIDs: validGVLVendorIDs, vendorIDs: vendorIDs, publisherID: requestInfo.PublisherID, gdprSignal: SignalNormalize(requestInfo.GDPRSignal, cfg.DefaultValue), diff --git a/gdpr/gdpr_test.go b/gdpr/gdpr_test.go index 6670fc6849..6329dad858 100644 --- a/gdpr/gdpr_test.go +++ b/gdpr/gdpr_test.go @@ -6,9 +6,9 @@ import ( "github.com/prebid/go-gdpr/consentconstants" "github.com/prebid/go-gdpr/vendorlist" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -51,7 +51,7 @@ func TestNewPermissions(t *testing.T) { fakePurposeEnforcerBuilder := fakePurposeEnforcerBuilder{ purposeEnforcer: nil, }.Builder - perms := NewPermissions(config, &tcf2Config{}, vendorIDs, nil, vendorListFetcher, fakePurposeEnforcerBuilder, RequestInfo{}, &metrics.MetricsEngineMock{}) + perms := NewPermissions(config, &tcf2Config{}, vendorIDs, vendorListFetcher, fakePurposeEnforcerBuilder, RequestInfo{}, &metrics.MetricsEngineMock{}) assert.IsType(t, tt.wantType, perms, tt.description) } diff --git a/gdpr/gvl_vendor_ids.go b/gdpr/gvl_vendor_ids.go deleted file mode 100644 index bcec2db517..0000000000 --- a/gdpr/gvl_vendor_ids.go +++ /dev/null @@ -1,119 +0,0 @@ -package gdpr - -import ( - "context" - "encoding/json" - "io" - "net/http" - "sync/atomic" - "time" - - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/util/task" - "golang.org/x/net/context/ctxhttp" -) - -// LiveGVLVendorIDs provides thread-safe access to the set of vendor IDs present in the latest -// Global Vendor List. It uses atomic.Value so reads (on every request) are lock-free, while -// writes (periodic refresh) are safe without mutexes. -type LiveGVLVendorIDs struct { - ids atomic.Value // holds map[uint16]struct{} -} - -// NewLiveGVLVendorIDs creates a LiveGVLVendorIDs initialized with an empty set. -func NewLiveGVLVendorIDs() *LiveGVLVendorIDs { - l := &LiveGVLVendorIDs{} - l.ids.Store(make(map[uint16]struct{})) - return l -} - -// Contains returns true if the given vendor ID is in the current valid set. -// If the set is empty (e.g. the GVL fetch failed), all IDs are considered valid -// as a safe fallback. -func (l *LiveGVLVendorIDs) Contains(id uint16) bool { - m := l.ids.Load().(map[uint16]struct{}) - if len(m) == 0 { - return true - } - _, ok := m[id] - return ok -} - -// Update atomically replaces the valid vendor ID set. If newIDs is empty, the existing -// set is retained. -func (l *LiveGVLVendorIDs) Update(newIDs map[uint16]struct{}) { - if len(newIDs) > 0 { - l.ids.Store(newIDs) - } -} - -// NewGVLVendorIDTickerTask creates a TickerTask that fetches the latest GVL vendor IDs and -// updates the LiveGVLVendorIDs set. Calling Start on the returned task performs the initial -// fetch immediately and then schedules periodic refreshes at the given interval. -func NewGVLVendorIDTickerTask(interval time.Duration, client *http.Client, urlMaker func(uint16, uint16) string, live *LiveGVLVendorIDs, me metrics.MetricsEngine) *task.TickerTask { - return task.NewTickerTaskFromFunc(interval, func() error { - newIDs := FetchLatestGVLVendorIDs(context.Background(), client, urlMaker, me) - live.Update(newIDs) - return nil - }) -} - -// gvlVendorListContract is a lightweight contract for parsing only vendor IDs from GVL JSON -type gvlVendorListContract struct { - Vendors map[string]struct { - ID uint16 `json:"id"` - } `json:"vendors"` -} - -// FetchLatestGVLVendorIDs fetches the most recent Global Vendor List and returns a set of all -// vendor IDs present in it. The returned map has vendor IDs as keys and empty structs as values. -// If the fetch or parse fails, an empty map is returned. -func FetchLatestGVLVendorIDs(ctx context.Context, client *http.Client, urlMaker func(uint16, uint16) string, me metrics.MetricsEngine) map[uint16]struct{} { - vendorIDs := make(map[uint16]struct{}) - - // Fetch latest GVL for the latest spec version (listVersion 0 means latest) - url := urlMaker(latestSpecVersion, 0) - - req, err := http.NewRequest("GET", url, nil) - if err != nil { - logger.Errorf("Failed to build GET %s request for GVL vendor ID extraction: %v", url, err) - me.RecordLiveGVLFetch(false) - return vendorIDs - } - - resp, err := ctxhttp.Do(ctx, client, req) - if err != nil { - logger.Errorf("Error calling GET %s for GVL vendor ID extraction: %v", url, err) - me.RecordLiveGVLFetch(false) - return vendorIDs - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - logger.Errorf("GET %s returned %d for GVL vendor ID extraction", url, resp.StatusCode) - me.RecordLiveGVLFetch(false) - return vendorIDs - } - - respBody, err := io.ReadAll(resp.Body) - if err != nil { - logger.Errorf("Error reading response body from GET %s for GVL vendor ID extraction: %v", url, err) - me.RecordLiveGVLFetch(false) - return vendorIDs - } - - var contract gvlVendorListContract - if err := json.Unmarshal(respBody, &contract); err != nil { - logger.Errorf("GET %s returned malformed JSON for GVL vendor ID extraction: %v", url, err) - me.RecordLiveGVLFetch(false) - return vendorIDs - } - - for _, v := range contract.Vendors { - vendorIDs[v.ID] = struct{}{} - } - - me.RecordLiveGVLFetch(true) - return vendorIDs -} diff --git a/gdpr/gvl_vendor_ids_test.go b/gdpr/gvl_vendor_ids_test.go deleted file mode 100644 index 43010df578..0000000000 --- a/gdpr/gvl_vendor_ids_test.go +++ /dev/null @@ -1,169 +0,0 @@ -package gdpr - -import ( - "context" - "net/http" - "net/http/httptest" - "testing" - - "github.com/prebid/prebid-server/v4/metrics" - "github.com/stretchr/testify/assert" -) - -func TestFetchLatestGVLVendorIDs(t *testing.T) { - tests := []struct { - name string - settings serverSettings - expectedIDs map[uint16]struct{} - expectError bool - }{ - { - name: "fetch-with-multiple-vendors", - settings: serverSettings{ - vendorListLatestVersion: 1, - vendorLists: map[int]map[int]string{ - 3: { - 1: MarshalVendorList(vendorList{ - GVLSpecificationVersion: 3, - VendorListVersion: 1, - Vendors: map[string]*vendor{ - "10": {ID: 10}, - "20": {ID: 20}, - "100": {ID: 100}, - }, - }), - }, - }, - }, - expectedIDs: map[uint16]struct{}{ - 10: {}, - 20: {}, - 100: {}, - }, - }, - { - name: "fetch-with-no-vendors", - settings: serverSettings{ - vendorListLatestVersion: 1, - vendorLists: map[int]map[int]string{ - 3: { - 1: MarshalVendorList(vendorList{ - GVLSpecificationVersion: 3, - VendorListVersion: 1, - Vendors: map[string]*vendor{}, - }), - }, - }, - }, - expectedIDs: map[uint16]struct{}{}, - }, - { - name: "error-spec-v3-not-available", - settings: serverSettings{ - vendorListLatestVersion: 1, - vendorLists: map[int]map[int]string{ - 2: { - 1: MarshalVendorList(vendorList{ - GVLSpecificationVersion: 2, - VendorListVersion: 1, - Vendors: map[string]*vendor{"5": {ID: 5}}, - }), - }, - }, - }, - expectedIDs: map[uint16]struct{}{}, - expectError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(mockServer(tt.settings))) - defer server.Close() - - m := &metrics.MetricsEngineMock{} - if tt.expectError { - m.On("RecordLiveGVLFetch", false).Once() - } else { - m.On("RecordLiveGVLFetch", true).Once() - } - result := FetchLatestGVLVendorIDs(context.Background(), server.Client(), testURLMaker(server), m) - assert.Equal(t, tt.expectedIDs, result) - m.AssertExpectations(t) - }) - } -} - -func TestFetchLatestGVLVendorIDsServerError(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusInternalServerError) - })) - defer server.Close() - - m := &metrics.MetricsEngineMock{} - m.On("RecordLiveGVLFetch", false).Once() - result := FetchLatestGVLVendorIDs(context.Background(), server.Client(), testURLMaker(server), m) - assert.Empty(t, result) - m.AssertExpectations(t) -} - -func TestFetchLatestGVLVendorIDsMalformedJSON(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - w.Write([]byte("not valid json")) - })) - defer server.Close() - - m := &metrics.MetricsEngineMock{} - m.On("RecordLiveGVLFetch", false).Once() - result := FetchLatestGVLVendorIDs(context.Background(), server.Client(), testURLMaker(server), m) - assert.Empty(t, result) - m.AssertExpectations(t) -} - -func TestLiveGVLVendorIDsContains(t *testing.T) { - tests := []struct { - name string - ids map[uint16]struct{} - checkID uint16 - expected bool - }{ - { - name: "empty-set-returns-true-for-any-id", - ids: map[uint16]struct{}{}, - checkID: 42, - expected: true, - }, - { - name: "id-present-in-set", - ids: map[uint16]struct{}{10: {}, 20: {}}, - checkID: 10, - expected: true, - }, - { - name: "id-not-present-in-set", - ids: map[uint16]struct{}{10: {}, 20: {}}, - checkID: 30, - expected: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - live := NewLiveGVLVendorIDs() - live.Update(tt.ids) - assert.Equal(t, tt.expected, live.Contains(tt.checkID)) - }) - } -} - -func TestLiveGVLVendorIDsUpdateSkipsEmpty(t *testing.T) { - live := NewLiveGVLVendorIDs() - live.Update(map[uint16]struct{}{10: {}, 20: {}}) - - // Updating with empty should retain previous set - live.Update(map[uint16]struct{}{}) - assert.True(t, live.Contains(10)) - assert.True(t, live.Contains(20)) - assert.False(t, live.Contains(30)) -} diff --git a/gdpr/impl.go b/gdpr/impl.go index 03c0e234b3..24c5b3010e 100644 --- a/gdpr/impl.go +++ b/gdpr/impl.go @@ -6,8 +6,8 @@ import ( "github.com/prebid/go-gdpr/api" "github.com/prebid/go-gdpr/consentconstants" tcf2 "github.com/prebid/go-gdpr/vendorconsent/tcf2" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const noBidder openrtb_ext.BidderName = "" @@ -23,7 +23,6 @@ type permissionsImpl struct { metrics metrics.MetricsEngine nonStandardPublishers map[string]struct{} purposeEnforcerBuilder PurposeEnforcerBuilder - validGVLVendorIDs *LiveGVLVendorIDs vendorIDs map[openrtb_ext.BidderName]uint16 // request-specific aliasGVLIDs map[string]uint16 @@ -49,7 +48,7 @@ func (p *permissionsImpl) BidderSyncAllowed(ctx context.Context, bidder openrtb_ } id, ok := p.vendorIDs[bidder] - if ok && p.isValidVendorID(id) { + if ok { vendorExceptions := p.cfg.PurposeVendorExceptions(consentconstants.Purpose(1)) _, vendorException := vendorExceptions[string(bidder)] return p.allowSync(ctx, id, bidder, vendorException) @@ -108,34 +107,17 @@ func (p *permissionsImpl) defaultPermissions() AuctionPermissions { } // resolveVendorID gets the vendor ID for the specified bidder from either the alias GVL IDs -// provided in the request or from the bidder configs loaded at startup. If the resolved ID -// is not present in the latest Global Vendor List, it returns 0 and false. +// provided in the request or from the bidder configs loaded at startup func (p *permissionsImpl) resolveVendorID(bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName) (id uint16, ok bool) { if id, ok = p.aliasGVLIDs[string(bidder)]; ok { - if !p.isValidVendorID(id) { - return 0, false - } return id, ok } id, ok = p.vendorIDs[bidderCoreName] - if ok && !p.isValidVendorID(id) { - return 0, false - } return id, ok } -// isValidVendorID checks whether the given vendor ID exists in the latest Global Vendor List. -// If the valid set is nil (e.g. the GVL fetch failed), all IDs are considered valid -// as a safe fallback. -func (p *permissionsImpl) isValidVendorID(id uint16) bool { - if p.validGVLVendorIDs == nil { - return true - } - return p.validGVLVendorIDs.Contains(id) -} - // allowSync computes cookie sync activity legal basis for a given bidder using the enforcement // algorithms selected by the purpose enforcer builder func (p *permissionsImpl) allowSync(ctx context.Context, vendorID uint16, bidder openrtb_ext.BidderName, vendorException bool) (bool, error) { diff --git a/gdpr/impl_test.go b/gdpr/impl_test.go index ec62f73108..60a688fcc4 100644 --- a/gdpr/impl_test.go +++ b/gdpr/impl_test.go @@ -9,9 +9,9 @@ import ( "github.com/prebid/go-gdpr/consentconstants" "github.com/prebid/go-gdpr/vendorlist" "github.com/prebid/go-gdpr/vendorlist2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -1321,94 +1321,6 @@ func TestDefaultPermissions(t *testing.T) { } } -func TestIsValidVendorID(t *testing.T) { - vendor2AndPurpose1Consent := "CPGWbY_PGWbY_GYAAAENABCAAIAAAAAAAAAAACEAAAAA" - vendor2AndPurpose2Consent := "CPGWbY_PGWbY_GYAAAENABCAAEAAAAAAAAAAACEAAAAA" - vendorListData := MarshalVendorList(vendorList{ - VendorListVersion: 2, - Vendors: map[string]*vendor{ - "2": { - ID: 2, - Purposes: []int{1, 2}, - }, - }, - }) - - tcf2AggConfig := allPurposesEnabledTCF2Config() - - tests := []struct { - name string - validGVLVendorIDs *LiveGVLVendorIDs - consent string - expectedAllowSync bool - expectedAllowBidReq bool - expectedPassID bool - }{ - { - name: "nil-live-gvl-vendor-ids", - validGVLVendorIDs: nil, - consent: vendor2AndPurpose1Consent, - expectedAllowSync: true, - expectedAllowBidReq: false, - expectedPassID: false, - }, - { - name: "vendor-id-in-live-gvl", - validGVLVendorIDs: func() *LiveGVLVendorIDs { - l := NewLiveGVLVendorIDs() - l.Update(map[uint16]struct{}{2: {}}) - return l - }(), - consent: vendor2AndPurpose2Consent, - expectedAllowSync: false, - expectedAllowBidReq: true, - expectedPassID: true, - }, - { - name: "vendor-id-not-in-live-gvl", - validGVLVendorIDs: func() *LiveGVLVendorIDs { - l := NewLiveGVLVendorIDs() - l.Update(map[uint16]struct{}{99: {}}) - return l - }(), - consent: vendor2AndPurpose2Consent, - expectedAllowSync: false, - expectedAllowBidReq: false, - expectedPassID: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - perms := permissionsImpl{ - cfg: &tcf2AggConfig, - hostVendorID: 2, - vendorIDs: map[openrtb_ext.BidderName]uint16{ - openrtb_ext.BidderAppnexus: 2, - }, - fetchVendorList: listFetcher(map[uint16]map[uint16]vendorlist.VendorList{ - 2: { - 1: parseVendorListDataV2(t, vendorListData), - }, - }), - purposeEnforcerBuilder: NewPurposeEnforcerBuilder(&tcf2AggConfig), - nonStandardPublishers: map[string]struct{}{}, - gdprSignal: SignalYes, - consent: tt.consent, - validGVLVendorIDs: tt.validGVLVendorIDs, - } - - allowSync, err := perms.BidderSyncAllowed(context.Background(), openrtb_ext.BidderAppnexus) - assert.NoError(t, err) - assert.Equal(t, tt.expectedAllowSync, allowSync, "BidderSyncAllowed") - - auctionPerms := perms.AuctionActivitiesAllowed(context.Background(), openrtb_ext.BidderAppnexus, openrtb_ext.BidderAppnexus) - assert.Equal(t, tt.expectedAllowBidReq, auctionPerms.AllowBidRequest, "AllowBidRequest") - assert.Equal(t, tt.expectedPassID, auctionPerms.PassID, "PassID") - }) - } -} - func TestVendorListSelection(t *testing.T) { policyVersion3WithVendor2AndPurpose1Consent := "CPGWbY_PGWbY_GYAAAENABDAAIAAAAAAAAAAACEAAAAA" policyVersion4WithVendor2AndPurpose1Consent := "CPGWbY_PGWbY_GYAAAENABEAAIAAAAAAAAAAACEAAAAA" diff --git a/gdpr/purpose_config.go b/gdpr/purpose_config.go index 9838c873f1..020d0aaa06 100644 --- a/gdpr/purpose_config.go +++ b/gdpr/purpose_config.go @@ -2,7 +2,7 @@ package gdpr import ( "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) // purposeConfig represents all of the config info selected from the host and account configs for diff --git a/gdpr/purpose_config_test.go b/gdpr/purpose_config_test.go index 025019ea0b..61b7b9b2d6 100644 --- a/gdpr/purpose_config_test.go +++ b/gdpr/purpose_config_test.go @@ -3,7 +3,7 @@ package gdpr import ( "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/purpose_enforcer.go b/gdpr/purpose_enforcer.go index 28a0c6dcd1..5cc5d8e83d 100644 --- a/gdpr/purpose_enforcer.go +++ b/gdpr/purpose_enforcer.go @@ -4,8 +4,8 @@ import ( "github.com/prebid/go-gdpr/api" "github.com/prebid/go-gdpr/consentconstants" tcf2 "github.com/prebid/go-gdpr/vendorconsent/tcf2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // PurposeEnforcer represents the enforcement strategy for determining if legal basis is achieved for a purpose diff --git a/gdpr/purpose_enforcer_test.go b/gdpr/purpose_enforcer_test.go index a73f6b3ee8..756bb07d71 100644 --- a/gdpr/purpose_enforcer_test.go +++ b/gdpr/purpose_enforcer_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/signal.go b/gdpr/signal.go index b8bb49c27f..478985b64f 100644 --- a/gdpr/signal.go +++ b/gdpr/signal.go @@ -3,7 +3,7 @@ package gdpr import ( "strconv" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) type Signal int diff --git a/gdpr/utils.go b/gdpr/utils.go index a8efc30872..543b70a4b5 100644 --- a/gdpr/utils.go +++ b/gdpr/utils.go @@ -7,8 +7,8 @@ import ( gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" - "github.com/prebid/prebid-server/v4/openrtb_ext" - gppPolicy "github.com/prebid/prebid-server/v4/privacy/gpp" + "github.com/prebid/prebid-server/v3/openrtb_ext" + gppPolicy "github.com/prebid/prebid-server/v3/privacy/gpp" ) // GetGDPR will pull the gdpr flag from an openrtb request diff --git a/gdpr/utils_test.go b/gdpr/utils_test.go index 747b550db3..01fae95de3 100644 --- a/gdpr/utils_test.go +++ b/gdpr/utils_test.go @@ -6,8 +6,8 @@ import ( gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/gdpr/vendorlist-fetching.go b/gdpr/vendorlist-fetching.go index 4632c5d6b0..2a3be433ec 100644 --- a/gdpr/vendorlist-fetching.go +++ b/gdpr/vendorlist-fetching.go @@ -13,19 +13,15 @@ import ( "github.com/prebid/go-gdpr/api" "github.com/prebid/go-gdpr/vendorlist" "github.com/prebid/go-gdpr/vendorlist2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" "golang.org/x/net/context/ctxhttp" ) type saveVendors func(uint16, uint16, api.VendorList) type VendorListFetcher func(ctx context.Context, specVersion uint16, listVersion uint16, metricsEngine metrics.MetricsEngine) (vendorlist.VendorList, error) -// latestSpecVersion is the highest GVL specification version supported. Update this value when -// a new spec version is introduced by the IAB. -const latestSpecVersion = 3 - // This file provides the vendorlist-fetching function for Prebid Server. // // For more info, see https://github.com/prebid/prebid-server/issues/504 @@ -76,7 +72,7 @@ func preloadCache(ctx context.Context, client *http.Client, urlMaker func(uint16 firstListVersion: 2, // The GVL for TCF2 has no vendors defined in its first version. It's very unlikely to be used, so don't preload it. }, { - specVersion: latestSpecVersion, + specVersion: 3, firstListVersion: 1, }, } diff --git a/gdpr/vendorlist-fetching_test.go b/gdpr/vendorlist-fetching_test.go index 8a587bd7f2..4ba228244b 100644 --- a/gdpr/vendorlist-fetching_test.go +++ b/gdpr/vendorlist-fetching_test.go @@ -11,9 +11,9 @@ import ( "github.com/prebid/go-gdpr/api" "github.com/prebid/go-gdpr/consentconstants" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func TestFetcherDynamicLoadListExists(t *testing.T) { diff --git a/go.mod b/go.mod index 06de764a5b..086f2525a5 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,25 @@ -module github.com/prebid/prebid-server/v4 +module github.com/prebid/prebid-server/v3 -go 1.25.0 +go 1.23.0 + +retract v3.0.0 // Forgot to update major version in import path and module name require ( github.com/51Degrees/device-detection-go/v4 v4.4.35 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/IABTechLab/adscert v0.34.0 github.com/NYTimes/gziphandler v1.1.1 - github.com/WURFL/golang-wurfl v1.30.3 github.com/alitto/pond v1.8.3 github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d github.com/benbjohnson/clock v1.3.0 - github.com/buger/jsonparser v1.1.2 + github.com/buger/jsonparser v1.1.1 github.com/chasex/glog v0.0.0-20160217080310-c62392af379c github.com/coocood/freecache v1.2.1 github.com/docker/go-units v0.4.0 github.com/go-sql-driver/mysql v1.6.0 github.com/gofrs/uuid v4.2.0+incompatible - github.com/golang/glog v1.2.5 - github.com/google/go-cmp v0.7.0 + github.com/golang/glog v1.2.4 + github.com/google/go-cmp v0.6.0 github.com/grafana/pyroscope-go/godeltaprof v0.1.9 github.com/json-iterator/go v1.1.12 github.com/julienschmidt/httprouter v1.3.0 @@ -41,19 +42,19 @@ require ( github.com/vrischmann/go-metrics-influxdb v0.1.1 github.com/xeipuuv/gojsonschema v1.2.0 github.com/yudai/gojsondiff v1.0.0 - golang.org/x/net v0.55.0 - golang.org/x/text v0.37.0 - google.golang.org/grpc v1.79.3 + golang.org/x/net v0.38.0 + golang.org/x/text v0.23.0 + google.golang.org/grpc v1.56.3 gopkg.in/evanphx/json-patch.v5 v5.9.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d // indirect github.com/klauspost/compress v1.17.8 // indirect @@ -79,10 +80,10 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect - golang.org/x/crypto v0.52.0 // indirect - golang.org/x/sys v0.45.0 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/sys v0.31.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.36.10 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 2d975520cc..de7723b629 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,6 @@ github.com/IABTechLab/adscert v0.34.0/go.mod h1:pCLd3Up1kfTrH6kYFUGGeavxIc1f6Tvv github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/WURFL/golang-wurfl v1.30.3 h1:a/ZR+/mwMrA9cEVa88ig47zkVJNl3HM5OTCpPvoSYmE= -github.com/WURFL/golang-wurfl v1.30.3/go.mod h1:cKXIyA0oIrbZ7YTOhBPX29ELt6XAM1/S7qyFIrTKkS0= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -86,16 +84,15 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= -github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chasex/glog v0.0.0-20160217080310-c62392af379c h1:eXqCBUHfmjbeDqcuvzjsd+bM6A+bnwo5N9FVbV6m5/s= github.com/chasex/glog v0.0.0-20160217080310-c62392af379c/go.mod h1:omJZNg0Qu76bxJd+ExohVo8uXzNcGOk2bv7vel460xk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -157,10 +154,6 @@ github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -172,8 +165,8 @@ github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= -github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= +github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -204,8 +197,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -223,8 +216,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -248,8 +241,6 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/tink/go v1.6.1/go.mod h1:IGW53kTgag+st5yPhKKwJ6u2l+SSp5/v9XF7spovjlY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -542,18 +533,6 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= -go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= -go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= -go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= -go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= -go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= -go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= -go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= -go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= -go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= -go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -572,8 +551,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988= -golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -658,8 +637,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -770,8 +749,8 @@ golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -784,8 +763,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -849,8 +828,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -990,8 +967,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= -google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1006,8 +983,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/hooks/empty_plan.go b/hooks/empty_plan.go index a26bf8feb4..ea86a31405 100644 --- a/hooks/empty_plan.go +++ b/hooks/empty_plan.go @@ -1,8 +1,8 @@ package hooks import ( - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) // EmptyPlanBuilder implements the ExecutionPlanBuilder interface diff --git a/hooks/hookanalytics/analytics_test.go b/hooks/hookanalytics/analytics_test.go index 3f783d4b27..a1186e1b86 100644 --- a/hooks/hookanalytics/analytics_test.go +++ b/hooks/hookanalytics/analytics_test.go @@ -3,7 +3,7 @@ package hookanalytics import ( "testing" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/hooks/hookexecution/context.go b/hooks/hookexecution/context.go index b2fbda3832..75ad2a8217 100644 --- a/hooks/hookexecution/context.go +++ b/hooks/hookexecution/context.go @@ -3,10 +3,10 @@ package hookexecution import ( "sync" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/privacy" ) // executionContext holds information passed to module's hook during hook execution. @@ -43,27 +43,24 @@ func (ctx executionContext) getModuleContext(moduleName string) hookstage.Module // moduleContexts preserves data the module wants to pass to itself from earlier stages to later stages. type moduleContexts struct { sync.RWMutex - ctxs map[string]*hookstage.ModuleContext // format: {"module_name": hookstage.ModuleContext} + ctxs map[string]hookstage.ModuleContext // format: {"module_name": hookstage.ModuleContext} } -func (mc *moduleContexts) put(moduleName string, mCtx *hookstage.ModuleContext) { - if mc == nil { - return - } +func (mc *moduleContexts) put(moduleName string, mCtx hookstage.ModuleContext) { mc.Lock() defer mc.Unlock() - existingCtx, ok := mc.ctxs[moduleName] - if !ok || existingCtx == nil { - mc.ctxs[moduleName] = mCtx - return + newCtx := mCtx + if existingCtx, ok := mc.ctxs[moduleName]; ok && existingCtx != nil { + for k, v := range mCtx { + existingCtx[k] = v + } + newCtx = existingCtx } - - // Add new data to existing context - existingCtx.SetAll(mCtx.GetAll()) + mc.ctxs[moduleName] = newCtx } -func (mc *moduleContexts) get(moduleName string) (*hookstage.ModuleContext, bool) { +func (mc *moduleContexts) get(moduleName string) (hookstage.ModuleContext, bool) { mc.RLock() defer mc.RUnlock() mCtx, ok := mc.ctxs[moduleName] @@ -75,4 +72,4 @@ type stageModuleContext struct { groupCtx []groupModuleContext } -type groupModuleContext map[string]*hookstage.ModuleContext +type groupModuleContext map[string]hookstage.ModuleContext diff --git a/hooks/hookexecution/context_test.go b/hooks/hookexecution/context_test.go deleted file mode 100644 index aaab2cebb4..0000000000 --- a/hooks/hookexecution/context_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package hookexecution - -import ( - "testing" - - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/stretchr/testify/assert" -) - -func TestModuleContextsPutAfterNil(t *testing.T) { - mcs := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}} - mcs.put("module", nil) - - later := hookstage.NewModuleContext() - later.Set("key", "value") - mcs.put("module", later) - - got, ok := mcs.get("module") - assert.True(t, ok) - v, found := got.Get("key") - assert.True(t, found) - assert.Equal(t, "value", v) -} - -func TestModuleContextsPutMergesAndKeepsNilHarmless(t *testing.T) { - mcs := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}} - - first := hookstage.NewModuleContext() - first.Set("a", 1) - mcs.put("module", first) - mcs.put("module", nil) - - second := hookstage.NewModuleContext() - second.Set("b", 2) - mcs.put("module", second) - - got, _ := mcs.get("module") - assert.Equal(t, map[string]any{"a": 1, "b": 2}, got.GetAll()) -} diff --git a/hooks/hookexecution/enricher.go b/hooks/hookexecution/enricher.go index a7043a25a5..17a2eb9cc9 100644 --- a/hooks/hookexecution/enricher.go +++ b/hooks/hookexecution/enricher.go @@ -5,8 +5,8 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/util/jsonutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) diff --git a/hooks/hookexecution/enricher_test.go b/hooks/hookexecution/enricher_test.go index d25b30b407..beb07444d1 100644 --- a/hooks/hookexecution/enricher_test.go +++ b/hooks/hookexecution/enricher_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/hooks/hookexecution/errors.go b/hooks/hookexecution/errors.go index c8124d7c02..0e61ebc983 100644 --- a/hooks/hookexecution/errors.go +++ b/hooks/hookexecution/errors.go @@ -3,7 +3,7 @@ package hookexecution import ( "fmt" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) // TimeoutError indicates exceeding of the max execution time allotted for hook. diff --git a/hooks/hookexecution/execution.go b/hooks/hookexecution/execution.go index cb5b49c70c..57a145dd1c 100644 --- a/hooks/hookexecution/execution.go +++ b/hooks/hookexecution/execution.go @@ -8,15 +8,15 @@ import ( "sync" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/util/iputil" ) type hookResponse[T any] struct { diff --git a/hooks/hookexecution/execution_test.go b/hooks/hookexecution/execution_test.go index 5c3dd72943..1090db578d 100644 --- a/hooks/hookexecution/execution_test.go +++ b/hooks/hookexecution/execution_test.go @@ -4,10 +4,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" "github.com/stretchr/testify/assert" ) diff --git a/hooks/hookexecution/executor.go b/hooks/hookexecution/executor.go index eb66caf64a..0e5b28fff8 100644 --- a/hooks/hookexecution/executor.go +++ b/hooks/hookexecution/executor.go @@ -6,14 +6,14 @@ import ( "sync" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" ) const ( @@ -68,7 +68,7 @@ func NewHookExecutor(builder hooks.ExecutionPlanBuilder, endpoint string, me met endpoint: endpoint, planBuilder: builder, stageOutcomes: []StageOutcome{}, - moduleContexts: &moduleContexts{ctxs: make(map[string]*hookstage.ModuleContext)}, + moduleContexts: &moduleContexts{ctxs: make(map[string]hookstage.ModuleContext)}, metricEngine: me, } } diff --git a/hooks/hookexecution/executor_test.go b/hooks/hookexecution/executor_test.go index 3dd0e76c02..4ce9933c83 100644 --- a/hooks/hookexecution/executor_test.go +++ b/hooks/hookexecution/executor_test.go @@ -10,17 +10,17 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/metrics" - metricsConfig "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/privacy" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/metrics" + metricsConfig "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/privacy" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -61,7 +61,7 @@ func TestExecuteEntrypointStage(t *testing.T) { const body string = `{"name": "John", "last_name": "Doe"}` const urlString string = "https://prebid.com/openrtb2/auction" - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} testCases := []struct { description string @@ -84,7 +84,7 @@ func TestExecuteEntrypointStage(t *testing.T) { expectedHeader: http.Header{}, expectedQuery: url.Values{}, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -299,18 +299,9 @@ func TestExecuteEntrypointStage(t *testing.T) { expectedHeader: http.Header{}, expectedQuery: url.Values{}, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"entrypoint-ctx-1": "some-ctx-1", "entrypoint-ctx-3": "some-ctx-3"}, + "module-2": {"entrypoint-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -427,7 +418,7 @@ func TestExecuteRawAuctionStage(t *testing.T) { const bodyUpdated string = `{"last_name": "Doe", "foo": "bar"}` const urlString string = "https://prebid.com/openrtb2/auction" - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} testCases := []struct { description string @@ -446,7 +437,7 @@ func TestExecuteRawAuctionStage(t *testing.T) { givenPlanBuilder: hooks.EmptyPlanBuilder{}, expectedBody: body, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -622,18 +613,9 @@ func TestExecuteRawAuctionStage(t *testing.T) { givenPlanBuilder: TestWithModuleContextsPlanBuilder{}, expectedBody: body, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("raw-auction-ctx-1", "some-ctx-1") - mc.Set("raw-auction-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("raw-auction-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"raw-auction-ctx-1": "some-ctx-1", "raw-auction-ctx-3": "some-ctx-3"}, + "module-2": {"raw-auction-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -709,7 +691,7 @@ func TestExecuteRawAuctionStage(t *testing.T) { } func TestExecuteProcessedAuctionStage(t *testing.T) { - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} req := openrtb2.BidRequest{ID: "some-id", User: &openrtb2.User{ID: "user-id"}} reqUpdated := openrtb2.BidRequest{ID: "some-id", User: &openrtb2.User{ID: "user-id", Yob: 2000, Consent: "true"}} @@ -728,7 +710,7 @@ func TestExecuteProcessedAuctionStage(t *testing.T) { givenRequest: openrtb_ext.RequestWrapper{BidRequest: &req}, expectedRequest: req, expectedErr: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -849,18 +831,9 @@ func TestExecuteProcessedAuctionStage(t *testing.T) { givenRequest: openrtb_ext.RequestWrapper{BidRequest: &req}, expectedRequest: req, expectedErr: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("processed-auction-ctx-1", "some-ctx-1") - mc.Set("processed-auction-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("processed-auction-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"processed-auction-ctx-1": "some-ctx-1", "processed-auction-ctx-3": "some-ctx-3"}, + "module-2": {"processed-auction-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -937,7 +910,7 @@ func TestExecuteProcessedAuctionStage(t *testing.T) { func TestExecuteBidderRequestStage(t *testing.T) { bidderName := "the-bidder" - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} expectedBidderRequest := &openrtb2.BidRequest{ID: "some-id", User: &openrtb2.User{ID: "user-id"}} expectedUpdatedBidderRequest := &openrtb2.BidRequest{ @@ -965,7 +938,7 @@ func TestExecuteBidderRequestStage(t *testing.T) { givenPlanBuilder: hooks.EmptyPlanBuilder{}, expectedBidderRequest: expectedBidderRequest, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -1133,17 +1106,9 @@ func TestExecuteBidderRequestStage(t *testing.T) { givenPlanBuilder: TestWithModuleContextsPlanBuilder{}, expectedBidderRequest: expectedBidderRequest, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("bidder-request-ctx-1", "some-ctx-1") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("bidder-request-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"bidder-request-ctx-1": "some-ctx-1"}, + "module-2": {"bidder-request-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -1253,7 +1218,7 @@ func buildDefaultActivityConfig(componentName string, allow bool) config.Activit } func TestExecuteRawBidderResponseStage(t *testing.T) { - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} resp := adapters.BidderResponse{Bids: []*adapters.TypedBid{{DealPriority: 1}}} expResp := adapters.BidderResponse{Bids: []*adapters.TypedBid{{DealPriority: 10}}} vEntity := entity("the-bidder") @@ -1273,7 +1238,7 @@ func TestExecuteRawBidderResponseStage(t *testing.T) { givenBidderResponse: resp, expectedBidderResponse: resp, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -1392,18 +1357,9 @@ func TestExecuteRawBidderResponseStage(t *testing.T) { givenBidderResponse: resp, expectedBidderResponse: expResp, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("raw-bidder-response-ctx-1", "some-ctx-1") - mc.Set("raw-bidder-response-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("raw-bidder-response-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"raw-bidder-response-ctx-1": "some-ctx-1", "raw-bidder-response-ctx-3": "some-ctx-3"}, + "module-2": {"raw-bidder-response-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -1479,7 +1435,7 @@ func TestExecuteRawBidderResponseStage(t *testing.T) { } func TestExecuteAllProcessedBidResponsesStage(t *testing.T) { - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} expectedAllProcBidResponses := map[openrtb_ext.BidderName]*entities.PbsOrtbSeatBid{ "some-bidder": {Bids: []*entities.PbsOrtbBid{{DealPriority: 1}}}, @@ -1505,7 +1461,7 @@ func TestExecuteAllProcessedBidResponsesStage(t *testing.T) { givenPlanBuilder: hooks.EmptyPlanBuilder{}, expectedBiddersResponse: expectedAllProcBidResponses, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -1686,17 +1642,9 @@ func TestExecuteAllProcessedBidResponsesStage(t *testing.T) { givenPlanBuilder: TestWithModuleContextsPlanBuilder{}, expectedBiddersResponse: expectedAllProcBidResponses, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("all-processed-bid-responses-ctx-1", "some-ctx-1") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("all-processed-bid-responses-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"all-processed-bid-responses-ctx-1": "some-ctx-1"}, + "module-2": {"all-processed-bid-responses-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -1761,7 +1709,7 @@ func TestExecuteAllProcessedBidResponsesStage(t *testing.T) { } func TestExecuteAuctionResponseStage(t *testing.T) { - foobarModuleCtx := &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}} + foobarModuleCtx := &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}} resp := &openrtb2.BidResponse{CustomData: "some-custom-data"} expResp := &openrtb2.BidResponse{CustomData: "new-custom-data"} @@ -1780,7 +1728,7 @@ func TestExecuteAuctionResponseStage(t *testing.T) { givenResponse: resp, expectedResponse: resp, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -1929,18 +1877,9 @@ func TestExecuteAuctionResponseStage(t *testing.T) { givenResponse: resp, expectedResponse: resp, expectedReject: nil, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("auction-response-ctx-1", "some-ctx-1") - mc.Set("auction-response-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("auction-response-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"auction-response-ctx-1": "some-ctx-1", "auction-response-ctx-3": "some-ctx-3"}, + "module-2": {"auction-response-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -2061,7 +2000,7 @@ func TestExecuteExitpointStage(t *testing.T) { expectedResponseHeaders: http.Header{ "Content-Type": []string{"application/json"}, }, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{}}, expectedStageOutcomes: []StageOutcome{}, }, { @@ -2088,7 +2027,7 @@ func TestExecuteExitpointStage(t *testing.T) { expectedResponseHeaders: http.Header{ "Content-Type": []string{"application/xml"}, }, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}}, expectedStageOutcomes: []StageOutcome{ { Entity: "exitpoint", @@ -2129,7 +2068,7 @@ func TestExecuteExitpointStage(t *testing.T) { }, expectedResponse: ``, expectedResponseHeaders: http.Header{"Content-Type": []string{"application/xml"}}, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}}, expectedStageOutcomes: []StageOutcome{ { Entity: entityExitpoint, @@ -2205,7 +2144,7 @@ func TestExecuteExitpointStage(t *testing.T) { }, expectedResponse: ``, expectedResponseHeaders: http.Header{"Content-Type": []string{"application/xml"}}, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{"foobar": nil}}, + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{"foobar": nil}}, expectedStageOutcomes: []StageOutcome{ { Entity: entityExitpoint, @@ -2263,18 +2202,9 @@ func TestExecuteExitpointStage(t *testing.T) { }, expectedResponse: &openrtb2.BidResponse{ID: "test-id"}, expectedResponseHeaders: http.Header{"Content-Type": []string{"application/json"}}, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("exitpoint-ctx-1", "some-ctx-1") - mc.Set("exitpoint-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("exitpoint-ctx-2", "some-ctx-2") - return mc - }(), + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": {"exitpoint-ctx-1": "some-ctx-1", "exitpoint-ctx-3": "some-ctx-3"}, + "module-2": {"exitpoint-ctx-2": "some-ctx-2"}, }}, expectedStageOutcomes: []StageOutcome{ { @@ -2347,7 +2277,7 @@ func TestExecuteExitpointStage(t *testing.T) { expectedResponseHeaders: http.Header{ "Content-Type": []string{"application/json"}, }, - expectedModuleContexts: &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ + expectedModuleContexts: &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ "module-1": nil, "module-2": nil, }}, @@ -2415,18 +2345,12 @@ func TestInterStageContextCommunication(t *testing.T) { assert.Nil(t, reject, "Unexpected reject from entrypoint stage.") assert.Equal( t, - &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - return mc - }(), + &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": { + "entrypoint-ctx-1": "some-ctx-1", + "entrypoint-ctx-3": "some-ctx-3", + }, + "module-2": {"entrypoint-ctx-2": "some-ctx-2"}, }}, exec.moduleContexts, "Wrong module contexts after executing entrypoint hook.", @@ -2435,99 +2359,83 @@ func TestInterStageContextCommunication(t *testing.T) { // test that context added at the raw-auction stage merged with existing module contexts _, reject = exec.ExecuteRawAuctionStage(body) assert.Nil(t, reject, "Unexpected reject from raw-auction stage.") - assert.Equal(t, &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - mc.Set("raw-auction-ctx-1", "some-ctx-1") - mc.Set("raw-auction-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - mc.Set("raw-auction-ctx-2", "some-ctx-2") - return mc - }(), + assert.Equal(t, &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": { + "entrypoint-ctx-1": "some-ctx-1", + "entrypoint-ctx-3": "some-ctx-3", + "raw-auction-ctx-1": "some-ctx-1", + "raw-auction-ctx-3": "some-ctx-3", + }, + "module-2": { + "entrypoint-ctx-2": "some-ctx-2", + "raw-auction-ctx-2": "some-ctx-2", + }, }}, exec.moduleContexts, "Wrong module contexts after executing raw-auction hook.") // test that context added at the processed-auction stage merged with existing module contexts err = exec.ExecuteProcessedAuctionStage(&openrtb_ext.RequestWrapper{BidRequest: &openrtb2.BidRequest{}}) assert.Nil(t, err, "Unexpected reject from processed-auction stage.") - assert.Equal(t, &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - mc.Set("raw-auction-ctx-1", "some-ctx-1") - mc.Set("raw-auction-ctx-3", "some-ctx-3") - mc.Set("processed-auction-ctx-1", "some-ctx-1") - mc.Set("processed-auction-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - mc.Set("raw-auction-ctx-2", "some-ctx-2") - mc.Set("processed-auction-ctx-2", "some-ctx-2") - return mc - }(), + assert.Equal(t, &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": { + "entrypoint-ctx-1": "some-ctx-1", + "entrypoint-ctx-3": "some-ctx-3", + "raw-auction-ctx-1": "some-ctx-1", + "raw-auction-ctx-3": "some-ctx-3", + "processed-auction-ctx-1": "some-ctx-1", + "processed-auction-ctx-3": "some-ctx-3", + }, + "module-2": { + "entrypoint-ctx-2": "some-ctx-2", + "raw-auction-ctx-2": "some-ctx-2", + "processed-auction-ctx-2": "some-ctx-2", + }, }}, exec.moduleContexts, "Wrong module contexts after executing processed-auction hook.") // test that context added at the raw bidder response stage merged with existing module contexts reject = exec.ExecuteRawBidderResponseStage(&adapters.BidderResponse{}, "some-bidder") assert.Nil(t, reject, "Unexpected reject from raw-bidder-response stage.") - assert.Equal(t, &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - mc.Set("raw-auction-ctx-1", "some-ctx-1") - mc.Set("raw-auction-ctx-3", "some-ctx-3") - mc.Set("processed-auction-ctx-1", "some-ctx-1") - mc.Set("processed-auction-ctx-3", "some-ctx-3") - mc.Set("raw-bidder-response-ctx-1", "some-ctx-1") - mc.Set("raw-bidder-response-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - mc.Set("raw-auction-ctx-2", "some-ctx-2") - mc.Set("processed-auction-ctx-2", "some-ctx-2") - mc.Set("raw-bidder-response-ctx-2", "some-ctx-2") - return mc - }(), + assert.Equal(t, &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": { + "entrypoint-ctx-1": "some-ctx-1", + "entrypoint-ctx-3": "some-ctx-3", + "raw-auction-ctx-1": "some-ctx-1", + "raw-auction-ctx-3": "some-ctx-3", + "processed-auction-ctx-1": "some-ctx-1", + "processed-auction-ctx-3": "some-ctx-3", + "raw-bidder-response-ctx-1": "some-ctx-1", + "raw-bidder-response-ctx-3": "some-ctx-3", + }, + "module-2": { + "entrypoint-ctx-2": "some-ctx-2", + "raw-auction-ctx-2": "some-ctx-2", + "processed-auction-ctx-2": "some-ctx-2", + "raw-bidder-response-ctx-2": "some-ctx-2", + }, }}, exec.moduleContexts, "Wrong module contexts after executing raw-bidder-response hook.") // test that context added at the auction-response stage merged with existing module contexts exec.ExecuteAuctionResponseStage(&openrtb2.BidResponse{}) assert.Nil(t, reject, "Unexpected reject from raw-auction stage.") - assert.Equal(t, &moduleContexts{ctxs: map[string]*hookstage.ModuleContext{ - "module-1": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-1", "some-ctx-1") - mc.Set("entrypoint-ctx-3", "some-ctx-3") - mc.Set("raw-auction-ctx-1", "some-ctx-1") - mc.Set("raw-auction-ctx-3", "some-ctx-3") - mc.Set("processed-auction-ctx-1", "some-ctx-1") - mc.Set("processed-auction-ctx-3", "some-ctx-3") - mc.Set("raw-bidder-response-ctx-1", "some-ctx-1") - mc.Set("raw-bidder-response-ctx-3", "some-ctx-3") - mc.Set("auction-response-ctx-1", "some-ctx-1") - mc.Set("auction-response-ctx-3", "some-ctx-3") - return mc - }(), - "module-2": func() *hookstage.ModuleContext { - mc := hookstage.NewModuleContext() - mc.Set("entrypoint-ctx-2", "some-ctx-2") - mc.Set("raw-auction-ctx-2", "some-ctx-2") - mc.Set("processed-auction-ctx-2", "some-ctx-2") - mc.Set("raw-bidder-response-ctx-2", "some-ctx-2") - mc.Set("auction-response-ctx-2", "some-ctx-2") - return mc - }(), + assert.Equal(t, &moduleContexts{ctxs: map[string]hookstage.ModuleContext{ + "module-1": { + "entrypoint-ctx-1": "some-ctx-1", + "entrypoint-ctx-3": "some-ctx-3", + "raw-auction-ctx-1": "some-ctx-1", + "raw-auction-ctx-3": "some-ctx-3", + "processed-auction-ctx-1": "some-ctx-1", + "processed-auction-ctx-3": "some-ctx-3", + "raw-bidder-response-ctx-1": "some-ctx-1", + "raw-bidder-response-ctx-3": "some-ctx-3", + "auction-response-ctx-1": "some-ctx-1", + "auction-response-ctx-3": "some-ctx-3", + }, + "module-2": { + "entrypoint-ctx-2": "some-ctx-2", + "raw-auction-ctx-2": "some-ctx-2", + "processed-auction-ctx-2": "some-ctx-2", + "raw-bidder-response-ctx-2": "some-ctx-2", + "auction-response-ctx-2": "some-ctx-2", + }, }}, exec.moduleContexts, "Wrong module contexts after executing auction-response hook.") } diff --git a/hooks/hookexecution/mocks_test.go b/hooks/hookexecution/mocks_test.go index a5857157d5..3d9d982861 100644 --- a/hooks/hookexecution/mocks_test.go +++ b/hooks/hookexecution/mocks_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) type mockUpdateHeaderEntrypointHook struct{} @@ -201,50 +201,42 @@ type mockModuleContextHook struct { } func (e mockModuleContextHook) HandleEntrypointHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.EntrypointPayload) (hookstage.HookResult[hookstage.EntrypointPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.EntrypointPayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleRawAuctionHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.RawAuctionRequestPayload) (hookstage.HookResult[hookstage.RawAuctionRequestPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.RawAuctionRequestPayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleProcessedAuctionHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.ProcessedAuctionRequestPayload) (hookstage.HookResult[hookstage.ProcessedAuctionRequestPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.ProcessedAuctionRequestPayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleBidderRequestHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.BidderRequestPayload) (hookstage.HookResult[hookstage.BidderRequestPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.BidderRequestPayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleRawBidderResponseHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.RawBidderResponsePayload) (hookstage.HookResult[hookstage.RawBidderResponsePayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.RawBidderResponsePayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleAllProcessedBidResponsesHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.AllProcessedBidResponsesPayload) (hookstage.HookResult[hookstage.AllProcessedBidResponsesPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.AllProcessedBidResponsesPayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleAuctionResponseHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.AuctionResponsePayload) (hookstage.HookResult[hookstage.AuctionResponsePayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.AuctionResponsePayload]{ModuleContext: miCtx.ModuleContext}, nil } func (e mockModuleContextHook) HandleExitpointHook(_ context.Context, miCtx hookstage.ModuleInvocationContext, _ hookstage.ExitpointPayload) (hookstage.HookResult[hookstage.ExitpointPayload], error) { - miCtx.ModuleContext = hookstage.NewModuleContext() - miCtx.ModuleContext.Set(e.key, e.val) + miCtx.ModuleContext = map[string]interface{}{e.key: e.val} return hookstage.HookResult[hookstage.ExitpointPayload]{ModuleContext: miCtx.ModuleContext}, nil } diff --git a/hooks/hookexecution/outcome.go b/hooks/hookexecution/outcome.go index b9c2561328..d17d3cd467 100644 --- a/hooks/hookexecution/outcome.go +++ b/hooks/hookexecution/outcome.go @@ -3,7 +3,7 @@ package hookexecution import ( "time" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" ) // Status indicates the result of hook execution. diff --git a/hooks/hookexecution/test_utils.go b/hooks/hookexecution/test_utils.go index cd4f4d16ff..b26d4aae4b 100644 --- a/hooks/hookexecution/test_utils.go +++ b/hooks/hookexecution/test_utils.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/hooks/hookstage/allprocessedbidresponses.go b/hooks/hookstage/allprocessedbidresponses.go index 09b4860261..6bfe0d8082 100644 --- a/hooks/hookstage/allprocessedbidresponses.go +++ b/hooks/hookstage/allprocessedbidresponses.go @@ -3,8 +3,8 @@ package hookstage import ( "context" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // AllProcessedBidResponses hooks are invoked over a list of all diff --git a/hooks/hookstage/bidderrequest.go b/hooks/hookstage/bidderrequest.go index ab06ad97a6..8c27f07242 100644 --- a/hooks/hookstage/bidderrequest.go +++ b/hooks/hookstage/bidderrequest.go @@ -3,7 +3,7 @@ package hookstage import ( "context" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // BidderRequest hooks are invoked for each bidder participating in auction. diff --git a/hooks/hookstage/bidderrequest_mutations.go b/hooks/hookstage/bidderrequest_mutations.go index 946f5b92c9..3ab571ff8e 100644 --- a/hooks/hookstage/bidderrequest_mutations.go +++ b/hooks/hookstage/bidderrequest_mutations.go @@ -3,7 +3,7 @@ package hookstage import ( "errors" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/prebid/openrtb/v20/adcom1" ) diff --git a/hooks/hookstage/invocation.go b/hooks/hookstage/invocation.go index b0b1c00089..b5452af7fc 100644 --- a/hooks/hookstage/invocation.go +++ b/hooks/hookstage/invocation.go @@ -2,10 +2,8 @@ package hookstage import ( "encoding/json" - "maps" - "sync" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" ) // HookResult represents the result of execution the concrete hook instance. @@ -18,7 +16,7 @@ type HookResult[T any] struct { Warnings []string DebugMessages []string AnalyticsTags hookanalytics.Analytics - ModuleContext *ModuleContext // holds values that the module wants to pass to itself at later stages + ModuleContext ModuleContext // holds values that the module wants to pass to itself at later stages } // ModuleInvocationContext holds data passed to the module hook during invocation. @@ -30,77 +28,11 @@ type ModuleInvocationContext struct { // Endpoint represents the path of the current endpoint. Endpoint string // ModuleContext holds values that the module passes to itself from the previous stages. - ModuleContext *ModuleContext + ModuleContext ModuleContext // HookImplCode is the hook_impl_code for a module instance to differentiate between multiple hooks HookImplCode string } // ModuleContext holds arbitrary data passed between module hooks at different stages. // We use interface as we do not know exactly how the modules will use their inner context. -type ModuleContext struct { - sync.RWMutex - data map[string]any -} - -// NewModuleContext creates a new module context -func NewModuleContext() *ModuleContext { - moduleContext := ModuleContext{ - data: make(map[string]any), - } - return &moduleContext -} - -// Get retrieves a value from the module context with read lock -func (mc *ModuleContext) Get(key string) (any, bool) { - if mc == nil { - return nil, false - } - mc.RLock() - defer mc.RUnlock() - if mc.data == nil { - return nil, false - } - val, ok := mc.data[key] - return val, ok -} - -// Set stores a value in the module context with write lock -func (mc *ModuleContext) Set(key string, value any) { - if mc == nil { - return - } - mc.Lock() - defer mc.Unlock() - if mc.data == nil { - mc.data = make(map[string]any) - } - mc.data[key] = value -} - -// GetAll returns a copy of all data in the context -func (mc *ModuleContext) GetAll() map[string]any { - if mc == nil { - return nil - } - mc.RLock() - defer mc.RUnlock() - if mc.data == nil { - return nil - } - result := make(map[string]any, len(mc.data)) - maps.Copy(result, mc.data) - return result -} - -// SetAll merges the provided data into the module context -func (mc *ModuleContext) SetAll(data map[string]any) { - if mc == nil { - return - } - mc.Lock() - defer mc.Unlock() - if mc.data == nil { - mc.data = make(map[string]any, len(data)) - } - maps.Copy(mc.data, data) -} +type ModuleContext map[string]interface{} diff --git a/hooks/hookstage/processedauctionrequest.go b/hooks/hookstage/processedauctionrequest.go index deb2994ab5..0674213882 100644 --- a/hooks/hookstage/processedauctionrequest.go +++ b/hooks/hookstage/processedauctionrequest.go @@ -3,7 +3,7 @@ package hookstage import ( "context" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // ProcessedAuctionRequest hooks are invoked after the request is parsed diff --git a/hooks/hookstage/processedauctionrequest_mutations.go b/hooks/hookstage/processedauctionrequest_mutations.go index a98cbbc580..9cd9c64573 100644 --- a/hooks/hookstage/processedauctionrequest_mutations.go +++ b/hooks/hookstage/processedauctionrequest_mutations.go @@ -3,7 +3,7 @@ package hookstage import ( "encoding/json" "errors" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func (c *ChangeSet[T]) ProcessedAuctionRequest() ChangeSetProcessedAuctionRequest[T] { diff --git a/hooks/hookstage/processedauctionrequest_mutations_test.go b/hooks/hookstage/processedauctionrequest_mutations_test.go index 3bfb94bf0b..bf7616a6d3 100644 --- a/hooks/hookstage/processedauctionrequest_mutations_test.go +++ b/hooks/hookstage/processedauctionrequest_mutations_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/hooks/hookstage/rawbidderresponse.go b/hooks/hookstage/rawbidderresponse.go index 9299a73600..52d1d8a1ba 100644 --- a/hooks/hookstage/rawbidderresponse.go +++ b/hooks/hookstage/rawbidderresponse.go @@ -3,7 +3,7 @@ package hookstage import ( "context" - "github.com/prebid/prebid-server/v4/adapters" + "github.com/prebid/prebid-server/v3/adapters" ) // RawBidderResponse hooks are invoked for each bidder participating in auction. diff --git a/hooks/hookstage/rawbidderresponse_mutations.go b/hooks/hookstage/rawbidderresponse_mutations.go index 203f9ac3bc..027598c651 100644 --- a/hooks/hookstage/rawbidderresponse_mutations.go +++ b/hooks/hookstage/rawbidderresponse_mutations.go @@ -3,7 +3,7 @@ package hookstage import ( "errors" - "github.com/prebid/prebid-server/v4/adapters" + "github.com/prebid/prebid-server/v3/adapters" ) func (c *ChangeSet[T]) RawBidderResponse() ChangeSetRawBidderResponse[T] { diff --git a/hooks/plan.go b/hooks/plan.go index 8324487d37..c64dfb1cfb 100644 --- a/hooks/plan.go +++ b/hooks/plan.go @@ -3,9 +3,9 @@ package hooks import ( "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/logger" ) type Stage string diff --git a/hooks/plan_test.go b/hooks/plan_test.go index 0d7639b583..3266d2177f 100644 --- a/hooks/plan_test.go +++ b/hooks/plan_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/hooks/repo.go b/hooks/repo.go index e9e545b50b..e00077e7bc 100644 --- a/hooks/repo.go +++ b/hooks/repo.go @@ -3,7 +3,7 @@ package hooks import ( "fmt" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) // HookRepository is the interface that exposes methods diff --git a/hooks/repo_test.go b/hooks/repo_test.go index b31554d406..d6d3713351 100644 --- a/hooks/repo_test.go +++ b/hooks/repo_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookstage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/injector/injector.go b/injector/injector.go index 0df0c2aeaa..9de2c1b726 100644 --- a/injector/injector.go +++ b/injector/injector.go @@ -6,8 +6,8 @@ import ( "io" "strings" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" ) const ( diff --git a/injector/injector_test.go b/injector/injector_test.go index 4010066228..b3457b094b 100644 --- a/injector/injector_test.go +++ b/injector/injector_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/macros/macros.go b/macros/macros.go index 2473be05e7..0c6e08cae0 100644 --- a/macros/macros.go +++ b/macros/macros.go @@ -25,10 +25,6 @@ type EndpointTemplateParams struct { PartnerId string Region string PlacementID string - NetworkId string - SiteDomain string - AppDomain string - Bundle string } // UserSyncPrivacy specifies privacy policy macros, represented as strings, for user sync urls. diff --git a/macros/provider.go b/macros/provider.go index fa9b584b4d..575aa49aa5 100644 --- a/macros/provider.go +++ b/macros/provider.go @@ -5,8 +5,8 @@ import ( "strconv" "time" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const ( diff --git a/macros/provider_test.go b/macros/provider_test.go index cc92b0dc78..795fae9c41 100644 --- a/macros/provider_test.go +++ b/macros/provider_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/macros/string_index_based_replacer_test.go b/macros/string_index_based_replacer_test.go index 868592790f..515640d4ff 100644 --- a/macros/string_index_based_replacer_test.go +++ b/macros/string_index_based_replacer_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/exchange/entities" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/exchange/entities" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/main.go b/main.go index 8ab997468e..9964238878 100644 --- a/main.go +++ b/main.go @@ -10,14 +10,14 @@ import ( "time" jsoniter "github.com/json-iterator/go" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/router" - "github.com/prebid/prebid-server/v4/server" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/task" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/router" + "github.com/prebid/prebid-server/v3/server" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/task" "github.com/spf13/viper" ) diff --git a/main_test.go b/main_test.go index 92c0b90200..494e6d6774 100644 --- a/main_test.go +++ b/main_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" "github.com/spf13/viper" diff --git a/metrics/config/metrics.go b/metrics/config/metrics.go index 6ef2d552c0..cb039155bf 100644 --- a/metrics/config/metrics.go +++ b/metrics/config/metrics.go @@ -3,10 +3,10 @@ package config import ( "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - prometheusmetrics "github.com/prebid/prebid-server/v4/metrics/prometheus" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + prometheusmetrics "github.com/prebid/prebid-server/v3/metrics/prometheus" + "github.com/prebid/prebid-server/v3/openrtb_ext" gometrics "github.com/rcrowley/go-metrics" influxdb "github.com/vrischmann/go-metrics-influxdb" ) @@ -299,12 +299,6 @@ func (me *MultiMetricsEngine) RecordGvlListRequest() { } } -func (me *MultiMetricsEngine) RecordLiveGVLFetch(success bool) { - for _, thisME := range *me { - thisME.RecordLiveGVLFetch(success) - } -} - func (me *MultiMetricsEngine) RecordAdsCertReq(success bool) { for _, thisME := range *me { thisME.RecordAdsCertReq(success) @@ -540,9 +534,6 @@ func (me *NilMetricsEngine) RecordStoredResponse(pubId string) { func (me *NilMetricsEngine) RecordGvlListRequest() { } -func (me *NilMetricsEngine) RecordLiveGVLFetch(success bool) { -} - func (me *NilMetricsEngine) RecordAdsCertReq(success bool) { } diff --git a/metrics/config/metrics_test.go b/metrics/config/metrics_test.go index 1b35f59b1e..48166f07fc 100644 --- a/metrics/config/metrics_test.go +++ b/metrics/config/metrics_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - mainConfig "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + mainConfig "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" gometrics "github.com/rcrowley/go-metrics" ) diff --git a/metrics/go_metrics.go b/metrics/go_metrics.go index 4f10166c17..aa64e41a8d 100644 --- a/metrics/go_metrics.go +++ b/metrics/go_metrics.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/openrtb_ext" metrics "github.com/rcrowley/go-metrics" ) @@ -36,8 +36,6 @@ type Metrics struct { BidderServerResponseTimer metrics.Timer StoredResponsesMeter metrics.Meter GvlListRequestsMeter metrics.Meter - LiveGVLFetchSuccess metrics.Meter - LiveGVLFetchFailure metrics.Meter // Metrics for OpenRTB requests specifically RequestStatuses map[RequestType]map[RequestStatus]metrics.Meter @@ -190,8 +188,6 @@ func NewBlankMetrics(registry metrics.Registry, exchanges []string, disabledMetr SyncerSetsMeter: make(map[string]map[SyncerSetUidStatus]metrics.Meter), StoredResponsesMeter: blankMeter, GvlListRequestsMeter: blankMeter, - LiveGVLFetchSuccess: blankMeter, - LiveGVLFetchFailure: blankMeter, ImpsTypeBanner: blankMeter, ImpsTypeVideo: blankMeter, @@ -318,8 +314,6 @@ func NewMetrics(registry metrics.Registry, exchanges []openrtb_ext.BidderName, d newMetrics.PrebidCacheRequestTimerError = metrics.GetOrRegisterTimer("prebid_cache_request_time.err", registry) newMetrics.StoredResponsesMeter = metrics.GetOrRegisterMeter("stored_responses", registry) newMetrics.GvlListRequestsMeter = metrics.GetOrRegisterMeter("gvl_requests", registry) - newMetrics.LiveGVLFetchSuccess = metrics.GetOrRegisterMeter("live_gvl_fetch.ok", registry) - newMetrics.LiveGVLFetchFailure = metrics.GetOrRegisterMeter("live_gvl_fetch.failed", registry) newMetrics.OverheadTimer = makeOverheadTimerMetrics(registry) newMetrics.BidderServerResponseTimer = metrics.GetOrRegisterTimer("bidder_server_response_time_seconds", registry) @@ -664,14 +658,6 @@ func (me *Metrics) RecordGvlListRequest() { me.GvlListRequestsMeter.Mark(1) } -func (me *Metrics) RecordLiveGVLFetch(success bool) { - if success { - me.LiveGVLFetchSuccess.Mark(1) - } else { - me.LiveGVLFetchFailure.Mark(1) - } -} - func (me *Metrics) RecordImps(labels ImpLabels) { me.ImpMeter.Mark(int64(1)) if labels.BannerImps { diff --git a/metrics/go_metrics_test.go b/metrics/go_metrics_test.go index 553dfba09d..2fcec9cb6d 100644 --- a/metrics/go_metrics_test.go +++ b/metrics/go_metrics_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" metrics "github.com/rcrowley/go-metrics" "github.com/stretchr/testify/assert" ) @@ -37,8 +37,6 @@ func TestNewMetrics(t *testing.T) { ensureContains(t, registry, "setuid_requests.syncer_unknown", m.SetUidStatusMeter[SetUidSyncerUnknown]) ensureContains(t, registry, "stored_responses", m.StoredResponsesMeter) ensureContains(t, registry, "gvl_requests", m.GvlListRequestsMeter) - ensureContains(t, registry, "live_gvl_fetch.ok", m.LiveGVLFetchSuccess) - ensureContains(t, registry, "live_gvl_fetch.failed", m.LiveGVLFetchFailure) ensureContains(t, registry, "prebid_cache_request_time.ok", m.PrebidCacheRequestTimerSuccess) ensureContains(t, registry, "prebid_cache_request_time.err", m.PrebidCacheRequestTimerError) diff --git a/metrics/metrics.go b/metrics/metrics.go index aa2e28b7c8..054bf8940a 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Labels defines the labels that can be attached to the metrics. @@ -497,7 +497,6 @@ type MetricsEngine interface { RecordDebugRequest(debugEnabled bool, pubId string) RecordStoredResponse(pubId string) RecordGvlListRequest() - RecordLiveGVLFetch(success bool) RecordAdsCertReq(success bool) RecordAdsCertSignTime(adsCertSignTime time.Duration) RecordBidValidationCreativeSizeError(adapter openrtb_ext.BidderName, account string) diff --git a/metrics/metrics_mock.go b/metrics/metrics_mock.go index 7cf0af5cc0..09fa605166 100644 --- a/metrics/metrics_mock.go +++ b/metrics/metrics_mock.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/mock" ) @@ -179,10 +179,6 @@ func (me *MetricsEngineMock) RecordGvlListRequest() { me.Called() } -func (me *MetricsEngineMock) RecordLiveGVLFetch(success bool) { - me.Called(success) -} - func (me *MetricsEngineMock) RecordAdsCertReq(success bool) { me.Called(success) } diff --git a/metrics/prometheus/preload.go b/metrics/prometheus/preload.go index d25540fb02..9753fcd025 100644 --- a/metrics/prometheus/preload.go +++ b/metrics/prometheus/preload.go @@ -1,8 +1,8 @@ package prometheusmetrics import ( - "github.com/prebid/prebid-server/v4/metrics" - // "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/metrics" + // "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/prometheus/client_golang/prometheus" ) diff --git a/metrics/prometheus/prometheus.go b/metrics/prometheus/prometheus.go index 443184b31e..359e57a948 100644 --- a/metrics/prometheus/prometheus.go +++ b/metrics/prometheus/prometheus.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/prometheus/client_golang/prometheus" promCollector "github.com/prometheus/client_golang/prometheus/collectors" ) @@ -55,7 +55,6 @@ type Metrics struct { privacyTCF *prometheus.CounterVec storedResponses prometheus.Counter gvlListRequests prometheus.Counter - liveGVLFetch *prometheus.CounterVec storedResponsesFetchTimer *prometheus.HistogramVec storedResponsesErrors *prometheus.CounterVec adsCertRequests *prometheus.CounterVec @@ -380,11 +379,6 @@ func NewMetrics(cfg config.PrometheusMetrics, disabledMetrics config.DisabledMet "gvl_requests", "Count number of times GVL list is fetched") - metrics.liveGVLFetch = newCounter(cfg, reg, - "live_gvl_fetch", - "Count of live GVL vendor ID fetches labeled by success or failure.", - []string{successLabel}) - metrics.adapterBids = newCounter(cfg, reg, "adapter_bids", "Count of bids labeled by adapter and markup delivery type (adm or nurl).", @@ -745,18 +739,6 @@ func (m *Metrics) RecordGvlListRequest() { m.gvlListRequests.Inc() } -func (m *Metrics) RecordLiveGVLFetch(success bool) { - if success { - m.liveGVLFetch.With(prometheus.Labels{ - successLabel: requestSuccessful, - }).Inc() - } else { - m.liveGVLFetch.With(prometheus.Labels{ - successLabel: requestFailed, - }).Inc() - } -} - func (m *Metrics) RecordImps(labels metrics.ImpLabels) { m.impressions.With(prometheus.Labels{ isBannerLabel: strconv.FormatBool(labels.BannerImps), diff --git a/metrics/prometheus/prometheus_test.go b/metrics/prometheus/prometheus_test.go index 7bf5b79af7..8af11d79aa 100644 --- a/metrics/prometheus/prometheus_test.go +++ b/metrics/prometheus/prometheus_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" @@ -1952,26 +1952,6 @@ func TestRecordGvlListRequest(t *testing.T) { assertCounterValue(t, "Record instance of fetched GVL list", "success", m.gvlListRequests, 1.00) } -func TestRecordLiveGVLFetch(t *testing.T) { - m := createMetricsForTesting() - - m.RecordLiveGVLFetch(true) - m.RecordLiveGVLFetch(true) - m.RecordLiveGVLFetch(false) - - assertCounterVecValue(t, "", "live_gvl_fetch:ok", m.liveGVLFetch, - float64(2), - prometheus.Labels{ - successLabel: requestSuccessful, - }) - - assertCounterVecValue(t, "", "live_gvl_fetch:fail", m.liveGVLFetch, - float64(1), - prometheus.Labels{ - successLabel: requestFailed, - }) -} - func TestRecordAdsCertReqMetric(t *testing.T) { testCases := []struct { description string diff --git a/modules/builder.go b/modules/builder.go index df2f1b1c3a..85a38fd022 100644 --- a/modules/builder.go +++ b/modules/builder.go @@ -1,11 +1,10 @@ package modules import ( - fiftyonedegreesDevicedetection "github.com/prebid/prebid-server/v4/modules/fiftyonedegrees/devicedetection" - prebidOrtb2blocking "github.com/prebid/prebid-server/v4/modules/prebid/ortb2blocking" - prebidRulesengine "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine" - wurflDevicedetection "github.com/prebid/prebid-server/v4/modules/scientiamobile/wurfl_devicedetection" - scope3Rtd "github.com/prebid/prebid-server/v4/modules/scope3/rtd" + fiftyonedegreesDevicedetection "github.com/prebid/prebid-server/v3/modules/fiftyonedegrees/devicedetection" + prebidOrtb2blocking "github.com/prebid/prebid-server/v3/modules/prebid/ortb2blocking" + prebidRulesengine "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine" + scope3Rtd "github.com/prebid/prebid-server/v3/modules/scope3/rtd" ) // builders returns mapping between module name and its builder @@ -19,9 +18,6 @@ func builders() ModuleBuilders { "ortb2blocking": prebidOrtb2blocking.Builder, "rulesengine": prebidRulesengine.Builder, }, - "scientiamobile": { - "wurfl_devicedetection": wurflDevicedetection.Builder, - }, "scope3": { "rtd": scope3Rtd.Builder, }, diff --git a/modules/fiftyonedegrees/devicedetection/config.go b/modules/fiftyonedegrees/devicedetection/config.go index 8037f83ec5..3a83030b6d 100644 --- a/modules/fiftyonedegrees/devicedetection/config.go +++ b/modules/fiftyonedegrees/devicedetection/config.go @@ -8,7 +8,7 @@ import ( "os" "github.com/51Degrees/device-detection-go/v4/dd" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type config struct { diff --git a/modules/fiftyonedegrees/devicedetection/device_detector.go b/modules/fiftyonedegrees/devicedetection/device_detector.go index 73c2f46601..9f66c64eea 100644 --- a/modules/fiftyonedegrees/devicedetection/device_detector.go +++ b/modules/fiftyonedegrees/devicedetection/device_detector.go @@ -68,8 +68,6 @@ func buildEngineOptions(moduleConfig *config, configHash *dd.ConfigHash) []onpre "HardwareModel", "HardwareFamily", "HardwareModelVariants", - "HardwareNamePrefix", - "HardwareNameVersion", "ScreenInchesHeight", "IsCrawler", }), diff --git a/modules/fiftyonedegrees/devicedetection/device_info_extractor.go b/modules/fiftyonedegrees/devicedetection/device_info_extractor.go index ef3aeef360..d16ac64f07 100644 --- a/modules/fiftyonedegrees/devicedetection/device_info_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/device_info_extractor.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) // deviceInfoExtractor is a struct that contains the methods to extract device information @@ -44,8 +44,6 @@ const ( deviceInfoHardwareFamily deviceInfoProperty = "HardwareFamily" deviceInfoHardwareModelVariants deviceInfoProperty = "HardwareModelVariants" deviceInfoScreenInchesHeight deviceInfoProperty = "ScreenInchesHeight" - deviceInfoHardwareNamePrefix deviceInfoProperty = "HardwareNamePrefix" - deviceInfoHardwareNameVersion deviceInfoProperty = "HardwareNameVersion" ) func (x deviceInfoExtractor) extract(results Results, ua string) (*deviceInfo, error) { @@ -71,8 +69,6 @@ func (x deviceInfoExtractor) extract(results Results, ua string) (*deviceInfo, e hardwareFamily := x.getValue(results, deviceInfoHardwareFamily) hardwareModelVariants := x.getValue(results, deviceInfoHardwareModelVariants) screenInchedHeight, _ := strconv.ParseFloat(x.getValue(results, deviceInfoScreenInchesHeight), 10) - hardwareNamePrefix := x.getValue(results, deviceInfoHardwareNamePrefix) - hardwareNameVersion := x.getValue(results, deviceInfoHardwareNameVersion) p := &deviceInfo{ HardwareVendor: hardwareVendor, @@ -94,8 +90,6 @@ func (x deviceInfoExtractor) extract(results Results, ua string) (*deviceInfo, e HardwareModel: hardwareModel, HardwareFamily: hardwareFamily, HardwareModelVariants: hardwareModelVariants, - HardwareNamePrefix: hardwareNamePrefix, - HardwareNameVersion: hardwareNameVersion, ScreenInchesHeight: screenInchedHeight, } diff --git a/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go b/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go index 481c93d45f..23bee8a5d5 100644 --- a/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/device_info_extractor_test.go @@ -107,8 +107,6 @@ func mockValues(results *ResultsHashMock) { mockValue(results, "HardwareModel", "Macbook") mockValue(results, "HardwareFamily", "Macbook") mockValue(results, "HardwareModelVariants", "Macbook") - mockValue(results, "HardwareNamePrefix", "Macbook") - mockValue(results, "HardwareNameVersion", "Pro") mockValue(results, "ScreenInchesHeight", "12") } @@ -126,8 +124,6 @@ func assertDeviceInfo(t *testing.T, deviceInfo *deviceInfo) { assert.Equal(t, deviceInfo.PixelRatio, float64(223)) assert.Equal(t, deviceInfo.Javascript, true) assert.Equal(t, deviceInfo.GeoLocation, true) - assert.Equal(t, deviceInfo.HardwareNamePrefix, "Macbook") - assert.Equal(t, deviceInfo.HardwareNameVersion, "Pro") } func mockValue(results *ResultsHashMock, name string, value string) { diff --git a/modules/fiftyonedegrees/devicedetection/evidence_extractor.go b/modules/fiftyonedegrees/devicedetection/evidence_extractor.go index 9599e43de1..700f53117d 100644 --- a/modules/fiftyonedegrees/devicedetection/evidence_extractor.go +++ b/modules/fiftyonedegrees/devicedetection/evidence_extractor.go @@ -9,7 +9,7 @@ import ( "github.com/51Degrees/device-detection-go/v4/dd" "github.com/51Degrees/device-detection-go/v4/onpremise" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) type defaultEvidenceExtractor struct { @@ -57,18 +57,16 @@ func merge(val1, val2 []stringEvidence) []stringEvidence { return evidence } -func (x *defaultEvidenceExtractor) extract(ctx *hookstage.ModuleContext) ([]onpremise.Evidence, string, error) { +func (x *defaultEvidenceExtractor) extract(ctx hookstage.ModuleContext) ([]onpremise.Evidence, string, error) { if ctx == nil { return nil, "", errors.New("context is nil") } - evidenceFromSuaCtx, _ := ctx.Get(evidenceFromSuaCtxKey) - suaStrings, err := x.getEvidenceStrings(evidenceFromSuaCtx) + suaStrings, err := x.getEvidenceStrings(ctx[evidenceFromSuaCtxKey]) if err != nil { return nil, "", fmt.Errorf("error extracting sua evidence: %w", err) } - evidenceFromHeadersCtx, _ := ctx.Get(evidenceFromHeadersCtxKey) - headerString, err := x.getEvidenceStrings(evidenceFromHeadersCtx) + headerString, err := x.getEvidenceStrings(ctx[evidenceFromHeadersCtxKey]) if err != nil { return nil, "", fmt.Errorf("error extracting header evidence: %w", err) } diff --git a/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go b/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go index 8c183af559..7dc4fb9790 100644 --- a/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go +++ b/modules/fiftyonedegrees/devicedetection/evidence_extractor_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/51Degrees/device-detection-go/v4/dd" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookstage" "github.com/stretchr/testify/assert" ) @@ -129,7 +129,7 @@ func TestExtract(t *testing.T) { tests := []struct { name string - ctx *hookstage.ModuleContext + ctx hookstage.ModuleContext wantEvidenceCount int wantUserAgent string wantError bool @@ -141,120 +141,96 @@ func TestExtract(t *testing.T) { }, { name: "empty", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{}) - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromSuaCtxKey: []stringEvidence{}, + evidenceFromHeadersCtxKey: []stringEvidence{}, + }, wantEvidenceCount: 0, wantUserAgent: "", }, { name: "from_headers", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{uaEvidence1}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{uaEvidence1}, + }, wantEvidenceCount: 1, wantUserAgent: "uav1", }, { name: "from_headers_no_user_agent", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{evidence1}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{evidence1}, + }, wantError: true, }, { name: "from_sua", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{uaEvidence1}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromSuaCtxKey: []stringEvidence{uaEvidence1}, + }, wantEvidenceCount: 1, wantUserAgent: "uav1", }, { name: "from_sua_no_user_agent", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{evidence1}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromSuaCtxKey: []stringEvidence{evidence1}, + }, wantError: true, }, { name: "from_headers_error", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, "bad value") - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: "bad value", + }, wantError: true, }, { name: "from_sua_error", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{}) - ctx.Set(evidenceFromSuaCtxKey, "bad value") - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{}, + evidenceFromSuaCtxKey: "bad value", + }, wantError: true, }, { name: "from_sua_and_headers", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{uaEvidence1}) - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{evidence1}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{uaEvidence1}, + evidenceFromSuaCtxKey: []stringEvidence{evidence1}, + }, wantEvidenceCount: 2, wantUserAgent: "uav1", }, { name: "from_sua_and_headers_sua_can_overwrite_if_ua_present", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{uaEvidence1}) - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{uaEvidence2}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{uaEvidence1}, + evidenceFromSuaCtxKey: []stringEvidence{uaEvidence2}, + }, wantEvidenceCount: 1, wantUserAgent: "uav2", }, { name: "empty_string_values", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{emptyEvidence}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{emptyEvidence}, + }, wantError: true, }, { name: "empty_sua_values", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromSuaCtxKey, []stringEvidence{emptyEvidence}) - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromSuaCtxKey: []stringEvidence{emptyEvidence}, + }, wantError: true, }, { name: "mixed_valid_and_invalid", - ctx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(evidenceFromHeadersCtxKey, []stringEvidence{uaEvidence1}) - ctx.Set(evidenceFromSuaCtxKey, "bad value") - return ctx - }(), + ctx: hookstage.ModuleContext{ + evidenceFromHeadersCtxKey: []stringEvidence{uaEvidence1}, + evidenceFromSuaCtxKey: "bad value", + }, wantError: true, }, } diff --git a/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go b/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go index 996845a2f0..8be51c422d 100644 --- a/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go +++ b/modules/fiftyonedegrees/devicedetection/hook_auction_entrypoint.go @@ -3,8 +3,8 @@ package devicedetection import ( - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) // handleAuctionEntryPointRequestHook is a hookstage.HookFunc that is used to handle the auction entrypoint request hook. @@ -18,10 +18,10 @@ func handleAuctionEntryPointRequestHook(cfg config, payload hookstage.Entrypoint evidenceFromSua := evidenceExtractor.fromSuaPayload(payload.Body) // create a Module context and set the evidence from headers, evidence from sua and dd enabled flag - moduleContext := hookstage.NewModuleContext() - moduleContext.Set(evidenceFromHeadersCtxKey, evidenceFromHeaders) - moduleContext.Set(evidenceFromSuaCtxKey, evidenceFromSua) - moduleContext.Set(ddEnabledCtxKey, true) + moduleContext := make(hookstage.ModuleContext) + moduleContext[evidenceFromHeadersCtxKey] = evidenceFromHeaders + moduleContext[evidenceFromSuaCtxKey] = evidenceFromSua + moduleContext[ddEnabledCtxKey] = true return hookstage.HookResult[hookstage.EntrypointPayload]{ ModuleContext: moduleContext, diff --git a/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go b/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go index 1bf1aa8203..acde532eb5 100644 --- a/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go +++ b/modules/fiftyonedegrees/devicedetection/hook_raw_auction_request.go @@ -3,10 +3,11 @@ package devicedetection import ( + "fmt" "math" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" "github.com/tidwall/gjson" "github.com/tidwall/sjson" ) @@ -36,7 +37,7 @@ func handleAuctionRequestHook(ctx hookstage.ModuleInvocationContext, deviceDetec result, err := hydrateFields(deviceInfo, rawPayload) if err != nil { - return rawPayload, hookexecution.NewFailure("error hydrating fields %s", err) + return rawPayload, hookexecution.NewFailure(fmt.Sprintf("error hydrating fields %s", err)) } return result, nil @@ -116,10 +117,6 @@ func setMissingFields(deviceObj map[string]any, fiftyOneDd *deviceInfo) map[stri return val }, "model": func() any { - if fiftyOneDd.HardwareNamePrefix != "" && fiftyOneDd.HardwareNamePrefix != ddUnknown { - return fiftyOneDd.HardwareNamePrefix - } - // Fallback: HardwareModel → HardwareName newVal := fiftyOneDd.HardwareModel if newVal == ddUnknown { newVal = fiftyOneDd.HardwareName @@ -129,12 +126,6 @@ func setMissingFields(deviceObj map[string]any, fiftyOneDd *deviceInfo) map[stri } return nil }, - "hwv": func() any { - if fiftyOneDd.HardwareNameVersion != "" && fiftyOneDd.HardwareNameVersion != ddUnknown { - return fiftyOneDd.HardwareNameVersion - } - return nil - }, "ppi": func() any { if fiftyOneDd.ScreenPixelsHeight > 0 && fiftyOneDd.ScreenInchesHeight > 0 { ppi := float64(fiftyOneDd.ScreenPixelsHeight) / fiftyOneDd.ScreenInchesHeight diff --git a/modules/fiftyonedegrees/devicedetection/models.go b/modules/fiftyonedegrees/devicedetection/models.go index 6afb4ed038..ffa9887235 100644 --- a/modules/fiftyonedegrees/devicedetection/models.go +++ b/modules/fiftyonedegrees/devicedetection/models.go @@ -62,8 +62,6 @@ type deviceInfo struct { HardwareFamily string HardwareModel string HardwareModelVariants string - HardwareNamePrefix string - HardwareNameVersion string UserAgent string DeviceId string ScreenInchesHeight float64 diff --git a/modules/fiftyonedegrees/devicedetection/module.go b/modules/fiftyonedegrees/devicedetection/module.go index 4dddc577f4..603f37810d 100644 --- a/modules/fiftyonedegrees/devicedetection/module.go +++ b/modules/fiftyonedegrees/devicedetection/module.go @@ -10,8 +10,8 @@ import ( "github.com/51Degrees/device-detection-go/v4/dd" "github.com/51Degrees/device-detection-go/v4/onpremise" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" ) func configHashFromConfig(cfg *config) *dd.ConfigHash { @@ -83,7 +83,7 @@ type accountValidator interface { type evidenceExtractor interface { fromHeaders(request *http.Request, httpHeaderKeys []dd.EvidenceKey) []stringEvidence fromSuaPayload(payload []byte) []stringEvidence - extract(ctx *hookstage.ModuleContext) ([]onpremise.Evidence, string, error) + extract(ctx hookstage.ModuleContext) ([]onpremise.Evidence, string, error) } func (m Module) HandleEntrypointHook( diff --git a/modules/fiftyonedegrees/devicedetection/module_no_cgo_test.go b/modules/fiftyonedegrees/devicedetection/module_no_cgo_test.go index 9aca4faa09..2f4bce4a99 100644 --- a/modules/fiftyonedegrees/devicedetection/module_no_cgo_test.go +++ b/modules/fiftyonedegrees/devicedetection/module_no_cgo_test.go @@ -5,7 +5,7 @@ package devicedetection import ( "testing" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/modules/moduledeps" "github.com/stretchr/testify/assert" ) diff --git a/modules/fiftyonedegrees/devicedetection/module_test.go b/modules/fiftyonedegrees/devicedetection/module_test.go index 32968515fc..19595aca4e 100644 --- a/modules/fiftyonedegrees/devicedetection/module_test.go +++ b/modules/fiftyonedegrees/devicedetection/module_test.go @@ -12,8 +12,8 @@ import ( "github.com/51Degrees/device-detection-go/v4/dd" "github.com/51Degrees/device-detection-go/v4/onpremise" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -44,7 +44,7 @@ func (m *mockEvidenceExtractor) fromSuaPayload(payload []byte) []stringEvidence return args.Get(0).([]stringEvidence) } -func (m *mockEvidenceExtractor) extract(ctx *hookstage.ModuleContext) ([]onpremise.Evidence, string, error) { +func (m *mockEvidenceExtractor) extract(ctx hookstage.ModuleContext) ([]onpremise.Evidence, string, error) { args := m.Called(ctx) res := args.Get(0) @@ -131,18 +131,16 @@ func TestHandleEntrypointHookAccountAllowed(t *testing.T) { result, err := module.HandleEntrypointHook(nil, hookstage.ModuleInvocationContext{}, hookstage.EntrypointPayload{}) assert.NoError(t, err) - evidenceFromHeadersCtx, _ := result.ModuleContext.Get(evidenceFromHeadersCtxKey) assert.Equal( - t, evidenceFromHeadersCtx, []stringEvidence{{ + t, result.ModuleContext[evidenceFromHeadersCtxKey], []stringEvidence{{ Prefix: "123", Key: "key", Value: "val", }}, ) - evidenceFromSuaCtx, _ := result.ModuleContext.Get(evidenceFromSuaCtxKey) assert.Equal( - t, evidenceFromSuaCtx, []stringEvidence{{ + t, result.ModuleContext[evidenceFromSuaCtxKey], []stringEvidence{{ Prefix: "123", Key: "User-Agent", Value: "ua", @@ -181,8 +179,9 @@ func TestHandleRawAuctionHookExtractError(t *testing.T) { accountValidator: &mockValidator, } - mctx := hookstage.NewModuleContext() - mctx.Set(ddEnabledCtxKey, true) + mctx := make(hookstage.ModuleContext) + + mctx[ddEnabledCtxKey] = true result, err := module.HandleRawAuctionHook( context.TODO(), hookstage.ModuleInvocationContext{ @@ -253,7 +252,7 @@ func TestHandleRawAuctionHookEnrichment(t *testing.T) { deviceDetectorM.On("getDeviceInfo", mock.Anything, mock.Anything).Return( &deviceInfo{ HardwareVendor: "Apple", - HardwareName: "Macbook Pro", + HardwareName: "Macbook", DeviceType: "device", PlatformVendor: "Apple", PlatformName: "MacOs", @@ -269,8 +268,6 @@ func TestHandleRawAuctionHookEnrichment(t *testing.T) { HardwareFamily: "Macbook", HardwareModel: "Macbook", HardwareModelVariants: "Macbook", - HardwareNamePrefix: "Macbook", - HardwareNameVersion: "Pro", UserAgent: "ua", DeviceId: "", }, @@ -283,8 +280,8 @@ func TestHandleRawAuctionHookEnrichment(t *testing.T) { accountValidator: &mockValidator, } - mctx := hookstage.NewModuleContext() - mctx.Set(ddEnabledCtxKey, true) + mctx := make(hookstage.ModuleContext) + mctx[ddEnabledCtxKey] = true result, err := module.HandleRawAuctionHook( nil, hookstage.ModuleInvocationContext{ @@ -404,7 +401,7 @@ func TestHandleRawAuctionHookEnrichment(t *testing.T) { "architecture": "arm", "model": "" } - ,"devicetype":2,"ua":"ua","make":"Apple","model":"Macbook","hwv":"Pro","os":"MacOs","osv":"14","h":1080,"w":1024,"pxratio":223,"js":1,"geoFetch":1} + ,"devicetype":2,"ua":"ua","make":"Apple","model":"Macbook","os":"MacOs","osv":"14","h":1080,"w":1024,"pxratio":223,"js":1,"geoFetch":1} }`) var deviceDetectorErrM mockDeviceDetector @@ -457,7 +454,7 @@ func TestHandleRawAuctionHookEnrichmentWithErrors(t *testing.T) { mockDeviceDetector.On("getDeviceInfo", mock.Anything, mock.Anything).Return( &deviceInfo{ HardwareVendor: "Apple", - HardwareName: "Macbook Pro", + HardwareName: "Macbook", DeviceType: "device", PlatformVendor: "Apple", PlatformName: "MacOs", @@ -473,8 +470,6 @@ func TestHandleRawAuctionHookEnrichmentWithErrors(t *testing.T) { HardwareFamily: "Macbook", HardwareModel: "Macbook", HardwareModelVariants: "Macbook", - HardwareNamePrefix: "Macbook", - HardwareNameVersion: "Pro", UserAgent: "ua", DeviceId: "", ScreenInchesHeight: 7, @@ -488,8 +483,8 @@ func TestHandleRawAuctionHookEnrichmentWithErrors(t *testing.T) { accountValidator: &mockValidator, } - mctx := hookstage.NewModuleContext() - mctx.Set(ddEnabledCtxKey, true) + mctx := make(hookstage.ModuleContext) + mctx[ddEnabledCtxKey] = true result, err := module.HandleRawAuctionHook( nil, hookstage.ModuleInvocationContext{ @@ -505,7 +500,7 @@ func TestHandleRawAuctionHookEnrichmentWithErrors(t *testing.T) { mutationResult, err := mutation.Apply(hookstage.RawAuctionRequestPayload(`{"device":{}}`)) assert.NoError(t, err) - require.JSONEq(t, string(mutationResult), `{"device":{"devicetype":2,"ua":"ua","make":"Apple","model":"Macbook","hwv":"Pro","os":"MacOs","osv":"14","h":1080,"w":1024,"pxratio":223,"js":1,"geoFetch":1,"ppi":154,"ext":{"fiftyonedegrees_deviceId":""}}}`) + require.JSONEq(t, string(mutationResult), `{"device":{"devicetype":2,"ua":"ua","make":"Apple","model":"Macbook","os":"MacOs","osv":"14","h":1080,"w":1024,"pxratio":223,"js":1,"geoFetch":1,"ppi":154,"ext":{"fiftyonedegrees_deviceId":""}}}`) } func TestConfigHashFromConfig(t *testing.T) { @@ -638,7 +633,7 @@ func TestBuilderHandleDeviceDetectorError(t *testing.T) { func TestHydrateFields(t *testing.T) { deviceInfo := &deviceInfo{ HardwareVendor: "Apple", - HardwareName: "Macbook Pro", + HardwareName: "Macbook", DeviceType: "device", PlatformVendor: "Apple", PlatformName: "MacOs", @@ -654,8 +649,6 @@ func TestHydrateFields(t *testing.T) { HardwareFamily: "Macbook", HardwareModel: "Macbook", HardwareModelVariants: "Macbook", - HardwareNamePrefix: "Macbook", - HardwareNameVersion: "Pro", UserAgent: "ua", DeviceId: "dev-ide", } @@ -706,7 +699,7 @@ func TestHydrateFields(t *testing.T) { require.JSONEq( t, - `{"devicetype":2,"dnt":0,"ext":{"fiftyonedegrees_deviceId":"dev-ide","h":"901","w":843},"geoFetch":1,"h":901,"hwv":"Pro","js":1,"language":"en","make":"Apple","model":"Macintosh","os":"MacOs","osv":"14","pxratio":223,"sua":{"browsers":[{"brand":"Not/A)Brand","version":["99","0","0","0"]},{"brand":"Samsung Internet","version":["23","0","1","1"]},{"brand":"Chromium","version":["115","0","5790","168"]}],"mobile":1,"model":"SM-A037U","platform":{"brand":"Android","version":["13","0","0"]},"source":2},"ua":"Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-A037U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36","w":843}`, + `{"devicetype":2,"dnt":0,"ext":{"fiftyonedegrees_deviceId":"dev-ide","h":"901","w":843},"geoFetch":1,"h":901,"js":1,"language":"en","make":"Apple","model":"Macintosh","os":"MacOs","osv":"14","pxratio":223,"sua":{"browsers":[{"brand":"Not/A)Brand","version":["99","0","0","0"]},{"brand":"Samsung Internet","version":["23","0","1","1"]},{"brand":"Chromium","version":["115","0","5790","168"]}],"mobile":1,"model":"SM-A037U","platform":{"brand":"Android","version":["13","0","0"]},"source":2},"ua":"Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-A037U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36","w":843}`, string(deviceHolder.Device), ) } diff --git a/modules/fiftyonedegrees/devicedetection/no-cgo.go b/modules/fiftyonedegrees/devicedetection/no-cgo.go index 4fe5814f7a..c9ec89eb20 100644 --- a/modules/fiftyonedegrees/devicedetection/no-cgo.go +++ b/modules/fiftyonedegrees/devicedetection/no-cgo.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/modules/moduledeps" ) const errMsg = "fiftyonedegrees should not be enabled unless CGO is enabled" diff --git a/modules/generator/builder.tmpl b/modules/generator/builder.tmpl index ebf49e7615..211e0d1e08 100644 --- a/modules/generator/builder.tmpl +++ b/modules/generator/builder.tmpl @@ -2,7 +2,7 @@ package modules import ( {{- range $vendor, $modules := .}} {{- range $module := $modules}} - {{$vendor}}{{$module | Title}} "github.com/prebid/prebid-server/v4/modules/{{$vendor}}/{{$module}}" + {{$vendor}}{{$module | Title}} "github.com/prebid/prebid-server/v3/modules/{{$vendor}}/{{$module}}" {{- end}} {{- end}} ) diff --git a/modules/helpers.go b/modules/helpers.go index 66fb40a370..9a3c547e0b 100644 --- a/modules/helpers.go +++ b/modules/helpers.go @@ -4,17 +4,17 @@ import ( "fmt" "strings" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) var moduleReplacer = strings.NewReplacer(".", "_", "-", "_") func createModuleStageNamesCollection(modules map[string]interface{}) (map[string][]string, error) { moduleStageNameCollector := make(map[string][]string) + var added bool for id, hook := range modules { - added := false if _, ok := hook.(hookstage.Entrypoint); ok { added = true stageName := hooks.StageEntrypoint.String() diff --git a/modules/moduledeps/deps.go b/modules/moduledeps/deps.go index 5d15c4d510..a60587e1ef 100644 --- a/modules/moduledeps/deps.go +++ b/modules/moduledeps/deps.go @@ -3,7 +3,7 @@ package moduledeps import ( "net/http" - "github.com/prebid/prebid-server/v4/currency" + "github.com/prebid/prebid-server/v3/currency" ) // ModuleDeps provides dependencies that custom modules may need for hooks execution. diff --git a/modules/modules.go b/modules/modules.go index cdca17ff8f..288beb5b7b 100644 --- a/modules/modules.go +++ b/modules/modules.go @@ -4,11 +4,11 @@ import ( "encoding/json" "fmt" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) //go:generate go run ./generator/buildergen.go diff --git a/modules/modules_test.go b/modules/modules_test.go index e9a1102efd..cdc573e992 100644 --- a/modules/modules_test.go +++ b/modules/modules_test.go @@ -9,10 +9,10 @@ import ( "net/http" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" "github.com/stretchr/testify/assert" ) diff --git a/modules/msp_plugin.go b/modules/msp_plugin.go index 229e24ed33..b69c0788b2 100644 --- a/modules/msp_plugin.go +++ b/modules/msp_plugin.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/golang/glog" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - mspPlugin "github.com/prebid/prebid-server/v4/msp/plugin" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + mspPlugin "github.com/prebid/prebid-server/v3/msp/plugin" ) type PluginBuilder interface { diff --git a/modules/prebid/ortb2blocking/analytics.go b/modules/prebid/ortb2blocking/analytics.go index de2b4db61f..bab50e3a4e 100644 --- a/modules/prebid/ortb2blocking/analytics.go +++ b/modules/prebid/ortb2blocking/analytics.go @@ -1,8 +1,8 @@ package ortb2blocking import ( - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) const enforceBlockingTag = "enforce_blocking" diff --git a/modules/prebid/ortb2blocking/config.go b/modules/prebid/ortb2blocking/config.go index 102b895f73..1990b0a56a 100644 --- a/modules/prebid/ortb2blocking/config.go +++ b/modules/prebid/ortb2blocking/config.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func newConfig(data json.RawMessage) (config, error) { @@ -84,21 +84,13 @@ type BtypeActionOverride struct { type Battr struct { ActionOverrides BattrActionOverride `json:"action_overrides"` AllowedBannerAttrForDeals []int `json:"allowed_banner_attr_for_deals"` - AllowedVideoAttrForDeals []int `json:"allowed_video_attr_for_deals"` - AllowedAudioAttrForDeals []int `json:"allowed_audio_attr_for_deals"` BlockedBannerAttr []int `json:"blocked_banner_attr"` - BlockedVideoAttr []int `json:"blocked_video_attr"` - BlockedAudioAttr []int `json:"blocked_audio_attr"` EnforceBlocks bool `json:"enforce_blocks"` } type BattrActionOverride struct { AllowedBannerAttrForDeals []ActionOverride `json:"allowed_banner_attr_for_deals"` - AllowedVideoAttrForDeals []ActionOverride `json:"allowed_video_attr_for_deals"` - AllowedAudioAttrForDeals []ActionOverride `json:"allowed_audio_attr_for_deals"` BlockedBannerAttr []ActionOverride `json:"blocked_banner_attr"` - BlockedVideoAttr []ActionOverride `json:"blocked_video_attr"` - BlockedAudioAttr []ActionOverride `json:"blocked_audio_attr"` EnforceBlocks []ActionOverride `json:"enforce_blocks"` } diff --git a/modules/prebid/ortb2blocking/hook_bidderrequest.go b/modules/prebid/ortb2blocking/hook_bidderrequest.go index 9542777ae0..4b3cb87c85 100644 --- a/modules/prebid/ortb2blocking/hook_bidderrequest.go +++ b/modules/prebid/ortb2blocking/hook_bidderrequest.go @@ -7,9 +7,9 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func handleBidderRequestHook( @@ -47,10 +47,7 @@ func handleBidderRequestHook( updateCatTax(cfg, payload, &blockingAttributes, &changeSet) result.ChangeSet = changeSet - if result.ModuleContext == nil { - result.ModuleContext = hookstage.NewModuleContext() - } - result.ModuleContext.Set(payload.Bidder, blockingAttributes) + result.ModuleContext = hookstage.ModuleContext{payload.Bidder: blockingAttributes} return result, nil } @@ -150,22 +147,13 @@ func updateBType( return imp.Banner != nil && len(imp.Banner.BType) > 0 } - overrides, messages, err := findImpressionOverrides(payload, actionOverrides, btype, checkAttrExistence) + attributes.bType, messages, err = findImpressionOverrides(payload, actionOverrides, btype, checkAttrExistence) result.Warnings = mergeStrings(result.Warnings, messages...) if err != nil { return fmt.Errorf("failed to get override for imp.*.banner.btype: %s", err) - } - - // Filter to only apply to impressions with Banner objects - if len(overrides) > 0 { - filteredOverrides := filterByMediaType(payload, overrides, func(imp openrtb2.Imp) bool { - return imp.Banner != nil - }) - if len(filteredOverrides) > 0 { - mutation := createBTypeMutation(filteredOverrides) - changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "banner", "btype") - } - attributes.bType = overrides + } else if len(attributes.bType) > 0 { + mutation := bTypeMutation(attributes.bType) + changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "banner", "btype") } return nil @@ -179,91 +167,21 @@ func updateBAttr( changeSet *hookstage.ChangeSet[hookstage.BidderRequestPayload], ) (err error) { var messages []string - - bannerBattr := cfg.Attributes.Battr.BlockedBannerAttr - bannerActionOverrides := cfg.Attributes.Battr.ActionOverrides.BlockedBannerAttr - bannerCheckAttrExistence := func(imp openrtb2.Imp) bool { + battr := cfg.Attributes.Battr.BlockedBannerAttr + actionOverrides := cfg.Attributes.Battr.ActionOverrides.BlockedBannerAttr + checkAttrExistence := func(imp openrtb2.Imp) bool { return imp.Banner != nil && len(imp.Banner.BAttr) > 0 } - bannerOverrides, bannerMessages, err := findImpressionOverrides(payload, bannerActionOverrides, bannerBattr, bannerCheckAttrExistence) - messages = append(messages, bannerMessages...) + attributes.bAttr, messages, err = findImpressionOverrides(payload, actionOverrides, battr, checkAttrExistence) + result.Warnings = mergeStrings(result.Warnings, messages...) if err != nil { return fmt.Errorf("failed to get override for imp.*.banner.battr: %s", err) + } else if len(attributes.bAttr) > 0 { + mutation := bAttrMutation(attributes.bAttr) + changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "banner", "battr") } - // Apply banner battr only to impressions that have Banner objects - if len(bannerOverrides) > 0 { - filteredBannerOverrides := filterByMediaType(payload, bannerOverrides, func(imp openrtb2.Imp) bool { - return imp.Banner != nil - }) - if len(filteredBannerOverrides) > 0 { - mutation := createBAttrMutation(filteredBannerOverrides, "banner") - changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "banner", "battr") - } - } - - // Video battr - videoBattr := cfg.Attributes.Battr.BlockedVideoAttr - videoActionOverrides := cfg.Attributes.Battr.ActionOverrides.BlockedVideoAttr - videoCheckAttrExistence := func(imp openrtb2.Imp) bool { - return imp.Video != nil && len(imp.Video.BAttr) > 0 - } - - videoOverrides, videoMessages, err := findImpressionOverrides(payload, videoActionOverrides, videoBattr, videoCheckAttrExistence) - messages = append(messages, videoMessages...) - if err != nil { - return fmt.Errorf("failed to get override for imp.*.video.battr: %s", err) - } - - // Apply video battr only to impressions that have Video objects - if len(videoOverrides) > 0 { - filteredVideoOverrides := filterByMediaType(payload, videoOverrides, func(imp openrtb2.Imp) bool { - return imp.Video != nil - }) - if len(filteredVideoOverrides) > 0 { - mutation := createBAttrMutation(filteredVideoOverrides, "video") - changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "video", "battr") - } - } - - // Audio battr - audioBattr := cfg.Attributes.Battr.BlockedAudioAttr - audioActionOverrides := cfg.Attributes.Battr.ActionOverrides.BlockedAudioAttr - audioCheckAttrExistence := func(imp openrtb2.Imp) bool { - return imp.Audio != nil && len(imp.Audio.BAttr) > 0 - } - - audioOverrides, audioMessages, err := findImpressionOverrides(payload, audioActionOverrides, audioBattr, audioCheckAttrExistence) - messages = append(messages, audioMessages...) - if err != nil { - return fmt.Errorf("failed to get override for imp.*.audio.battr: %s", err) - } - - // Apply audio battr only to impressions that have Audio objects - if len(audioOverrides) > 0 { - filteredAudioOverrides := filterByMediaType(payload, audioOverrides, func(imp openrtb2.Imp) bool { - return imp.Audio != nil - }) - if len(filteredAudioOverrides) > 0 { - mutation := createBAttrMutation(filteredAudioOverrides, "audio") - changeSet.AddMutation(mutation, hookstage.MutationUpdate, "bidrequest", "imp", "audio", "battr") - } - } - - // Store all attributes and merge messages - attributes.bAttr = make(map[string][]int) - for k, v := range bannerOverrides { - attributes.bAttr[k] = v - } - for k, v := range videoOverrides { - attributes.bAttr[k] = v - } - for k, v := range audioOverrides { - attributes.bAttr[k] = v - } - - result.Warnings = mergeStrings(result.Warnings, messages...) return nil } @@ -281,6 +199,26 @@ func updateCatTax( changeSet.BidderRequest().CatTax().Update(attributes.catTax) } +func bTypeMutation(bTypeByImp map[string][]int) hookstage.MutationFunc[hookstage.BidderRequestPayload] { + return mutationForImp(bTypeByImp, func(imp openrtb2.Imp, btype []int) openrtb2.Imp { + imp.Banner.BType = make([]openrtb2.BannerAdType, len(btype)) + for i := range btype { + imp.Banner.BType[i] = openrtb2.BannerAdType(btype[i]) + } + return imp + }) +} + +func bAttrMutation(bAttrByImp map[string][]int) hookstage.MutationFunc[hookstage.BidderRequestPayload] { + return mutationForImp(bAttrByImp, func(imp openrtb2.Imp, battr []int) openrtb2.Imp { + imp.Banner.BAttr = make([]adcom1.CreativeAttribute, len(battr)) + for i := range battr { + imp.Banner.BAttr[i] = adcom1.CreativeAttribute(battr[i]) + } + return imp + }) +} + type impUpdateFunc func(imp openrtb2.Imp, values []int) openrtb2.Imp func mutationForImp( @@ -484,64 +422,3 @@ func validateCondition(conditions Conditions) error { } return nil } - -// filterByMediaType filters overrides to only include impressions with a specific media type -func filterByMediaType( - payload hookstage.BidderRequestPayload, - overrides map[string][]int, - mediaTypeExists func(imp openrtb2.Imp) bool, -) map[string][]int { - filtered := make(map[string][]int) - - for _, imp := range payload.Request.Imp { - if values, exists := overrides[imp.ID]; exists && mediaTypeExists(imp) { - filtered[imp.ID] = values - } - } - - return filtered -} - -// createBAttrMutation creates a mutation function for a specific media type -func createBAttrMutation(bAttrByImp map[string][]int, mediaType string) hookstage.MutationFunc[hookstage.BidderRequestPayload] { - return func(payload hookstage.BidderRequestPayload) (hookstage.BidderRequestPayload, error) { - for i, imp := range payload.Request.Imp { - if values, ok := bAttrByImp[imp.ID]; ok && len(values) > 0 { - switch mediaType { - case "banner": - imp.Banner.BAttr = make([]adcom1.CreativeAttribute, len(values)) - for j, attr := range values { - imp.Banner.BAttr[j] = adcom1.CreativeAttribute(attr) - } - case "video": - imp.Video.BAttr = make([]adcom1.CreativeAttribute, len(values)) - for j, attr := range values { - imp.Video.BAttr[j] = adcom1.CreativeAttribute(attr) - } - case "audio": - imp.Audio.BAttr = make([]adcom1.CreativeAttribute, len(values)) - for j, attr := range values { - imp.Audio.BAttr[j] = adcom1.CreativeAttribute(attr) - } - } - payload.Request.Imp[i] = imp - } - } - return payload, nil - } -} - -func createBTypeMutation(bTypeByImp map[string][]int) hookstage.MutationFunc[hookstage.BidderRequestPayload] { - return func(payload hookstage.BidderRequestPayload) (hookstage.BidderRequestPayload, error) { - for i, imp := range payload.Request.Imp { - if values, ok := bTypeByImp[imp.ID]; ok && len(values) > 0 { - imp.Banner.BType = make([]openrtb2.BannerAdType, len(values)) - for j, btype := range values { - imp.Banner.BType[j] = openrtb2.BannerAdType(btype) - } - payload.Request.Imp[i] = imp - } - } - return payload, nil - } -} diff --git a/modules/prebid/ortb2blocking/hook_bidderrequest_test.go b/modules/prebid/ortb2blocking/hook_bidderrequest_test.go deleted file mode 100644 index 82ad708803..0000000000 --- a/modules/prebid/ortb2blocking/hook_bidderrequest_test.go +++ /dev/null @@ -1,738 +0,0 @@ -package ortb2blocking - -import ( - "testing" - - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestUpdateBAttr_DoesNotCreateMediaTypeObjects(t *testing.T) { - cfg := config{ - Attributes: Attributes{ - Battr: Battr{ - BlockedBannerAttr: []int{1, 2, 3}, - BlockedVideoAttr: []int{4, 5, 6}, - BlockedAudioAttr: []int{7, 8, 9}, - }, - }, - } - - var sizeW int64 = 640 - var sizeH int64 = 480 - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-video-only", - Video: &openrtb2.Video{W: &sizeW, H: &sizeH}, - // Banner = nil, Audio = nil - }, - { - ID: "imp-audio-only", - Audio: &openrtb2.Audio{}, - // Banner = nil, Video = nil - }, - }, - }, - }, - Bidder: "test-bidder", - } - - var blockingAttrs blockingAttributes - var result hookstage.HookResult[hookstage.BidderRequestPayload] - var changeSet hookstage.ChangeSet[hookstage.BidderRequestPayload] - - err := updateBAttr(cfg, payload, &blockingAttrs, &result, &changeSet) - require.NoError(t, err) - - // Check that mutations were created only for existing media types - mutations := changeSet.Mutations() - - // Check the number of mutations - there should be only one for video and one for audio - videoMutationsCount := 0 - audioMutationsCount := 0 - bannerMutationsCount := 0 - - for _, mutation := range mutations { - if len(mutation.Key()) >= 3 { - mediaType := mutation.Key()[2] // the third path element must be a media type - switch mediaType { - case "video": - videoMutationsCount++ - case "audio": - audioMutationsCount++ - case "banner": - bannerMutationsCount++ - } - } - } - - assert.Equal(t, 1, videoMutationsCount, "Should have exactly one video mutation") - assert.Equal(t, 1, audioMutationsCount, "Should have exactly one audio mutation") - assert.Equal(t, 0, bannerMutationsCount, "Should have no banner mutations") - - // Apply mutations manually using functions from the code - for _, mutation := range mutations { - updatedPayload, err := mutation.Apply(payload) - require.NoError(t, err) - payload = updatedPayload - } - - // Check that Banner/Audio objects were NOT created - for _, imp := range payload.Request.BidRequest.Imp { - switch imp.ID { - case "imp-video-only": - assert.NotNil(t, imp.Video, "Video should exist") - assert.Nil(t, imp.Banner, "Banner should NOT be created") - assert.Nil(t, imp.Audio, "Audio should NOT be created") - // Check that battr was added to video - if imp.Video != nil { - assert.Len(t, imp.Video.BAttr, 3, "Video should have battr applied") - } - case "imp-audio-only": - assert.NotNil(t, imp.Audio, "Audio should exist") - assert.Nil(t, imp.Banner, "Banner should NOT be created") - assert.Nil(t, imp.Video, "Video should NOT be created") - // Check that battr was added to audio - if imp.Audio != nil { - assert.Len(t, imp.Audio.BAttr, 3, "Audio should have battr applied") - } - } - } -} - -func TestUpdateBAttr_AppliesOnlyToExistingMediaTypes(t *testing.T) { - cfg := config{ - Attributes: Attributes{ - Battr: Battr{ - BlockedBannerAttr: []int{1, 2}, - BlockedVideoAttr: []int{3, 4}, - BlockedAudioAttr: []int{5, 6}, - }, - }, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-banner-only", - Banner: &openrtb2.Banner{W: ptrutil.ToPtr[int64](300), H: ptrutil.ToPtr[int64](250)}, - }, - { - ID: "imp-mixed", - Banner: &openrtb2.Banner{W: ptrutil.ToPtr[int64](728), H: ptrutil.ToPtr[int64](90)}, - Video: &openrtb2.Video{W: ptrutil.ToPtr[int64](640), H: ptrutil.ToPtr[int64](480)}, - }, - }, - }, - }, - Bidder: "test-bidder", - } - - var blockingAttrs blockingAttributes - var result hookstage.HookResult[hookstage.BidderRequestPayload] - var changeSet hookstage.ChangeSet[hookstage.BidderRequestPayload] - - err := updateBAttr(cfg, payload, &blockingAttrs, &result, &changeSet) - require.NoError(t, err) - - // We apply mutations - mutations := changeSet.Mutations() - for _, mutation := range mutations { - updatedPayload, err := mutation.Apply(payload) - require.NoError(t, err) - payload = updatedPayload - } - - for _, imp := range payload.Request.BidRequest.Imp { - switch imp.ID { - case "imp-banner-only": - assert.NotNil(t, imp.Banner, "Banner should exist") - assert.Nil(t, imp.Video, "Video should NOT be created") - assert.Nil(t, imp.Audio, "Audio should NOT be created") - if imp.Banner != nil { - assert.Len(t, imp.Banner.BAttr, 2, "Banner should have battr applied") - } - case "imp-mixed": - assert.NotNil(t, imp.Banner, "Banner should exist") - assert.NotNil(t, imp.Video, "Video should exist") - assert.Nil(t, imp.Audio, "Audio should NOT be created") - if imp.Banner != nil { - assert.Len(t, imp.Banner.BAttr, 2, "Banner should have battr applied") - } - if imp.Video != nil { - assert.Len(t, imp.Video.BAttr, 2, "Video should have battr applied") - } - } - } -} - -func TestFilterByMediaType(t *testing.T) { - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "has-banner", - Banner: &openrtb2.Banner{}, - }, - { - ID: "no-banner", - // Banner = nil - }, - }, - }, - }, - } - - overrides := map[string][]int{ - "has-banner": {1, 2, 3}, - "no-banner": {4, 5, 6}, - } - - filtered := filterByMediaType(payload, overrides, func(imp openrtb2.Imp) bool { - return imp.Banner != nil - }) - - // Only the impression with the Banner should remain. - assert.Len(t, filtered, 1) - assert.Contains(t, filtered, "has-banner") - assert.NotContains(t, filtered, "no-banner") - assert.Equal(t, []int{1, 2, 3}, filtered["has-banner"]) -} - -func TestCreateBAttrMutation(t *testing.T) { - bAttrByImp := map[string][]int{ - "imp1": {1, 2}, - "imp2": {3, 4}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Banner: &openrtb2.Banner{}, - }, - { - ID: "imp2", - Banner: &openrtb2.Banner{}, - }, - }, - }, - }, - } - - mutation := createBAttrMutation(bAttrByImp, "banner") - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - // Check that battr was applied - for _, imp := range updatedPayload.Request.BidRequest.Imp { - switch imp.ID { - case "imp1": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BAttr, 2) - assert.Equal(t, adcom1.CreativeAttribute(1), imp.Banner.BAttr[0]) - assert.Equal(t, adcom1.CreativeAttribute(2), imp.Banner.BAttr[1]) - case "imp2": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BAttr, 2) - assert.Equal(t, adcom1.CreativeAttribute(3), imp.Banner.BAttr[0]) - assert.Equal(t, adcom1.CreativeAttribute(4), imp.Banner.BAttr[1]) - } - } -} - -func TestCreateBTypeMutation(t *testing.T) { - bTypeByImp := map[string][]int{ - "imp1": {1, 2}, - "imp2": {3, 4}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Banner: &openrtb2.Banner{}, - }, - { - ID: "imp2", - Banner: &openrtb2.Banner{}, - }, - }, - }, - }, - } - - mutation := createBTypeMutation(bTypeByImp) - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - // Check that btype was applied - for _, imp := range updatedPayload.Request.BidRequest.Imp { - switch imp.ID { - case "imp1": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BType, 2) - assert.Equal(t, openrtb2.BannerAdType(1), imp.Banner.BType[0]) - assert.Equal(t, openrtb2.BannerAdType(2), imp.Banner.BType[1]) - case "imp2": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BType, 2) - assert.Equal(t, openrtb2.BannerAdType(3), imp.Banner.BType[0]) - assert.Equal(t, openrtb2.BannerAdType(4), imp.Banner.BType[1]) - } - } -} - -func TestUpdateBType_DoesNotCreateBannerObjects(t *testing.T) { - cfg := config{ - Attributes: Attributes{ - Btype: Btype{ - BlockedBannerType: []int{1, 2, 3}, - }, - }, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp-video-only", - Video: &openrtb2.Video{W: ptrutil.ToPtr[int64](640), H: ptrutil.ToPtr[int64](480)}, - }, - { - ID: "imp-with-banner", - Banner: &openrtb2.Banner{}, - }, - }, - }, - }, - Bidder: "test-bidder", - } - - var blockingAttrs blockingAttributes - var result hookstage.HookResult[hookstage.BidderRequestPayload] - var changeSet hookstage.ChangeSet[hookstage.BidderRequestPayload] - - err := updateBType(cfg, payload, &blockingAttrs, &result, &changeSet) - require.NoError(t, err) - - // Apply mutations - mutations := changeSet.Mutations() - for _, mutation := range mutations { - updatedPayload, err := mutation.Apply(payload) - require.NoError(t, err) - payload = updatedPayload - } - - // Check that Banner was NOT created for video-only impression - for _, imp := range payload.Request.BidRequest.Imp { - switch imp.ID { - case "imp-video-only": - assert.NotNil(t, imp.Video, "Video should exist") - assert.Nil(t, imp.Banner, "Banner should NOT be created") - case "imp-with-banner": - assert.NotNil(t, imp.Banner, "Banner should exist") - assert.Len(t, imp.Banner.BType, 3, "Banner should have btype applied") - } - } -} - -func TestCreateBAttrMutation_EmptyValues(t *testing.T) { - bAttrByImp := map[string][]int{ - "imp1": {}, - "imp2": {1, 2}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Banner: &openrtb2.Banner{}, - }, - { - ID: "imp2", - Banner: &openrtb2.Banner{}, - }, - }, - }, - }, - } - - mutation := createBAttrMutation(bAttrByImp, "banner") - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - // Check that empty values are handled correctly - for _, imp := range updatedPayload.Request.BidRequest.Imp { - switch imp.ID { - case "imp1": - require.NotNil(t, imp.Banner) - // Empty array should result in empty BAttr - assert.Len(t, imp.Banner.BAttr, 0) - case "imp2": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BAttr, 2) - } - } -} - -func TestCreateBTypeMutation_EmptyValues(t *testing.T) { - bTypeByImp := map[string][]int{ - "imp1": {}, - "imp2": {1, 2}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Banner: &openrtb2.Banner{}, - }, - { - ID: "imp2", - Banner: &openrtb2.Banner{}, - }, - }, - }, - }, - } - - mutation := createBTypeMutation(bTypeByImp) - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - for _, imp := range updatedPayload.Request.BidRequest.Imp { - switch imp.ID { - case "imp1": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BType, 0) - case "imp2": - require.NotNil(t, imp.Banner) - assert.Len(t, imp.Banner.BType, 2) - } - } -} - -func TestMediaTypesFrom(t *testing.T) { - request := &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Banner: &openrtb2.Banner{}, - Video: &openrtb2.Video{}, - }, - { - ID: "imp2", - Audio: &openrtb2.Audio{}, - }, - }, - } - - mediaTypes := mediaTypesFrom(request) - - assert.Len(t, mediaTypes, 3) - assert.Contains(t, mediaTypes, "banner") - assert.Contains(t, mediaTypes, "video") - assert.Contains(t, mediaTypes, "audio") - assert.NotContains(t, mediaTypes, "native") -} - -func TestMediaTypesFromImp(t *testing.T) { - tests := []struct { - name string - imp openrtb2.Imp - expected []string - }{ - { - name: "banner only", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - }, - expected: []string{"banner"}, - }, - { - name: "video only", - imp: openrtb2.Imp{ - Video: &openrtb2.Video{}, - }, - expected: []string{"video"}, - }, - { - name: "audio only", - imp: openrtb2.Imp{ - Audio: &openrtb2.Audio{}, - }, - expected: []string{"audio"}, - }, - { - name: "native only", - imp: openrtb2.Imp{ - Native: &openrtb2.Native{}, - }, - expected: []string{"native"}, - }, - { - name: "multiple types", - imp: openrtb2.Imp{ - Banner: &openrtb2.Banner{}, - Video: &openrtb2.Video{}, - Audio: &openrtb2.Audio{}, - }, - expected: []string{"banner", "video", "audio"}, - }, - { - name: "no media types", - imp: openrtb2.Imp{}, - expected: []string{}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := mediaTypesFromImp(tt.imp) - assert.Len(t, result, len(tt.expected)) - for _, mt := range tt.expected { - assert.Contains(t, result, mt) - } - }) - } -} - -func TestMediaTypes_String(t *testing.T) { - tests := []struct { - name string - mt mediaTypes - expected string - }{ - { - name: "multiple types sorted", - mt: mediaTypes{ - "video": struct{}{}, - "banner": struct{}{}, - "audio": struct{}{}, - }, - expected: "audio, banner, video", - }, - { - name: "empty", - mt: mediaTypes{}, - expected: "", - }, - { - name: "all types", - mt: mediaTypes{ - "audio": struct{}{}, - "banner": struct{}{}, - "native": struct{}{}, - "video": struct{}{}, - }, - expected: "audio, banner, native, video", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := tt.mt.String() - assert.Equal(t, tt.expected, result) - }) - } -} - -func TestMediaTypes_Intersects(t *testing.T) { - mt := mediaTypes{ - "banner": struct{}{}, - "video": struct{}{}, - } - - tests := []struct { - name string - input []string - expected bool - }{ - { - name: "exact match", - input: []string{"banner"}, - expected: true, - }, - { - name: "case insensitive match", - input: []string{"BANNER"}, - expected: true, - }, - { - name: "multiple with match", - input: []string{"audio", "video"}, - expected: true, - }, - { - name: "no match", - input: []string{"audio", "native"}, - expected: false, - }, - { - name: "empty input", - input: []string{}, - expected: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - result := mt.intersects(tt.input) - assert.Equal(t, tt.expected, result) - }) - } -} - -func TestValidateCondition(t *testing.T) { - tests := []struct { - name string - condition Conditions - wantErr bool - }{ - { - name: "valid - bidders only", - condition: Conditions{ - Bidders: []string{"bidder1"}, - }, - wantErr: false, - }, - { - name: "valid - media types only", - condition: Conditions{ - MediaTypes: []string{"banner"}, - }, - wantErr: false, - }, - { - name: "valid - both present", - condition: Conditions{ - Bidders: []string{"bidder1"}, - MediaTypes: []string{"banner"}, - }, - wantErr: false, - }, - { - name: "invalid - both absent", - condition: Conditions{}, - wantErr: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := validateCondition(tt.condition) - if tt.wantErr { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - }) - } -} - -func TestFilterByMediaType_NoMatches(t *testing.T) { - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Video: &openrtb2.Video{}, - }, - }, - }, - }, - } - - overrides := map[string][]int{ - "imp1": {1, 2, 3}, - } - - // Filter for Banner, but impression has only Video - filtered := filterByMediaType(payload, overrides, func(imp openrtb2.Imp) bool { - return imp.Banner != nil - }) - - assert.Len(t, filtered, 0, "Should not include impressions without matching media type") -} - -func TestCreateBAttrMutation_VideoMediaType(t *testing.T) { - bAttrByImp := map[string][]int{ - "imp1": {1, 2}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Video: &openrtb2.Video{}, - }, - }, - }, - }, - } - - mutation := createBAttrMutation(bAttrByImp, "video") - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - imp := updatedPayload.Request.BidRequest.Imp[0] - require.NotNil(t, imp.Video) - assert.Len(t, imp.Video.BAttr, 2) - assert.Equal(t, adcom1.CreativeAttribute(1), imp.Video.BAttr[0]) - assert.Equal(t, adcom1.CreativeAttribute(2), imp.Video.BAttr[1]) -} - -func TestCreateBAttrMutation_AudioMediaType(t *testing.T) { - bAttrByImp := map[string][]int{ - "imp1": {7, 8, 9}, - } - - payload := hookstage.BidderRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - Imp: []openrtb2.Imp{ - { - ID: "imp1", - Audio: &openrtb2.Audio{}, - }, - }, - }, - }, - } - - mutation := createBAttrMutation(bAttrByImp, "audio") - updatedPayload, err := mutation(payload) - require.NoError(t, err) - - imp := updatedPayload.Request.BidRequest.Imp[0] - require.NotNil(t, imp.Audio) - assert.Len(t, imp.Audio.BAttr, 3) - assert.Equal(t, adcom1.CreativeAttribute(7), imp.Audio.BAttr[0]) - assert.Equal(t, adcom1.CreativeAttribute(8), imp.Audio.BAttr[1]) - assert.Equal(t, adcom1.CreativeAttribute(9), imp.Audio.BAttr[2]) -} diff --git a/modules/prebid/ortb2blocking/hook_raw_bidder_response.go b/modules/prebid/ortb2blocking/hook_raw_bidder_response.go index cbdae93735..a6ddbdd58c 100644 --- a/modules/prebid/ortb2blocking/hook_raw_bidder_response.go +++ b/modules/prebid/ortb2blocking/hook_raw_bidder_response.go @@ -7,18 +7,18 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" ) func handleRawBidderResponseHook( cfg config, payload hookstage.RawBidderResponsePayload, - moduleCtx *hookstage.ModuleContext, + moduleCtx hookstage.ModuleContext, ) (result hookstage.HookResult[hookstage.RawBidderResponsePayload], err error) { bidder := payload.Bidder - blockAttrsVal, ok := moduleCtx.Get(bidder) + blockAttrsVal, ok := moduleCtx[bidder] if !ok { // if there are no blocking attributes for this bidder just pass empty blockingAttributes for further processing // other values from config must still be checked diff --git a/modules/prebid/ortb2blocking/module.go b/modules/prebid/ortb2blocking/module.go index e31c7ccb7e..24ff28df74 100644 --- a/modules/prebid/ortb2blocking/module.go +++ b/modules/prebid/ortb2blocking/module.go @@ -5,8 +5,8 @@ import ( "encoding/json" "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" ) func Builder(_ json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error) { diff --git a/modules/prebid/ortb2blocking/module_test.go b/modules/prebid/ortb2blocking/module_test.go index 85be537bb6..17008b2dad 100644 --- a/modules/prebid/ortb2blocking/module_test.go +++ b/modules/prebid/ortb2blocking/module_test.go @@ -8,12 +8,12 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/adapters" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookexecution" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -307,9 +307,8 @@ func TestHandleBidderRequestHook(t *testing.T) { Video: &openrtb2.Video{}, }, { - ID: "ImpID2", - Audio: &openrtb2.Audio{}, - Banner: &openrtb2.Banner{}, + ID: "ImpID2", + Audio: &openrtb2.Audio{}, }, }, }, @@ -343,9 +342,8 @@ func TestHandleBidderRequestHook(t *testing.T) { }, }, expectedHookResult: hookstage.HookResult[hookstage.BidderRequestPayload]{ - ModuleContext: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{ + ModuleContext: map[string]interface{}{ + bidder: blockingAttributes{ bAdv: []string{bAdvA, bAdvB}, bApp: []string{bApp3}, bCat: []string{bCat1, bCat2, bCat3, bCat4}, @@ -358,9 +356,8 @@ func TestHandleBidderRequestHook(t *testing.T) { "ImpID2": toInt([]adcom1.CreativeAttribute{bAttr1, bAttr8, bAttr9, bAttr10}), }, catTax: catTax, - }) - return mctx - }(), + }, + }, Warnings: []string{ // multiple warnings may be added (per condition) "More than one condition matches request. Bidder: appnexus, request media types: audio, banner, native, video", @@ -391,14 +388,13 @@ func TestHandleBidderRequestHook(t *testing.T) { }, }, expectedHookResult: hookstage.HookResult[hookstage.BidderRequestPayload]{ - ModuleContext: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{ + ModuleContext: map[string]interface{}{ + bidder: blockingAttributes{ bAdv: []string{bAdvA, bAdvB, bAdvC}, + bType: map[string][]int{}, bAttr: map[string][]int{}, - }) - return mctx - }(), + }, + }, }, expectedError: nil, }, @@ -443,13 +439,10 @@ func TestHandleBidderRequestHook(t *testing.T) { }, }, expectedHookResult: hookstage.HookResult[hookstage.BidderRequestPayload]{ - ModuleContext: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{ - bAttr: map[string][]int{}, - }) - return mctx - }(), + ModuleContext: map[string]interface{}{bidder: blockingAttributes{ + bType: map[string][]int{}, + bAttr: map[string][]int{}, + }}, }, expectedError: nil, }, @@ -467,13 +460,10 @@ func TestHandleBidderRequestHook(t *testing.T) { Imp: []openrtb2.Imp{{ID: "ImpID1", Video: &openrtb2.Video{}}}, }, expectedHookResult: hookstage.HookResult[hookstage.BidderRequestPayload]{ - ModuleContext: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{ - bAttr: map[string][]int{}, - }) - return mctx - }(), + ModuleContext: map[string]interface{}{bidder: blockingAttributes{ + bType: map[string][]int{}, + bAttr: map[string][]int{}, + }}, }, expectedError: nil, }, @@ -591,7 +581,7 @@ func TestHandleBidderRequestHook(t *testing.T) { hookstage.ModuleInvocationContext{ AccountConfig: test.config, Endpoint: hookexecution.EndpointAuction, - ModuleContext: hookstage.NewModuleContext(), + ModuleContext: map[string]interface{}{}, }, payload, ) @@ -617,7 +607,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { description string payload hookstage.RawBidderResponsePayload config json.RawMessage - moduleCtx *hookstage.ModuleContext + moduleCtx hookstage.ModuleContext expectedBids []*adapters.TypedBid expectedHookResult hookstage.HookResult[hookstage.RawBidderResponsePayload] expectedError error @@ -667,11 +657,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ADomain: []string{"foo"}, ImpID: impID1}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, "boo") - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: "boo"}, expectedError: hookexecution.NewFailure("could not cast blocking attributes for bidder `appnexus`, module context has incorrect data"), }, { @@ -692,11 +678,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bAdv: []string{"forbidden_domain"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bAdv: []string{"forbidden_domain"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -744,11 +726,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set("other-bidder", blockingAttributes{bAdv: []string{"forbidden_domain"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{"other-bidder": blockingAttributes{bAdv: []string{"forbidden_domain"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -791,11 +769,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bAdv: []string{"forbidden_domain"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bAdv: []string{"forbidden_domain"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -838,11 +812,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bAdv: []string{"forbidden_domain"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bAdv: []string{"forbidden_domain"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -882,11 +852,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -934,11 +900,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -981,11 +943,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", ADomain: []string{"good_domain"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bAdv: []string{"forbidden_domain"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bAdv: []string{"forbidden_domain"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -1106,11 +1064,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", Cat: []string{"moto"}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bCat: []string{"fishing"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bCat: []string{"fishing"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -1236,11 +1190,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", CatTax: 2, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{catTax: 2}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{catTax: 2}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -1329,11 +1279,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", Bundle: "allowed_bundle", ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bApp: []string{"forbidden_bundle"}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bApp: []string{"forbidden_bundle"}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -1432,11 +1378,7 @@ func TestHandleRawBidderResponseHook(t *testing.T) { Bid: &openrtb2.Bid{ID: "2", Attr: []adcom1.CreativeAttribute{2}, ImpID: impID2}, }, }, - moduleCtx: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set(bidder, blockingAttributes{bAttr: map[string][]int{impID1: {1}}}) - return mctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{bAttr: map[string][]int{impID1: {1}}}}, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ @@ -1559,17 +1501,13 @@ func TestHandleRawBidderResponseHook(t *testing.T) { }, }, }, - moduleCtx: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(bidder, blockingAttributes{ - bAdv: []string{"forbidden_domain"}, - bCat: []string{"fishing"}, - catTax: 2, - bApp: []string{"forbidden_bundle"}, - bAttr: map[string][]int{impID1: {1}}, - }) - return ctx - }(), + moduleCtx: map[string]interface{}{bidder: blockingAttributes{ + bAdv: []string{"forbidden_domain"}, + bCat: []string{"fishing"}, + catTax: 2, + bApp: []string{"forbidden_bundle"}, + bAttr: map[string][]int{impID1: {1}}}, + }, expectedHookResult: hookstage.HookResult[hookstage.RawBidderResponsePayload]{ AnalyticsTags: hookanalytics.Analytics{ Activities: []hookanalytics.Activity{ diff --git a/modules/prebid/rulesengine/bidder_config_ruleset.go b/modules/prebid/rulesengine/bidder_config_ruleset.go index 59d2c0079b..888c41c696 100644 --- a/modules/prebid/rulesengine/bidder_config_ruleset.go +++ b/modules/prebid/rulesengine/bidder_config_ruleset.go @@ -1,7 +1,7 @@ package rulesengine import ( - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/rules" ) // buildBidderConfigRuleSet builds a dynamic ruleset based on the geoscope annotations in the diff --git a/modules/prebid/rulesengine/bidder_config_ruleset_builder.go b/modules/prebid/rulesengine/bidder_config_ruleset_builder.go index 85eb01753c..2fe9b705c6 100644 --- a/modules/prebid/rulesengine/bidder_config_ruleset_builder.go +++ b/modules/prebid/rulesengine/bidder_config_ruleset_builder.go @@ -6,8 +6,8 @@ import ( "slices" "strings" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/rules" ) type CountryExclusions = map[string][]string diff --git a/modules/prebid/rulesengine/bidder_config_ruleset_builder_test.go b/modules/prebid/rulesengine/bidder_config_ruleset_builder_test.go index 709fe3156b..e9f9743aff 100644 --- a/modules/prebid/rulesengine/bidder_config_ruleset_builder_test.go +++ b/modules/prebid/rulesengine/bidder_config_ruleset_builder_test.go @@ -3,7 +3,7 @@ package rulesengine import ( "testing" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/rules" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/bidder_config_ruleset_test.go b/modules/prebid/rulesengine/bidder_config_ruleset_test.go index 0813028930..93af63cd21 100644 --- a/modules/prebid/rulesengine/bidder_config_ruleset_test.go +++ b/modules/prebid/rulesengine/bidder_config_ruleset_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/rules" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/cache.go b/modules/prebid/rulesengine/cache.go index 2110b0cd6a..1b09abc1c5 100644 --- a/modules/prebid/rulesengine/cache.go +++ b/modules/prebid/rulesengine/cache.go @@ -5,7 +5,7 @@ import ( "sync/atomic" "time" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/util/timeutil" ) type accountID = string diff --git a/modules/prebid/rulesengine/cache_entry.go b/modules/prebid/rulesengine/cache_entry.go index 5f912d1827..5b995dd6e7 100644 --- a/modules/prebid/rulesengine/cache_entry.go +++ b/modules/prebid/rulesengine/cache_entry.go @@ -7,10 +7,10 @@ import ( "errors" "time" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" ) type hash = string diff --git a/modules/prebid/rulesengine/cache_entry_test.go b/modules/prebid/rulesengine/cache_entry_test.go index 0b3cb8d7dd..481f1a26c0 100644 --- a/modules/prebid/rulesengine/cache_entry_test.go +++ b/modules/prebid/rulesengine/cache_entry_test.go @@ -5,10 +5,10 @@ import ( "errors" "testing" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/config/config.go b/modules/prebid/rulesengine/config/config.go index 5654d20441..0dc4bded5d 100644 --- a/modules/prebid/rulesengine/config/config.go +++ b/modules/prebid/rulesengine/config/config.go @@ -7,8 +7,8 @@ import ( "fmt" "path/filepath" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/xeipuuv/gojsonschema" ) diff --git a/modules/prebid/rulesengine/hook_processed_auction.go b/modules/prebid/rulesengine/hook_processed_auction.go index dad6891353..144b72a943 100644 --- a/modules/prebid/rulesengine/hook_processed_auction.go +++ b/modules/prebid/rulesengine/hook_processed_auction.go @@ -3,9 +3,9 @@ package rulesengine import ( "fmt" - hs "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/randomutil" + hs "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/randomutil" ) type RequestWrapper = openrtb_ext.RequestWrapper diff --git a/modules/prebid/rulesengine/hook_processed_auction_test.go b/modules/prebid/rulesengine/hook_processed_auction_test.go index 7116644195..9cc5fc7f8e 100644 --- a/modules/prebid/rulesengine/hook_processed_auction_test.go +++ b/modules/prebid/rulesengine/hook_processed_auction_test.go @@ -2,9 +2,9 @@ package rulesengine import ( "fmt" - hs "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" + hs "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" "testing" "github.com/stretchr/testify/assert" diff --git a/modules/prebid/rulesengine/module.go b/modules/prebid/rulesengine/module.go index e0a59245ed..ca63c763b9 100644 --- a/modules/prebid/rulesengine/module.go +++ b/modules/prebid/rulesengine/module.go @@ -8,9 +8,9 @@ import ( "github.com/buger/jsonparser" - hs "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" + hs "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" ) // Builder configures the rules engine module initiating an in-memory cache and kicking diff --git a/modules/prebid/rulesengine/module_test.go b/modules/prebid/rulesengine/module_test.go index 9bffeb8816..2cf2bd59bb 100644 --- a/modules/prebid/rulesengine/module_test.go +++ b/modules/prebid/rulesengine/module_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/modules/moduledeps" + "github.com/prebid/prebid-server/v3/modules/moduledeps" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/result_functions.go b/modules/prebid/rulesengine/result_functions.go index eef632ba5b..64fe23bc4a 100644 --- a/modules/prebid/rulesengine/result_functions.go +++ b/modules/prebid/rulesengine/result_functions.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // ProcessedAuctionResultFunc is a type alias for a result function that runs in the processed auction request stage. diff --git a/modules/prebid/rulesengine/result_functions_test.go b/modules/prebid/rulesengine/result_functions_test.go index d452f1d83d..1b78471ed1 100644 --- a/modules/prebid/rulesengine/result_functions_test.go +++ b/modules/prebid/rulesengine/result_functions_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - hs "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" + hs "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/tree_builder.go b/modules/prebid/rulesengine/tree_builder.go index c74fc095cd..438212f061 100644 --- a/modules/prebid/rulesengine/tree_builder.go +++ b/modules/prebid/rulesengine/tree_builder.go @@ -1,8 +1,8 @@ package rulesengine import ( - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/rules" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/rules" ) // treeBuilder is a custom tree builder for the rules engine module. diff --git a/modules/prebid/rulesengine/tree_builder_test.go b/modules/prebid/rulesengine/tree_builder_test.go index 014c28db90..38fc6a9ae5 100644 --- a/modules/prebid/rulesengine/tree_builder_test.go +++ b/modules/prebid/rulesengine/tree_builder_test.go @@ -4,10 +4,10 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/modules/prebid/rulesengine/tree_manager.go b/modules/prebid/rulesengine/tree_manager.go index 6aca08c430..35496e7591 100644 --- a/modules/prebid/rulesengine/tree_manager.go +++ b/modules/prebid/rulesengine/tree_manager.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" "github.com/xeipuuv/gojsonschema" ) diff --git a/modules/prebid/rulesengine/tree_manager_test.go b/modules/prebid/rulesengine/tree_manager_test.go index 4fe7048c1a..b397074860 100644 --- a/modules/prebid/rulesengine/tree_manager_test.go +++ b/modules/prebid/rulesengine/tree_manager_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/golang/glog" - "github.com/prebid/prebid-server/v4/modules/prebid/rulesengine/config" + "github.com/prebid/prebid-server/v3/modules/prebid/rulesengine/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/modules/prebid/rulesengine/tree_test.go b/modules/prebid/rulesengine/tree_test.go index f7d4a318b1..4769a2fc49 100644 --- a/modules/prebid/rulesengine/tree_test.go +++ b/modules/prebid/rulesengine/tree_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - hs "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/rules" + hs "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/rules" "github.com/stretchr/testify/assert" ) diff --git a/modules/scientiamobile/wurfl_devicedetection/README.md b/modules/scientiamobile/wurfl_devicedetection/README.md deleted file mode 100644 index 023b5828d2..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/README.md +++ /dev/null @@ -1,357 +0,0 @@ -## WURFL Device Enrichment Module - -### Overview - -The **WURFL Device Enrichment Module** for Prebid Server enhances the OpenRTB 2.x payload -with comprehensive device detection data powered by **ScientiaMobile**’s WURFL device detection framework. -Thanks to WURFL's device database, the module provides accurate and comprehensive device-related information, -enabling bidders to make better-informed targeting and optimization decisions. - -### Key features - -#### Device Field Enrichment - -The WURFL module populates **missing or empty fields** in `ortb2.device` with the following data: - -- **make**: Manufacturer of the device (e.g., "Apple", "Samsung"). -- **model**: Device model (e.g., "iPhone 14", "Galaxy S22"). -- **os**: Operating system (e.g., "iOS", "Android"). -- **osv**: Operating system version (e.g., "16.0", "12.0"). -- **h**: Screen height in pixels. -- **w**: Screen width in pixels. -- **ppi**: Screen pixels per inch (PPI). -- **pxratio**: Screen pixel density ratio. -- **devicetype**: Device type (e.g., mobile, tablet, desktop). -- **js**: Support for JavaScript, where 0 = no, 1 = yes - -> **Note**: If these fields are already populated in the bid request, the module will not overwrite them. - -#### Publisher-Specific Enrichment - -Device enrichment is selectively enabled for publishers based on their **account ID**. -The module identifies publishers through the following fields: - -- `site.publisher.id` (for web environments). -- `app.publisher.id` (for mobile app environments). -- `dooh.publisher.id` (for digital out-of-home environments). - -### Build prerequisites - -To build the WURFL module, you need to install the WURFL Infuze from ScientiaMobile. -For more details, visit: [ScientiaMobile WURFL Infuze](https://docs.scientiamobile.com/documentation/infuze/infuze-c-api-user-guide). - -#### Note - -The WURFL module requires CGO at compile time to link against the WURFL Infuze library. - -To enable the WURFL module, the `wurfl` build tag must be specified: - -```go -go build -tags wurfl . -``` - -If the `wurfl` tag is not provided, the module will fail to initialize at startup. - -### Configuring the WURFL Module - -Below is a sample configuration for the WURFL module: - -```json -{ - "adapters": [ - { - "appnexus": { - "enabled": true - } - } - ], - "gdpr": { - "enabled": true, - "default_value": 0, - "timeouts_ms": { - "active_vendorlist_fetch": 900000 - } - }, - "hooks": { - "enabled": true, - "modules": { - "scientiamobile": { - "wurfl_devicedetection": { - "enabled": true, - "wurfl_file_path": "/path/to/wurfl.zip", - "wurfl_snapshot_url": "", - "wurfl_cache_size": 200000, - "allowed_publisher_ids": ["1","3"], - "ext_caps": true - } - } - }, - "host_execution_plan": { - "endpoints": { - "/openrtb2/auction": { - "stages": { - "entrypoint": { - "groups": [ - { - "timeout": 10, - "hook_sequence": [ - { - "module_code": "scientiamobile.wurfl_devicedetection", - "hook_impl_code": "scientiamobile-wurfl_devicedetection-entrypoint-hook" - } - ] - } - ] - }, - "raw_auction_request": { - "groups": [ - { - "timeout": 10, - "hook_sequence": [ - { - "module_code": "scientiamobile.wurfl_devicedetection", - "hook_impl_code": "scientiamobile-wurfl_devicedetection-raw-auction-request-hook" - } - ] - } - ] - } - } - } - } - } - } -} -``` - -The same configuration in YAML format - -```yaml -adapters: - - appnexus: - enabled: true -gdpr: - enabled: true - default_value: 0 - timeouts_ms: - active_vendorlist_fetch: 900000 -hooks: - enabled: true - modules: - scientiamobile: - wurfl_devicedetection: - enabled: true - wurfl_file_path: "/path/to/wurfl.zip" - wurfl_snapshot_url: "" - wurfl_cache_size: 200000 - allowed_publisher_ids: - - "1" - - "3" - ext_caps: true - host_execution_plan: - endpoints: - /openrtb2/auction: - stages: - entrypoint: - groups: - - timeout: 10 - hook_sequence: - - module_code: "scientiamobile.wurfl_devicedetection" - hook_impl_code: "scientiamobile-wurfl_devicedetection-entrypoint-hook" - raw_auction_request: - groups: - - timeout: 10 - hook_sequence: - - module_code: "scientiamobile.wurfl_devicedetection" - hook_impl_code: "scientiamobile-wurfl_devicedetection-raw-auction-request-hook" -``` - -### Configuration Options - -| Parameter | Requirement | Description | -|---------------------------|-------------|-------------------------------------------------------------------------------------------------------| -| **`wurfl_file_path`** | Mandatory | Path to the WURFL file (e.g. /path/to/wurfl.zip). | -| **`wurfl_snapshot_url`** | Optional | URL of the licensed WURFL snapshot. If set, it periodically updates the WURFL file in the `wurfl_file_path` directory, which must be writable. | -| **`wurfl_cache_size`** | Optional | Maximum number of devices stored in the WURFL cache. Defaults to the WURFL cache's standard size. | -| **`ext_caps`** | Optional | If `true`, the module adds all licensed capabilities to the `device.ext` object. | -| **`allowed_publisher_ids`** | Optional | List of publisher IDs permitted to use the module. Defaults to all publishers. | - -A valid WURFL license must include all the required capabilities for device enrichment. - -### Launching Prebid Server with the WURFL Module - -1. Download dependencies - -```bash -go mod download -``` - -2. Copy the sample [config file](modules/scientiamobile/wurfl_devicedetection/sample/pbs-example.json) - -```bash -cp modules/scientiamobile/wurfl_devicedetection/sample/pbs-example.json pbs.json -``` - -3. Copy the WURFL file to `wurfl_file_path` - -In order for the WURFL module to work, you need a WURFL file installed on your system. The WURFL Infuze package comes with a recent evaluation copy of the WURFL file called wurfl.zip. - -Commercial licensees of WURFL are granted access to "The Customer Vault", a personal virtual space containing purchased software licenses and weekly updated versions of the WURFL repository. - -For more details, visit: [ScientiaMobile WURFL Infuze](https://docs.scientiamobile.com/documentation/infuze/infuze-c-api-user-guide). - -4. Start the server - - ```bash - go run -tags wurfl . -``` - -When the server starts, it loads the WURFL file from `wurfl_file_path` into the module. -To enable automatic updates, ensure that `wurfl_snapshot_url` is correctly configured. - -Sample request data for testing is available in the module's `sample` directory. -Using the `auction` endpoint, you can observe WURFL-enriched device data in the response. - -### Sample Response - -Using the sample request data via `curl` when the module is configured with `ext_caps` set to `false` (or no value) - -```bash -curl http://localhost:8000/openrtb2/auction --data @modules/scientiamobile/wurfl_devicedetection/sample/request_data.json -``` - -the device object in the response will include WURFL device detection data: - -```json -"device": { - "ua": "Mozilla/5.0 (Linux; Android 15; Pixel 9 Pro XL Build/AP3A.241005.015;) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64", - "devicetype": 1, - "make": "Google", - "model": "Pixel 9 Pro XL", - "os": "Android", - "osv": "15", - "h": 2992, - "w": 1344, - "ppi": 481, - "pxratio": 2.55, - "js": 1, - "ext": { - "wurfl": { - "wurfl_id": "google_pixel_9_pro_xl_ver1_suban150" - } - } -} -``` - -When `ext_caps` is set to `true`, the response will include all licensed capabilities: - -```json -"device":{ - "ua":"Mozilla/5.0 (Linux; Android 15; Pixel 9 Pro XL Build/AP3A.241005.015; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64", - "devicetype":1, - "make":"Google", - "model":"Pixel 9 Pro XL", - "os":"Android", - "osv":"15", - "h":2992, - "w":1344, - "ppi":481, - "pxratio":2.55, - "js":1, - "ext":{ - "wurfl":{ - "wurfl_id":"google_pixel_9_pro_xl_ver1_suban150", - "mobile_browser_version":"", - "resolution_height":"2992", - "resolution_width":"1344", - "is_wireless_device":"true", - "is_tablet":"false", - "physical_form_factor":"phone_phablet", - "ajax_support_javascript":"true", - "preferred_markup":"html_web_4_0", - "brand_name":"Google", - "can_assign_phone_number":"true", - "xhtml_support_level":"4", - "ux_full_desktop":"false", - "device_os":"Android", - "physical_screen_width":"71", - "is_connected_tv":"false", - "is_smarttv":"false", - "physical_screen_height":"158", - "model_name":"Pixel 9 Pro XL", - "is_ott":"false", - "density_class":"2.55", - "marketing_name":"", - "device_os_version":"15.0", - "mobile_browser":"Chrome Mobile", - "pointing_method":"touchscreen", - "is_app_webview":"false", - "advertised_app_name":"Edge Browser", - "is_smartphone":"true", - "is_robot":"false", - "advertised_device_os":"Android", - "is_largescreen":"true", - "is_android":"true", - "is_xhtmlmp_preferred":"false", - "device_name":"Google Pixel 9 Pro XL", - "is_ios":"false", - "is_touchscreen":"true", - "is_wml_preferred":"false", - "is_app":"false", - "is_mobile":"true", - "is_phone":"true", - "is_full_desktop":"false", - "is_generic":"false", - "advertised_browser":"Edge", - "complete_device_name":"Google Pixel 9 Pro XL", - "advertised_browser_version":"124.0.2478.64", - "is_html_preferred":"true", - "is_windows_phone":"false", - "pixel_density":"481", - "form_factor":"Smartphone", - "advertised_device_os_version":"15" - } - } -} -``` - -### Building Docker images with WURFL support - -When building Prebid Server with the WURFL module using Docker, you need to install both compile-time and runtime WURFL dependencies. - -To build a Docker image with WURFL support: - -1. **Place the WURFL library package**: Copy the `libwurfl*.deb` package files into the `modules/scientiamobile/wurfl_devicedetection/libwurfl/` directory before building the Docker image. - -2. **Install compile-time dependencies**: In the build stage of your Dockerfile, before the `go build` command, add: - - ```dockerfile - # Installing WURFL compile-time dependencies if libwurfl package is present - RUN if ls modules/scientiamobile/wurfl_devicedetection/libwurfl/libwurfl*.deb 1> /dev/null 2>&1; then \ - dpkg -i modules/scientiamobile/wurfl_devicedetection/libwurfl/libwurfl*.deb; \ - fi - ``` - - And build with the WURFL tag: - - ```dockerfile - RUN go build -tags wurfl -mod=vendor -ldflags "-X github.com/prebid/prebid-server/v4/version.Ver=`git describe --tags | sed 's/^v//'` -X github.com/prebid/prebid-server/v4/version.Rev=`git rev-parse HEAD`" . - ``` - -3. **Install runtime dependencies**: In the runtime stage, add the WURFL runtime dependencies: - - ```dockerfile - # Installing WURFL runtime dependencies if libwurfl package is present - COPY modules/scientiamobile/wurfl_devicedetection/libwurfl/ /tmp/wurfl - RUN if ls /tmp/wurfl/libwurfl*.deb 1> /dev/null 2>&1; then \ - dpkg -i /tmp/wurfl/libwurfl*.deb; \ - apt-get update && \ - apt-get install -y curl && \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \ - rm -rf /tmp/wurfl; \ - fi - ``` - -## Maintainer - - diff --git a/modules/scientiamobile/wurfl_devicedetection/config.go b/modules/scientiamobile/wurfl_devicedetection/config.go deleted file mode 100644 index 8702e64365..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/config.go +++ /dev/null @@ -1,58 +0,0 @@ -package wurfl_devicedetection - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" - - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -const ( - defaultCacheSize = "200000" -) - -var ErrWURFLFilePathRequired = errors.New("wurfl_file_path is required") - -// newConfig creates and validates a new config from the raw JSON data. -func newConfig(data json.RawMessage) (config, error) { - var cfg config - if err := jsonutil.UnmarshalValid(data, &cfg); err != nil { - return cfg, fmt.Errorf("failed to parse config: %s", err) - } - err := cfg.validate() - return cfg, err -} - -// config represents the configuration for the module. -type config struct { - // WURFLFilePath is the path to the WURFL file (i.e. /path/to/wurfl.zip). Required. - WURFLFilePath string `json:"wurfl_file_path"` - // WURFLSnapshotURL is the URL of the WURFL Snapshot. - // If set, it will be used to periodically update the WURFL file. - // The snapshot will be downloaded to the same directory as the WURFLFilePath. - // Make sure this directory is writable. - WURFLSnapshotURL string `json:"wurfl_snapshot_url"` - // WURFLCacheSize is the size of the WURFL Engine cache. Default is 200000 - WURFLCacheSize int `json:"wurfl_cache_size"` - // Holds the list of allowed publisher IDs. Leave empty to allow all. - AllowedPublisherIDs []string `json:"allowed_publisher_ids"` - // ExtCaps if true will include licensed WURFL capabilities in ortb2.Device.Ext - ExtCaps bool `json:"ext_caps"` -} - -// WURFLEngineCacheSize returns the cache size for the WURFL engine. -func (cfg config) WURFLEngineCacheSize() string { - if cfg.WURFLCacheSize > 0 { - return strconv.Itoa(cfg.WURFLCacheSize) - } - return defaultCacheSize -} - -func (cfg config) validate() error { - if cfg.WURFLFilePath == "" { - return ErrWURFLFilePathRequired - } - return nil -} diff --git a/modules/scientiamobile/wurfl_devicedetection/config_test.go b/modules/scientiamobile/wurfl_devicedetection/config_test.go deleted file mode 100644 index fba8845efb..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/config_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package wurfl_devicedetection - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNewConfig(t *testing.T) { - tests := []struct { - name string - input json.RawMessage - expectedErr bool - validate func(t *testing.T, cfg config) - }{ - { - name: "Valid config with default cache size", - input: json.RawMessage(`{ - "wurfl_snapshot_url": "http://example.com/wurfl-data", - "wurfl_file_path": "/tmp/wurfl.zip" - }`), - expectedErr: false, - validate: func(t *testing.T, cfg config) { - assert.Equal(t, "http://example.com/wurfl-data", cfg.WURFLSnapshotURL) - assert.Equal(t, "/tmp/wurfl.zip", cfg.WURFLFilePath) - assert.Equal(t, defaultCacheSize, cfg.WURFLEngineCacheSize()) - }, - }, - { - name: "Valid config with custom cache size", - input: json.RawMessage(`{ - "wurfl_snapshot_url": "http://example.com/wurfl-data", - "wurfl_file_path": "/tmp/wurfl.zip", - "wurfl_cache_size": 5000, - "wurfl_run_updater": true - }`), - expectedErr: false, - validate: func(t *testing.T, cfg config) { - assert.Equal(t, "5000", cfg.WURFLEngineCacheSize()) - }, - }, - { - name: "Invalid config - missing wurfl_snapshot_url", - input: json.RawMessage(`{ - "wurfl_file_path": "/tmp/wurfl" - }`), - expectedErr: false, - }, - { - name: "Invalid config - missing wurfl_file_path", - input: json.RawMessage(`{ - "wurfl_snapshot_url": "http://example.com/wurfl-data" - }`), - expectedErr: true, - }, - { - name: "Invalid config - malformed JSON", - input: json.RawMessage(`{ "wurfl_snapshot_url": "http://example.com/wurfl-data", "wurfl_file_path": "/tmp/wurfl",`), // Malformed JSON - expectedErr: true, - }, - { - name: "Empty config", - input: json.RawMessage(`{}`), - expectedErr: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - cfg, err := newConfig(tc.input) - - if tc.expectedErr { - assert.Error(t, err) - return - } - - assert.NoError(t, err) - if tc.validate != nil { - tc.validate(t, cfg) - } - }) - } -} - -func TestValidate(t *testing.T) { - tests := []struct { - name string - cfg config - expectedErr bool - }{ - { - name: "Valid config", - cfg: config{ - WURFLSnapshotURL: "http://example.com/wurfl-data", - WURFLFilePath: "/tmp/wurfl.zip", - }, - expectedErr: false, - }, - { - name: "Invalid config - missing wurfl_file_path", - cfg: config{ - WURFLSnapshotURL: "http://example.com/wurfl-data", - }, - expectedErr: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - err := tc.cfg.validate() - - if tc.expectedErr { - assert.Error(t, err) - return - } - - assert.NoError(t, err) - }) - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/libwurfl/.gitignore b/modules/scientiamobile/wurfl_devicedetection/libwurfl/.gitignore deleted file mode 100644 index a5baada18f..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/libwurfl/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore - diff --git a/modules/scientiamobile/wurfl_devicedetection/module.go b/modules/scientiamobile/wurfl_devicedetection/module.go deleted file mode 100644 index 7cbf8d3a6d..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/module.go +++ /dev/null @@ -1,185 +0,0 @@ -package wurfl_devicedetection - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/buger/jsonparser" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookexecution" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/tidwall/sjson" -) - -const ( - wurflHeaderCtxKey = "wurfl_header" -) - -// declare conformity with hookstage.RawAuctionRequest interface -var ( - _ hookstage.RawAuctionRequest = Module{} - _ hookstage.Entrypoint = Module{} -) - -// payloadPublisherIDPaths specifies the possible paths in the Request payload JSON -// where the publisher ID can be defined. -var payloadPublisherIDPaths = [][]string{ - {"site", "publisher", "id"}, - {"app", "publisher", "id"}, - {"dooh", "publisher", "id"}, -} - -func Builder(configRaw json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error) { - cfg, err := newConfig(configRaw) - if err != nil { - return nil, err - } - - we, err := newWurflEngine(cfg) - if err != nil { - return nil, err - } - - m := Module{ - we: we, - extCaps: cfg.ExtCaps, - } - if len(cfg.AllowedPublisherIDs) > 0 { - m.allowedPublisherIDs = make(map[string]struct{}, len(cfg.AllowedPublisherIDs)) - for _, v := range cfg.AllowedPublisherIDs { - m.allowedPublisherIDs[v] = struct{}{} - } - } - return m, nil -} - -// Module must implement at least 1 hook interface. -type Module struct { - we wurflDeviceDetection - allowedPublisherIDs map[string]struct{} - extCaps bool -} - -// HandleEntrypointHook implements hookstage.Entrypoint. -func (m Module) HandleEntrypointHook(ctx context.Context, invocationCtx hookstage.ModuleInvocationContext, payload hookstage.EntrypointPayload) (hookstage.HookResult[hookstage.EntrypointPayload], error) { - result := hookstage.HookResult[hookstage.EntrypointPayload]{} - if !m.isPublisherAllowed(payload.Body) { - return result, hookexecution.NewFailure("publisher not allowed") - } - header := map[string]string{} - if payload.Request != nil { - for k := range payload.Request.Header { - header[k] = payload.Request.Header.Get(k) - } - } - moduleContext := hookstage.NewModuleContext() - moduleContext.Set(wurflHeaderCtxKey, header) - result.ModuleContext = moduleContext - - return result, nil -} - -// HandleRawAuctionHook implements hookstage.RawAuctionRequest. -func (m Module) HandleRawAuctionHook( - ctx context.Context, - invocationCtx hookstage.ModuleInvocationContext, - payload hookstage.RawAuctionRequestPayload, -) (hookstage.HookResult[hookstage.RawAuctionRequestPayload], error) { - result := hookstage.HookResult[hookstage.RawAuctionRequestPayload]{} - - if invocationCtx.ModuleContext == nil { - // The module context has not been initialized in the entrypoint hook. - // This could be due to a not allowed publisher or an error. - // Return the payload as is - return result, hookexecution.NewFailure("module context has not been initialized in the entrypoint hook") - } - - if isWURFLEnrichedRequest(payload) { - return result, nil - } - - headers, ok := invocationCtx.ModuleContext.Get(wurflHeaderCtxKey) - if !ok { - return result, hookexecution.NewFailure("invalid module context type") - } - rawHeaders, ok := headers.(map[string]string) - if !ok { - return result, hookexecution.NewFailure("invalid module context type") - } - result.ChangeSet.AddMutation(func(payload hookstage.RawAuctionRequestPayload) (hookstage.RawAuctionRequestPayload, error) { - ortb2Device, err := getOrtb2Device(payload) - if err != nil { - return payload, hookexecution.NewFailure("could not get ortb2.Device from payload %s", err) - } - - headers := makeHeaders(ortb2Device, rawHeaders) - - wd, err := m.we.DeviceDetection(headers) - if err != nil { - return payload, hookexecution.NewFailure("could not perform WURFL device detection %s", err) - } - - we := &wurflEnricher{ - WurflData: wd, - ExtCaps: m.extCaps, - } - we.EnrichDevice(&ortb2Device) - - updatedPayload, err := sjson.SetBytes(payload, "device", ortb2Device) - if err != nil { - return payload, hookexecution.NewFailure("could not update ortb2.Device payload %s", err) - } - return updatedPayload, nil - }, - hookstage.MutationUpdate, - "device", - ) - return result, nil -} - -// isPublisherAllowed verifies whether the publisher ID from a request payload is allowed to use this module. -// It checks against a list of authorized IDs, searching for the publisher ID in the site, app, or DOOH fields. -func (m Module) isPublisherAllowed(payload []byte) bool { - if m.allowedPublisherIDs == nil { - return true - } - var publisherID string - jsonparser.EachKey(payload, func(idx int, value []byte, vt jsonparser.ValueType, err error) { - if err != nil { - return - } - if vt != jsonparser.String { - return - } - publisherID = string(value) - }, payloadPublisherIDPaths...) - if publisherID == "" { - return false - } - _, found := m.allowedPublisherIDs[publisherID] - return found -} - -// getOrtb2Device extracts the openrtb2.Device from the bid request body. -func getOrtb2Device(payload []byte) (openrtb2.Device, error) { - device := openrtb2.Device{} - b, t, _, err := jsonparser.Get(payload, "device") - if err != nil { - return device, err - } - if t != jsonparser.Object { - return device, fmt.Errorf("expecting Object, got %s", t) - } - err = jsonutil.Unmarshal(b, &device) - return device, err -} - -// isWURFLEnrichedRequest returns true if the payload request has been already -// enriched with WURFL data like requests from Prebid.js with WURFL RTD module -func isWURFLEnrichedRequest(payload []byte) bool { - _, _, _, err := jsonparser.Get(payload, "device", "ext", ortb2WurflExtKey) - return err == nil -} diff --git a/modules/scientiamobile/wurfl_devicedetection/module_test.go b/modules/scientiamobile/wurfl_devicedetection/module_test.go deleted file mode 100644 index 8dc0ee48ee..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/module_test.go +++ /dev/null @@ -1,546 +0,0 @@ -package wurfl_devicedetection - -import ( - "context" - "errors" - "net/http" - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/stretchr/testify/assert" -) - -func TestHandleEntrypointHook(t *testing.T) { - tests := []struct { - name string - module Module - payload hookstage.EntrypointPayload - expectedError bool - expectedModuleCtx map[string]map[string]string - }{ - { - name: "Publisher allowed with headers", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - Request: &http.Request{ - Header: http.Header{ - "User-Agent": {"Mozilla/5.0"}, - "X-Test": {"HeaderValue"}, - }, - }, - }, - expectedError: false, - expectedModuleCtx: map[string]map[string]string{ - wurflHeaderCtxKey: { - "User-Agent": "Mozilla/5.0", - "X-Test": "HeaderValue", - }, - }, - }, - { - name: "Publisher not allowed", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher":{"id":"pub2"}}}`), - Request: &http.Request{ - Header: http.Header{ - "User-Agent": {"Mozilla/5.0"}, - }, - }, - }, - expectedError: true, - expectedModuleCtx: nil, - }, - { - name: "No publisher ID in payload", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{}`), - Request: &http.Request{ - Header: http.Header{ - "User-Agent": {"Mozilla/5.0"}, - }, - }, - }, - expectedError: true, - expectedModuleCtx: nil, - }, - { - name: "Nil Request, publisher allowed", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - Request: nil, - }, - expectedError: false, - expectedModuleCtx: map[string]map[string]string{ - wurflHeaderCtxKey: {}, - }, - }, - { - name: "Nil allowedPublisherIDs (all publishers allowed)", - module: Module{ - allowedPublisherIDs: nil, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - Request: &http.Request{ - Header: http.Header{ - "X-Custom-Header": {"HeaderValue"}, - }, - }, - }, - expectedError: false, - expectedModuleCtx: map[string]map[string]string{ - wurflHeaderCtxKey: { - "X-Custom-Header": "HeaderValue", - }, - }, - }, - { - name: "Malformed payload", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher": `), - Request: &http.Request{ - Header: http.Header{ - "X-Custom-Header": {"HeaderValue"}, - }, - }, - }, - expectedError: true, - expectedModuleCtx: nil, - }, - { - name: "Empty headers", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: hookstage.EntrypointPayload{ - Body: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - Request: &http.Request{Header: http.Header{}}, - }, - expectedError: false, - expectedModuleCtx: map[string]map[string]string{ - wurflHeaderCtxKey: {}, - }, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.module.HandleEntrypointHook(context.Background(), hookstage.ModuleInvocationContext{}, tc.payload) - - if tc.expectedError { - assert.Error(t, err) - assert.Nil(t, result.ModuleContext) - } else { - assert.NoError(t, err) - assert.NotNil(t, result.ModuleContext) - headers, _ := result.ModuleContext.Get(wurflHeaderCtxKey) - assert.Equal(t, tc.expectedModuleCtx[wurflHeaderCtxKey], headers) - } - }) - } -} - -func TestHandleRawAuctionHook(t *testing.T) { - tests := []struct { - name string - module Module - invocationCtx hookstage.ModuleInvocationContext - payload hookstage.RawAuctionRequestPayload - expectedErr bool - mutationErr bool - expectedPayload string - }{ - { - name: "Successful device enrichment without extCaps", - module: Module{ - we: &mockWurflDeviceDetection{ - detectDeviceFunc: func(headers map[string]string) (wurflData, error) { - return wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile", - }, nil - }, - }, - extCaps: false, - }, - invocationCtx: hookstage.ModuleInvocationContext{ - ModuleContext: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(wurflHeaderCtxKey, map[string]string{ - "User-Agent": "Mozilla/5.0", - }) - return ctx - }(), - }, - payload: []byte(`{"device":{"ua":"Mozilla/5.0"}}`), - expectedErr: false, - expectedPayload: `{ - "device": { - "ua": "Mozilla/5.0", - "make": "BrandX", - "model": "ModelY", - "hwv": "ModelY", - "devicetype": 1 - } - }`, - }, - { - name: "Nil module context", - module: Module{ - we: &mockWurflDeviceDetection{ - detectDeviceFunc: func(headers map[string]string) (wurflData, error) { - return wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile", - }, nil - }, - }, - extCaps: false, - }, - invocationCtx: hookstage.ModuleInvocationContext{}, - payload: []byte(`{"device":{"ua":"Mozilla/5.0"}}`), - expectedErr: true, - expectedPayload: `{"device":{"ua":"Mozilla/5.0"}}`, - }, - { - name: "Successful device enrichment with extCaps", - module: Module{ - we: &mockWurflDeviceDetection{ - detectDeviceFunc: func(headers map[string]string) (wurflData, error) { - return wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile", - }, nil - }, - }, - extCaps: true, - }, - invocationCtx: hookstage.ModuleInvocationContext{ - ModuleContext: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(wurflHeaderCtxKey, map[string]string{ - "User-Agent": "Mozilla/5.0", - }) - return ctx - }(), - }, - payload: []byte(`{"device":{"ua":"Mozilla/5.0"}}`), - expectedErr: false, - expectedPayload: `{ - "device": { - "ua": "Mozilla/5.0", - "make": "BrandX", - "model": "ModelY", - "hwv": "ModelY", - "devicetype": 1, - "ext": { - "wurfl": { - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile" - } - } - } - }`, - }, - { - name: "Successful device enrichment with ext data and with extCaps", - module: Module{ - we: &mockWurflDeviceDetection{ - detectDeviceFunc: func(headers map[string]string) (wurflData, error) { - return wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile", - }, nil - }, - }, - extCaps: true, - }, - invocationCtx: hookstage.ModuleInvocationContext{ - ModuleContext: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(wurflHeaderCtxKey, map[string]string{ - "User-Agent": "Mozilla/5.0", - }) - return ctx - }(), - }, - payload: []byte(`{"device":{"ua":"Mozilla/5.0", "ext": {"test": 1}}}`), - expectedErr: false, - expectedPayload: `{ - "device": { - "ua": "Mozilla/5.0", - "make": "BrandX", - "model": "ModelY", - "hwv": "ModelY", - "devicetype": 1, - "ext": { - "test": 1, - "wurfl": { - "brand_name": "BrandX", - "model_name": "ModelY", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - "form_factor": "Other Mobile" - } - } - } - }`, - }, - { - name: "Failed device detection", - module: Module{ - we: &mockWurflDeviceDetection{ - detectDeviceFunc: func(headers map[string]string) (wurflData, error) { - return nil, errors.New("device detection error") - }, - }, - extCaps: false, - }, - invocationCtx: hookstage.ModuleInvocationContext{ - ModuleContext: func() *hookstage.ModuleContext { - ctx := hookstage.NewModuleContext() - ctx.Set(wurflHeaderCtxKey, map[string]string{ - "User-Agent": "Mozilla/5.0", - }) - return ctx - }(), - }, - payload: []byte(`{"device":{"ua":"Mozilla/5.0"}}`), - expectedErr: false, - mutationErr: true, - expectedPayload: `{"device":{"ua":"Mozilla/5.0"}}`, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.module.HandleRawAuctionHook(context.Background(), tc.invocationCtx, tc.payload) - if tc.expectedErr { - assert.Error(t, err) - assert.JSONEq(t, tc.expectedPayload, string(tc.payload)) - return - } - assert.NoError(t, err) - - assert.Equal(t, len(result.ChangeSet.Mutations()), 1) - - assert.Equal(t, result.ChangeSet.Mutations()[0].Type(), hookstage.MutationUpdate) - - mutation := result.ChangeSet.Mutations()[0] - // Apply mutation - mutatedPayload, err := mutation.Apply(tc.payload) - if tc.mutationErr { - assert.Error(t, err) - assert.JSONEq(t, tc.expectedPayload, string(tc.payload)) - return - } - assert.NoError(t, err) - - // Verify the mutated payload - assert.JSONEq(t, tc.expectedPayload, string(mutatedPayload)) - }) - } -} - -// Mock implementation of wurflDeviceDetection -type mockWurflDeviceDetection struct { - detectDeviceFunc func(headers map[string]string) (wurflData, error) -} - -func (m *mockWurflDeviceDetection) DeviceDetection(headers map[string]string) (wurflData, error) { - return m.detectDeviceFunc(headers) -} - -func TestIsPublisherAllowed(t *testing.T) { - tests := []struct { - name string - module Module - payload []byte - expected bool - allowedPublisherIDs map[string]bool - }{ - { - name: "Allowed publisher - site.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - expected: true, - }, - { - name: "Disallowed publisher - site.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: []byte(`{"site":{"publisher":{"id":"pub2"}}}`), - expected: false, - }, - { - name: "Allowed publisher - app.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub3": {}}, - }, - payload: []byte(`{"app":{"publisher":{"id":"pub3"}}}`), - expected: true, - }, - { - name: "Disallowed publisher - app.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub3": {}}, - }, - payload: []byte(`{"app":{"publisher":{"id":"pub4"}}}`), - expected: false, - }, - { - name: "Allowed publisher - dooh.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub5": {}}, - }, - payload: []byte(`{"dooh":{"publisher":{"id":"pub5"}}}`), - expected: true, - }, - { - name: "Disallowed publisher - dooh.publisher.id", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub5": {}}, - }, - payload: []byte(`{"dooh":{"publisher":{"id":"pub6"}}}`), - expected: false, - }, - { - name: "Empty payload - no publisher ID", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: []byte(`{}`), - expected: false, - }, - { - name: "Nil allowedPublisherIDs - all publishers allowed", - module: Module{ - allowedPublisherIDs: nil, - }, - payload: []byte(`{"site":{"publisher":{"id":"pub1"}}}`), - expected: true, - }, - { - name: "Malformed JSON - no publisher ID", - module: Module{ - allowedPublisherIDs: map[string]struct{}{"pub1": {}}, - }, - payload: []byte(`{"site":{"publisher":{}}`), // Missing closing braces - expected: false, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - result := tc.module.isPublisherAllowed(tc.payload) - assert.Equal(t, tc.expected, result) - }) - } -} - -func TestGetOrtb2Device(t *testing.T) { - tests := []struct { - name string - payload []byte - expectError bool - expected openrtb2.Device - }{ - { - name: "Valid device object", - payload: []byte(`{ - "device": { - "ua": "Mozilla/5.0", - "ip": "192.168.0.1", - "make": "Apple", - "model": "iPhone" - } - }`), - expectError: false, - expected: openrtb2.Device{ - UA: "Mozilla/5.0", - IP: "192.168.0.1", - Make: "Apple", - Model: "iPhone", - }, - }, - { - name: "Missing device field", - payload: []byte(`{}`), - expectError: true, - expected: openrtb2.Device{}, - }, - { - name: "Invalid device type (non-object)", - payload: []byte(`{"device": "string_instead_of_object"}`), - expectError: true, - expected: openrtb2.Device{}, - }, - { - name: "Malformed JSON", - payload: []byte(`{"device": { "ua": "Mozilla/5.0"`), // Missing closing braces - expectError: true, - expected: openrtb2.Device{}, - }, - { - name: "Empty payload", - payload: []byte(``), - expectError: true, - expected: openrtb2.Device{}, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - device, err := getOrtb2Device(tc.payload) - - if tc.expectError { - assert.Error(t, err) - assert.Equal(t, tc.expected, device) - } else { - assert.NoError(t, err) - assert.Equal(t, tc.expected, device) - } - }) - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/module_wurfl_test.go b/modules/scientiamobile/wurfl_devicedetection/module_wurfl_test.go deleted file mode 100644 index e89784d52f..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/module_wurfl_test.go +++ /dev/null @@ -1,59 +0,0 @@ -//go:build wurfl - -package wurfl_devicedetection - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/stretchr/testify/assert" -) - -func TestBuilder(t *testing.T) { - tests := []struct { - name string - configRaw json.RawMessage - expectedErr bool - validate func(t *testing.T, module interface{}) - }{ - { - name: "Valid configuration", - configRaw: json.RawMessage(`{ - "wurfl_snapshot_url": "http://example.com/wurfl-data", - "wurfl_file_path": "/tmp/wurfl.zip", - "allowed_publisher_ids": ["pub1", "pub2"], - "ext_caps": true - }`), - expectedErr: false, - validate: func(t *testing.T, module interface{}) { - m, ok := module.(Module) - assert.True(t, ok, "Module type assertion failed") - assert.Equal(t, map[string]struct{}{"pub1": {}, "pub2": {}}, m.allowedPublisherIDs) - assert.True(t, m.extCaps) - assert.NotNil(t, m.we) - }, - }, - { - name: "Invalid configuration - newConfig fails", - configRaw: json.RawMessage(`{ "wurfl_snapshot_url": "http://example.com/wurfl-data" }`), // Missing required fields - expectedErr: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - module, err := Builder(tc.configRaw, moduledeps.ModuleDeps{}) - - if tc.expectedErr { - assert.Error(t, err) - return - } - - assert.NoError(t, err) - if tc.validate != nil { - tc.validate(t, module) - } - }) - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/sample/pbs_example.json b/modules/scientiamobile/wurfl_devicedetection/sample/pbs_example.json deleted file mode 100644 index 2a0e7b60fc..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/sample/pbs_example.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "adapters": [ - { - "appnexus": { - "enabled": true - } - } - ], - "gdpr": { - "enabled": true, - "default_value": 0, - "timeouts_ms": { - "active_vendorlist_fetch": 900000 - } - }, - "hooks": { - "enabled": true, - "modules": { - "scientiamobile": { - "wurfl_devicedetection": { - "enabled": true, - "wurfl_file_path": "/path/to/wurfl.zip", - "wurfl_snapshot_url": "", - "wurfl_cache_size": 200000, - "allowed_publisher_ids": [ - "1", - "3" - ], - "ext_caps": true - } - } - }, - "host_execution_plan": { - "endpoints": { - "/openrtb2/auction": { - "stages": { - "entrypoint": { - "groups": [ - { - "timeout": 10, - "hook_sequence": [ - { - "module_code": "scientiamobile.wurfl_devicedetection", - "hook_impl_code": "scientiamobile-wurfl_devicedetection-entrypoint-hook" - } - ] - } - ] - }, - "raw_auction_request": { - "groups": [ - { - "timeout": 10, - "hook_sequence": [ - { - "module_code": "scientiamobile.wurfl_devicedetection", - "hook_impl_code": "scientiamobile-wurfl_devicedetection-raw-auction-request-hook" - } - ] - } - ] - } - } - } - } - } - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/sample/request_data.json b/modules/scientiamobile/wurfl_devicedetection/sample/request_data.json deleted file mode 100644 index 42691bbc74..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/sample/request_data.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "imp": [ - { - "ext": { - "data": { - "adserver": { - "name": "gam", - "adslot": "test" - }, - "pbadslot": "test", - "gpid": "test" - }, - "gpid": "test", - "prebid": { - "bidder": { - "appnexus": { - "placement_id": 1, - "use_pmt_rule": false - }, - "0test": { - "placement_id": 1 - } - }, - "adunitcode": "25e8ad9f-13a4-4404-ba74-f9eebff0e86c", - "floors": { - "floorMin": 0.01 - } - } - }, - "id": "2529eeea-813e-4da6-838f-f91c28d64867", - "banner": { - "topframe": 1, - "format": [ - { - "w": 728, - "h": 90 - } - ], - "pos": 1 - }, - "bidfloor": 0.01, - "bidfloorcur": "USD" - } - ], - "site": { - "domain": "test.com", - "publisher": { - "domain": "test.com", - "id": "1" - }, - "page": "https://www.test.com/" - }, - "device": { - "ua": "Mozilla/5.0 (Linux; Android 15; Pixel 9 Pro XL Build/AP3A.241005.015; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 EdgA/124.0.2478.64" - }, - "id": "fc4670ce-4985-4316-a245-b43c885dc37a", - "test": 1, - "cur": [ - "USD" - ], - "source": { - "ext": { - "schain": { - "ver": "1.0", - "complete": 1, - "nodes": [ - { - "asi": "example.com", - "sid": "1234", - "hp": 1 - } - ] - } - } - }, - "ext": { - "prebid": { - "cache": { - "bids": { - "returnCreative": true - }, - "vastxml": { - "returnCreative": true - } - }, - "auctiontimestamp": 1799310801804, - "targeting": { - "includewinners": true, - "includebidderkeys": false - }, - "schains": [ - { - "bidders": [ - "appnexus" - ], - "schain": { - "ver": "1.0", - "complete": 1, - "nodes": [ - { - "asi": "example.com", - "sid": "1234", - "hp": 1 - } - ] - } - } - ], - "floors": { - "enabled": false, - "floorMin": 0.01, - "floorMinCur": "USD" - }, - "createtids": false - } - }, - "user": {}, - "tmax": 2000 -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_data.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_data.go deleted file mode 100644 index 7cc1284407..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_data.go +++ /dev/null @@ -1,86 +0,0 @@ -package wurfl_devicedetection - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" - - "github.com/prebid/prebid-server/v4/util/jsonutil" -) - -const ( - wurflID = "wurfl_id" -) - -var ErrWURFLIDNotExist = errors.New("WURFL ID does not exist") - -// declare conformity with json.Marshaler interface -var _ json.Marshaler = wurflData{} - -// wurflData represents the WURFL data -type wurflData map[string]string - -// Bool retrieves a capability value as a bool -func (wd wurflData) Bool(key string) (bool, error) { - val, exists := wd[key] - if !exists { - return false, fmt.Errorf("capability not found: %q", key) - } - result, err := strconv.ParseBool(val) - if err != nil { - return false, fmt.Errorf("could not parse %q to bool for capability %q", val, key) - } - return result, nil -} - -// Int64 retrieves a capability value as an int64 -func (wd wurflData) Int64(key string) (int64, error) { - val, exists := wd[key] - if !exists { - return 0, fmt.Errorf("capability not found: %q", key) - } - result, err := strconv.ParseInt(val, 10, 64) - if err != nil { - return 0, fmt.Errorf("could not parse %q to int64 for capability %q", val, key) - } - return result, nil -} - -// Float64 retrieves a capability value as a float64 -func (wd wurflData) Float64(key string) (float64, error) { - val, exists := wd[key] - if !exists { - return 0.0, fmt.Errorf("capability not found: %q", key) - } - result, err := strconv.ParseFloat(val, 64) - if err != nil { - return 0.0, fmt.Errorf("could not parse %q to float64 for capability %q", val, key) - } - return result, nil -} - -// String retrieves a capability value as a string -func (wd wurflData) String(key string) (string, error) { - val, exists := wd[key] - if !exists { - return "", fmt.Errorf("capability not found: %q", key) - } - return val, nil -} - -// WurflIDToJSON returns a JSON representation of the WURFL ID -func (wd wurflData) WurflIDToJSON() ([]byte, error) { - m := make(map[string]string) - v, ok := wd[wurflID] - if !ok { - return nil, ErrWURFLIDNotExist - } - m[wurflID] = v - return jsonutil.Marshal(m) -} - -// MarshalJSON customizes the JSON marshaling for wurflData -func (wd wurflData) MarshalJSON() ([]byte, error) { - return jsonutil.Marshal(map[string]string(wd)) -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_data_test.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_data_test.go deleted file mode 100644 index 257d5933d9..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_data_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package wurfl_devicedetection - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestWurflData_MarshalJSON(t *testing.T) { - tests := []struct { - name string - data wurflData - expected string - }{ - { - name: "Non-empty wurflData", - data: wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - }, - expected: `{"brand_name":"BrandX","model_name":"ModelY"}`, - }, - { - name: "Empty wurflData", - data: wurflData{}, - expected: `{}`, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.data.MarshalJSON() - assert.NoError(t, err) - assert.JSONEq(t, tc.expected, string(result)) - }) - } -} - -func TestWurflData_SON(t *testing.T) { - tests := []struct { - name string - data wurflData - expected string - expectedErr bool - }{ - { - name: "Non-empty wurflData", - data: wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "wurfl_id": "test", - }, - expected: `{"wurfl_id":"test"}`, - }, - { - name: "Missed WURFL ID", - data: wurflData{}, - expectedErr: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.data.WurflIDToJSON() - if tc.expectedErr { - assert.Error(t, err) - assert.Nil(t, result) - return - } - assert.NoError(t, err) - assert.JSONEq(t, tc.expected, string(result)) - }) - } -} - -func TestWurflData_Bool(t *testing.T) { - data := wurflData{ - "ajax_support_javascript": "true", - "invalid_value": "not_a_bool", - } - - v, err := data.Bool("ajax_support_javascript") - assert.NoError(t, err) - assert.True(t, v) - - v, err = data.Bool("invalid_value") - assert.Error(t, err) - assert.Empty(t, v) - - v, err = data.Bool("non_existent_key") - assert.Error(t, err) - assert.Empty(t, v) -} - -func TestWurflData_Float64(t *testing.T) { - data := wurflData{ - "density_class": "2.5", - "invalid_value": "not_a_number", - } - - v, err := data.Float64("density_class") - assert.NoError(t, err) - assert.Equal(t, 2.5, v) - - v, err = data.Float64("invalid_value") - assert.Empty(t, v) - assert.Error(t, err) - - v, err = data.Float64("non_existent_key") - assert.Empty(t, v) - assert.Error(t, err) -} - -func TestWurflData_Int64(t *testing.T) { - data := wurflData{ - "resolution_height": "1080", - "invalid_value": "not_a_number", - } - - v, err := data.Int64("resolution_height") - assert.NoError(t, err) - assert.Equal(t, int64(1080), v) - - v, err = data.Int64("invalid_value") - assert.Empty(t, v) - assert.Error(t, err) - - v, err = data.Int64("non_existent_key") - assert.Empty(t, v) - assert.Error(t, err) -} - -func TestWurflData_String(t *testing.T) { - data := wurflData{ - "brand_name": "BrandX", - } - - v, err := data.String("brand_name") - assert.NoError(t, err) - assert.Equal(t, "BrandX", v) - - v, err = data.String("non_existent_key") - assert.Empty(t, v) - assert.Error(t, err) -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_engine.go deleted file mode 100644 index ebcad9c607..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine.go +++ /dev/null @@ -1,145 +0,0 @@ -//go:build wurfl - -package wurfl_devicedetection - -import ( - "fmt" - "strings" - - wurfl "github.com/WURFL/golang-wurfl" - "github.com/golang/glog" -) - -// declare conformity with wurflDeviceDetection interface -var _ wurflDeviceDetection = (*wurflEngine)(nil) - -// vcaps is the list of WURFL virtual capabilities to request -var vcaps = []string{ - advertisedDeviceOSCapKey, - advertisedDeviceOSVersionCapKey, - completeDeviceNameCapKey, - isFullDesktopCapKey, - isMobileCapKey, - isPhoneCapKey, - formFactorCapKey, - pixelDensityCapKey, -} - -// newWurflEngine creates a new Enricher -func newWurflEngine(c config) (wurflDeviceDetection, error) { - wengine, err := wurfl.Create(c.WURFLFilePath, - nil, - nil, - -1, - wurfl.WurflCacheProviderLru, - c.WURFLEngineCacheSize(), - ) - if err != nil { - return nil, err - } - - caps := wengine.GetAllCaps() - e := &wurflEngine{ - wengine: wengine, - caps: caps, - vcaps: vcaps, - } - - err = e.validate() - if err != nil { - return nil, err - } - - e.startUpdater(c.WURFLSnapshotURL) - - return e, nil -} - -// wurflEngine is the ortb2 enricher powered by WURFL -type wurflEngine struct { - wengine *wurfl.Wurfl - caps []string - vcaps []string -} - -// deviceDetection performs device detection using the WURFL engine. -func (e *wurflEngine) DeviceDetection(headers map[string]string) (wurflData, error) { - wurflDevice, err := e.wengine.LookupWithImportantHeaderMap(headers) - if err != nil { - return nil, err - } - defer wurflDevice.Destroy() - - wurflDeviceID, err := wurflDevice.GetDeviceID() - if err != nil { - return nil, err - } - wurflData, err := wurflDevice.GetStaticCaps(e.caps) - if err != nil { - return nil, err - } - vcaps, err := wurflDevice.GetVirtualCaps(e.vcaps) - if err != nil { - return nil, err - } - for k, v := range vcaps { - wurflData[k] = v - } - wurflData[wurflID] = wurflDeviceID - return wurflData, nil -} - -func (e *wurflEngine) startUpdater(snapshotURL string) { - if snapshotURL == "" { - return - } - - err := e.wengine.SetUpdaterDataURL(snapshotURL) - if err != nil { - glog.Errorf("could not set WURFL Updater Snapshot URL: %s", err.Error()) - return - } - - err = e.wengine.SetUpdaterDataFrequency(wurfl.WurflUpdaterFrequencyDaily) - if err != nil { - glog.Errorf("could not set the WURFL Updater frequency: %s", err.Error()) - return - } - - err = e.wengine.UpdaterStart() - if err != nil { - glog.Errorf("could not start the WURFL Updater: %s", err.Error()) - return - } -} - -// validate checks if the WURFL file has all the required capabilities -func (e *wurflEngine) validate() error { - requiredCaps := []string{ - ajaxSupportJavascriptCapKey, - brandNameCapKey, - densityClassCapKey, - isConnectedTVCapKey, - isConsoleCapKey, - isOTTCapKey, - isTabletCapKey, - modelNameCapKey, - physicalFormFactorCapKey, - resolutionHeightCapKey, - resolutionWidthCapKey, - } - m := map[string]struct{}{} - for _, val := range e.caps { - m[val] = struct{}{} - } - missed := []string{} - for _, val := range requiredCaps { - if _, ok := m[val]; !ok { - missed = append(missed, val) - } - } - if len(missed) > 0 { - return fmt.Errorf("WURFL file is missing the following capabilities: %s", strings.Join(missed, ",")) - } - return nil -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback.go deleted file mode 100644 index 8c83b9f89e..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build !wurfl - -package wurfl_devicedetection - -import "errors" - -const wurflBuildTagMissingError = "wurfl module requires the wurfl build tag; build with: go build -tags wurfl" - -func newWurflEngine(_ config) (wurflDeviceDetection, error) { - return nil, errors.New(wurflBuildTagMissingError) -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback_test.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback_test.go deleted file mode 100644 index de0334fe19..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_engine_fallback_test.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build !wurfl - -package wurfl_devicedetection - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNewWurflEngineFallbackError(t *testing.T) { - _, err := newWurflEngine(config{}) - assert.EqualError(t, err, wurflBuildTagMissingError) -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher.go deleted file mode 100644 index a7753bac35..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher.go +++ /dev/null @@ -1,194 +0,0 @@ -package wurfl_devicedetection - -import ( - "github.com/golang/glog" - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/tidwall/sjson" -) - -const ( - advertisedDeviceOSCapKey = "advertised_device_os" - advertisedDeviceOSVersionCapKey = "advertised_device_os_version" - ajaxSupportJavascriptCapKey = "ajax_support_javascript" - brandNameCapKey = "brand_name" - completeDeviceNameCapKey = "complete_device_name" - densityClassCapKey = "density_class" - formFactorCapKey = "form_factor" - isConsoleCapKey = "is_console" - isConnectedTVCapKey = "is_connected_tv" - isFullDesktopCapKey = "is_full_desktop" - isMobileCapKey = "is_mobile" - isOTTCapKey = "is_ott" - isPhoneCapKey = "is_phone" - isTabletCapKey = "is_tablet" - modelNameCapKey = "model_name" - physicalFormFactorCapKey = "physical_form_factor" - pixelDensityCapKey = "pixel_density" - resolutionHeightCapKey = "resolution_height" - resolutionWidthCapKey = "resolution_width" -) - -const ( - ortb2WurflExtKey = "wurfl" -) - -const ( - outOfHomeDevice = "out_of_home_device" -) - -// WURFL form_factor values -const ( - formFactorDesktop = "Desktop" - formFactorSmartphone = "Smartphone" - formFactorFeaturePhone = "Feature Phone" - formFactorTablet = "Tablet" - formFactorSmartTV = "Smart-TV" - formFactorOtherNonMobile = "Other Non-Mobile" - formFactorOtherMobile = "Other Mobile" -) - -// wurflDeviceDetection wraps the methods for the WURFL device detection -type wurflDeviceDetection interface { - DeviceDetection(headers map[string]string) (wurflData, error) -} - -// wurflEnricher represents the WURFL Enricher for Prebid -type wurflEnricher struct { - // WurflData holds the WURFL data - WurflData wurflData - // extCaps if true will enrich the device.ext field with all WURFL caps - // Default to enrich only with the wurfl_id - ExtCaps bool -} - -// EnrichDevice enriches OpenRTB 2.x device with WURFL data -func (we *wurflEnricher) EnrichDevice(device *openrtb2.Device) { - wd := we.WurflData - if device.Make == "" { - if v, err := wd.String(brandNameCapKey); err == nil { - device.Make = v - } - } - if device.Model == "" { - if v, err := wd.String(modelNameCapKey); err == nil { - device.Model = v - } - } - if device.DeviceType == 0 { - device.DeviceType = we.makeDeviceType() - } - if device.OS == "" { - if v, err := wd.String(advertisedDeviceOSCapKey); err == nil { - device.OS = v - } - } - if device.OSV == "" { - if v, err := wd.String(advertisedDeviceOSVersionCapKey); err == nil { - device.OSV = v - } - } - if device.HWV == "" { - if v, err := wd.String(modelNameCapKey); err == nil { - device.HWV = v - } - } - if device.H == 0 { - if v, err := wd.Int64(resolutionHeightCapKey); err == nil { - device.H = v - } - } - if device.W == 0 { - if v, err := wd.Int64(resolutionWidthCapKey); err == nil { - device.W = v - } - } - if device.PPI == 0 { - if v, err := wd.Int64(pixelDensityCapKey); err == nil { - device.PPI = v - } - } - if device.PxRatio == 0 { - if v, err := wd.Float64(densityClassCapKey); err == nil { - device.PxRatio = v - } - } - if device.JS == nil { - if v, err := wd.Bool(ajaxSupportJavascriptCapKey); err == nil { - var js int8 - if v { - js = 1 - } - device.JS = &js - } - } - - wurflExtData, err := we.wurflExtData() - if err != nil { - glog.Warningf("could not create WURFL ext data: %s", err) - return - } - // merges the WURFL data in device.ext under the wurfl "namespace" - ext, err := sjson.SetRawBytes(device.Ext, ortb2WurflExtKey, wurflExtData) - if err != nil { - glog.Warningf("could not set WURFL ext data: %s", err) - return - } - device.Ext = ext -} - -// wurflExtData returns the WURFL data in JSON format for the device.ext field -func (we *wurflEnricher) wurflExtData() ([]byte, error) { - if we.ExtCaps { - // return all WURFL data - return we.WurflData.MarshalJSON() - } - // return only the WURFL ID - return we.WurflData.WurflIDToJSON() -} - -// makeDeviceType returns an OpenRTB2 DeviceType from WURFL data -// see https://www.scientiamobile.com/how-to-populate-iab-openrtb-device-object/ -func (we *wurflEnricher) makeDeviceType() adcom1.DeviceType { - wd := we.WurflData - unknownDeviceType := adcom1.DeviceType(0) - - // Priority 1: Check is_ott - if isOTT, err := wd.Bool(isOTTCapKey); err == nil && isOTT { - return adcom1.DeviceSetTopBox - } - - // Priority 2: Check is_console - if isConsole, err := wd.Bool(isConsoleCapKey); err == nil && isConsole { - return adcom1.DeviceConnected - } - - // Priority 3: Check physical_form_factor for out_of_home_device - if physicalFormFactor, err := wd.String(physicalFormFactorCapKey); err == nil && physicalFormFactor == outOfHomeDevice { - return adcom1.DeviceOOH - } - - // Priority 4: Check if form_factor exists and switch on its value - formFactor, err := wd.String(formFactorCapKey) - if err != nil { - // form_factor not available, return unknown - return unknownDeviceType - } - - switch formFactor { - case formFactorDesktop: - return adcom1.DevicePC - case formFactorSmartphone, formFactorFeaturePhone: - return adcom1.DevicePhone - case formFactorTablet: - return adcom1.DeviceTablet - case formFactorSmartTV: - return adcom1.DeviceTV - case formFactorOtherNonMobile: - return adcom1.DeviceConnected - case formFactorOtherMobile: - return adcom1.DeviceMobile - default: - return unknownDeviceType - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher_test.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher_test.go deleted file mode 100644 index 5c34017232..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_enricher_test.go +++ /dev/null @@ -1,213 +0,0 @@ -package wurfl_devicedetection - -import ( - "encoding/json" - "testing" - - "github.com/prebid/openrtb/v20/adcom1" - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/stretchr/testify/assert" -) - -func TestWurflEnricher_EnrichDevice(t *testing.T) { - data := wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - "advertised_device_os": "Android", - "resolution_height": "1080", - "resolution_width": "1920", - "pixel_density": "300", - "density_class": "2.5", - "ajax_support_javascript": "true", - "is_mobile": "true", - "is_phone": "true", - "is_tablet": "false", - } - - device := &openrtb2.Device{} - - we := &wurflEnricher{ - WurflData: data, - } - we.EnrichDevice(device) - - assert.Equal(t, "BrandX", device.Make) - assert.Equal(t, "ModelY", device.Model) - assert.Equal(t, "Android", device.OS) - assert.Equal(t, int64(1080), device.H) - assert.Equal(t, int64(1920), device.W) - assert.Equal(t, int64(300), device.PPI) - assert.Equal(t, 2.5, device.PxRatio) - assert.NotNil(t, device.JS) - assert.Equal(t, int8(1), *device.JS) - assert.Nil(t, device.Ext) -} - -func TestWurflEnricher_EnrichDeviceExt(t *testing.T) { - tests := []struct { - name string - wurflData wurflData - initialExt json.RawMessage - expectedExt string - expectNoError bool - }{ - { - name: "Add wurfl data to empty device ext", - wurflData: wurflData{ - "brand_name": "BrandX", - "model_name": "ModelY", - }, - initialExt: nil, - expectedExt: `{"wurfl":{"brand_name":"BrandX","model_name":"ModelY"}}`, - expectNoError: true, - }, - { - name: "Merge wurfl data into existing device ext", - wurflData: wurflData{ - "brand_name": "BrandZ", - }, - initialExt: json.RawMessage(`{"existing_key":"existing_value"}`), - expectedExt: `{"existing_key":"existing_value","wurfl":{"brand_name":"BrandZ"}}`, - expectNoError: true, - }, - { - name: "Invalid initial ext JSON", - wurflData: wurflData{ - "brand_name": "BrandX", - }, - initialExt: json.RawMessage(`{"invalid_json":`), // Malformed JSON - expectedExt: `{"invalid_json":`, // Should remain as is - expectNoError: false, - }, - { - name: "Empty wurfl data", - wurflData: wurflData{}, - initialExt: nil, - expectedExt: `{"wurfl":{}}`, - expectNoError: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - device := &openrtb2.Device{Ext: tc.initialExt} - - we := &wurflEnricher{ - WurflData: tc.wurflData, - ExtCaps: true, - } - // Call the method being tested - we.EnrichDevice(device) - - // Assert the results - if tc.expectNoError { - assert.JSONEq(t, tc.expectedExt, string(device.Ext)) - } else { - assert.NotEqual(t, tc.expectedExt, string(device.Ext)) - } - }) - } -} - -func TestWurflEnricher_MakeDeviceType(t *testing.T) { - tests := []struct { - name string - data wurflData - expected adcom1.DeviceType - }{ - { - name: "Mobile device - form_factor Other Mobile", - data: wurflData{ - "form_factor": "Other Mobile", - }, - expected: adcom1.DeviceMobile, - }, - { - name: "Smartphone device - form_factor Smartphone", - data: wurflData{ - "form_factor": "Smartphone", - }, - expected: adcom1.DevicePhone, - }, - { - name: "Feature Phone device - form_factor Feature Phone", - data: wurflData{ - "form_factor": "Feature Phone", - }, - expected: adcom1.DevicePhone, - }, - { - name: "Connected TV - form_factor Smart-TV", - data: wurflData{ - "form_factor": "Smart-TV", - }, - expected: adcom1.DeviceTV, - }, - { - name: "Full desktop - form_factor Desktop", - data: wurflData{ - "form_factor": "Desktop", - }, - expected: adcom1.DevicePC, - }, - { - name: "Tablet device - form_factor Tablet", - data: wurflData{ - "form_factor": "Tablet", - }, - expected: adcom1.DeviceTablet, - }, - { - name: "Connected device - form_factor Other Non-Mobile", - data: wurflData{ - "form_factor": "Other Non-Mobile", - }, - expected: adcom1.DeviceConnected, - }, - { - name: "Set-top box (OTT) - is_ott has priority", - data: wurflData{ - "is_ott": "true", - "form_factor": "Desktop", - }, - expected: adcom1.DeviceSetTopBox, - }, - { - name: "Console device - is_console has priority", - data: wurflData{ - "is_console": "true", - "form_factor": "Desktop", - }, - expected: adcom1.DeviceConnected, - }, - { - name: "Out-of-home device - physical_form_factor has priority", - data: wurflData{ - "physical_form_factor": "out_of_home_device", - "form_factor": "Desktop", - }, - expected: adcom1.DeviceOOH, - }, - { - name: "Unknown device type - no form_factor", - data: wurflData{}, - expected: adcom1.DeviceType(0), - }, - { - name: "Unknown device type - invalid form_factor", - data: wurflData{ - "form_factor": "Unknown", - }, - expected: adcom1.DeviceType(0), - }, - } - - for _, tc := range tests { - we := &wurflEnricher{ - WurflData: tc.data, - } - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expected, we.makeDeviceType()) - }) - } -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_headers.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_headers.go deleted file mode 100644 index 163102b414..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_headers.go +++ /dev/null @@ -1,104 +0,0 @@ -package wurfl_devicedetection - -import ( - "fmt" - "strings" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/iterutil" -) - -const ( - secCHUA = "Sec-CH-UA" - secCHUAPlatform = "Sec-CH-UA-Platform" - secCHUAPlatformVersion = "Sec-CH-UA-Platform-Version" - secCHUAMobile = "Sec-CH-UA-Mobile" - secCHUAArch = "Sec-CH-UA-Arch" - secCHUAModel = "Sec-CH-UA-Model" - secCHUAFullVersionList = "Sec-CH-UA-Full-Version-List" - userAgent = "User-Agent" -) - -// clientHintEscaper escapes special characters in Client Hint header values per RFC 9651. -// Only backslash and double-quote need escaping. Backslash must be escaped first. -var clientHintEscaper = strings.NewReplacer( - `\`, `\\`, // Must escape backslash FIRST - `"`, `\"`, // Then escape quotes -) - -func makeHeaders(ortb2Device openrtb2.Device, rawHeaders map[string]string) map[string]string { - sua := ortb2Device.SUA - ua := ortb2Device.UA - if ua == "" { - if sua == nil { - return rawHeaders - } - if sua.Browsers == nil { - return rawHeaders - } - } - headers := make(map[string]string) - - if ua != "" { - headers[userAgent] = ua - } - - if sua == nil { - return headers - } - - if sua.Browsers == nil { - return headers - } - - brandList := makeBrandList(sua.Browsers) - headers[secCHUA] = brandList - headers[secCHUAFullVersionList] = brandList - - if sua.Platform != nil { - headers[secCHUAPlatform] = quoteAndEscapeClientHintField(sua.Platform.Brand) - headers[secCHUAPlatformVersion] = quoteAndEscapeClientHintField(strings.Join(sua.Platform.Version, ".")) - } - - if sua.Model != "" { - headers[secCHUAModel] = quoteAndEscapeClientHintField(sua.Model) - } - - if sua.Architecture != "" { - headers[secCHUAArch] = quoteAndEscapeClientHintField(sua.Architecture) - } - - if sua.Mobile != nil { - headers[secCHUAMobile] = fmt.Sprintf("?%d", *sua.Mobile) - } - - return headers -} - -func makeBrandList(brandVersions []openrtb2.BrandVersion) string { - var builder strings.Builder - first := true - for version := range iterutil.SlicePointerValues(brandVersions) { - if version.Brand == "" { - continue - } - if !first { - builder.WriteString(", ") - } - first = false - - brandName := quoteAndEscapeClientHintField(version.Brand) - builder.WriteString(brandName) - builder.WriteString(`;v="`) - builder.WriteString(clientHintEscaper.Replace(strings.Join(version.Version, "."))) - builder.WriteString(`"`) - } - return builder.String() -} - -// quoteAndEscapeClientHintField escapes special characters per RFC 9651 and wraps -// the value in double quotes for use in HTTP Client Hint header values. -// Backslashes and double-quotes are escaped as required by the structured field specification. -func quoteAndEscapeClientHintField(value string) string { - return `"` + clientHintEscaper.Replace(value) + `"` -} diff --git a/modules/scientiamobile/wurfl_devicedetection/wurfl_headers_test.go b/modules/scientiamobile/wurfl_devicedetection/wurfl_headers_test.go deleted file mode 100644 index 36456954ff..0000000000 --- a/modules/scientiamobile/wurfl_devicedetection/wurfl_headers_test.go +++ /dev/null @@ -1,171 +0,0 @@ -package wurfl_devicedetection - -import ( - "testing" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/stretchr/testify/assert" -) - -func TestMakeHeaders(t *testing.T) { - tests := []struct { - name string - device openrtb2.Device - rawHeaders map[string]string - expected map[string]string - }{ - { - name: "No SUA and no UA", - device: openrtb2.Device{}, - rawHeaders: map[string]string{"Custom-Header": "Value"}, - expected: map[string]string{"Custom-Header": "Value"}, - }, - { - name: "Only UA", - device: openrtb2.Device{ - UA: "Mozilla/5.0", - }, - rawHeaders: map[string]string{}, - expected: map[string]string{"User-Agent": "Mozilla/5.0"}, - }, - { - name: "UA and SUA without Browsers", - device: openrtb2.Device{ - UA: "Mozilla/5.0", - SUA: &openrtb2.UserAgent{ - Platform: &openrtb2.BrandVersion{ - Brand: "Android", - Version: []string{"12"}, - }, - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{"User-Agent": "Mozilla/5.0"}, - }, - { - name: "No UA and SUA without Browsers", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Platform: &openrtb2.BrandVersion{ - Brand: "Android", - Version: []string{"12"}, - }, - }, - }, - rawHeaders: map[string]string{"User-Agent": "Mozilla/5.0"}, - expected: map[string]string{"User-Agent": "Mozilla/5.0"}, - }, - { - name: "SUA with browsers and platform", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Browsers: []openrtb2.BrandVersion{ - {Brand: "Google Chrome", Version: []string{"114", "0", "5735"}}, - }, - Platform: &openrtb2.BrandVersion{ - Brand: "Android", - Version: []string{"12"}, - }, - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{ - "Sec-CH-UA": `"Google Chrome";v="114.0.5735"`, - "Sec-CH-UA-Full-Version-List": `"Google Chrome";v="114.0.5735"`, - "Sec-CH-UA-Platform": `"Android"`, - "Sec-CH-UA-Platform-Version": `"12"`, - }, - }, - { - name: "SUA with mobile and model", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Browsers: []openrtb2.BrandVersion{ - {Brand: "Google Chrome", Version: []string{"114", "0", "5735"}}, - }, - Mobile: func(i int8) *int8 { return &i }(1), - Model: "Pixel 6", - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{ - "Sec-CH-UA": `"Google Chrome";v="114.0.5735"`, - "Sec-CH-UA-Full-Version-List": `"Google Chrome";v="114.0.5735"`, - "Sec-CH-UA-Mobile": `?1`, - "Sec-CH-UA-Model": `"Pixel 6"`, - }, - }, - { - name: "SUA with multiple browsers brand", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Browsers: []openrtb2.BrandVersion{ - {Brand: "Chromium", Version: []string{"114"}}, - {Brand: "Google Chrome", Version: []string{"114", "0", "5735"}}, - {Brand: " Not A;Brand", Version: []string{"99"}}, - }, - Platform: &openrtb2.BrandVersion{ - Brand: "Windows", - Version: []string{"10", "0", "0"}, - }, - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{ - "Sec-CH-UA": `"Chromium";v="114", "Google Chrome";v="114.0.5735", " Not A;Brand";v="99"`, - "Sec-CH-UA-Full-Version-List": `"Chromium";v="114", "Google Chrome";v="114.0.5735", " Not A;Brand";v="99"`, - "Sec-CH-UA-Platform": `"Windows"`, - "Sec-CH-UA-Platform-Version": `"10.0.0"`, - }, - }, - { - name: "SUA with special characters in version strings (RFC 9651)", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Browsers: []openrtb2.BrandVersion{ - {Brand: "Chrome", Version: []string{`1", "Injected";v="99`}}, - {Brand: "Brand", Version: []string{`1\2`}}, - }, - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{ - "Sec-CH-UA": `"Chrome";v="1\", \"Injected\";v=\"99", "Brand";v="1\\2"`, - "Sec-CH-UA-Full-Version-List": `"Chrome";v="1\", \"Injected\";v=\"99", "Brand";v="1\\2"`, - }, - }, - { - name: "SUA with special characters requiring escaping (RFC 9651)", - device: openrtb2.Device{ - SUA: &openrtb2.UserAgent{ - Browsers: []openrtb2.BrandVersion{ - {Brand: `Test"Brand`, Version: []string{"1", "0"}}, - {Brand: `Test\Brand`, Version: []string{"2", "0"}}, - }, - Platform: &openrtb2.BrandVersion{ - Brand: `OS"Name`, - Version: []string{"1"}, - }, - Model: `Device"Model\Name`, - Architecture: `arch\test`, - }, - }, - rawHeaders: map[string]string{}, - expected: map[string]string{ - "Sec-CH-UA": `"Test\"Brand";v="1.0", "Test\\Brand";v="2.0"`, - "Sec-CH-UA-Full-Version-List": `"Test\"Brand";v="1.0", "Test\\Brand";v="2.0"`, - "Sec-CH-UA-Platform": `"OS\"Name"`, - "Sec-CH-UA-Platform-Version": `"1"`, - "Sec-CH-UA-Model": `"Device\"Model\\Name"`, - "Sec-CH-UA-Arch": `"arch\\test"`, - }, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - result := makeHeaders(test.device, test.rawHeaders) - assert.Equal(t, test.expected, result) - }) - } -} diff --git a/modules/scope3/rtd/README.md b/modules/scope3/rtd/README.md index bdaa5e5893..3db4d447e2 100644 --- a/modules/scope3/rtd/README.md +++ b/modules/scope3/rtd/README.md @@ -19,12 +19,10 @@ hooks: auth_key: ${SCOPE3_API_KEY} # Set SCOPE3_API_KEY environment variable endpoint: https://rtdp.scope3.com/prebid/prebid timeout_ms: 1000 - cache_ttl_seconds: 60 # Cache segments for 60 seconds (default) - add_to_targeting: false # Set to true to add segments as individual targeting keys for GAM - add_scope3_targeting_section: false # Also set targeting in dedicated scope3 section - single_segment_key: "" # When set, adds all segments as a comma separated value under a single targeting key - masking: # Optional privacy masking configuration - enabled: true # Enable field masking before sending to Scope3 + cache_ttl_seconds: 60 # Cache segments for 60 seconds (default) + add_to_targeting: false # Set to true to add segments as individual targeting keys for GAM + masking: # Optional privacy masking configuration + enabled: true # Enable field masking before sending to Scope3 geo: preserve_metro: true # Preserve DMA code (default: true) preserve_zip: true # Preserve postal code (default: true) @@ -48,12 +46,12 @@ hooks: hook_sequence: - module_code: "scope3.rtd" hook_impl_code: "HandleEntrypointHook" - auction_processed: + raw_auction_request: groups: - timeout: 2000 hook_sequence: - module_code: "scope3.rtd" - hook_impl_code: "HandleAuctionProcessedHook" + hook_impl_code: "HandleRawAuctionHook" auction_response: groups: - timeout: 5 @@ -75,7 +73,6 @@ hooks: "timeout_ms": 1000, "cache_ttl_seconds": 60, "add_to_targeting": false, - "add_scope3_targeting_section": false, "masking": { "enabled": true, "geo": { @@ -309,7 +306,7 @@ The module forwards any fields that are not masked from the bid request to the S ### Auction Response Data The module adds audience segments to the auction response, giving publishers full control over how to use them: -1. **Publisher Flexibility**: Segments are returned in `ext.scope3.segments` when configured for the publisher to decide where to send +1. **Publisher Flexibility**: Segments are always returned in `ext.scope3.segments` for the publisher to decide where to send 2. **Google Ad Manager (GAM)**: Individual targeting keys are added when `add_to_targeting: true` (e.g., `gmp_eligible=true`) 3. **Other Ad Servers**: Publisher can forward segments to any ad server or system 4. **Analytics**: Segment data is available for reporting and analysis @@ -317,7 +314,7 @@ The module adds audience segments to the auction response, giving publishers ful ### Response Format Options The module provides segments in two formats: -**When `add_scope3_targeting_section: true`:** +**Always available:** ```json { "ext": { diff --git a/modules/scope3/rtd/async_request.go b/modules/scope3/rtd/async_request.go index 23f44b2df5..38c4663286 100644 --- a/modules/scope3/rtd/async_request.go +++ b/modules/scope3/rtd/async_request.go @@ -48,6 +48,6 @@ func (ar *AsyncRequest) fetchScope3SegmentsAsync(request *openrtb2.BidRequest) { } close(ar.Done) }() - ar.Segments, ar.Err = ar.fetchScope3Segments(ar.Context, request) + ar.Segments, ar.Err = ar.Module.fetchScope3Segments(ar.Context, request) }() } diff --git a/modules/scope3/rtd/masking.go b/modules/scope3/rtd/masking.go index d8123aa20b..d32689dacf 100644 --- a/modules/scope3/rtd/masking.go +++ b/modules/scope3/rtd/masking.go @@ -4,8 +4,8 @@ import ( "math" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/iterutil" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/iterutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // maskBidRequest creates a deep copy of the bid request with sensitive fields masked diff --git a/modules/scope3/rtd/module.go b/modules/scope3/rtd/module.go index 9ad4e61702..15fab4fc68 100644 --- a/modules/scope3/rtd/module.go +++ b/modules/scope3/rtd/module.go @@ -10,7 +10,9 @@ import ( "errors" "fmt" "hash" + "maps" "net/http" + "slices" "strings" "sync" "time" @@ -18,13 +20,12 @@ import ( "github.com/coocood/freecache" jsoniter "github.com/json-iterator/go" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookanalytics" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/util/iterutil" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/tidwall/sjson" + "github.com/prebid/prebid-server/v3/hooks/hookanalytics" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/util/iterutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // Builder is the entry point for the module @@ -89,35 +90,31 @@ func Builder(config json.RawMessage, deps moduledeps.ModuleDeps) (interface{}, e const ( // keys for miCtx - asyncRequestKey = "scope3.AsyncRequest" - scope3MacroKey = "scope3_macro" - scope3IncludeKey = "scope3_include" - scope3Separator = ";" - scope3CacheKeySeparator = "|" + asyncRequestKey = "scope3.AsyncRequest" + scope3MacroKey = "scope3_macro" + scope3MacroSeparator = ";" ) -var scope3MacroKeyPlusSeparator = scope3MacroKey + scope3Separator -var scope3IncludeKeyPlusSeparator = scope3IncludeKey + scope3Separator +var scope3MacroKeyPlusSeparator = scope3MacroKey + scope3MacroSeparator const DefaultScope3RTDURL = "https://rtdp.scope3.com/prebid/prebid" var ( // Declare hooks - _ hookstage.Entrypoint = (*Module)(nil) - _ hookstage.ProcessedAuctionRequest = (*Module)(nil) - _ hookstage.AuctionResponse = (*Module)(nil) + _ hookstage.Entrypoint = (*Module)(nil) + _ hookstage.RawAuctionRequest = (*Module)(nil) + _ hookstage.AuctionResponse = (*Module)(nil) ) // Config holds module configuration type Config struct { - Endpoint string `json:"endpoint"` - AuthKey string `json:"auth_key"` - Timeout int `json:"timeout_ms"` - CacheTTL int `json:"cache_ttl_seconds"` // Cache segments for this many seconds - CacheSize int `json:"cache_size"` // Maximum size of segment cache in bytes - AddToTargeting bool `json:"add_to_targeting"` // Add segments as individual targeting keys - AddScope3TargetingSection bool `json:"add_scope3_targeting_section"` // Add segments as individual targeting keys in Scope3 targeting section - Masking MaskingConfig `json:"masking"` // Privacy masking configuration + Endpoint string `json:"endpoint"` + AuthKey string `json:"auth_key"` + Timeout int `json:"timeout_ms"` + CacheTTL int `json:"cache_ttl_seconds"` // Cache segments for this many seconds + CacheSize int `json:"cache_size"` // Maximum size of segment cache in bytes + AddToTargeting bool `json:"add_to_targeting"` // Add segments as individual targeting keys + Masking MaskingConfig `json:"masking"` // Privacy masking configuration } // MaskingConfig controls what user data is masked before sending to Scope3 @@ -156,19 +153,30 @@ type userExt struct { // Response types for Scope3 API type Scope3Response struct { - AEESignals `json:"aee_signals"` + Data []Scope3Data `json:"data"` } -type AEESignals struct { - Include []string `json:"include,omitempty"` - Exclude []string `json:"exclude,omitempty"` - Macro string `json:"macro,omitempty"` // base64 - Bidders []map[string]Bidder `json:"bidders,omitempty"` +type Scope3Data struct { + Destination string `json:"destination"` + Imp []Scope3ImpData `json:"imp"` } -type Bidder struct { - Segments []string `json:"segments,omitempty"` - Deals []string `json:"deals,omitempty"` +type Scope3ImpData struct { + ID string `json:"id"` + Ext *Scope3Ext `json:"ext,omitempty"` +} + +type Scope3Ext struct { + Scope3 *Scope3ExtData `json:"scope3"` +} + +type Scope3ExtData struct { + Segments []Scope3Segment `json:"segments"` + Macro string `json:"macro"` +} + +type Scope3Segment struct { + ID string `json:"id"` } // Module implements the Scope3 RTD module @@ -186,24 +194,24 @@ func (m *Module) HandleEntrypointHook( miCtx hookstage.ModuleInvocationContext, payload hookstage.EntrypointPayload, ) (hookstage.HookResult[hookstage.EntrypointPayload], error) { - moduleContext := hookstage.NewModuleContext() - moduleContext.Set(asyncRequestKey, m.NewAsyncRequest(payload.Request)) // Initialize module context with sync.Map for thread-safe segment storage return hookstage.HookResult[hookstage.EntrypointPayload]{ - ModuleContext: moduleContext, + ModuleContext: hookstage.ModuleContext{ + asyncRequestKey: m.NewAsyncRequest(payload.Request), + }, }, nil } // HandleRawAuctionHook is called early in the auction to fetch Scope3 data -func (m *Module) HandleProcessedAuctionHook( +func (m *Module) HandleRawAuctionHook( ctx context.Context, miCtx hookstage.ModuleInvocationContext, - payload hookstage.ProcessedAuctionRequestPayload, -) (hookstage.HookResult[hookstage.ProcessedAuctionRequestPayload], error) { - var ret hookstage.HookResult[hookstage.ProcessedAuctionRequestPayload] - analyticsNamePrefix := "HandleProcessedAuctionHook." + payload hookstage.RawAuctionRequestPayload, +) (hookstage.HookResult[hookstage.RawAuctionRequestPayload], error) { + var ret hookstage.HookResult[hookstage.RawAuctionRequestPayload] + analyticsNamePrefix := "HandleRawAuctionHook." - request, ok := miCtx.ModuleContext.Get(asyncRequestKey) + asyncRequest, ok := miCtx.ModuleContext[asyncRequestKey].(*AsyncRequest) if !ok { // Log error but don't fail the auction ret.AnalyticsTags = hookanalytics.Analytics{ @@ -219,16 +227,17 @@ func (m *Module) HandleProcessedAuctionHook( return ret, nil } - asyncRequest, ok := request.(*AsyncRequest) - if !ok { + // Parse OpenRTB request here rather than HandleProcessedAuctionHook to get a copy to avoid parallel mutation issues + var bidRequest openrtb2.BidRequest + if err := jsonutil.Unmarshal(payload, &bidRequest); err != nil { // Log error but don't fail the auction ret.AnalyticsTags = hookanalytics.Analytics{ Activities: []hookanalytics.Activity{{ - Name: analyticsNamePrefix + asyncRequestKey, + Name: analyticsNamePrefix + "bidRequest.unmarshal", Status: hookanalytics.ActivityStatusError, Results: []hookanalytics.Result{{ Status: hookanalytics.ResultStatusError, - Values: map[string]interface{}{"error": "failed to get async request from module context"}, + Values: map[string]interface{}{"error": err.Error()}, }}, }}, } @@ -236,7 +245,7 @@ func (m *Module) HandleProcessedAuctionHook( } // Start async request to Scope3 - asyncRequest.fetchScope3SegmentsAsync(payload.Request.BidRequest) + asyncRequest.fetchScope3SegmentsAsync(&bidRequest) return ret, nil } @@ -249,24 +258,7 @@ func (m *Module) HandleAuctionResponseHook( ) (hookstage.HookResult[hookstage.AuctionResponsePayload], error) { analyticsNamePrefix := "HandleAuctionResponseHook." var ret hookstage.HookResult[hookstage.AuctionResponsePayload] - - request, ok := miCtx.ModuleContext.Get(asyncRequestKey) - if !ok { - // Log error but don't fail the auction - ret.AnalyticsTags = hookanalytics.Analytics{ - Activities: []hookanalytics.Activity{{ - Name: analyticsNamePrefix + asyncRequestKey, - Status: hookanalytics.ActivityStatusError, - Results: []hookanalytics.Result{{ - Status: hookanalytics.ResultStatusError, - Values: map[string]interface{}{"error": "failed to get async request from module context"}, - }}, - }}, - } - return ret, nil - } - - asyncRequest, ok := request.(*AsyncRequest) + asyncRequest, ok := miCtx.ModuleContext[asyncRequestKey].(*AsyncRequest) if !ok { // Log error but don't fail the auction ret.AnalyticsTags = hookanalytics.Analytics{ @@ -321,64 +313,50 @@ func (m *Module) HandleAuctionResponseHook( // Add segments to the auction response ret.ChangeSet.AddMutation( func(payload hookstage.AuctionResponsePayload) (hookstage.AuctionResponsePayload, error) { + // Add Scope3 segments to the response ext so publisher can use them + if payload.BidResponse.Ext == nil { + payload.BidResponse.Ext = json.RawMessage("{}") + } + + var extMap map[string]interface{} + if err = jsonutil.Unmarshal(payload.BidResponse.Ext, &extMap); err != nil { + extMap = make(map[string]interface{}) + } + // Add segments as individual targeting keys for GAM integration if m.cfg.AddToTargeting { + prebidMap, ok := extMap["prebid"].(map[string]interface{}) + if !ok { + prebidMap = make(map[string]interface{}) + extMap["prebid"] = prebidMap + } + targetingMap, ok := prebidMap["targeting"].(map[string]interface{}) + if !ok { + targetingMap = make(map[string]interface{}) + prebidMap["targeting"] = targetingMap + } // Add each segment as individual targeting key for _, segment := range segments { - segmentKeyVal := strings.Split(segment, scope3Separator) - if len(segmentKeyVal) != 2 { - logger.Infof("Skipping malformed segment: %s", segment) - continue - } - newPayload, err := sjson.SetBytes(payload.BidResponse.Ext, "prebid.targeting."+segmentKeyVal[0], segmentKeyVal[1]) - if err != nil { - logger.Errorf("Failed to add targeting to bid: %v", err) - continue + if strings.HasPrefix(segment, scope3MacroKeyPlusSeparator) { + macroKeyVal := strings.Split(segment, scope3MacroSeparator) + if len(macroKeyVal) != 2 { + continue + } + targetingMap[macroKeyVal[0]] = macroKeyVal[1] + } else { + targetingMap[segment] = "true" } - payload.BidResponse.Ext = newPayload } } - // Add to a dedicated scope3 section for publisher flexibility when configured - if m.cfg.AddScope3TargetingSection { - newPayload, err := sjson.SetBytes(payload.BidResponse.Ext, "scope3.segments", segments) - if err != nil { - logger.Errorf("Failed to add scope3 section to bid response ext: %v", err) - } else { - payload.BidResponse.Ext = newPayload - } + // Always add to a dedicated scope3 section for publisher flexibility + extMap["scope3"] = map[string]interface{}{ + "segments": segments, } - // also add to seatbid[].bid[] - for seatBid := range iterutil.SlicePointerValues(payload.BidResponse.SeatBid) { - for bid := range iterutil.SlicePointerValues(seatBid.Bid) { - // Add segments as individual targeting keys for GAM integration - if m.cfg.AddToTargeting { - for _, segment := range segments { - segmentKeyVal := strings.Split(segment, scope3Separator) - if len(segmentKeyVal) != 2 { - logger.Infof("Skipping malformed segment in bid targeting: %s", segment) - continue - } - newPayload, err := sjson.SetBytes(bid.Ext, "prebid.targeting."+segmentKeyVal[0], segmentKeyVal[1]) - if err != nil { - logger.Errorf("Failed to add targeting to bid: %v", err) - continue - } - bid.Ext = newPayload - } - } - - // Always add to a dedicated scope3 section for publisher flexibility - if m.cfg.AddScope3TargetingSection { - newPayload, err := sjson.SetBytes(bid.Ext, "scope3.segments", segments) - if err != nil { - logger.Errorf("Failed to add scope3 section to bid response ext: %v", err) - } else { - bid.Ext = newPayload - } - } - } + extResp, err := jsonutil.Marshal(extMap) + if err == nil { + payload.BidResponse.Ext = extResp } return payload, nil @@ -397,7 +375,7 @@ func (m *Module) fetchScope3Segments(ctx context.Context, bidRequest *openrtb2.B // Check cache first if segments, err := m.cache.Get(cacheKey); err == nil { - return strings.Split(string(segments), scope3CacheKeySeparator), nil + return strings.Split(string(segments), ","), nil } // Apply privacy masking before sending to Scope3 @@ -443,17 +421,31 @@ func (m *Module) fetchScope3Segments(ctx context.Context, bidRequest *openrtb2.B return nil, err } - segments := []string{} - if len(scope3Resp.Include) > 0 { - segmentsStr := scope3IncludeKeyPlusSeparator + strings.Join(scope3Resp.Include, ",") - segments = append(segments, segmentsStr) + // Extract unique segments (exclude destination) + segmentMap := make(map[string]bool) + var macro string + for data := range iterutil.SlicePointerValues(scope3Resp.Data) { + // Extract actual segments from impression-level data + for imp := range iterutil.SlicePointerValues(data.Imp) { + if imp.Ext != nil && imp.Ext.Scope3 != nil { + if imp.Ext.Scope3.Macro != "" { + macro = imp.Ext.Scope3.Macro + } + for segment := range iterutil.SlicePointerValues(imp.Ext.Scope3.Segments) { + segmentMap[segment.ID] = true + } + } + } } - if scope3Resp.Macro != "" { - segments = append(segments, scope3MacroKeyPlusSeparator+scope3Resp.Macro) + + // Convert to slice + segments := slices.AppendSeq(make([]string, 0, len(segmentMap)), maps.Keys(segmentMap)) + if macro != "" { + segments = append(segments, scope3MacroKeyPlusSeparator+macro) } // Cache the result - err = m.cache.Set(cacheKey, []byte(strings.Join(segments, scope3CacheKeySeparator)), m.cfg.CacheTTL) + err = m.cache.Set(cacheKey, []byte(strings.Join(segments, ",")), m.cfg.CacheTTL) if err != nil { logger.Infof("could not set segments in cache: %v", err) } diff --git a/modules/scope3/rtd/module_test.go b/modules/scope3/rtd/module_test.go index 6b40353cf0..8b46d3bbb8 100644 --- a/modules/scope3/rtd/module_test.go +++ b/modules/scope3/rtd/module_test.go @@ -15,10 +15,9 @@ import ( "github.com/coocood/freecache" "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/hooks/hookstage" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/hooks/hookstage" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -83,19 +82,16 @@ func TestHandleEntrypointHook(t *testing.T) { result, err := module.HandleEntrypointHook(ctx, miCtx, payload) assert.NoError(t, err) - asyncRequest, _ := result.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) + assert.NotNil(t, result.ModuleContext[asyncRequestKey]) } func TestHandleAuctionResponseHook_NoSegments(t *testing.T) { module := &Module{} ctx := context.Background() miCtx := hookstage.ModuleInvocationContext{ - ModuleContext: func() *hookstage.ModuleContext { - mctx := hookstage.NewModuleContext() - mctx.Set("segments", &sync.Map{}) - return mctx - }(), + ModuleContext: hookstage.ModuleContext{ + "segments": &sync.Map{}, + }, } payload := hookstage.AuctionResponsePayload{} @@ -132,78 +128,25 @@ func TestScope3APIIntegration(t *testing.T) { // Return mock Scope3 response with segments response := `{ - "aee_signals": { - "include": [ - "gmp_eligible", - "gmp_plus_eligible" - ], - "macro": "test-macro" - } - }` - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(response)) - })) - defer mockServer.Close() - - // Create module with mock server endpoint - config := json.RawMessage(`{ - "endpoint": "` + mockServer.URL + `", - "auth_key": "test-auth-key", - "timeout_ms": 1000, - "cache_ttl_seconds": 60, - "add_to_targeting": false - }`) - - moduleInterface, err := Builder(config, getTestModuleDeps(t)) - require.NoError(t, err) - module := moduleInterface.(*Module) - - // Create test bid request - width := int64(300) - height := int64(250) - bidRequest := &openrtb2.BidRequest{ - ID: "test-auction", - Imp: []openrtb2.Imp{{ - ID: "test-imp-1", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }}, - Site: &openrtb2.Site{ - Domain: "example.com", - Page: "https://example.com/test-page", - }, - User: &openrtb2.User{ - ID: "test-user", - Ext: json.RawMessage(`{ - "eids": [ - { - "source": "liveramp.com", - "uids": [{"id": "test-ramp-id"}] - } - ] - }`), - }, - } - - // Test fetchScope3Segments - ctx := context.Background() - segments, err := module.fetchScope3Segments(ctx, bidRequest) - require.NoError(t, err) - assert.Len(t, segments, 2) - assert.ElementsMatch(t, segments, []string{"scope3_include;gmp_eligible,gmp_plus_eligible", "scope3_macro;test-macro"}) -} - -func TestScope3APIIntegrationNoSegments(t *testing.T) { - // Create mock Scope3 API server - mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Verify request method and headers - assert.Equal(t, "POST", r.Method) - assert.Equal(t, "application/json", r.Header.Get("Content-Type")) - assert.Equal(t, "test-auth-key", r.Header.Get("x-scope3-auth")) - - // Return mock Scope3 response with segments - response := `{ - "aee_signals": {} + "data": [ + { + "destination": "triplelift.com", + "imp": [ + { + "id": "test-imp-1", + "ext": { + "scope3": { + "macro": "test-macro", + "segments": [ + {"id": "gmp_eligible"}, + {"id": "gmp_plus_eligible"} + ] + } + } + } + ] + } + ] }` w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) @@ -254,89 +197,34 @@ func TestScope3APIIntegrationNoSegments(t *testing.T) { ctx := context.Background() segments, err := module.fetchScope3Segments(ctx, bidRequest) require.NoError(t, err) - assert.Len(t, segments, 0) - - // Test entrypoint hook - entrypointResult, err := module.HandleEntrypointHook(ctx, hookstage.ModuleInvocationContext{}, getTestEntrypointPayload(t)) - require.NoError(t, err) - asyncRequest, _ := entrypointResult.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) - - payload := hookstage.ProcessedAuctionRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: bidRequest, - }, - } - - // Test raw auction hook - miCtx := hookstage.ModuleInvocationContext{ - ModuleContext: entrypointResult.ModuleContext, - } - _, err = module.HandleProcessedAuctionHook(ctx, miCtx, payload) - require.NoError(t, err) - - // Test auction response hook - responsePayload := hookstage.AuctionResponsePayload{ - BidResponse: &openrtb2.BidResponse{ - ID: "test-response", - Ext: json.RawMessage(`{}`), - SeatBid: []openrtb2.SeatBid{ - { - Seat: "test-seat", - Bid: []openrtb2.Bid{ - { - ID: "test-bid-1", - ImpID: "test-imp-1", - Price: 1.0, - Ext: json.RawMessage(`{}`), - }, - { - ID: "test-bid-2", - ImpID: "test-imp-2", - Price: 2.0, - Ext: json.RawMessage(`{}`), - }, - }, - }, - }, - }, - } - - responseResult, err := module.HandleAuctionResponseHook(ctx, miCtx, responsePayload) - require.NoError(t, err) - - // Verify the response was modified - assert.True(t, len(responseResult.ChangeSet.Mutations()) > 0) - - // Apply the mutations and check the result - modifiedPayload := responsePayload - for _, mutation := range responseResult.ChangeSet.Mutations() { - var err error - modifiedPayload, err = mutation.Apply(modifiedPayload) - require.NoError(t, err) - } - - // Parse the modified response - var extMap map[string]interface{} - err = json.Unmarshal(modifiedPayload.BidResponse.Ext, &extMap) - require.NoError(t, err) - - // Verify scope3 section exists - _, exists := extMap["scope3"].(map[string]interface{}) - require.False(t, exists) + assert.Len(t, segments, 3) + assert.ElementsMatch(t, segments, []string{"gmp_eligible", "gmp_plus_eligible", "scope3_macro;test-macro"}) + assert.NotContains(t, segments, "triplelift.com") // Should not include destination } func TestScope3APIIntegrationWithTargeting(t *testing.T) { // Create mock server that returns segments mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { response := `{ - "aee_signals": { - "include": [ - "test_segment_1", - "test_segment_2" - ], - "macro": "test-macro" - } + "data": [ + { + "destination": "triplelift.com", + "imp": [ + { + "id": "test-imp-1", + "ext": { + "scope3": { + "macro": "test-macro", + "segments": [ + {"id": "test_segment_1"}, + {"id": "test_segment_2"} + ] + } + } + } + ] + } + ] }` w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) @@ -349,8 +237,7 @@ func TestScope3APIIntegrationWithTargeting(t *testing.T) { "endpoint": "` + mockServer.URL + `", "auth_key": "test-auth-key", "timeout_ms": 1000, - "add_to_targeting": true, - "add_scope3_targeting_section": true + "add_to_targeting": true }`) moduleInterface, err := Builder(config, getTestModuleDeps(t)) @@ -363,38 +250,29 @@ func TestScope3APIIntegrationWithTargeting(t *testing.T) { // Test entrypoint hook entrypointResult, err := module.HandleEntrypointHook(ctx, hookstage.ModuleInvocationContext{}, getTestEntrypointPayload(t)) require.NoError(t, err) - asyncRequest, _ := entrypointResult.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) + assert.NotNil(t, entrypointResult.ModuleContext[asyncRequestKey]) // Create test request payload width := int64(300) height := int64(250) - payload := hookstage.ProcessedAuctionRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - ID: "test-auction", - Imp: []openrtb2.Imp{ - { - ID: "test-imp-1", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }, - { - ID: "test-imp-2", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }}, - Site: &openrtb2.Site{ - Domain: "example.com", - Page: "https://example.com/test", - }, - }, + bidRequest := openrtb2.BidRequest{ + ID: "test-auction", + Imp: []openrtb2.Imp{{ + ID: "test-imp-1", + Banner: &openrtb2.Banner{W: &width, H: &height}, + }}, + Site: &openrtb2.Site{ + Domain: "example.com", + Page: "https://example.com/test", }, } + requestPayload, _ := json.Marshal(bidRequest) // Test raw auction hook miCtx := hookstage.ModuleInvocationContext{ ModuleContext: entrypointResult.ModuleContext, } - _, err = module.HandleProcessedAuctionHook(ctx, miCtx, payload) + _, err = module.HandleRawAuctionHook(ctx, miCtx, requestPayload) require.NoError(t, err) // Test auction response hook @@ -402,42 +280,6 @@ func TestScope3APIIntegrationWithTargeting(t *testing.T) { BidResponse: &openrtb2.BidResponse{ ID: "test-response", Ext: json.RawMessage(`{}`), - SeatBid: []openrtb2.SeatBid{ - { - Seat: "test-seat", - Bid: []openrtb2.Bid{ - { - ID: "test-bid-1", - ImpID: "test-imp-1", - Price: 1.0, - Ext: json.RawMessage(`{}`), - }, - { - ID: "test-bid-2", - ImpID: "test-imp-2", - Price: 2.0, - Ext: json.RawMessage(`{}`), - }, - }, - }, - { - Seat: "test-seat2", - Bid: []openrtb2.Bid{ - { - ID: "test-bid-3", - ImpID: "test-imp-3", - Price: 1.0, - Ext: json.RawMessage(`{}`), - }, - { - ID: "test-bid-4", - ImpID: "test-imp-4", - Price: 2.0, - Ext: json.RawMessage(`{}`), - }, - }, - }, - }, }, } @@ -465,159 +307,7 @@ func TestScope3APIIntegrationWithTargeting(t *testing.T) { require.True(t, exists) segments, exists := scope3Data["segments"].([]interface{}) require.True(t, exists) - assert.Len(t, segments, 2) - - // Verify targeting section exists (add_to_targeting: true) - prebidData, exists := extMap["prebid"].(map[string]interface{}) - require.True(t, exists, "prebid section missing") - targetingData, exists := prebidData["targeting"].(map[string]interface{}) - require.True(t, exists, "targeting section missing") - - // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingData["scope3_include"]) - assert.Equal(t, "test-macro", targetingData["scope3_macro"]) - - // check seatbid - assert.Len(t, modifiedPayload.BidResponse.SeatBid, 2) - assert.Len(t, modifiedPayload.BidResponse.SeatBid[0].Bid, 2) - assert.Len(t, modifiedPayload.BidResponse.SeatBid[1].Bid, 2) - - for _, seatbid := range modifiedPayload.BidResponse.SeatBid { - for _, bid := range seatbid.Bid { - // Parse the modified response - var extBidMap map[string]interface{} - err = json.Unmarshal(bid.Ext, &extBidMap) - require.NoError(t, err) - - // Verify scope3 section exists - scope3DataSeatBid, exists := extBidMap["scope3"].(map[string]interface{}) - require.True(t, exists, "scope3 section missing") - segmentsSeatBid, exists := scope3DataSeatBid["segments"].([]interface{}) - require.True(t, exists, "segments section missing") - assert.Len(t, segmentsSeatBid, 2) - - // Verify targeting section exists (add_to_targeting: true) - prebidDataSeatBid, exists := extBidMap["prebid"].(map[string]interface{}) - require.True(t, exists, "prebid section missing") - targetingDataSeatBid, exists := prebidDataSeatBid["targeting"].(map[string]interface{}) - require.True(t, exists, "targeting section missing") - - // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingDataSeatBid["scope3_include"]) - assert.Equal(t, "test-macro", targetingDataSeatBid["scope3_macro"]) - } - } -} - -func TestScope3APIIntegrationWithTargetingNoScope3Section(t *testing.T) { - // Create mock server that returns segments - mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - response := `{ - "aee_signals": { - "include": [ - "test_segment_1", - "test_segment_2" - ], - "macro": "test-macro" - } - }` - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(response)) - })) - defer mockServer.Close() - - // Create module with targeting enabled - config := json.RawMessage(`{ - "endpoint": "` + mockServer.URL + `", - "auth_key": "test-auth-key", - "timeout_ms": 1000, - "add_to_targeting": true, - "add_scope3_targeting_section": false - }`) - - moduleInterface, err := Builder(config, getTestModuleDeps(t)) - require.NoError(t, err) - module := moduleInterface.(*Module) - - // Test full hook workflow - ctx := context.Background() - - // Test entrypoint hook - entrypointResult, err := module.HandleEntrypointHook(ctx, hookstage.ModuleInvocationContext{}, getTestEntrypointPayload(t)) - require.NoError(t, err) - asyncRequest, _ := entrypointResult.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) - - // Create test request payload - width := int64(300) - height := int64(250) - payload := hookstage.ProcessedAuctionRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - ID: "test-auction", - Imp: []openrtb2.Imp{{ - ID: "test-imp-1", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }}, - Site: &openrtb2.Site{ - Domain: "example.com", - Page: "https://example.com/test", - }, - }, - }, - } - - // Test raw auction hook - miCtx := hookstage.ModuleInvocationContext{ - ModuleContext: entrypointResult.ModuleContext, - } - _, err = module.HandleProcessedAuctionHook(ctx, miCtx, payload) - require.NoError(t, err) - - // Test auction response hook - responsePayload := hookstage.AuctionResponsePayload{ - BidResponse: &openrtb2.BidResponse{ - ID: "test-response", - Ext: json.RawMessage(`{}`), - SeatBid: []openrtb2.SeatBid{ - { - Seat: "test-seat", - Bid: []openrtb2.Bid{ - { - ID: "test-bid-1", - ImpID: "test-imp-1", - Price: 1.0, - Ext: json.RawMessage(`{}`), - }, - }, - }, - }, - }, - } - - responseResult, err := module.HandleAuctionResponseHook(ctx, miCtx, responsePayload) - require.NoError(t, err) - - // Verify the response was modified - assert.True(t, len(responseResult.ChangeSet.Mutations()) > 0) - - // Apply the mutations and check the result - modifiedPayload := responsePayload - for _, mutation := range responseResult.ChangeSet.Mutations() { - var err error - modifiedPayload, err = mutation.Apply(modifiedPayload) - require.NoError(t, err) - } - - // Parse the modified response - var extMap map[string]interface{} - err = json.Unmarshal(modifiedPayload.BidResponse.Ext, &extMap) - require.NoError(t, err) - - // Verify scope3 section exists - _, exists := extMap["scope3"].(map[string]interface{}) - require.False(t, exists) + assert.Len(t, segments, 3) // Verify targeting section exists (add_to_targeting: true) prebidData, exists := extMap["prebid"].(map[string]interface{}) @@ -626,44 +316,33 @@ func TestScope3APIIntegrationWithTargetingNoScope3Section(t *testing.T) { require.True(t, exists) // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingData["scope3_include"]) + assert.Equal(t, "true", targetingData["test_segment_1"]) + assert.Equal(t, "true", targetingData["test_segment_2"]) assert.Equal(t, "test-macro", targetingData["scope3_macro"]) - - // check seatbid - assert.Len(t, modifiedPayload.BidResponse.SeatBid, 1) - assert.Len(t, modifiedPayload.BidResponse.SeatBid[0].Bid, 1) - - // Parse the modified response - var extBidMap map[string]interface{} - err = json.Unmarshal(modifiedPayload.BidResponse.SeatBid[0].Bid[0].Ext, &extBidMap) - require.NoError(t, err) - - // Verify scope3 section exists - _, exists = extBidMap["scope3"].(map[string]interface{}) - require.False(t, exists) - - // Verify targeting section exists (add_to_targeting: true) - prebidDataSeatBid, exists := extBidMap["prebid"].(map[string]interface{}) - require.True(t, exists, "prebid section missing") - targetingDataSeatBid, exists := prebidDataSeatBid["targeting"].(map[string]interface{}) - require.True(t, exists, "targeting section missing") - - // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingDataSeatBid["scope3_include"]) - assert.Equal(t, "test-macro", targetingDataSeatBid["scope3_macro"]) } func TestScope3APIIntegrationWithExistingPrebidTargeting(t *testing.T) { // Create mock server that returns segments mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { response := `{ - "aee_signals": { - "include": [ - "test_segment_1", - "test_segment_2" - ], - "macro": "test-macro" - } + "data": [ + { + "destination": "triplelift.com", + "imp": [ + { + "id": "test-imp-1", + "ext": { + "scope3": { + "segments": [ + {"id": "test_segment_1"}, + {"id": "test_segment_2"} + ] + } + } + } + ] + } + ] }` w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) @@ -676,8 +355,7 @@ func TestScope3APIIntegrationWithExistingPrebidTargeting(t *testing.T) { "endpoint": "` + mockServer.URL + `", "auth_key": "test-auth-key", "timeout_ms": 1000, - "add_to_targeting": true, - "add_scope3_targeting_section": true + "add_to_targeting": true }`) moduleInterface, err := Builder(config, getTestModuleDeps(t)) @@ -690,33 +368,29 @@ func TestScope3APIIntegrationWithExistingPrebidTargeting(t *testing.T) { // Test entrypoint hook entrypointResult, err := module.HandleEntrypointHook(ctx, hookstage.ModuleInvocationContext{}, getTestEntrypointPayload(t)) require.NoError(t, err) - asyncRequest, _ := entrypointResult.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) + assert.NotNil(t, entrypointResult.ModuleContext[asyncRequestKey]) // Create test request payload width := int64(300) height := int64(250) - payload := hookstage.ProcessedAuctionRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - ID: "test-auction", - Imp: []openrtb2.Imp{{ - ID: "test-imp-1", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }}, - Site: &openrtb2.Site{ - Domain: "example.com", - Page: "https://example.com/test", - }, - }, + bidRequest := openrtb2.BidRequest{ + ID: "test-auction", + Imp: []openrtb2.Imp{{ + ID: "test-imp-1", + Banner: &openrtb2.Banner{W: &width, H: &height}, + }}, + Site: &openrtb2.Site{ + Domain: "example.com", + Page: "https://example.com/test", }, } + requestPayload, _ := json.Marshal(bidRequest) // Test raw auction hook miCtx := hookstage.ModuleInvocationContext{ ModuleContext: entrypointResult.ModuleContext, } - _, err = module.HandleProcessedAuctionHook(ctx, miCtx, payload) + _, err = module.HandleRawAuctionHook(ctx, miCtx, requestPayload) require.NoError(t, err) // Test auction response hook @@ -760,21 +434,33 @@ func TestScope3APIIntegrationWithExistingPrebidTargeting(t *testing.T) { require.True(t, exists) // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingData["scope3_include"]) - assert.Equal(t, "test-macro", targetingData["scope3_macro"]) + assert.Equal(t, "true", targetingData["segment_existing"]) + assert.Equal(t, "true", targetingData["test_segment_1"]) + assert.Equal(t, "true", targetingData["test_segment_2"]) } func TestScope3APIIntegrationWithExistingPrebidNoTargeting(t *testing.T) { // Create mock server that returns segments mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { response := `{ - "aee_signals": { - "include": [ - "test_segment_1", - "test_segment_2" - ], - "macro": "test-macro" - } + "data": [ + { + "destination": "triplelift.com", + "imp": [ + { + "id": "test-imp-1", + "ext": { + "scope3": { + "segments": [ + {"id": "test_segment_1"}, + {"id": "test_segment_2"} + ] + } + } + } + ] + } + ] }` w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) @@ -787,8 +473,7 @@ func TestScope3APIIntegrationWithExistingPrebidNoTargeting(t *testing.T) { "endpoint": "` + mockServer.URL + `", "auth_key": "test-auth-key", "timeout_ms": 1000, - "add_to_targeting": true, - "add_scope3_targeting_section": true + "add_to_targeting": true }`) moduleInterface, err := Builder(config, getTestModuleDeps(t)) @@ -801,33 +486,29 @@ func TestScope3APIIntegrationWithExistingPrebidNoTargeting(t *testing.T) { // Test entrypoint hook entrypointResult, err := module.HandleEntrypointHook(ctx, hookstage.ModuleInvocationContext{}, getTestEntrypointPayload(t)) require.NoError(t, err) - asyncRequest, _ := entrypointResult.ModuleContext.Get(asyncRequestKey) - assert.NotNil(t, asyncRequest) + assert.NotNil(t, entrypointResult.ModuleContext[asyncRequestKey]) // Create test request payload width := int64(300) height := int64(250) - payload := hookstage.ProcessedAuctionRequestPayload{ - Request: &openrtb_ext.RequestWrapper{ - BidRequest: &openrtb2.BidRequest{ - ID: "test-auction", - Imp: []openrtb2.Imp{{ - ID: "test-imp-1", - Banner: &openrtb2.Banner{W: &width, H: &height}, - }}, - Site: &openrtb2.Site{ - Domain: "example.com", - Page: "https://example.com/test", - }, - }, + bidRequest := openrtb2.BidRequest{ + ID: "test-auction", + Imp: []openrtb2.Imp{{ + ID: "test-imp-1", + Banner: &openrtb2.Banner{W: &width, H: &height}, + }}, + Site: &openrtb2.Site{ + Domain: "example.com", + Page: "https://example.com/test", }, } + requestPayload, _ := json.Marshal(bidRequest) // Test raw auction hook miCtx := hookstage.ModuleInvocationContext{ ModuleContext: entrypointResult.ModuleContext, } - _, err = module.HandleProcessedAuctionHook(ctx, miCtx, payload) + _, err = module.HandleRawAuctionHook(ctx, miCtx, requestPayload) require.NoError(t, err) // Test auction response hook @@ -871,8 +552,8 @@ func TestScope3APIIntegrationWithExistingPrebidNoTargeting(t *testing.T) { require.True(t, exists) // Check individual targeting keys - assert.Equal(t, "test_segment_1,test_segment_2", targetingData["scope3_include"]) - assert.Equal(t, "test-macro", targetingData["scope3_macro"]) + assert.Equal(t, "true", targetingData["test_segment_1"]) + assert.Equal(t, "true", targetingData["test_segment_2"]) } func TestScope3APIError(t *testing.T) { diff --git a/modules/shutdown.go b/modules/shutdown.go index d8be00b214..ae769ddf5e 100644 --- a/modules/shutdown.go +++ b/modules/shutdown.go @@ -1,7 +1,7 @@ package modules import ( - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) // Shutdowner is an interface that defines a method for shutting down modules. diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index bc8cd14770..d0a2841001 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -33,11 +33,15 @@ var coreBidderNames []BidderName = []BidderName{ BidderAdmatic, BidderAdmixer, BidderAdnuntius, + BidderAdOcean, + BidderAdoppler, BidderAdot, BidderAdpone, BidderAdprime, BidderAdquery, BidderAdrino, + BidderAdsInteractive, + BidderAdsinteractive, BidderAdtarget, BidderAdtrgtme, BidderAdtelligent, @@ -54,7 +58,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderAkcelo, BidderAlgorix, BidderAlkimi, - BidderAllianceGravity, BidderAMX, BidderApacdex, BidderAppnexus, @@ -68,7 +71,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderBeachfront, BidderBeintoo, BidderBematterfull, - BidderBeop, BidderBetween, BidderBeyondMedia, BidderBidmachine, @@ -113,17 +115,15 @@ var coreBidderNames []BidderName = []BidderName{ BidderDisplayio, BidderEdge226, BidderDmx, + BidderDXKulture, BidderDriftPixel, - BidderElementalTV, BidderEmtv, BidderEmxDigital, BidderEPlanning, BidderEpom, BidderEscalax, - BidderEskimi, BidderEVolution, BidderExco, - BidderEzoic, BidderFeedAd, BidderFlatads, BidderFlipp, @@ -134,6 +134,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderGamoshi, BidderGlobalsun, BidderGoldbach, + BidderGothamads, BidderGrid, BidderGumGum, BidderHuaweiAds, @@ -143,8 +144,8 @@ var coreBidderNames []BidderName = []BidderName{ BidderInfyTV, BidderInMobi, BidderInsticator, - BidderIntenze, BidderInteractiveoffers, + BidderIntertech, BidderInvibes, BidderIQX, BidderIQZone, @@ -203,9 +204,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderOwnAdx, BidderPangle, BidderPGAMSsp, - BidderPixfuture, BidderPlaydigo, - BidderProxistore, BidderPubmatic, BidderPubrise, BidderPubnative, @@ -221,12 +220,11 @@ var coreBidderNames []BidderName = []BidderName{ BidderRise, BidderRoulax, BidderRTBHouse, - BidderRTBStack, BidderRubicon, BidderSeedingAlliance, BidderSeedtag, BidderSaLunaMedia, - BidderScalibur, + BidderScreencore, BidderSharethrough, BidderShowheroes, BidderSilverMob, @@ -245,16 +243,11 @@ var coreBidderNames []BidderName = []BidderName{ BidderSovrnXsp, BidderSparteo, BidderSspBC, - BidderStackAdapt, BidderStartIO, BidderStroeerCore, - BidderSynapseHX, BidderTaboola, - BidderTAdvertisingBlis, BidderTappx, - BidderTargetVideo, BidderTeads, - BidderTeal, BidderTelaria, BidderTeqBlaze, BidderTheadx, @@ -265,7 +258,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderTriplelift, BidderTripleliftNative, BidderTrustedstack, - BidderTrustX, BidderUcfunnel, BidderUndertone, BidderUnicorn, @@ -418,11 +410,15 @@ const ( BidderAdmatic BidderName = "admatic" BidderAdmixer BidderName = "admixer" BidderAdnuntius BidderName = "adnuntius" + BidderAdOcean BidderName = "adocean" + BidderAdoppler BidderName = "adoppler" BidderAdot BidderName = "adot" BidderAdpone BidderName = "adpone" BidderAdprime BidderName = "adprime" BidderAdquery BidderName = "adquery" BidderAdrino BidderName = "adrino" + BidderAdsInteractive BidderName = "ads_interactive" + BidderAdsinteractive BidderName = "adsinteractive" BidderAdtarget BidderName = "adtarget" BidderAdtrgtme BidderName = "adtrgtme" BidderAdTonos BidderName = "adtonos" @@ -439,7 +435,6 @@ const ( BidderAkcelo BidderName = "akcelo" BidderAlgorix BidderName = "algorix" BidderAlkimi BidderName = "alkimi" - BidderAllianceGravity BidderName = "alliance_gravity" BidderAMX BidderName = "amx" BidderApacdex BidderName = "apacdex" BidderAppnexus BidderName = "appnexus" @@ -453,7 +448,6 @@ const ( BidderBeachfront BidderName = "beachfront" BidderBeintoo BidderName = "beintoo" BidderBematterfull BidderName = "bematterfull" - BidderBeop BidderName = "beop" BidderBetween BidderName = "between" BidderBeyondMedia BidderName = "beyondmedia" BidderBidmachine BidderName = "bidmachine" @@ -498,17 +492,15 @@ const ( BidderDisplayio BidderName = "displayio" BidderEdge226 BidderName = "edge226" BidderDmx BidderName = "dmx" + BidderDXKulture BidderName = "dxkulture" BidderDriftPixel BidderName = "driftpixel" - BidderElementalTV BidderName = "elementaltv" BidderEmtv BidderName = "emtv" BidderEmxDigital BidderName = "emx_digital" BidderEPlanning BidderName = "eplanning" BidderEpom BidderName = "epom" BidderEscalax BidderName = "escalax" - BidderEskimi BidderName = "eskimi" BidderExco BidderName = "exco" BidderEVolution BidderName = "e_volution" - BidderEzoic BidderName = "ezoic" BidderFeedAd BidderName = "feedad" BidderFlatads BidderName = "flatads" BidderFlipp BidderName = "flipp" @@ -519,6 +511,7 @@ const ( BidderGamoshi BidderName = "gamoshi" BidderGlobalsun BidderName = "globalsun" BidderGoldbach BidderName = "goldbach" + BidderGothamads BidderName = "gothamads" BidderGrid BidderName = "grid" BidderGumGum BidderName = "gumgum" BidderHuaweiAds BidderName = "huaweiads" @@ -528,8 +521,8 @@ const ( BidderInfyTV BidderName = "infytv" BidderInMobi BidderName = "inmobi" BidderInsticator BidderName = "insticator" - BidderIntenze BidderName = "intenze" BidderInteractiveoffers BidderName = "interactiveoffers" + BidderIntertech BidderName = "intertech" BidderInvibes BidderName = "invibes" BidderIQX BidderName = "iqx" BidderIQZone BidderName = "iqzone" @@ -589,9 +582,7 @@ const ( BidderOwnAdx BidderName = "ownadx" BidderPangle BidderName = "pangle" BidderPGAMSsp BidderName = "pgamssp" - BidderPixfuture BidderName = "pixfuture" BidderPlaydigo BidderName = "playdigo" - BidderProxistore BidderName = "proxistore" BidderPubmatic BidderName = "pubmatic" BidderPubrise BidderName = "pubrise" BidderPubnative BidderName = "pubnative" @@ -607,12 +598,11 @@ const ( BidderRise BidderName = "rise" BidderRoulax BidderName = "roulax" BidderRTBHouse BidderName = "rtbhouse" - BidderRTBStack BidderName = "rtbstack" BidderRubicon BidderName = "rubicon" BidderSeedingAlliance BidderName = "seedingAlliance" BidderSeedtag BidderName = "seedtag" BidderSaLunaMedia BidderName = "sa_lunamedia" - BidderScalibur BidderName = "scalibur" + BidderScreencore BidderName = "screencore" BidderSharethrough BidderName = "sharethrough" BidderShowheroes BidderName = "showheroes" BidderSilverMob BidderName = "silvermob" @@ -631,16 +621,11 @@ const ( BidderSovrnXsp BidderName = "sovrnXsp" BidderSparteo BidderName = "sparteo" BidderSspBC BidderName = "sspBC" - BidderStackAdapt BidderName = "stackadapt" BidderStartIO BidderName = "startio" BidderStroeerCore BidderName = "stroeerCore" - BidderSynapseHX BidderName = "synapseHX" BidderTaboola BidderName = "taboola" - BidderTAdvertisingBlis BidderName = "tadvertising_blis" BidderTappx BidderName = "tappx" - BidderTargetVideo BidderName = "targetVideo" BidderTeads BidderName = "teads" - BidderTeal BidderName = "teal" BidderTelaria BidderName = "telaria" BidderTeqBlaze BidderName = "teqblaze" BidderTheadx BidderName = "theadx" @@ -650,7 +635,6 @@ const ( BidderTriplelift BidderName = "triplelift" BidderTripleliftNative BidderName = "triplelift_native" BidderTrustedstack BidderName = "trustedstack" - BidderTrustX BidderName = "trustx" BidderUcfunnel BidderName = "ucfunnel" BidderUndertone BidderName = "undertone" BidderUnicorn BidderName = "unicorn" diff --git a/openrtb_ext/convert_down_test.go b/openrtb_ext/convert_down_test.go index 0d295872cd..684ae5cda4 100644 --- a/openrtb_ext/convert_down_test.go +++ b/openrtb_ext/convert_down_test.go @@ -6,8 +6,8 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/deal_tier.go b/openrtb_ext/deal_tier.go index c9818479fd..b0f2675d66 100644 --- a/openrtb_ext/deal_tier.go +++ b/openrtb_ext/deal_tier.go @@ -2,7 +2,7 @@ package openrtb_ext import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // DealTier defines the configuration of a deal tier. diff --git a/openrtb_ext/deal_tier_test.go b/openrtb_ext/deal_tier_test.go index f85390ed26..6808f90a0d 100644 --- a/openrtb_ext/deal_tier_test.go +++ b/openrtb_ext/deal_tier_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/device.go b/openrtb_ext/device.go index feb362e502..2107a3081f 100644 --- a/openrtb_ext/device.go +++ b/openrtb_ext/device.go @@ -6,7 +6,7 @@ import ( "strconv" "github.com/buger/jsonparser" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) // PrebidExtKey represents the prebid extension key used in requests diff --git a/openrtb_ext/device_test.go b/openrtb_ext/device_test.go index d634876143..52b679fda3 100644 --- a/openrtb_ext/device_test.go +++ b/openrtb_ext/device_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/floors.go b/openrtb_ext/floors.go index 93667e7d36..1faa629232 100644 --- a/openrtb_ext/floors.go +++ b/openrtb_ext/floors.go @@ -4,7 +4,7 @@ import ( "maps" "slices" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) // Defines strings for FetchStatus diff --git a/openrtb_ext/floors_test.go b/openrtb_ext/floors_test.go index e80ba28a03..df7d1e5dc2 100644 --- a/openrtb_ext/floors_test.go +++ b/openrtb_ext/floors_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/imp_adocean.go b/openrtb_ext/imp_adocean.go new file mode 100644 index 0000000000..1dd64d284e --- /dev/null +++ b/openrtb_ext/imp_adocean.go @@ -0,0 +1,7 @@ +package openrtb_ext + +type ExtImpAdOcean struct { + EmitterPrefix string `json:"emitterPrefix"` + MasterID string `json:"masterId"` + SlaveID string `json:"slaveId"` +} diff --git a/openrtb_ext/imp_adoppler.go b/openrtb_ext/imp_adoppler.go new file mode 100644 index 0000000000..9d4d5e5ca0 --- /dev/null +++ b/openrtb_ext/imp_adoppler.go @@ -0,0 +1,6 @@ +package openrtb_ext + +type ExtImpAdoppler struct { + Client string `json:"client"` + AdUnit string `json:"adunit"` +} diff --git a/openrtb_ext/imp_ads_interactive.go b/openrtb_ext/imp_ads_interactive.go new file mode 100644 index 0000000000..f7a02e2dd2 --- /dev/null +++ b/openrtb_ext/imp_ads_interactive.go @@ -0,0 +1,6 @@ +package openrtb_ext + +type ImpExtAdsInteractive struct { + PlacementID string `json:"placementId"` + EndpointID string `json:"endpointId"` +} diff --git a/openrtb_ext/imp_adsinteractive.go b/openrtb_ext/imp_adsinteractive.go new file mode 100644 index 0000000000..c382b2d6e5 --- /dev/null +++ b/openrtb_ext/imp_adsinteractive.go @@ -0,0 +1,5 @@ +package openrtb_ext + +type ImpExtAdsinteractive struct { + AdUnit string `json:"adUnit"` +} diff --git a/openrtb_ext/imp_alliance_gravity.go b/openrtb_ext/imp_alliance_gravity.go deleted file mode 100644 index f63c46fe2b..0000000000 --- a/openrtb_ext/imp_alliance_gravity.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ExtImpAllianceGravity struct { - SrId string `json:"srid"` -} diff --git a/openrtb_ext/imp_appnexus.go b/openrtb_ext/imp_appnexus.go index e5c43fcf54..bde37bdc9d 100644 --- a/openrtb_ext/imp_appnexus.go +++ b/openrtb_ext/imp_appnexus.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // ExtImpAppnexus defines the contract for bidrequest.imp[i].ext.prebid.bidder.appnexus diff --git a/openrtb_ext/imp_appnexus_test.go b/openrtb_ext/imp_appnexus_test.go index 5cf268a793..52e42d4d53 100644 --- a/openrtb_ext/imp_appnexus_test.go +++ b/openrtb_ext/imp_appnexus_test.go @@ -3,7 +3,7 @@ package openrtb_ext import ( "testing" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/imp_beop.go b/openrtb_ext/imp_beop.go deleted file mode 100644 index 797ac92ef0..0000000000 --- a/openrtb_ext/imp_beop.go +++ /dev/null @@ -1,7 +0,0 @@ -package openrtb_ext - -type ExtImpBeop struct { - BeopPublisherID string `json:"pid,omitempty"` - BeopNetworkID string `json:"nid,omitempty"` - BeopNetworkPartnerID string `json:"nptnid,omitempty"` -} diff --git a/openrtb_ext/imp_connectad.go b/openrtb_ext/imp_connectad.go index 528636f498..4affaed1ea 100644 --- a/openrtb_ext/imp_connectad.go +++ b/openrtb_ext/imp_connectad.go @@ -1,6 +1,6 @@ package openrtb_ext -import "github.com/prebid/prebid-server/v4/util/jsonutil" +import "github.com/prebid/prebid-server/v3/util/jsonutil" type ExtImpConnectAd struct { NetworkID jsonutil.StringInt `json:"networkId"` diff --git a/openrtb_ext/imp_dxkulture.go b/openrtb_ext/imp_dxkulture.go new file mode 100644 index 0000000000..4b507c5524 --- /dev/null +++ b/openrtb_ext/imp_dxkulture.go @@ -0,0 +1,7 @@ +package openrtb_ext + +// ExtImpDXKulture defines the contract for bidrequest.imp[i].ext.prebid.bidder.dxkulture +type ExtImpDXKulture struct { + PublisherId string `json:"publisherId"` + PlacementId string `json:"placementId"` +} diff --git a/openrtb_ext/imp_elementaltv.go b/openrtb_ext/imp_elementaltv.go deleted file mode 100644 index a1f267f971..0000000000 --- a/openrtb_ext/imp_elementaltv.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ExtImpElementalTV struct { - AdUnit string `json:"adunit"` -} diff --git a/openrtb_ext/imp_eskimi.go b/openrtb_ext/imp_eskimi.go deleted file mode 100644 index cf6922c21d..0000000000 --- a/openrtb_ext/imp_eskimi.go +++ /dev/null @@ -1,14 +0,0 @@ -package openrtb_ext - -// ExtImpEskimi defines the contract for bidrequest.imp[i].ext.prebid.bidder.eskimi. -// COPPA and test flags are handled by PBS core via request.regs.coppa / request.test; -// they are not duplicated as bidder params. -type ExtImpEskimi struct { - PlacementID int64 `json:"placementId"` - BidFloor float64 `json:"bidFloor,omitempty"` - BidFloorCur string `json:"bidFloorCur,omitempty"` - Bcat []string `json:"bcat,omitempty"` - Badv []string `json:"badv,omitempty"` - Bapp []string `json:"bapp,omitempty"` - Battr []int64 `json:"battr,omitempty"` -} diff --git a/openrtb_ext/imp_ezoic.go b/openrtb_ext/imp_ezoic.go deleted file mode 100644 index 609650ad5e..0000000000 --- a/openrtb_ext/imp_ezoic.go +++ /dev/null @@ -1,8 +0,0 @@ -package openrtb_ext - -// ExtImpEzoic defines the contract for bidrequest.imp[i].ext.prebid.bidder.ezoic. -// Ezoic eligibility is resolved server-side from site.domain, so no params are -// required; placementId is an optional onboarding-assigned identifier. -type ExtImpEzoic struct { - PlacementID string `json:"placementId,omitempty"` -} diff --git a/openrtb_ext/imp_freewheelssp.go b/openrtb_ext/imp_freewheelssp.go index 78040d7bd6..5ed1f62609 100644 --- a/openrtb_ext/imp_freewheelssp.go +++ b/openrtb_ext/imp_freewheelssp.go @@ -1,7 +1,7 @@ package openrtb_ext import ( - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ImpExtFreewheelSSP struct { diff --git a/openrtb_ext/imp_goldbach.go b/openrtb_ext/imp_goldbach.go index 512b7883e8..238ef2ff2e 100644 --- a/openrtb_ext/imp_goldbach.go +++ b/openrtb_ext/imp_goldbach.go @@ -3,7 +3,7 @@ package openrtb_ext import ( "fmt" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type ImpExtGoldbach struct { diff --git a/openrtb_ext/imp_intenze.go b/openrtb_ext/imp_gothamads.go similarity index 68% rename from openrtb_ext/imp_intenze.go rename to openrtb_ext/imp_gothamads.go index 991c4817ac..fb945fbba6 100644 --- a/openrtb_ext/imp_intenze.go +++ b/openrtb_ext/imp_gothamads.go @@ -1,5 +1,5 @@ package openrtb_ext -type ExtIntenze struct { +type ExtGothamAds struct { AccountID string `json:"accountId"` } diff --git a/openrtb_ext/imp_intertech.go b/openrtb_ext/imp_intertech.go new file mode 100644 index 0000000000..7c0bc955c5 --- /dev/null +++ b/openrtb_ext/imp_intertech.go @@ -0,0 +1,6 @@ +package openrtb_ext + +type ExtImpIntertech struct { + PageID int `json:"page_id"` + ImpID int `json:"imp_id"` +} diff --git a/openrtb_ext/imp_missena.go b/openrtb_ext/imp_missena.go index ac4a722341..6884209b7f 100644 --- a/openrtb_ext/imp_missena.go +++ b/openrtb_ext/imp_missena.go @@ -4,6 +4,6 @@ type ExtImpMissena struct { APIKey string `json:"apiKey"` Formats []string `json:"formats"` Placement string `json:"placement"` - Sample string `json:"sample"` + TestMode string `json:"test"` Settings map[string]any `json:"settings,omitempty"` } diff --git a/openrtb_ext/imp_nativo.go b/openrtb_ext/imp_nativo.go deleted file mode 100644 index b4623bc5e8..0000000000 --- a/openrtb_ext/imp_nativo.go +++ /dev/null @@ -1,7 +0,0 @@ -package openrtb_ext - -import "github.com/prebid/prebid-server/v4/util/jsonutil" - -type ImpExtNativo struct { - PlacementID jsonutil.StringInt `json:"placementId"` -} diff --git a/openrtb_ext/imp_pixfuture.go b/openrtb_ext/imp_pixfuture.go deleted file mode 100644 index be8bf36531..0000000000 --- a/openrtb_ext/imp_pixfuture.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ImpExtPixfuture struct { - PixID string `json:"pix_id"` -} diff --git a/openrtb_ext/imp_proxistore.go b/openrtb_ext/imp_proxistore.go deleted file mode 100644 index 6c6b5bd5f0..0000000000 --- a/openrtb_ext/imp_proxistore.go +++ /dev/null @@ -1,6 +0,0 @@ -package openrtb_ext - -type ExtImpProxistore struct { - Website string `json:"website"` - Language string `json:"language"` -} diff --git a/openrtb_ext/imp_pulsepoint.go b/openrtb_ext/imp_pulsepoint.go index 9be3a36941..a372e3765c 100644 --- a/openrtb_ext/imp_pulsepoint.go +++ b/openrtb_ext/imp_pulsepoint.go @@ -1,7 +1,7 @@ package openrtb_ext import ( - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // ExtImpPulsePoint defines the json spec for bidrequest.imp[i].ext.prebid.bidder.pulsepoint diff --git a/openrtb_ext/imp_relevantdigital.go b/openrtb_ext/imp_relevantdigital.go index ccd5c201f4..ec250557c2 100644 --- a/openrtb_ext/imp_relevantdigital.go +++ b/openrtb_ext/imp_relevantdigital.go @@ -1,9 +1,8 @@ package openrtb_ext type ExtRelevantDigital struct { - AccountId string `json:"accountId"` - PlacementId string `json:"placementId"` - Host string `json:"pbsHost"` - PbsBufferMs int `json:"pbsBufferMs"` - UseSourceBidderCode bool `json:"useSourceBidderCode,omitempty"` + AccountId string `json:"accountId"` + PlacementId string `json:"placementId"` + Host string `json:"pbsHost"` + PbsBufferMs int `json:"pbsBufferMs"` } diff --git a/openrtb_ext/imp_rtbstack.go b/openrtb_ext/imp_rtbstack.go deleted file mode 100644 index d98e1b69bd..0000000000 --- a/openrtb_ext/imp_rtbstack.go +++ /dev/null @@ -1,7 +0,0 @@ -package openrtb_ext - -type ExtImpRTBStack struct { - Route string `json:"route"` - TagId string `json:"tagId"` - CustomParams map[string]interface{} `json:"customParams,omitempty"` -} diff --git a/openrtb_ext/imp_scalibur.go b/openrtb_ext/imp_scalibur.go deleted file mode 100644 index 9a0ff7902f..0000000000 --- a/openrtb_ext/imp_scalibur.go +++ /dev/null @@ -1,11 +0,0 @@ -package openrtb_ext - -type ExtImpScalibur struct { - PlacementID string `json:"placementId"` // required - BidFloor *float64 `json:"bidfloor,omitempty"` // optional, used as fallback - BidFloorCur string `json:"bidfloorcur,omitempty"` // optional, defaults to USD if empty -} - -type ExtRequestScalibur struct { - IsDebug int `json:"isDebug,omitempty"` -} diff --git a/openrtb_ext/imp_screencore.go b/openrtb_ext/imp_screencore.go new file mode 100644 index 0000000000..5a3fa1c39f --- /dev/null +++ b/openrtb_ext/imp_screencore.go @@ -0,0 +1,6 @@ +package openrtb_ext + +type ExtScreencore struct { + AccountID string `json:"accountId"` + PlacementID string `json:"placementId"` +} diff --git a/openrtb_ext/imp_seedtag.go b/openrtb_ext/imp_seedtag.go index 4a235cb986..825595dd29 100644 --- a/openrtb_ext/imp_seedtag.go +++ b/openrtb_ext/imp_seedtag.go @@ -1,7 +1,5 @@ package openrtb_ext type ImpExtSeedtag struct { - AdUnitID string `json:"adUnitId,omitempty"` - PublisherID string `json:"publisherId,omitempty"` - IntegrationType string `json:"integrationType,omitempty"` + AdUnitID string `json:"adUnitId"` } diff --git a/openrtb_ext/imp_stackadapt.go b/openrtb_ext/imp_stackadapt.go deleted file mode 100644 index 930899c2a2..0000000000 --- a/openrtb_ext/imp_stackadapt.go +++ /dev/null @@ -1,13 +0,0 @@ -package openrtb_ext - -type ExtImpStackAdapt struct { - PublisherId string `json:"publisherId"` - SupplyId string `json:"supplyId"` - PlacementId *string `json:"placementId,omitempty"` - Banner *ExtImpStackAdaptBanner `json:"banner,omitempty"` - BidFloor float64 `json:"bidfloor,omitempty"` -} - -type ExtImpStackAdaptBanner struct { - ExpDir []int `json:"expdir,omitempty"` -} diff --git a/openrtb_ext/imp_synapseHX.go b/openrtb_ext/imp_synapseHX.go deleted file mode 100644 index 5cc209fdb5..0000000000 --- a/openrtb_ext/imp_synapseHX.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ExtImpSynapseHX struct { - TenantID string `json:"tenantId"` -} diff --git a/openrtb_ext/imp_tadvertisingblis.go b/openrtb_ext/imp_tadvertisingblis.go deleted file mode 100644 index dee8d26031..0000000000 --- a/openrtb_ext/imp_tadvertisingblis.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ImpExtTadvertising struct { - PublisherId string `json:"publisherId"` -} diff --git a/openrtb_ext/imp_targetvideo.go b/openrtb_ext/imp_targetvideo.go deleted file mode 100644 index c13b8a42aa..0000000000 --- a/openrtb_ext/imp_targetvideo.go +++ /dev/null @@ -1,8 +0,0 @@ -package openrtb_ext - -import "github.com/prebid/prebid-server/v4/util/jsonutil" - -// ExtImpTargetVideo defines the contract for bidrequest.imp[i].ext.prebid.bidder.targetVideo -type ExtImpTargetVideo struct { - PlacementId jsonutil.StringInt `json:"placementId,omitempty"` -} diff --git a/openrtb_ext/imp_teal.go b/openrtb_ext/imp_teal.go deleted file mode 100644 index 9f961c33b1..0000000000 --- a/openrtb_ext/imp_teal.go +++ /dev/null @@ -1,17 +0,0 @@ -package openrtb_ext - -// ExtImpTeal carries the per-imp Teal bidder-slot params. -// -// Account is required. The first valid imp's account is propagated to -// BidRequest.Site.Publisher.ID (and BidRequest.App.Publisher.ID, when present). -// All imps in a request must use the same account: a later imp whose account -// differs is rejected with a BadInput error and dropped. -// -// Placement is optional. When present and non-blank, the adapter injects -// imp.ext.prebid.storedrequest.id = placement on a per-imp basis. Pointer-typed -// to distinguish absent (nil) from present-but-blank (non-nil → validation -// failure). -type ExtImpTeal struct { - Account string `json:"account"` - Placement *string `json:"placement,omitempty"` -} diff --git a/openrtb_ext/imp_trustx.go b/openrtb_ext/imp_trustx.go deleted file mode 100644 index 8187f91a2c..0000000000 --- a/openrtb_ext/imp_trustx.go +++ /dev/null @@ -1,9 +0,0 @@ -package openrtb_ext - -import "encoding/json" - -// ExtImpTrustX defines the contract for bidrequest.imp[i].ext.prebid.bidder.trustx -type ExtImpTrustX struct { - Uid int `json:"uid"` - Keywords json.RawMessage `json:"keywords,omitempty"` -} diff --git a/openrtb_ext/multibid_test.go b/openrtb_ext/multibid_test.go index 9e8de09d9e..5a55265311 100644 --- a/openrtb_ext/multibid_test.go +++ b/openrtb_ext/multibid_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/regs_test.go b/openrtb_ext/regs_test.go index ed998054ac..064282c1f3 100644 --- a/openrtb_ext/regs_test.go +++ b/openrtb_ext/regs_test.go @@ -3,7 +3,7 @@ package openrtb_ext import ( "testing" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/request.go b/openrtb_ext/request.go index 6d51d42145..7f8978e6eb 100644 --- a/openrtb_ext/request.go +++ b/openrtb_ext/request.go @@ -7,8 +7,8 @@ import ( "slices" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) // FirstPartyDataExtKey defines a field name within request.ext and request.imp.ext reserved for first party data. diff --git a/openrtb_ext/request_test.go b/openrtb_ext/request_test.go index b0c09f6c55..92f148db40 100644 --- a/openrtb_ext/request_test.go +++ b/openrtb_ext/request_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/request_wrapper.go b/openrtb_ext/request_wrapper.go index 52ed2ba91f..7b73d31867 100644 --- a/openrtb_ext/request_wrapper.go +++ b/openrtb_ext/request_wrapper.go @@ -7,8 +7,8 @@ import ( "slices" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) // RequestWrapper wraps the OpenRTB request to provide a storage location for unmarshalled ext fields, so they diff --git a/openrtb_ext/request_wrapper_test.go b/openrtb_ext/request_wrapper_test.go index ca332679b0..e4c14b6031 100644 --- a/openrtb_ext/request_wrapper_test.go +++ b/openrtb_ext/request_wrapper_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/site_test.go b/openrtb_ext/site_test.go index e76e06c8c5..e06c0e67bd 100644 --- a/openrtb_ext/site_test.go +++ b/openrtb_ext/site_test.go @@ -3,8 +3,8 @@ package openrtb_ext_test import ( "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/openrtb_ext/supplyChain.go b/openrtb_ext/supplyChain.go index b8abdb4c32..0051d647ff 100644 --- a/openrtb_ext/supplyChain.go +++ b/openrtb_ext/supplyChain.go @@ -2,7 +2,7 @@ package openrtb_ext import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) func cloneSupplyChain(schain *openrtb2.SupplyChain) *openrtb2.SupplyChain { diff --git a/openrtb_ext/supplyChain_test.go b/openrtb_ext/supplyChain_test.go index 86c2741dac..1adfaf8f62 100644 --- a/openrtb_ext/supplyChain_test.go +++ b/openrtb_ext/supplyChain_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/ortb/clone.go b/ortb/clone.go index 8a0f505acd..07eaf2886b 100644 --- a/ortb/clone.go +++ b/ortb/clone.go @@ -4,7 +4,7 @@ import ( "slices" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) func CloneDataSlice(s []openrtb2.Data) []openrtb2.Data { diff --git a/ortb/clone_test.go b/ortb/clone_test.go index 5f86b5121f..14bdc0bb19 100644 --- a/ortb/clone_test.go +++ b/ortb/clone_test.go @@ -7,7 +7,7 @@ import ( "github.com/prebid/openrtb/v20/adcom1" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/ortb/default.go b/ortb/default.go index 43e787f39b..f6cc979045 100644 --- a/ortb/default.go +++ b/ortb/default.go @@ -1,8 +1,8 @@ package ortb import ( - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) const ( diff --git a/ortb/default_test.go b/ortb/default_test.go index cb6af876b5..b03f546fd4 100644 --- a/ortb/default_test.go +++ b/ortb/default_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" ) func TestSetDefaults(t *testing.T) { diff --git a/ortb/request_validator.go b/ortb/request_validator.go index 57ba91ff2c..e959caa934 100644 --- a/ortb/request_validator.go +++ b/ortb/request_validator.go @@ -4,9 +4,9 @@ import ( "encoding/json" "fmt" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/stored_responses" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/stored_responses" ) type ValidationConfig struct { diff --git a/ortb/request_validator_banner.go b/ortb/request_validator_banner.go index c4cf9a2be0..fea68121a9 100644 --- a/ortb/request_validator_banner.go +++ b/ortb/request_validator_banner.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) func isInterstitial(imp *openrtb_ext.ImpWrapper) bool { diff --git a/ortb/request_validator_banner_test.go b/ortb/request_validator_banner_test.go index a028305460..e131c32e98 100644 --- a/ortb/request_validator_banner_test.go +++ b/ortb/request_validator_banner_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/ortb/request_validator_native.go b/ortb/request_validator_native.go index 7d6ff74af8..1209a13913 100644 --- a/ortb/request_validator_native.go +++ b/ortb/request_validator_native.go @@ -8,8 +8,8 @@ import ( "github.com/prebid/openrtb/v20/native1" nativeRequests "github.com/prebid/openrtb/v20/native1/request" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) // fillAndValidateNative validates the request, and assigns the Asset IDs as recommended by the Native v1.2 spec. diff --git a/ortb/request_validator_test.go b/ortb/request_validator_test.go index 4c548a7cca..c2b6ea3c7b 100644 --- a/ortb/request_validator_test.go +++ b/ortb/request_validator_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/ortb/request_validator_video_test.go b/ortb/request_validator_video_test.go index c8f8e4e9bc..3d579e2c77 100644 --- a/ortb/request_validator_video_test.go +++ b/ortb/request_validator_video_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/pbs/usersync.go b/pbs/usersync.go index d3cc12a0aa..2a88ecc7b9 100644 --- a/pbs/usersync.go +++ b/pbs/usersync.go @@ -11,9 +11,9 @@ import ( "strings" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/usersync" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/usersync" ) // Recaptcha code from https://github.com/haisum/recaptcha/blob/master/recaptcha.go diff --git a/prebid_cache_client/client.go b/prebid_cache_client/client.go index 07548cc53e..adc57b97ad 100644 --- a/prebid_cache_client/client.go +++ b/prebid_cache_client/client.go @@ -12,9 +12,9 @@ import ( "strings" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" "github.com/buger/jsonparser" "golang.org/x/net/context/ctxhttp" diff --git a/prebid_cache_client/client_test.go b/prebid_cache_client/client_test.go index 1b6e146992..31fc05d30b 100644 --- a/prebid_cache_client/client_test.go +++ b/prebid_cache_client/client_test.go @@ -10,10 +10,10 @@ import ( "strconv" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - metricsConf "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + metricsConf "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/privacy/activitycontrol.go b/privacy/activitycontrol.go index 4f3d5b1a51..674d751988 100644 --- a/privacy/activitycontrol.go +++ b/privacy/activitycontrol.go @@ -1,8 +1,8 @@ package privacy import ( - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) type ActivityResult int diff --git a/privacy/activitycontrol_test.go b/privacy/activitycontrol_test.go index 8a8d6a03c6..add20ad2c3 100644 --- a/privacy/activitycontrol_test.go +++ b/privacy/activitycontrol_test.go @@ -3,9 +3,9 @@ package privacy import ( "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/privacy/ccpa/consentwriter_test.go b/privacy/ccpa/consentwriter_test.go index e087cd13ac..6d0b89e24c 100644 --- a/privacy/ccpa/consentwriter_test.go +++ b/privacy/ccpa/consentwriter_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/privacy/ccpa/parsedpolicy.go b/privacy/ccpa/parsedpolicy.go index c442bd4d23..98b04a1632 100644 --- a/privacy/ccpa/parsedpolicy.go +++ b/privacy/ccpa/parsedpolicy.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) const ( diff --git a/privacy/ccpa/policy.go b/privacy/ccpa/policy.go index a32c41cc34..b4841a174f 100644 --- a/privacy/ccpa/policy.go +++ b/privacy/ccpa/policy.go @@ -7,9 +7,9 @@ import ( gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - gppPolicy "github.com/prebid/prebid-server/v4/privacy/gpp" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + gppPolicy "github.com/prebid/prebid-server/v3/privacy/gpp" ) // Policy represents the CCPA regulatory information from an OpenRTB bid request. diff --git a/privacy/ccpa/policy_test.go b/privacy/ccpa/policy_test.go index 5274c566f4..89bb2ccf04 100644 --- a/privacy/ccpa/policy_test.go +++ b/privacy/ccpa/policy_test.go @@ -8,7 +8,7 @@ import ( gpplib "github.com/prebid/go-gpp" gppConstants "github.com/prebid/go-gpp/constants" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/privacy/lmt/ios.go b/privacy/lmt/ios.go index ccfa409f05..7778a02d0a 100644 --- a/privacy/lmt/ios.go +++ b/privacy/lmt/ios.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iosutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/iosutil" ) var ( diff --git a/privacy/lmt/ios_test.go b/privacy/lmt/ios_test.go index e0c98c5b61..42636759eb 100644 --- a/privacy/lmt/ios_test.go +++ b/privacy/lmt/ios_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/util/iosutil" + "github.com/prebid/prebid-server/v3/util/iosutil" "github.com/stretchr/testify/assert" ) diff --git a/privacy/rule_condition_test.go b/privacy/rule_condition_test.go index aaa6ac51f4..97bdeef35f 100644 --- a/privacy/rule_condition_test.go +++ b/privacy/rule_condition_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/privacy/scrubber.go b/privacy/scrubber.go index fbda5b88c6..8f4a9b103f 100644 --- a/privacy/scrubber.go +++ b/privacy/scrubber.go @@ -4,12 +4,12 @@ import ( "encoding/json" "net" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/iputil" ) type IPConf struct { diff --git a/privacy/scrubber_test.go b/privacy/scrubber_test.go index 0c8813b5d5..ccb065bccb 100644 --- a/privacy/scrubber_test.go +++ b/privacy/scrubber_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/privacysandbox/topics.go b/privacysandbox/topics.go index 8483321315..3ed620b4bd 100644 --- a/privacysandbox/topics.go +++ b/privacysandbox/topics.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type Topic struct { diff --git a/privacysandbox/topics_test.go b/privacysandbox/topics_test.go index 64c1de0ec8..73d5ef0c12 100644 --- a/privacysandbox/topics_test.go +++ b/privacysandbox/topics_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" "github.com/stretchr/testify/assert" ) diff --git a/router/admin.go b/router/admin.go index 0d34b11162..3053cebe29 100644 --- a/router/admin.go +++ b/router/admin.go @@ -6,9 +6,9 @@ import ( "time" delta "github.com/grafana/pyroscope-go/godeltaprof/http/pprof" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/endpoints" - "github.com/prebid/prebid-server/v4/version" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/endpoints" + "github.com/prebid/prebid-server/v3/version" ) func Admin(rateConverter *currency.RateConverter, rateConverterFetchingInterval time.Duration) *http.ServeMux { diff --git a/router/aspects/request_timeout_handler.go b/router/aspects/request_timeout_handler.go index 6dee25a525..0a4d147d90 100644 --- a/router/aspects/request_timeout_handler.go +++ b/router/aspects/request_timeout_handler.go @@ -6,8 +6,8 @@ import ( "time" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" ) func QueuedRequestTimeout(f httprouter.Handle, reqTimeoutHeaders config.RequestTimeoutHeaders, metricsEngine metrics.MetricsEngine, requestType metrics.RequestType) httprouter.Handle { diff --git a/router/aspects/request_timeout_handler_test.go b/router/aspects/request_timeout_handler_test.go index 2cfb144802..2ac8f36ae3 100644 --- a/router/aspects/request_timeout_handler_test.go +++ b/router/aspects/request_timeout_handler_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" "github.com/stretchr/testify/assert" ) diff --git a/router/router.go b/router/router.go index b82b837eba..d0bbef1aa2 100644 --- a/router/router.go +++ b/router/router.go @@ -12,36 +12,36 @@ import ( "time" openrtb2model "github.com/prebid/openrtb/v20/openrtb2" - analyticsBuild "github.com/prebid/prebid-server/v4/analytics/build" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/currency" - "github.com/prebid/prebid-server/v4/endpoints" - "github.com/prebid/prebid-server/v4/endpoints/events" - infoEndpoints "github.com/prebid/prebid-server/v4/endpoints/info" - "github.com/prebid/prebid-server/v4/endpoints/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/exchange" - "github.com/prebid/prebid-server/v4/experiment/adscert" - "github.com/prebid/prebid-server/v4/floors" - "github.com/prebid/prebid-server/v4/gdpr" - "github.com/prebid/prebid-server/v4/hooks" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/macros" - "github.com/prebid/prebid-server/v4/metrics" - metricsConf "github.com/prebid/prebid-server/v4/metrics/config" - "github.com/prebid/prebid-server/v4/modules" - "github.com/prebid/prebid-server/v4/modules/moduledeps" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/ortb" - "github.com/prebid/prebid-server/v4/pbs" - pbc "github.com/prebid/prebid-server/v4/prebid_cache_client" - "github.com/prebid/prebid-server/v4/router/aspects" - "github.com/prebid/prebid-server/v4/server/ssl" - storedRequestsConf "github.com/prebid/prebid-server/v4/stored_requests/config" - "github.com/prebid/prebid-server/v4/usersync" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/uuidutil" - "github.com/prebid/prebid-server/v4/version" + analyticsBuild "github.com/prebid/prebid-server/v3/analytics/build" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/endpoints" + "github.com/prebid/prebid-server/v3/endpoints/events" + infoEndpoints "github.com/prebid/prebid-server/v3/endpoints/info" + "github.com/prebid/prebid-server/v3/endpoints/openrtb2" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/exchange" + "github.com/prebid/prebid-server/v3/experiment/adscert" + "github.com/prebid/prebid-server/v3/floors" + "github.com/prebid/prebid-server/v3/gdpr" + "github.com/prebid/prebid-server/v3/hooks" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/macros" + "github.com/prebid/prebid-server/v3/metrics" + metricsConf "github.com/prebid/prebid-server/v3/metrics/config" + "github.com/prebid/prebid-server/v3/modules" + "github.com/prebid/prebid-server/v3/modules/moduledeps" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/ortb" + "github.com/prebid/prebid-server/v3/pbs" + pbc "github.com/prebid/prebid-server/v3/prebid_cache_client" + "github.com/prebid/prebid-server/v3/router/aspects" + "github.com/prebid/prebid-server/v3/server/ssl" + storedRequestsConf "github.com/prebid/prebid-server/v3/stored_requests/config" + "github.com/prebid/prebid-server/v3/usersync" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/uuidutil" + "github.com/prebid/prebid-server/v3/version" _ "github.com/go-sql-driver/mysql" "github.com/julienschmidt/httprouter" @@ -128,14 +128,15 @@ func New(cfg *config.Configuration, rateConvertor *currency.RateConverter) (r *R Router: httprouter.New(), } - certPool, certPoolCreateErr := ssl.CreateCertPool() + // For bid processing, we need both the hardcoded certificates and the certificates found in container's + // local file system + certPool, certPoolCreateErr := ssl.CreateCertPool(cfg.CertsUseSystem) if certPoolCreateErr != nil { logger.Infof("Could not load root certificates: %s \n", certPoolCreateErr.Error()) } - // load optional PEM certificate files var readCertErr error - certPool, readCertErr = ssl.AppendPEMFileToCertPool(certPool, cfg.PemCertsFile) + certPool, readCertErr = ssl.AppendPEMFileToRootCAPool(certPool, cfg.PemCertsFile) if readCertErr != nil { logger.Infof("Could not read certificates file: %s \n", readCertErr.Error()) } @@ -220,6 +221,9 @@ func New(cfg *config.Configuration, rateConvertor *currency.RateConverter) (r *R analyticsRunner := analyticsBuild.New(&cfg.Analytics) + // register the analytics runner for shutdown + r.shutdowns = append(r.shutdowns, shutdown, analyticsRunner.Shutdown, shutdownModules.Shutdown) + paramsValidator, err := openrtb_ext.NewBidderParamsValidator(schemaDirectory) if err != nil { logger.Fatalf("Failed to create the bidder params validator. %v", err) @@ -232,16 +236,9 @@ func New(cfg *config.Configuration, rateConvertor *currency.RateConverter) (r *R gvlVendorIDs := cfg.BidderInfos.ToGVLVendorIDMap() vendorListFetcher := gdpr.NewVendorListFetcher(context.Background(), cfg.GDPR, generalHttpClient, r.MetricsEngine, gdpr.VendorListURLMaker) - liveGVLVendorIDs := gdpr.NewLiveGVLVendorIDs() - refreshInterval := time.Duration(cfg.GDPR.LiveGVLRefreshInterval) * time.Second - gvlVendorIDTask := gdpr.NewGVLVendorIDTickerTask(refreshInterval, generalHttpClient, gdpr.VendorListURLMaker, liveGVLVendorIDs, r.MetricsEngine) - gvlVendorIDTask.Start() - gdprPermsBuilder := gdpr.NewPermissionsBuilder(cfg.GDPR, gvlVendorIDs, liveGVLVendorIDs, vendorListFetcher, r.MetricsEngine) + gdprPermsBuilder := gdpr.NewPermissionsBuilder(cfg.GDPR, gvlVendorIDs, vendorListFetcher, r.MetricsEngine) tcf2CfgBuilder := gdpr.NewTCF2Config - // register the analytics runner, modules and live GVL Vendor ID ticker task for shutdown - r.shutdowns = append(r.shutdowns, shutdown, analyticsRunner.Shutdown, shutdownModules.Shutdown, gvlVendorIDTask.Stop) - cacheClient := pbc.NewClient(cacheHttpClient, &cfg.CacheURL, &cfg.ExtCacheURL, r.MetricsEngine) adapters, singleFormatAdapters, adaptersErrs := exchange.BuildAdapters(generalHttpClient, cfg, cfg.BidderInfos, r.MetricsEngine) diff --git a/router/router_test.go b/router/router_test.go index 6023f7ae05..2566744609 100644 --- a/router/router_test.go +++ b/router/router_test.go @@ -8,9 +8,9 @@ import ( "testing" jsoniter "github.com/json-iterator/go" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/rules/schema_functions.go b/rules/schema_functions.go index 5ed668811c..32a5c6a4b5 100644 --- a/rules/schema_functions.go +++ b/rules/schema_functions.go @@ -7,10 +7,10 @@ import ( "github.com/buger/jsonparser" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/randomutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/randomutil" ) const ( diff --git a/rules/schema_functions_test.go b/rules/schema_functions_test.go index 033fb1ef9d..46b03dc380 100644 --- a/rules/schema_functions_test.go +++ b/rules/schema_functions_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/errortypes" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" - "github.com/prebid/prebid-server/v4/util/randomutil" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/randomutil" "github.com/stretchr/testify/assert" ) diff --git a/schain/schain.go b/schain/schain.go index e88d47c143..cdd1e14449 100644 --- a/schain/schain.go +++ b/schain/schain.go @@ -5,7 +5,7 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // BidderToPrebidSChains organizes the ORTB 2.5 multiple root schain nodes into a map of schain nodes by bidder diff --git a/schain/schain_test.go b/schain/schain_test.go index 040522d8ff..f112c9ec7e 100644 --- a/schain/schain_test.go +++ b/schain/schain_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/schain/schainwriter.go b/schain/schainwriter.go index 36a9810a1e..37b62c993f 100644 --- a/schain/schainwriter.go +++ b/schain/schainwriter.go @@ -2,7 +2,7 @@ package schain import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // NewSChainWriter creates an ORTB 2.5 schain writer instance diff --git a/schain/schainwriter_test.go b/schain/schainwriter_test.go index ef1e02e52a..69fda95907 100644 --- a/schain/schainwriter_test.go +++ b/schain/schainwriter_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" diff --git a/server/listener.go b/server/listener.go index 3bdeb176fe..ece1a6ec3d 100644 --- a/server/listener.go +++ b/server/listener.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" ) // monitorableListener tracks any opened connections in the metrics. diff --git a/server/listener_test.go b/server/listener_test.go index b54ae35ded..293890a1e1 100644 --- a/server/listener_test.go +++ b/server/listener_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" gometrics "github.com/rcrowley/go-metrics" ) diff --git a/server/prometheus.go b/server/prometheus.go index 2ddcc55a70..332eebdd1c 100644 --- a/server/prometheus.go +++ b/server/prometheus.go @@ -5,9 +5,9 @@ import ( "net/http" "strconv" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - metricsconfig "github.com/prebid/prebid-server/v4/metrics/config" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + metricsconfig "github.com/prebid/prebid-server/v3/metrics/config" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/server/server.go b/server/server.go index b0b4a9f93e..6dddaee4ff 100644 --- a/server/server.go +++ b/server/server.go @@ -12,11 +12,11 @@ import ( "time" "github.com/NYTimes/gziphandler" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - metricsconfig "github.com/prebid/prebid-server/v4/metrics/config" - mspPlugin "github.com/prebid/prebid-server/v4/msp/plugin" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + metricsconfig "github.com/prebid/prebid-server/v3/metrics/config" + mspPlugin "github.com/prebid/prebid-server/v3/msp/plugin" ) // Listen blocks forever, serving PBS requests on the given port. This will block forever, until the process is shut down. diff --git a/server/server_test.go b/server/server_test.go index 389b9884dd..6d2a3335e3 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - metricsconfig "github.com/prebid/prebid-server/v4/metrics/config" + "github.com/prebid/prebid-server/v3/config" + metricsconfig "github.com/prebid/prebid-server/v3/metrics/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/server/ssl/ssl.go b/server/ssl/ssl.go index 6a69f6de2e..ee754ed66d 100644 --- a/server/ssl/ssl.go +++ b/server/ssl/ssl.go @@ -2,30 +2,3664 @@ package ssl import ( "crypto/x509" + "errors" "fmt" "os" ) -func CreateCertPool() (*x509.CertPool, error) { - return x509.SystemCertPool() +// from https://medium.com/@kelseyhightower/optimizing-docker-images-for-static-binaries-b5696e26eb07 + +var ( + ErrLoadEmbeddedCerts = errors.New("failed to load embedded certs") +) + +func CreateCertPool(useSystem bool) (*x509.CertPool, error) { + if useSystem { + return x509.SystemCertPool() + } + + return createCertPoolFromEmbedded() } -// AppendPEMFileToCertPool appends certificates from a PEM file to the provided certificate pool. -// This is a helper method intended for use in main startup code to append specific certificates -// to the system certificate pool. -func AppendPEMFileToCertPool(certPool *x509.CertPool, pemFileName string) (*x509.CertPool, error) { +func createCertPoolFromEmbedded() (*x509.CertPool, error) { + pool := x509.NewCertPool() + + if ok := pool.AppendCertsFromPEM(pemCerts); !ok { + return pool, ErrLoadEmbeddedCerts + } + + return pool, nil +} + +// Appends certificates to the `x509.CertPool` from a `.pem` private local file. On many Linux +// systems, /etc/ssl/cert.pem will contain the system wide set but in our case, we'll pull +// the certificate file path from the `Configuration` struct +func AppendPEMFileToRootCAPool(certPool *x509.CertPool, pemFileName string) (*x509.CertPool, error) { if certPool == nil { certPool = x509.NewCertPool() } - if pemFileName != "" { + //read file and place it's contents in `pemCerts` pemCerts, err := os.ReadFile(pemFileName) if err != nil { return certPool, fmt.Errorf("Failed to read file %s: %v", pemFileName, err) } + //`pemCerts` has been obtained, append to certPool certPool.AppendCertsFromPEM(pemCerts) } - return certPool, nil } + +var pemCerts = []byte(` +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE +AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw +CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMD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lvnrxir4tiz+OpAUFteM +YyRIHN8wfdVoOw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5 +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g +Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG +A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg +Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi +9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk +M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB +MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw +CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW +1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UE +AwwVQXRvcyBUcnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQG +EwJERTAeFw0xMTA3MDcxNDU4MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMM +FUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsGA1UECgwEQXRvczELMAkGA1UEBhMC +REUwggEiMA0GCSqGSIb3DQEB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QD8rv7gmsHINFSH5pkAnuYZttcTVoP +0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZckbxJF0WddCajJFdr60qZf +E2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29t +bVNjb3BlIFB1YmxpYyBUcnVzdCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNa +Fw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2Nv +cGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDEw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLxeP0C +flfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJE +hRGnSjot6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggq +hkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg +2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liWpDVfG2XqYZpwI7UNo5uS +Um9poIyNStDuiw7LR47QjRE= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEA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XTWtiBmelDGDfrs7vRWGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl +6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjWHYbL +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYD +VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG +A1UEAxMLR1RTIFJvb3QgUjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAw +WjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz +IExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjOPQIBBgUrgQQAIgNi +AAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout736G +jOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL2 +4CejQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBTB8Sa6oC2uhYHP0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7 +VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azTL818+FsuVbu/3ZL3pAzcMeGiAjEA/Jdm +ZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV11RZt+cRLInUue4X +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYD +VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG +A1UEAxMLR1RTIFJvb3QgUjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDA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095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEg +MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2Jh +bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQx +MjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjET +MBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQssgrRI +xutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1k +ZguSgMpE3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxD +aNc9PIrFsmbVkJq3MQbFvuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJw +LnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqMPKq0pPbzlUoSB239jLKJz9CgYXfIWHSw +1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+azayOeSsJDa38O+2HBNX +k7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05OWgtH8wY2 +SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/h +bguyCLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ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+WT0EBXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63R +DolUK5X6wK0dmBR4M0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZI +pEYslOqodmJHixBTB0hXbOKSTbauBcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGj +YzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7Wxy+G2CQ5MB0GA1UdDgQWBBRy +rOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ +8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi +0f6X+J8wfBj5tFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMM +A8iZGok1GTzTyVR8qPAs5m4HeW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBS +SRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+Cy748fdHif64W1lZYudogsYMVoe+K +TTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygCQMez2P2ccGrGKMOF +6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15h2Er +3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMt +Ty3EHD70sz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pT +VmBds9hCG1xLEooc6+t9xnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAW +ysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQraVplI/owd8k+BsHMYeB2F326CjYSlKA +rBPuUBQemMc= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MI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MaPnu1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHW +OXSuTEGC2/KmSNGzm/MzqvOmwMVO9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMB +AAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYgscasGrz2iTAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAKbqSSaet +8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd +nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1j +bhd47F18iMjrjld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvM +Kar5CKXiNxTKsbhm7xqC5PD48acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIiv +TDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJnxDHO2zTlJQNgJXtxmOTAGytfdELS +S8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554WgicEFOwE30z9J4nfr +I8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4sEb9 +b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNB +UvupLnKWnyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1P +Ti07NEPhmg4NpGaXutIcSkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929ven +sBxXVsFy6K2ir40zSbofitzmdHxghm+Hl3s= +-----END CERTIFICATE----- +`) diff --git a/server/ssl/ssl_test.go b/server/ssl/ssl_test.go index ef1925b50e..b425ec9a63 100644 --- a/server/ssl/ssl_test.go +++ b/server/ssl/ssl_test.go @@ -8,25 +8,49 @@ import ( "github.com/stretchr/testify/require" ) -func TestAppendPEMFileToCertPool(t *testing.T) { - t.Run("append-to-empty", func(t *testing.T) { - var certPool *x509.CertPool = nil +func TestCertsFromFilePoolExists(t *testing.T) { + // Load hardcoded certificates found in ssl.go + certPool, certErr := createCertPoolFromEmbedded() + require.NoError(t, certErr) + + // Assert loaded certificates by looking at the length of the subjects array of strings + subjects := certPool.Subjects() + hardCodedSubNum := len(subjects) + assert.True(t, hardCodedSubNum > 0) + + // Load certificates from file + certificatesFile := "mockcertificates/mock-certs.pem" + certPool, err := AppendPEMFileToRootCAPool(certPool, certificatesFile) + + // Assert loaded certificates by looking at the length of the subjects array of strings + assert.NoError(t, err, "Error thrown by AppendPEMFileToRootCAPool while loading file %s: %v", certificatesFile, err) + subjects = certPool.Subjects() + subNumIncludingFile := len(subjects) + assert.True(t, subNumIncludingFile > hardCodedSubNum, "subNumIncludingFile should be greater than hardCodedSubNum") +} + +func TestCertsFromFilePoolDontExist(t *testing.T) { + // Empty certpool + var certPool *x509.CertPool = nil - certificatesFile := "mockcertificates/mock-certs.pem" - certPool, err := AppendPEMFileToCertPool(certPool, certificatesFile) + // Load certificates from file + certificatesFile := "mockcertificates/mock-certs.pem" + certPool, err := AppendPEMFileToRootCAPool(certPool, certificatesFile) - require.NoError(t, err) - subjects := certPool.Subjects() - assert.Equal(t, len(subjects), 1) - }) + // Assert loaded certificates by looking at the length of the subjects array of strings + assert.NoError(t, err, "Error thrown by AppendPEMFileToRootCAPool while loading file %s: %v", certificatesFile, err) + subjects := certPool.Subjects() + assert.Equal(t, len(subjects), 1, "We only loaded one certificate from the file, len(subjects) should equal 1") +} - t.Run("fail", func(t *testing.T) { - var certPool *x509.CertPool +func TestAppendPEMFileToRootCAPoolFail(t *testing.T) { + // Empty certpool + var certPool *x509.CertPool - certificatesFile := "mockcertificates/NO-FILE.pem" - _, err := AppendPEMFileToCertPool(certPool, certificatesFile) + // In this test we are going to pass a file that does not exist as value of second argument + fakeCertificatesFile := "mockcertificates/NO-FILE.pem" + _, err := AppendPEMFileToRootCAPool(certPool, fakeCertificatesFile) - // expect an error from a file which doesn't exist - assert.Error(t, err) - }) + // Assert AppendPEMFileToRootCAPool correctly throws an error when trying to load an nonexisting file + assert.Errorf(t, err, "AppendPEMFileToRootCAPool should throw an error by while loading fake file %s \n", fakeCertificatesFile) } diff --git a/static/bidder-info/9dotsmedialtd.yaml b/static/bidder-info/9dotsmedialtd.yaml deleted file mode 100644 index ad9e7b3f07..0000000000 --- a/static/bidder-info/9dotsmedialtd.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-dot-pbs.ortb.net/openrtb/{{.PublisherID}}" -aliasOf: "limelightDigital" diff --git a/static/bidder-info/adagio.yaml b/static/bidder-info/adagio.yaml index 8dbdf879e8..849665697b 100644 --- a/static/bidder-info/adagio.yaml +++ b/static/bidder-info/adagio.yaml @@ -7,7 +7,7 @@ endpoint: "https://mp-REGION.4dex.io/pbserver" userSync: iframe: - url: "https://u-REGION.4dex.io/pbserver/usync.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" + url: "https://u-REGION.4dex.io/pbserver/usync.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" userMacro: "{UID}" disabled: true diff --git a/static/bidder-info/adastra.yaml b/static/bidder-info/adastra.yaml deleted file mode 100644 index 2e06294181..0000000000 --- a/static/bidder-info/adastra.yaml +++ /dev/null @@ -1,5 +0,0 @@ -endpoint: "https://adastra-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" -aliasOf: "smarthub" -userSync: - supports: - - redirect \ No newline at end of file diff --git a/static/bidder-info/addigi.yaml b/static/bidder-info/addigi.yaml index 1952e5e7fd..8514d5c550 100644 --- a/static/bidder-info/addigi.yaml +++ b/static/bidder-info/addigi.yaml @@ -1,2 +1,2 @@ -endpoint: "https://addigi-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://addigi-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" diff --git a/static/bidder-info/adform.yaml b/static/bidder-info/adform.yaml index b25507131b..6475bb34ca 100644 --- a/static/bidder-info/adform.yaml +++ b/static/bidder-info/adform.yaml @@ -1,5 +1,4 @@ aliasOf: adf -gvlVendorID: 50 userSync: redirect: url: "https://c1.adform.net/cookie?redirect_url={{.RedirectURL}}" diff --git a/static/bidder-info/adinify.yaml b/static/bidder-info/adinify.yaml index 9f796ac970..501b54df3f 100644 --- a/static/bidder-info/adinify.yaml +++ b/static/bidder-info/adinify.yaml @@ -1,2 +1,2 @@ -endpoint: "https://adinify-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://adinify-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" diff --git a/static/bidder-info/adipolo.yaml b/static/bidder-info/adipolo.yaml index 0189ca5ed3..0cf1ac3430 100644 --- a/static/bidder-info/adipolo.yaml +++ b/static/bidder-info/adipolo.yaml @@ -2,11 +2,10 @@ aliasOf: xeworks endpoint: "http://rtb.adipolo.live?pid={{.SourceId}}&host={{.Host}}&pbs=1" maintainer: email: "smart@adipolo.com" -gvlVendorID: 1456 userSync: iframe: url: "https://sync.adipolo.live/static/adisync.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&cb={{.RedirectURL}}" userMacro: $UID redirect: url: "https://sync.adipolo.live/psync?t=s&e=0&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&cb={{.RedirectURL}}" - userMacro: "$UID" + userMacro: "$UID" \ No newline at end of file diff --git a/static/bidder-info/adklip.yaml b/static/bidder-info/adklip.yaml deleted file mode 100644 index 89a7868fc3..0000000000 --- a/static/bidder-info/adklip.yaml +++ /dev/null @@ -1,8 +0,0 @@ -aliasOf: aso -endpoint: "https://srv.adklip.net/pbs/bidder?zid={{.ZoneID}}" -maintainer: - email: "support@adklip.com" -userSync: - redirect: - url: "https://track.adklip.net/sync/v2?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "{uid}" diff --git a/static/bidder-info/admaticde.yaml b/static/bidder-info/admaticde.yaml index fdd9b6107d..562aa18369 100644 --- a/static/bidder-info/admaticde.yaml +++ b/static/bidder-info/admaticde.yaml @@ -1,2 +1 @@ -aliasOf: "admatic" -gvlVendorID: 1281 \ No newline at end of file +aliasOf: "admatic" \ No newline at end of file diff --git a/static/bidder-info/adnimation.yaml b/static/bidder-info/adnimation.yaml deleted file mode 100644 index 308c048314..0000000000 --- a/static/bidder-info/adnimation.yaml +++ /dev/null @@ -1,8 +0,0 @@ -aliasOf: "vidazoo" -endpoint: "https://exchange.adnimation.com/openrtb/" -maintainer: - email: "prebid@adnimation.com" -userSync: - iframe: - url: https://sync.adnimation.com/api/user/html/697a076271875e8907df35a6?pbs=true&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} - userMacro: ${userId} diff --git a/static/bidder-info/adocean.yaml b/static/bidder-info/adocean.yaml new file mode 100644 index 0000000000..3932a7a75e --- /dev/null +++ b/static/bidder-info/adocean.yaml @@ -0,0 +1,16 @@ +endpoint: "https://{{.Host}}.adocean.pl" +maintainer: + email: "aoteam@gemius.com" +gvlVendorID: 328 +capabilities: + app: + mediaTypes: + - banner + site: + mediaTypes: + - banner +userSync: + # adocean supports user syncing, but requires configuration by the host. contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect diff --git a/static/bidder-info/adoppler.yaml b/static/bidder-info/adoppler.yaml new file mode 100644 index 0000000000..3db2c1f998 --- /dev/null +++ b/static/bidder-info/adoppler.yaml @@ -0,0 +1,12 @@ +endpoint: "http://{{.AccountID}}.trustedmarketplace.io/ads/processHeaderBid/{{.AdUnit}}" +maintainer: + email: pbs@adoppler.com +capabilities: + app: + mediaTypes: + - banner + - video + site: + mediaTypes: + - banner + - video diff --git a/static/bidder-info/adrubi.yaml b/static/bidder-info/adrubi.yaml deleted file mode 100644 index 1d19dc7521..0000000000 --- a/static/bidder-info/adrubi.yaml +++ /dev/null @@ -1,4 +0,0 @@ -aliasOf: "admatic" -maintainer: - email: "support@adrubi.com" -gvlVendorID: 779 \ No newline at end of file diff --git a/static/bidder-info/ads_interactive.yaml b/static/bidder-info/ads_interactive.yaml index df45a6869e..dd857366b5 100644 --- a/static/bidder-info/ads_interactive.yaml +++ b/static/bidder-info/ads_interactive.yaml @@ -1,8 +1,18 @@ -aliasOf: "teqblaze" endpoint: "https://bntb.adsinteractive.com/pserver" gvlVendorID: 1212 maintainer: email: "it@adsinteractive.com" +capabilities: + site: + mediaTypes: + - banner + - video + - native + app: + mediaTypes: + - banner + - video + - native userSync: redirect: url: "https://cstb.adsinteractive.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" diff --git a/static/bidder-info/adsinteractive.yaml b/static/bidder-info/adsinteractive.yaml index 0940039929..095184725b 100644 --- a/static/bidder-info/adsinteractive.yaml +++ b/static/bidder-info/adsinteractive.yaml @@ -1,12 +1,17 @@ -aliasOf: "teqblaze" -endpoint: "https://bntb.adsinteractive.com/pserver" -gvlVendorID: 1212 +endpoint: "http://bid.adsinteractive.com/prebid" maintainer: - email: "it@adsinteractive.com" + email: it@adsinteractive.com +gvlVendorID: 1212 +modifyingVastXmlAllowed: false +capabilities: + app: + mediaTypes: + - banner + site: + mediaTypes: + - banner userSync: redirect: - url: "https://cstb.adsinteractive.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://cstb.adsinteractive.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" \ No newline at end of file + url: "https://sync.adsinteractive.com/getuid?{{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}" + userMacro: "$AUID" + diff --git a/static/bidder-info/adsmovil.yaml b/static/bidder-info/adsmovil.yaml deleted file mode 100644 index 2e919de4c6..0000000000 --- a/static/bidder-info/adsmovil.yaml +++ /dev/null @@ -1,16 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://tag-ssp.adsmovil.com/pserver" -maintainer: - email: "prebid@adsmovil.com" -capabilities: - site: - mediaTypes: - - banner - - video - - native - - app: - mediaTypes: - - banner - - video - - native \ No newline at end of file diff --git a/static/bidder-info/alchemyx.yaml b/static/bidder-info/alchemyx.yaml deleted file mode 100644 index 2758dd6249..0000000000 --- a/static/bidder-info/alchemyx.yaml +++ /dev/null @@ -1,11 +0,0 @@ -endpoint: "https://alchemyx.live/auction?id={{.AdUnit}}&auth={{.TokenID}}" -aliasOf: "adverxo" -maintainer: - email: "prebid@alchemyx.io" -userSync: - iframe: - url: https://alchemyx.online/usync?type=iframe&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID - redirect: - url: https://alchemyx.online/usync?type=image&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID diff --git a/static/bidder-info/alliance_gravity.yaml b/static/bidder-info/alliance_gravity.yaml deleted file mode 100644 index 2557de1e83..0000000000 --- a/static/bidder-info/alliance_gravity.yaml +++ /dev/null @@ -1,24 +0,0 @@ -endpoint: "https://pbs.production.agrvt.com/openrtb2/auction" -maintainer: - email: produit@alliancegravity.com -gvlVendorID: 501 -modifyingVastXmlAllowed: true -openrtb: - version: 2.6 -capabilities: - app: - mediaTypes: - - banner - - video - - audio - - native - site: - mediaTypes: - - banner - - video - - audio - - native -userSync: - iframe: - url: "https://pbs.production.agrvt.com/static/cookie_sync.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}" - userMacro: "$UID" diff --git a/static/bidder-info/altstar.yaml b/static/bidder-info/altstar.yaml deleted file mode 100644 index 1e8826ffb7..0000000000 --- a/static/bidder-info/altstar.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.ads-altstarmedia.com/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" \ No newline at end of file diff --git a/static/bidder-info/amcom.yaml b/static/bidder-info/amcom.yaml deleted file mode 100644 index 2144fe6b2e..0000000000 --- a/static/bidder-info/amcom.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "https://amcom-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" -aliasOf: "smarthub" diff --git a/static/bidder-info/anzuDSP.yaml b/static/bidder-info/anzuDSP.yaml deleted file mode 100644 index c45d33e189..0000000000 --- a/static/bidder-info/anzuDSP.yaml +++ /dev/null @@ -1,9 +0,0 @@ -aliasOf: "xeworks" -endpoint: "https://rtb.anzu-rtb.live/?pid={{.SourceId}}&host={{.Host}}&pbs=1" -maintainer: - email: "prebid@anzu.io" -userSync: - # anzuDSP supports user syncing, but requires configuration by the host. contact this - # bidder directly at the email address in this file to ask about enabling user sync. - supports: - - redirect diff --git a/static/bidder-info/anzuExchange.yaml b/static/bidder-info/anzuExchange.yaml deleted file mode 100644 index ae50ef3e7f..0000000000 --- a/static/bidder-info/anzuExchange.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.marketplace-anzu.io/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" \ No newline at end of file diff --git a/static/bidder-info/anzuSSP.yaml b/static/bidder-info/anzuSSP.yaml deleted file mode 100644 index 75aea96cab..0000000000 --- a/static/bidder-info/anzuSSP.yaml +++ /dev/null @@ -1,16 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "http://endpoint.anzumarketplace.com/pserver" -maintainer: - email: "prebid@anzu.io" -capabilities: - site: - mediaTypes: - - banner - - video - - native - - app: - mediaTypes: - - banner - - video - - native \ No newline at end of file diff --git a/static/bidder-info/apester.yaml b/static/bidder-info/apester.yaml deleted file mode 100644 index c5bd2facd0..0000000000 --- a/static/bidder-info/apester.yaml +++ /dev/null @@ -1,9 +0,0 @@ -aliasOf: "vidazoo" -endpoint: "https://bidder.apester.com/openrtb/" -maintainer: - email: "info@apester.com" -userSync: - iframe: - url: https://sync.apester.com/api/user/html/699dad2322a7fa644e1d8bf7?pbs=true&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} - userMacro: ${userId} -gvlVendorID: 354 \ No newline at end of file diff --git a/static/bidder-info/appMonstaMedia.yaml b/static/bidder-info/appMonstaMedia.yaml deleted file mode 100644 index 705140a525..0000000000 --- a/static/bidder-info/appMonstaMedia.yaml +++ /dev/null @@ -1,5 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://ssp-us.appmonsta.ai/pserver" -gvlVendorID: 1283 -maintainer: - email: "media.support@appmonsta.ai" diff --git a/static/bidder-info/artechnology.yaml b/static/bidder-info/artechnology.yaml index 429ed3cda2..0781235336 100644 --- a/static/bidder-info/artechnology.yaml +++ b/static/bidder-info/artechnology.yaml @@ -1,2 +1,2 @@ -endpoint: "https://artechnology-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://artechnology-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" diff --git a/static/bidder-info/aso.yaml b/static/bidder-info/aso.yaml index 6d0a86d490..429b8441a5 100644 --- a/static/bidder-info/aso.yaml +++ b/static/bidder-info/aso.yaml @@ -14,6 +14,8 @@ capabilities: - video - native userSync: - redirect: - url: "https://track.aso1.net/sync/v2?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "{uid}" + # Adserver.Online supports user syncing, but requires configuration by the host.Contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect + - iframe diff --git a/static/bidder-info/audienceNetwork.yaml b/static/bidder-info/audienceNetwork.yaml index 8b88d983c6..e952def740 100644 --- a/static/bidder-info/audienceNetwork.yaml +++ b/static/bidder-info/audienceNetwork.yaml @@ -2,8 +2,6 @@ endpoint: "https://an.facebook.com/placementbid.ortb" disabled: true maintainer: email: "none" -openrtb: - multiformat-supported: true capabilities: app: mediaTypes: diff --git a/static/bidder-info/bcmint.yaml b/static/bidder-info/bcmint.yaml index 8e42dcb986..9d5a62cc51 100644 --- a/static/bidder-info/bcmint.yaml +++ b/static/bidder-info/bcmint.yaml @@ -3,6 +3,8 @@ endpoint: "https://srv.datacygnal.io/pbs/bidder?zid={{.ZoneID}}" maintainer: email: "contact@bcm.ltd" userSync: - redirect: - url: "https://track.datacygnal.io/sync/v2?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "{uid}" + # BCM Int. supports user syncing, but requires configuration by the host.Contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect + - iframe \ No newline at end of file diff --git a/static/bidder-info/beop.yaml b/static/bidder-info/beop.yaml deleted file mode 100644 index 1129818f85..0000000000 --- a/static/bidder-info/beop.yaml +++ /dev/null @@ -1,12 +0,0 @@ -endpoint: "https://hb.collectiveaudience.co/rtb/bid" -endpointCompression: gzip -maintainer: - email: tech@collectiveaudience.co -gvlVendorID: 666 -openrtb: - version: 2.6 -capabilities: - site: - mediaTypes: - - banner - - video diff --git a/static/bidder-info/bidfuse.yaml b/static/bidder-info/bidfuse.yaml deleted file mode 100644 index c993e2f184..0000000000 --- a/static/bidder-info/bidfuse.yaml +++ /dev/null @@ -1,11 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://bn.bidfuse.com/pserver" -maintainer: - email: "support@bidfuse.com" -userSync: - redirect: - url: "https://syncbf.bidfuse.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://syncbf.bidfuse.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" \ No newline at end of file diff --git a/static/bidder-info/bidgency.yaml b/static/bidder-info/bidgency.yaml index e4885897d1..ad5816dffe 100644 --- a/static/bidder-info/bidgency.yaml +++ b/static/bidder-info/bidgency.yaml @@ -3,6 +3,8 @@ endpoint: "https://srv.bidgx.com/pbs/bidder?zid={{.ZoneID}}" maintainer: email: "aso@bidgency.com" userSync: - redirect: - url: "https://track.bidgx.com/sync/v2?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "{uid}" + # Bidgency supports user syncing, but requires configuration by the host.Contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect + - iframe \ No newline at end of file diff --git a/static/bidder-info/copper6.yaml b/static/bidder-info/copper6.yaml index fe3ea47a29..b4e259ef08 100644 --- a/static/bidder-info/copper6.yaml +++ b/static/bidder-info/copper6.yaml @@ -2,7 +2,6 @@ aliasOf: adtelligent endpoint: "http://ghb.app.copper6.com/pbs/ortb" maintainer: email: "info@copper6.com" -gvlVendorID: 1356 userSync: # Copper6 ssp supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/cortex.yaml b/static/bidder-info/cortex.yaml deleted file mode 100644 index e7b5868ea6..0000000000 --- a/static/bidder-info/cortex.yaml +++ /dev/null @@ -1,24 +0,0 @@ -aliasOf: "teqblaze" -# We have the following regional endpoint domains: 'eu' - for EU, 'us-east' - for US_EAST, 'apac' - for APAC -# Please deploy this config in each of your datacenters with the appropriate regional subdomain -endpoint: "https://REGION.targetadserver.com/pserver" -maintainer: - email: "dev@cortextech.it" -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://sync.targetadserver.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://sync.targetadserver.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/cwire.yaml b/static/bidder-info/cwire.yaml index eabe2b61b8..b7a16e05c3 100644 --- a/static/bidder-info/cwire.yaml +++ b/static/bidder-info/cwire.yaml @@ -3,16 +3,14 @@ maintainer: email: "devs@cwire.com" endpointCompression: gzip gvlVendorID: 1081 -modifyingVastXmlAllowed: true +modifyingVastXmlAllowed: false capabilities: app: mediaTypes: - banner - - video site: mediaTypes: - banner - - video userSync: iframe: url: https://prebid.cwi.re/v1/usersync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&rd={{.RedirectURL}} diff --git a/static/bidder-info/deepintent.yaml b/static/bidder-info/deepintent.yaml index c19b29f90d..95aba4207a 100644 --- a/static/bidder-info/deepintent.yaml +++ b/static/bidder-info/deepintent.yaml @@ -1,6 +1,4 @@ endpoint: "https://prebid.deepintent.com/prebid" -geoscope: - - USA maintainer: email: "prebiddev@deepintent.com" gvlVendorID: 541 diff --git a/static/bidder-info/displayio.yaml b/static/bidder-info/displayio.yaml index 6c2a04b65f..4b3b28b745 100644 --- a/static/bidder-info/displayio.yaml +++ b/static/bidder-info/displayio.yaml @@ -10,11 +10,7 @@ capabilities: mediaTypes: - banner - video - - audio - - native site: mediaTypes: - banner - - video - - audio - - native \ No newline at end of file + - video \ No newline at end of file diff --git a/static/bidder-info/dpai.yaml b/static/bidder-info/dpai.yaml deleted file mode 100644 index f679d66d77..0000000000 --- a/static/bidder-info/dpai.yaml +++ /dev/null @@ -1,22 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://ssp.drift-pixel.ai/pserver" -maintainer: - email: "adops@driftpixel.ai" -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://sync.drift-pixel.ai/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://sync.drift-pixel.ai/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/dxkulture.yaml b/static/bidder-info/dxkulture.yaml new file mode 100644 index 0000000000..d6f03044fd --- /dev/null +++ b/static/bidder-info/dxkulture.yaml @@ -0,0 +1,16 @@ +endpoint: "https://ads.dxkulture.com/pbs" +maintainer: + email: "devops@dxkulture.com" +capabilities: + app: + mediaTypes: + - banner + - video + site: + mediaTypes: + - banner + - video +userSync: + redirect: + url: "https://ads.dxkulture.com/usync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}" + userMacro: "$UID" diff --git a/static/bidder-info/elementaltv.yaml b/static/bidder-info/elementaltv.yaml deleted file mode 100644 index ffc219f7f7..0000000000 --- a/static/bidder-info/elementaltv.yaml +++ /dev/null @@ -1,17 +0,0 @@ -endpoint: "https://pbs.elementaltv.io/ads/processHeaderBid/{{.AdUnit}}" -endpointCompression: gzip -openrtb: - version: 2.6 -maintainer: - email: support@elementaltv.com -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native diff --git a/static/bidder-info/epsilon.yaml b/static/bidder-info/epsilon.yaml index 4da155b06f..cb8318102e 100644 --- a/static/bidder-info/epsilon.yaml +++ b/static/bidder-info/epsilon.yaml @@ -1,5 +1,4 @@ aliasOf: conversant -gvlVendorID: 24 userSync: redirect: url: "https://prebid-match.dotomi.com/match/bounce/current?version=1&networkId=72582&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&rurl={{.RedirectURL}}" diff --git a/static/bidder-info/equativ.yaml b/static/bidder-info/equativ.yaml index 512da14d50..7c5214fe48 100644 --- a/static/bidder-info/equativ.yaml +++ b/static/bidder-info/equativ.yaml @@ -1,2 +1 @@ aliasOf: "smartadserver" -gvlVendorID: 45 diff --git a/static/bidder-info/eskimi.yaml b/static/bidder-info/eskimi.yaml deleted file mode 100644 index c3e02c49eb..0000000000 --- a/static/bidder-info/eskimi.yaml +++ /dev/null @@ -1,21 +0,0 @@ -endpoint: "https://ittr.eskimi.com/prebidjs" -maintainer: - email: prebid@eskimi.com -gvlVendorID: 814 -modifyingVastXmlAllowed: false -openrtb: - version: 2.6 - gpp-supported: true -capabilities: - app: - mediaTypes: - - banner - - video - site: - mediaTypes: - - banner - - video -userSync: - redirect: - url: "https://ittpx.eskimi.com/sync?sp_id=137&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&dest={{.RedirectURL}}" - userMacro: "${USER_ID}" diff --git a/static/bidder-info/ezoic.yaml b/static/bidder-info/ezoic.yaml deleted file mode 100644 index 9f8be82b52..0000000000 --- a/static/bidder-info/ezoic.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Ezoic requires publisher domains to be registered and approved before -# bidding; unapproved inventory receives no-bid responses. Contact -# prebid@ezoic.com to get set up. -endpoint: "https://g.ezoic.net/ezoic/prebid/adapter/ortb" -maintainer: - email: prebid@ezoic.com -gvlVendorID: 347 -geoscope: - - global -openrtb: - version: 2.6 -modifyingVastXmlAllowed: false -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native diff --git a/static/bidder-info/felixads.yaml b/static/bidder-info/felixads.yaml index 2068293eaa..baa2268f4d 100644 --- a/static/bidder-info/felixads.yaml +++ b/static/bidder-info/felixads.yaml @@ -1,2 +1,2 @@ -endpoint: "https://felixads-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://felixads-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" diff --git a/static/bidder-info/finative.yaml b/static/bidder-info/finative.yaml index 9201f4eb3f..e1136c3220 100644 --- a/static/bidder-info/finative.yaml +++ b/static/bidder-info/finative.yaml @@ -1,3 +1,2 @@ endpoint: "https://b.finative.cloud/cds/rtb/bid?ssp={{.AccountID}}" -aliasOf: "seedingAlliance" -gvlVendorID: 371 \ No newline at end of file +aliasOf: "seedingAlliance" \ No newline at end of file diff --git a/static/bidder-info/flipp.yaml b/static/bidder-info/flipp.yaml index 01772ab41e..431c134579 100644 --- a/static/bidder-info/flipp.yaml +++ b/static/bidder-info/flipp.yaml @@ -1,4 +1,4 @@ -endpoint: "https://ads-flipp.com/flyer-locator-service/prebid_campaigns" +endpoint: "https://cdn-gateflipp.flippback.com/flyer-locator-service/prebid_campaigns" maintainer: email: prebid@flipp.com capabilities: diff --git a/static/bidder-info/freewheel-ssp.yaml b/static/bidder-info/freewheel-ssp.yaml index 4b79dd12ab..43c1ca166a 100644 --- a/static/bidder-info/freewheel-ssp.yaml +++ b/static/bidder-info/freewheel-ssp.yaml @@ -1,5 +1,4 @@ aliasOf: freewheelssp -gvlVendorID: 285 userSync: iframe: url: "https://ads.stickyadstv.com/pbs-user-sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" diff --git a/static/bidder-info/gothamads.yaml b/static/bidder-info/gothamads.yaml new file mode 100644 index 0000000000..c9f4e66b48 --- /dev/null +++ b/static/bidder-info/gothamads.yaml @@ -0,0 +1,14 @@ +endpoint: "http://us-e-node1.gothamads.com/?pass={{.AccountID}}" +maintainer: + email: "support@gothamads.com" +capabilities: + app: + mediaTypes: + - banner + - video + - native + site: + mediaTypes: + - banner + - video + - native \ No newline at end of file diff --git a/static/bidder-info/harion.yaml b/static/bidder-info/harion.yaml deleted file mode 100644 index 450afd8644..0000000000 --- a/static/bidder-info/harion.yaml +++ /dev/null @@ -1,17 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://usads.harion-ma.com/pserver" -maintainer: - email: "adtech@markappmedia.site" -gvlVendorID: 1406 -capabilities: - site: - mediaTypes: - - banner - - video - - native - - app: - mediaTypes: - - banner - - video - - native diff --git a/static/bidder-info/harrenmedia.yaml b/static/bidder-info/harrenmedia.yaml deleted file mode 100644 index aaafa8d446..0000000000 --- a/static/bidder-info/harrenmedia.yaml +++ /dev/null @@ -1,9 +0,0 @@ -endpoint: "https://harrenmedia.pbsadverxo.com/auction?id={{.AdUnit}}&auth={{.TokenID}}" -aliasOf: "adverxo" -userSync: - iframe: - url: https://hmidssp.com/usync?type=iframe&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID - redirect: - url: https://hmidssp.com/usync?type=image&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID diff --git a/static/bidder-info/imds.yaml b/static/bidder-info/imds.yaml index 73f2099548..135b67fc1f 100644 --- a/static/bidder-info/imds.yaml +++ b/static/bidder-info/imds.yaml @@ -15,6 +15,7 @@ capabilities: - banner - video userSync: + supportCors: true iframe: url: "https://ad-cdn.technoratimedia.com/html/usersync.html?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gppsid={{.GPPSID}}&cb={{.RedirectURL}}" userMacro: "[USER_ID]" diff --git a/static/bidder-info/indicue.yaml b/static/bidder-info/indicue.yaml index b6b2bccc80..1353424dfe 100644 --- a/static/bidder-info/indicue.yaml +++ b/static/bidder-info/indicue.yaml @@ -2,7 +2,6 @@ aliasOf: adtelligent endpoint: "http://ghb.console.indicue.com/pbs/ortb" maintainer: email: "ops@indicue.com" -gvlVendorID: 0 userSync: # Indicue ssp supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/insticator.yaml b/static/bidder-info/insticator.yaml index adef8536d6..907ff4a50d 100644 --- a/static/bidder-info/insticator.yaml +++ b/static/bidder-info/insticator.yaml @@ -1,11 +1,7 @@ endpoint: "https://ex.ingage.tech/v1/prebidserver" -extra_info: '{"app_endpoint":"https://aex.ingage.tech/v1/prebidserver"}' -endpointCompression: GZIP maintainer: email: "prebid@insticator.com" gvlVendorID: 910 -openrtb: - version: "2.6" capabilities: app: mediaTypes: diff --git a/static/bidder-info/intenze.yaml b/static/bidder-info/intenze.yaml index fe8d7635ad..14eec4d694 100644 --- a/static/bidder-info/intenze.yaml +++ b/static/bidder-info/intenze.yaml @@ -1,14 +1,4 @@ +aliasOf: "gothamads" endpoint: "http://lb-east.intenze.co/?pass={{.AccountID}}" maintainer: - email: "connect@intenze.co" -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native + email: "connect@intenze.co" \ No newline at end of file diff --git a/static/bidder-info/intertech.yaml b/static/bidder-info/intertech.yaml new file mode 100644 index 0000000000..bf4b52bc38 --- /dev/null +++ b/static/bidder-info/intertech.yaml @@ -0,0 +1,15 @@ +# This adapter is ported from PBS-Java to PBS-Go by Prebid. Please open a GitHub issue instead of +# directly contacting the maintainer for technical issues. +endpoint: https://prebid.intertechsrvcs.com/prebid/{{.PageID}}?imp-id={{.ImpID}}&ssp-id=10500 +endpointCompression: GZIP +maintainer: + email: prebid@intertechsrvcs.com +capabilities: + site: + mediaTypes: + - banner + - native +userSync: + redirect: + url: https://prebid.intertechsrvcs.com/mapuid/intertech/?ssp-id=10500&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&location= + userMacro: "{UID}" \ No newline at end of file diff --git a/static/bidder-info/jambojar.yaml b/static/bidder-info/jambojar.yaml index 794e804e17..5ab15a47d4 100644 --- a/static/bidder-info/jambojar.yaml +++ b/static/bidder-info/jambojar.yaml @@ -1,2 +1,2 @@ -endpoint: "https://jambojar-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://jambojar-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" diff --git a/static/bidder-info/janet.yaml b/static/bidder-info/janet.yaml index 4a77ef6f48..97f44a2bd5 100644 --- a/static/bidder-info/janet.yaml +++ b/static/bidder-info/janet.yaml @@ -2,7 +2,6 @@ aliasOf: adtelligent endpoint: "http://ghb.bidder.jmgads.com/pbs/ortb" maintainer: email: "info@thejmg.com" -gvlVendorID: 410 userSync: # JANet supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/jdpmedia.yaml b/static/bidder-info/jdpmedia.yaml index 2315db74ba..f558955a2f 100644 --- a/static/bidder-info/jdpmedia.yaml +++ b/static/bidder-info/jdpmedia.yaml @@ -1,4 +1,4 @@ -endpoint: "https://jdpmedia-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://jdpmedia-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" userSync: supports: diff --git a/static/bidder-info/kargo.yaml b/static/bidder-info/kargo.yaml index 1347a87eb4..6acd679ebc 100644 --- a/static/bidder-info/kargo.yaml +++ b/static/bidder-info/kargo.yaml @@ -1,4 +1,4 @@ -endpoint: "https://krk2.kargo.com/api/v1/openrtb" +endpoint: "https://krk.kargo.com/api/v1/openrtb" maintainer: email: "kraken@kargo.com" gvlVendorID: 972 @@ -9,11 +9,6 @@ capabilities: - banner - video - native - app: - mediaTypes: - - banner - - video - - native userSync: redirect: url: "https://crb.kargo.com/api/v1/dsync/PrebidServer?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" diff --git a/static/bidder-info/kuantyx.yaml b/static/bidder-info/kuantyx.yaml index 6b92e8c4e7..b4a2402450 100644 --- a/static/bidder-info/kuantyx.yaml +++ b/static/bidder-info/kuantyx.yaml @@ -3,6 +3,8 @@ endpoint: "https://srv.kntxy.com/pbs/bidder?zid={{.ZoneID}}" maintainer: email: "ssp@kuantyx.com" userSync: - redirect: - url: "https://track.kntxy.com/sync/v2?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "{uid}" + # Kuantyx supports user syncing, but requires configuration by the host.Contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect + - iframe diff --git a/static/bidder-info/m152.yaml b/static/bidder-info/m152.yaml deleted file mode 100644 index 4bc67f075e..0000000000 --- a/static/bidder-info/m152.yaml +++ /dev/null @@ -1,15 +0,0 @@ -disabled: true -# We have the following regional endpoint domains: 'east' - for US_EAST, 'eu' - for EU -# Please deploy this config in each of your datacenters with the appropriate regional subdomain -aliasOf: "teqblaze" -endpoint: "https://#{REGION}#.152media-ssp.com/pserver" -maintainer: - email: "info@152media.com" -gvlVendorID: 1111 -userSync: - redirect: - url: "https://cs.152media-ssp.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://cs.152media-ssp.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/magnite.yaml b/static/bidder-info/magnite.yaml index a0840a14a8..109c20d03b 100644 --- a/static/bidder-info/magnite.yaml +++ b/static/bidder-info/magnite.yaml @@ -1,2 +1 @@ -aliasOf: "rubicon" -gvlVendorID: 52 \ No newline at end of file +aliasOf: "rubicon" \ No newline at end of file diff --git a/static/bidder-info/markapp.yaml b/static/bidder-info/markapp.yaml index a55108cbe0..b0e7106242 100644 --- a/static/bidder-info/markapp.yaml +++ b/static/bidder-info/markapp.yaml @@ -1,4 +1,4 @@ -endpoint: "https://markapp-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://markapp-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" userSync: supports: diff --git a/static/bidder-info/matterfull.yaml b/static/bidder-info/matterfull.yaml deleted file mode 100644 index 80a007a85c..0000000000 --- a/static/bidder-info/matterfull.yaml +++ /dev/null @@ -1,9 +0,0 @@ -aliasOf: "xeworks" -endpoint: "https://rtb.mtflll.com?pid={{.SourceId}}&host={{.Host}}&pbs=1" -maintainer: - email: "adops@bematterfull.com" -userSync: - # matterfull supports user syncing, but requires configuration by the host. contact this - # bidder directly at the email address in this file to ask about enabling user sync. - supports: - - redirect diff --git a/static/bidder-info/medianet.yaml b/static/bidder-info/medianet.yaml index 73c1830e3e..effd768206 100644 --- a/static/bidder-info/medianet.yaml +++ b/static/bidder-info/medianet.yaml @@ -23,5 +23,5 @@ userSync: url: https://hbx.media.net/checksync.php?cid=8CUEHS6F9&cs=87&type=mpbc&cv=37&vsSync=1&uspstring={{.USPrivacy}}&gdpr={{.GDPR}}&gdprstring={{.GDPRConsent}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}} userMacro: "" redirect: - url: https://cs.media.net/cksync.php?cs=1&type=pbs&ovsid=setstatuscode&bidder=medianet&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} - userMacro: "" + url: https://hbx.media.net/cksync.php?cs=1&type=pbs&ovsid=setstatuscode&bidder=medianet&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} + userMacro: "" \ No newline at end of file diff --git a/static/bidder-info/mediasquare.yaml b/static/bidder-info/mediasquare.yaml index 8a5730c509..b6d21f4c9f 100644 --- a/static/bidder-info/mediasquare.yaml +++ b/static/bidder-info/mediasquare.yaml @@ -10,12 +10,3 @@ capabilities: - banner - video - native - site: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: https://pbs-front.mediasquare.fr/sync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID diff --git a/static/bidder-info/mgtechnology.yaml b/static/bidder-info/mgtechnology.yaml deleted file mode 100644 index 24e8544a74..0000000000 --- a/static/bidder-info/mgtechnology.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# MediaGo Technology LLC - alias of mediago with separate endpoint, GVL ID, and user sync -aliasOf: mediago -endpoint: "https://gbid.mediagotechnology.com/api/bid?tn={{.AccountID}}" -endpointCompression: gzip -geoscope: - - USA - - DEU - - JPN - - GBR - - KOR - - CAN - - FRA - - ITA -maintainer: - email: ext_mediago_cm@baidu.com -gvlVendorID: 1575 -capabilities: - site: - mediaTypes: - - banner - - native -userSync: - redirect: - url: https://go.mediagotechnology.com/ju/cs/prebid?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} - userMacro: $UID diff --git a/static/bidder-info/mobilefuse.yaml b/static/bidder-info/mobilefuse.yaml index c0770d80c2..14e488d077 100644 --- a/static/bidder-info/mobilefuse.yaml +++ b/static/bidder-info/mobilefuse.yaml @@ -12,11 +12,6 @@ capabilities: - banner - video - native - site: - mediaTypes: - - banner - - video - - native endpointCompression: "GZIP" openrtb: version: 2.6 diff --git a/static/bidder-info/mobupps.yaml b/static/bidder-info/mobupps.yaml new file mode 100644 index 0000000000..bb35990b80 --- /dev/null +++ b/static/bidder-info/mobupps.yaml @@ -0,0 +1,9 @@ +endpoint: "https://mobupps.pbsadverxo.com/auction?id={{.AdUnit}}&auth={{.TokenID}}" +aliasOf: "adverxo" +userSync: + iframe: + url: https://mobupps.pbsadverxo.com/usync?type=iframe&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} + userMacro: $UID + redirect: + url: https://mobupps.pbsadverxo.com/usync?type=image&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}} + userMacro: $UID diff --git a/static/bidder-info/monetixads.yaml b/static/bidder-info/monetixads.yaml index 32b0d79280..95beda701f 100644 --- a/static/bidder-info/monetixads.yaml +++ b/static/bidder-info/monetixads.yaml @@ -1,4 +1,3 @@ aliasOf: "admatic" maintainer: - email: "team@monetixads.com" -gvlVendorID: 1281 \ No newline at end of file + email: "team@monetixads.com" \ No newline at end of file diff --git a/static/bidder-info/mycodemedia.yaml b/static/bidder-info/mycodemedia.yaml deleted file mode 100644 index 88b0547773..0000000000 --- a/static/bidder-info/mycodemedia.yaml +++ /dev/null @@ -1,22 +0,0 @@ -aliasOf: "teqblaze" -endpoint: 'https://east-backend.mycodemedia.com/pserver' -maintainer: - email: 'support-platform@mycodemedia.com' -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://usersync.mycodemedia.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://usersync.mycodemedia.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/netaddiction.yaml b/static/bidder-info/netaddiction.yaml index 70a26fca5f..7f6777b4b3 100644 --- a/static/bidder-info/netaddiction.yaml +++ b/static/bidder-info/netaddiction.yaml @@ -1,4 +1,3 @@ aliasOf: "admatic" maintainer: - email: "publishers-support@netaddiction.it" -gvlVendorID: 1281 \ No newline at end of file + email: "publishers-support@netaddiction.it" \ No newline at end of file diff --git a/static/bidder-info/nexx360.yaml b/static/bidder-info/nexx360.yaml index c96b088fec..0a0b186ec9 100644 --- a/static/bidder-info/nexx360.yaml +++ b/static/bidder-info/nexx360.yaml @@ -1,7 +1,6 @@ endpoint: "http://fast.nexx360.io/prebid-server" maintainer: email: "tech@nexx360.io" -gvlVendorID: 965 endpointCompression: gzip geoscope: - global @@ -18,10 +17,3 @@ capabilities: - video - native - audio -userSync: - redirect: - url: "https://fast.nexx360.io/usermatchredir/redirect?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gppsid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "$UID" - iframe: - url: "https://fast.nexx360.io/usermatchredir/iframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gppsid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "$UID" diff --git a/static/bidder-info/ntvagents.yaml b/static/bidder-info/ntvagents.yaml deleted file mode 100644 index 1b34a11c13..0000000000 --- a/static/bidder-info/ntvagents.yaml +++ /dev/null @@ -1,11 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://endpoint1.nativeagents.ai/pserver" -maintainer: - email: "prebid@nativeagents.ai" -userSync: - redirect: - url: "https://sync.nativeagents.ai/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://sync.nativeagents.ai/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml deleted file mode 100644 index 803402c68a..0000000000 --- a/static/bidder-info/nuba.yaml +++ /dev/null @@ -1,4 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://ads.nuba.io/pserver" -maintainer: - email: "tech@nuba.io" diff --git a/static/bidder-info/nuclion.yaml b/static/bidder-info/nuclion.yaml deleted file mode 100644 index 070512409b..0000000000 --- a/static/bidder-info/nuclion.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.rtb-nuclion.io/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" diff --git a/static/bidder-info/optidigital.yaml b/static/bidder-info/optidigital.yaml index 30074e3a6f..b0df8a5ef8 100644 --- a/static/bidder-info/optidigital.yaml +++ b/static/bidder-info/optidigital.yaml @@ -19,5 +19,5 @@ userSync: supports: - iframe iframe: - url: "https://scripts.opti-digital.com/js/presyncs2s.html?endpoint=optidigital&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" + url: "https://scripts.opti-digital.com/js/presyncs2s.html?endpoint=optidigital&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redir={{.RedirectURL}}" userMacro: "$UID" \ No newline at end of file diff --git a/static/bidder-info/orbidder.yaml b/static/bidder-info/orbidder.yaml index 74348c75d7..c42fb91de4 100644 --- a/static/bidder-info/orbidder.yaml +++ b/static/bidder-info/orbidder.yaml @@ -11,6 +11,7 @@ capabilities: - banner - native userSync: + supportCors: true redirect: url: "https://orbidder.otto.de/pbs-usersync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&redirect={{.RedirectURL}}" userMacro: "[ODN_ID]" \ No newline at end of file diff --git a/static/bidder-info/oveeo.yaml b/static/bidder-info/oveeo.yaml deleted file mode 100644 index 388fea5ed6..0000000000 --- a/static/bidder-info/oveeo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.rtb-oveeo.com/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" \ No newline at end of file diff --git a/static/bidder-info/pgam.yaml b/static/bidder-info/pgam.yaml index 911fa4ef08..e0bf4388d4 100644 --- a/static/bidder-info/pgam.yaml +++ b/static/bidder-info/pgam.yaml @@ -2,7 +2,6 @@ aliasOf: adtelligent endpoint: "http://ghb.pgamssp.com/pbs/ortb" maintainer: email: "ppatel@pgammedia.com" -gvlVendorID: 1353 userSync: # PGAM ssp supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/pgamrtb.yaml b/static/bidder-info/pgamrtb.yaml deleted file mode 100644 index 718c341d54..0000000000 --- a/static/bidder-info/pgamrtb.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.pgamrtb.com/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" diff --git a/static/bidder-info/pixad.yaml b/static/bidder-info/pixad.yaml index bc9a6fe699..d08230bfbc 100644 --- a/static/bidder-info/pixad.yaml +++ b/static/bidder-info/pixad.yaml @@ -1,4 +1,3 @@ aliasOf: "admatic" maintainer: - email: "prebid@pixad.com.tr" -gvlVendorID: 1281 \ No newline at end of file + email: "prebid@pixad.com.tr" \ No newline at end of file diff --git a/static/bidder-info/pixfuture.yaml b/static/bidder-info/pixfuture.yaml deleted file mode 100644 index 1f1e78b6b8..0000000000 --- a/static/bidder-info/pixfuture.yaml +++ /dev/null @@ -1,19 +0,0 @@ -endpoint: "https://pbs-pix.pixfuture.com/pixservices" -maintainer: - email: "client-support@pixfuture.com" -gvlVendorID: 839 -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://sync.pixfuture.com/cookiesync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}" - userMacro: "${UID}" diff --git a/static/bidder-info/programmaticX.yaml b/static/bidder-info/programmaticX.yaml deleted file mode 100644 index 0e203e8e46..0000000000 --- a/static/bidder-info/programmaticX.yaml +++ /dev/null @@ -1,9 +0,0 @@ -aliasOf: "vidazoo" -endpoint: "https://exchange.programmaticx.ai/openrtb/" -maintainer: - email: "pxteam@programmaticx.ai" -gvlVendorID: 1344 -userSync: - iframe: - url: https://sync.programmaticx.ai/api/user/html/685297194d85991a5e6e36dd?pbs=true&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} - userMacro: ${userId} \ No newline at end of file diff --git a/static/bidder-info/progx.yaml b/static/bidder-info/progx.yaml index 45a27ecfa6..0e203e8e46 100644 --- a/static/bidder-info/progx.yaml +++ b/static/bidder-info/progx.yaml @@ -1,12 +1,9 @@ -aliasOf: 'teqblaze' -endpoint: "https://us-east.progrtb.com/pserver" +aliasOf: "vidazoo" +endpoint: "https://exchange.programmaticx.ai/openrtb/" maintainer: email: "pxteam@programmaticx.ai" gvlVendorID: 1344 userSync: - redirect: - url: "https://sync.progrtb.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" iframe: - url: "https://sync.progrtb.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" + url: https://sync.programmaticx.ai/api/user/html/685297194d85991a5e6e36dd?pbs=true&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} + userMacro: ${userId} \ No newline at end of file diff --git a/static/bidder-info/proxistore.yaml b/static/bidder-info/proxistore.yaml deleted file mode 100644 index 49fb1828cf..0000000000 --- a/static/bidder-info/proxistore.yaml +++ /dev/null @@ -1,29 +0,0 @@ -endpoint: "https://api.proxistore.com/v3/rtb/openrtb" -endpointCompression: gzip -geoscope: - - EEA -maintainer: - email: support@proxistore.com -gvlVendorID: 418 -openrtb: - version: 2.6 -capabilities: - app: - mediaTypes: - - banner - - video - - native - - audio - site: - mediaTypes: - - banner - - video - - native - - audio -userSync: - redirect: - url: https://abs.proxistore.com/v3/rtb/sync/prebid-server/redirect?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&redirect={{.RedirectURL}} - userMacro: $UID - iframe: - url: https://abs.proxistore.com/v3/rtb/sync/prebid-server/iframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&redirect={{.RedirectURL}} - userMacro: $UID \ No newline at end of file diff --git a/static/bidder-info/radiantfusion.yaml b/static/bidder-info/radiantfusion.yaml deleted file mode 100644 index 583fa8762a..0000000000 --- a/static/bidder-info/radiantfusion.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "https://radiantfusion-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" -aliasOf: "smarthub" diff --git a/static/bidder-info/reklamup.yaml b/static/bidder-info/reklamup.yaml deleted file mode 100644 index beb03cbcd3..0000000000 --- a/static/bidder-info/reklamup.yaml +++ /dev/null @@ -1,23 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://node.reklamup.com/pserver" -maintainer: - email: "support@reklamup.com" -gvlVendorID: 1619 -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://usersync.reklamup.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://usersync.reklamup.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/resetdigital.yaml b/static/bidder-info/resetdigital.yaml index 0651791dc0..db4e70ae76 100644 --- a/static/bidder-info/resetdigital.yaml +++ b/static/bidder-info/resetdigital.yaml @@ -1,23 +1,14 @@ -endpoint: https://prebid.resetdigital.co -endpointCompression: gzip +endpoint: http://b-us-east14.resetdigital.co:9001 maintainer: email: biddersupport@resetdigital.co -gvlVendorID: 1162 capabilities: site: mediaTypes: - - banner - - video - - native - - audio - app: - mediaTypes: - - banner - - video - - native - - audio - -usersync: + - banner + - video + - audio +gvlVendorID: 1162 +userSync: redirect: - url: "https://sync.resetdigital.co/usersync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}" - userMacro: "$UID" + url: https://sync.resetdigital.co/csync?redir={{.RedirectURL}} + userMacro: '$USER_ID' diff --git a/static/bidder-info/rtbdemand.yaml b/static/bidder-info/rtbdemand.yaml deleted file mode 100644 index 9f3edf6d48..0000000000 --- a/static/bidder-info/rtbdemand.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.ads-rtbdemand.com/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" \ No newline at end of file diff --git a/static/bidder-info/rtbstack.yaml b/static/bidder-info/rtbstack.yaml deleted file mode 100644 index 34f02f0e97..0000000000 --- a/static/bidder-info/rtbstack.yaml +++ /dev/null @@ -1,19 +0,0 @@ -endpoint: "https://{{.Region}}-adx-admixer.rtb-stack.com/pbs?ssp={{.SspID}}&endpoint={{.ZoneID}}&client={{.PartnerId}}" -maintainer: - email: "prebid@admixer.net" -gvlVendorID: 511 -openrtb: - version: "2.6" -capabilities: - site: - mediaTypes: - - banner - - video - - native - - audio - app: - mediaTypes: - - banner - - video - - native - - audio \ No newline at end of file diff --git a/static/bidder-info/scalibur.yaml b/static/bidder-info/scalibur.yaml deleted file mode 100644 index 06f84058a0..0000000000 --- a/static/bidder-info/scalibur.yaml +++ /dev/null @@ -1,25 +0,0 @@ -endpoint: "https://srv.scalibur.io/adserver/ortb?type=prebid-server" -# Leave disabled: false → adapter enabled -endpointCompression: gzip -disabled: false -maintainer: - email: "support@scalibur.io" -gvlVendorID: 1471 -openrtb: - version: 2.6 - gpp-supported: true -capabilities: - site: - mediaTypes: - - banner - - video - app: - mediaTypes: - - banner - - video -userSync: - iframe: - url: "https://srv.scalibur.io/adserver/sync?type=iframe&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}" - userMacro: "[PBS_UID]" - supports: - - iframe \ No newline at end of file diff --git a/static/bidder-info/screencore.yaml b/static/bidder-info/screencore.yaml index 4dd3a19f79..67777a1378 100644 --- a/static/bidder-info/screencore.yaml +++ b/static/bidder-info/screencore.yaml @@ -1,14 +1,14 @@ -aliasOf: "teqblaze" -# We have the following regional endpoint domains: 'taqus' - for US_EAST, 'taqeu' - for EU, 'taqapac' - for APAC -# Please deploy this config in each of your datacenters with the appropriate regional subdomain -endpoint: 'https://REGION.screencore.io/pserver' +endpoint: 'http://h1.screencore.io/?kp={{.AccountID}}&kn={{.SourceId}}' maintainer: email: 'connect@screencore.io' -gvlVendorID: 1473 -userSync: - redirect: - url: "https://cs.screencore.io/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&coppa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://cs.screencore.io/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" +capabilities: + app: + mediaTypes: + - banner + - video + - native + site: + mediaTypes: + - banner + - video + - native diff --git a/static/bidder-info/seedtag.yaml b/static/bidder-info/seedtag.yaml index 20dd7dfd5c..20df62ff0e 100644 --- a/static/bidder-info/seedtag.yaml +++ b/static/bidder-info/seedtag.yaml @@ -10,5 +10,5 @@ capabilities: - banner userSync: iframe: - url: "https://s.seedtag.com/cs/cookiesync/prebid?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp_consent={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" + url: "https://s.seedtag.com/cs/cookiesync/prebid?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&usp_consent={{.USPrivacy}}&redirect={{.RedirectURL}}" userMacro: "$UID" diff --git a/static/bidder-info/selectmedia.yaml b/static/bidder-info/selectmedia.yaml deleted file mode 100644 index 752c5ddb6f..0000000000 --- a/static/bidder-info/selectmedia.yaml +++ /dev/null @@ -1,26 +0,0 @@ -disabled: true -# We have the following regional endpoint domains: 'us-east' - for US_EAST, 'eu' - for EU -# Please deploy this config in each of your datacenters with the appropriate regional subdomain -aliasOf: "teqblaze" -endpoint: "https://#{REGION}#.zxyvrtd.com/pserver" -gvlVendorID: 775 -maintainer: - email: "prebid@selectmedia.asia" -capabilities: - site: - mediaTypes: - - banner - - video - - native - app: - mediaTypes: - - banner - - video - - native -userSync: - redirect: - url: "https://sync.zxyvrtd.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://sync.zxyvrtd.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" \ No newline at end of file diff --git a/static/bidder-info/showheroes-bs.yaml b/static/bidder-info/showheroes-bs.yaml index 7143e05aed..4b49a60f18 100644 --- a/static/bidder-info/showheroes-bs.yaml +++ b/static/bidder-info/showheroes-bs.yaml @@ -1,2 +1 @@ -aliasOf: "showheroes" -gvlVendorID: 111 \ No newline at end of file +aliasOf: "showheroes" \ No newline at end of file diff --git a/static/bidder-info/showheroes.yaml b/static/bidder-info/showheroes.yaml index 0586f34ca4..29296ecd91 100644 --- a/static/bidder-info/showheroes.yaml +++ b/static/bidder-info/showheroes.yaml @@ -2,7 +2,6 @@ endpoint: "https://ads.viralize.tv/openrtb2/auction/" maintainer: email: tech@showheroes.com gvlVendorID: 111 -endpointCompression: gzip openrtb: version: 2.6 capabilities: diff --git a/static/bidder-info/showheroesBs.yaml b/static/bidder-info/showheroesBs.yaml index 7143e05aed..4b49a60f18 100644 --- a/static/bidder-info/showheroesBs.yaml +++ b/static/bidder-info/showheroesBs.yaml @@ -1,2 +1 @@ -aliasOf: "showheroes" -gvlVendorID: 111 \ No newline at end of file +aliasOf: "showheroes" \ No newline at end of file diff --git a/static/bidder-info/smarthub.yaml b/static/bidder-info/smarthub.yaml index a0941a08e9..43e12ae257 100644 --- a/static/bidder-info/smarthub.yaml +++ b/static/bidder-info/smarthub.yaml @@ -1,4 +1,4 @@ -endpoint: "https://prebid.attekmi.co/pbserver?partnerName={{.Host}}&seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://prebid.attekmi.com/pbserver?partnerName={{.Host}}&seat={{.AccountID}}&token={{.SourceId}}" maintainer: email: "prebid@attekmi.com" capabilities: diff --git a/static/bidder-info/smb.yaml b/static/bidder-info/smb.yaml deleted file mode 100644 index 64d47d793d..0000000000 --- a/static/bidder-info/smb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "http://be.smartbid.ai/pserver" -maintainer: - email: "support@smartbid.ai" -capabilities: - site: - mediaTypes: - - banner - - video - - native - - app: - mediaTypes: - - banner - - video - - native \ No newline at end of file diff --git a/static/bidder-info/smootai.yaml b/static/bidder-info/smootai.yaml deleted file mode 100644 index 4185dc0478..0000000000 --- a/static/bidder-info/smootai.yaml +++ /dev/null @@ -1,2 +0,0 @@ -endpoint: "http://ads-pbs.ads-smoot.com/openrtb/{{.PublisherID}}?host={{.Host}}" -aliasOf: "limelightDigital" \ No newline at end of file diff --git a/static/bidder-info/sparteo.yaml b/static/bidder-info/sparteo.yaml index f9270be721..1ad61ab072 100644 --- a/static/bidder-info/sparteo.yaml +++ b/static/bidder-info/sparteo.yaml @@ -16,4 +16,5 @@ capabilities: endpoint: "https://bid.sparteo.com/s2s-auction" userSync: iframe: - url: "https://sync.sparteo.com/s2s_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect_url={{.RedirectURL}}" + url: "https://sync.sparteo.com/s2s_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect_url={{.RedirectURL}}" + supportCors: true \ No newline at end of file diff --git a/static/bidder-info/stackadapt.yaml b/static/bidder-info/stackadapt.yaml deleted file mode 100644 index 6ba316fe21..0000000000 --- a/static/bidder-info/stackadapt.yaml +++ /dev/null @@ -1,24 +0,0 @@ -endpoint: "https://pbs.srv.stackadapt.com/br?publisher_id={{.PublisherID}}&supply_id={{.SupplyId}}" -endpointCompression: gzip -maintainer: - email: pjs@stackadapt.com -gvlVendorID: 238 -openrtb: - gpp-supported: true -capabilities: - site: - mediaTypes: - - banner - - video - - native - - audio - app: - mediaTypes: - - banner - - video - - native - - audio -userSync: - redirect: - url: "https://sync.srv.stackadapt.com/sync?nid=pbs&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "$UID" \ No newline at end of file diff --git a/static/bidder-info/streamkey.yaml b/static/bidder-info/streamkey.yaml index 463abd64be..20510ceac6 100644 --- a/static/bidder-info/streamkey.yaml +++ b/static/bidder-info/streamkey.yaml @@ -2,7 +2,6 @@ aliasOf: adtelligent endpoint: "http://ghb.hb.streamkey.net/pbs/ortb" maintainer: email: "contact@streamkey.tv" -gvlVendorID: 410 capabilities: app: mediaTypes: diff --git a/static/bidder-info/synapseHX.yaml b/static/bidder-info/synapseHX.yaml deleted file mode 100644 index 2424fd76e4..0000000000 --- a/static/bidder-info/synapseHX.yaml +++ /dev/null @@ -1,21 +0,0 @@ -endpoint: "https://rtb.hx.compasonline.com/pbs" -maintainer: - email: prebid@compas-inc.com -openrtb: - version: 2.6 -capabilities: - app: - mediaTypes: - - banner - - video - site: - mediaTypes: - - banner - - video -userSync: - redirect: - url: "https://sync.hx.compasonline.com/pbserver/image?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "${VISITOR_ID}" - iframe: - url: "https://sync.hx.compasonline.com/pbserver/iframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "${VISITOR_ID}" diff --git a/static/bidder-info/tadvertising_blis.yaml b/static/bidder-info/tadvertising_blis.yaml deleted file mode 100644 index 115a4f752b..0000000000 --- a/static/bidder-info/tadvertising_blis.yaml +++ /dev/null @@ -1,21 +0,0 @@ -endpoint: "https://prebid-blis.tads.xplosion.de/bid" -endpointCompression: gzip -geoscope: - - GLOBAL -maintainer: - email: dev@emetriq.com -gvlVendorID: 213 -modifyingVastXmlAllowed: true -openrtb: - version: 2.6 -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native \ No newline at end of file diff --git a/static/bidder-info/tagoras.yaml b/static/bidder-info/tagoras.yaml index f8f94a456d..c40aaa2a04 100644 --- a/static/bidder-info/tagoras.yaml +++ b/static/bidder-info/tagoras.yaml @@ -2,7 +2,6 @@ aliasOf: "vidazoo" endpoint: "https://exchange.tagoras.io/openrtb/" maintainer: email: "prebid@tagoras.io" -gvlVendorID: 1450 userSync: iframe: url: https://sync.tagoras.io/api/user/html/6819bdc3e6bb44545c55f843?pbs=true&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}} diff --git a/static/bidder-info/targetVideo.yaml b/static/bidder-info/targetVideo.yaml deleted file mode 100644 index decc110db3..0000000000 --- a/static/bidder-info/targetVideo.yaml +++ /dev/null @@ -1,17 +0,0 @@ -endpoint: "https://pbs.prebrid.tv/openrtb2/auction" -geoscope: - - global -maintainer: - email: "contact@target-video.com" -gvlVendorID: 786 -capabilities: - app: - mediaTypes: - - video - site: - mediaTypes: - - video -userSync: - redirect: - url: "https://pbs.prebrid.tv/user_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "[TVUID]" diff --git a/static/bidder-info/teal.yaml b/static/bidder-info/teal.yaml deleted file mode 100644 index 6f6bf74dd9..0000000000 --- a/static/bidder-info/teal.yaml +++ /dev/null @@ -1,27 +0,0 @@ -endpoint: "https://a.bids.ws/openrtb2/auction" -maintainer: - email: prebid@teal.works -gvlVendorID: 1378 -endpointCompression: gzip -modifyingVastXmlAllowed: true -geoscope: - - global -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native -userSync: - key: "teal" - iframe: - url: "https://bids.ws/load-pbs.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect_url={{.RedirectURL}}" -openrtb: - version: 2.6 - multiformat-supported: true - gpp-supported: true diff --git a/static/bidder-info/thetradedesk.yaml b/static/bidder-info/thetradedesk.yaml index 623154f593..7fe4864354 100644 --- a/static/bidder-info/thetradedesk.yaml +++ b/static/bidder-info/thetradedesk.yaml @@ -8,13 +8,11 @@ capabilities: - banner - video - native - - audio site: mediaTypes: - banner - video - native - - audio userSync: # TheTradeDesk supports user syncing, but requires configuration by the host. Contact a technical account manager # or this bidder directly at the email address in this file to ask about enabling user sync. @@ -23,5 +21,4 @@ userSync: - iframe openrtb: gpp-supported: true - version: 2.6 endpointCompression: "GZIP" diff --git a/static/bidder-info/tredio.yaml b/static/bidder-info/tredio.yaml index d4a4e6c5be..fd8ac68689 100644 --- a/static/bidder-info/tredio.yaml +++ b/static/bidder-info/tredio.yaml @@ -1,4 +1,4 @@ -endpoint: "https://tredio-prebid.attekmi.co/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +endpoint: "https://tredio-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" aliasOf: "smarthub" userSync: supports: diff --git a/static/bidder-info/trustx.yaml b/static/bidder-info/trustx.yaml index 878d1d1d23..1c60ac34c2 100644 --- a/static/bidder-info/trustx.yaml +++ b/static/bidder-info/trustx.yaml @@ -1,19 +1,9 @@ -endpoint: "https://ads.trustx.org/pbs" +aliasOf: grid maintainer: - email: "prebid@trustx.org" -capabilities: - app: - mediaTypes: - - banner - - video - site: - mediaTypes: - - banner - - video + email: "grid-tech@themediagrid.com" +gvlVendorID: 686 userSync: - iframe: - url: "https://static.cdn.trustx.org/x/user_sync.html?source=pbs&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "$UID" redirect: - url: "https://sync.trustx.org/usync-pbs?us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redirect={{.RedirectURL}}" - userMacro: "$UID" + url: "https://x.bidswitch.net/check_uuid/{{.RedirectURL}}?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}" + userMacro: "${BSW_UUID}" + \ No newline at end of file diff --git a/static/bidder-info/ttd.yaml b/static/bidder-info/ttd.yaml index 78ed8c79b5..db055e1a75 100644 --- a/static/bidder-info/ttd.yaml +++ b/static/bidder-info/ttd.yaml @@ -1,2 +1 @@ aliasOf: thetradedesk -gvlVendorID: 21 diff --git a/static/bidder-info/verben.yaml b/static/bidder-info/verben.yaml deleted file mode 100644 index a5b9cfed3d..0000000000 --- a/static/bidder-info/verben.yaml +++ /dev/null @@ -1,4 +0,0 @@ -aliasOf: "teqblaze" -endpoint: "https://east-node.verben.com/pserver" -maintainer: - email: "support_trading@verben.com" diff --git a/static/bidder-info/vimayx.yaml b/static/bidder-info/vimayx.yaml new file mode 100644 index 0000000000..567d95c8c2 --- /dev/null +++ b/static/bidder-info/vimayx.yaml @@ -0,0 +1,2 @@ +endpoint: "https://vimayx-prebid.attekmi.com/pbserver/?seat={{.AccountID}}&token={{.SourceId}}" +aliasOf: "smarthub" diff --git a/static/bidder-info/waardex_ak.yaml b/static/bidder-info/waardex_ak.yaml deleted file mode 100644 index 36dce9a134..0000000000 --- a/static/bidder-info/waardex_ak.yaml +++ /dev/null @@ -1,8 +0,0 @@ -aliasOf: adkernel -userSync: - redirect: - url: "https://sync.adkernel.com/user-sync?t=image&zone=313534&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" - userMacro: "{UID}" - iframe: - url: "https://sync.adkernel.com/user-sync?t=iframe&zone=313534&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}" - userMacro: "{UID}" \ No newline at end of file diff --git a/static/bidder-info/yahooAds.yaml b/static/bidder-info/yahooAds.yaml index 2d86a0f27a..c53d1b14e0 100644 --- a/static/bidder-info/yahooAds.yaml +++ b/static/bidder-info/yahooAds.yaml @@ -2,8 +2,6 @@ endpoint: "https://s2shb.ssp.yahoo.com/admax/bid/partners/PBS" maintainer: email: "prebid-tech-team@yahooinc.com" gvlVendorID: 25 -openrtb: - version: "2.6" capabilities: app: mediaTypes: diff --git a/static/bidder-info/yahooAdvertising.yaml b/static/bidder-info/yahooAdvertising.yaml index 68037fb68f..f9f34fbfbd 100644 --- a/static/bidder-info/yahooAdvertising.yaml +++ b/static/bidder-info/yahooAdvertising.yaml @@ -1,5 +1,4 @@ aliasOf: yahooAds -gvlVendorID: 25 userSync: # yahooAdvertising supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/yahoossp.yaml b/static/bidder-info/yahoossp.yaml index 132bef5a83..81695624df 100644 --- a/static/bidder-info/yahoossp.yaml +++ b/static/bidder-info/yahoossp.yaml @@ -1,7 +1,6 @@ aliasOf: yahooAds maintainer: email: "hb-fe-tech@oath.com" -gvlVendorID: 25 userSync: # yahoossp supports user syncing, but requires configuration by the host. contact this # bidder directly at the email address in this file to ask about enabling user sync. diff --git a/static/bidder-info/yobee.yaml b/static/bidder-info/yobee.yaml index 94023eef0b..28ce00e79d 100644 --- a/static/bidder-info/yobee.yaml +++ b/static/bidder-info/yobee.yaml @@ -1,4 +1,3 @@ aliasOf: "admatic" maintainer: - email: "adops@yobee.it" -gvlVendorID: 1281 \ No newline at end of file + email: "adops@yobee.it" \ No newline at end of file diff --git a/static/bidder-params/acuityads.json b/static/bidder-params/acuityads.json index b5ccdf67d2..bae86ad210 100644 --- a/static/bidder-params/acuityads.json +++ b/static/bidder-params/acuityads.json @@ -7,8 +7,7 @@ "host": { "type": "string", "description": "Network host to send request", - "minLength": 1, - "pattern": "^[a-zA-Z0-9.-]+(:[0-9]+)?$" + "minLength": 1 }, "accountid": { "type": "string", @@ -16,8 +15,5 @@ "minLength": 1 } }, - "required": [ - "host", - "accountid" - ] -} + "required": ["host", "accountid"] +} \ No newline at end of file diff --git a/static/bidder-params/adhese.json b/static/bidder-params/adhese.json index ac6576c81d..14234a8bd1 100644 --- a/static/bidder-params/adhese.json +++ b/static/bidder-params/adhese.json @@ -7,7 +7,6 @@ "account": { "type": "string", "minLength": 1, - "pattern": "^[a-zA-Z0-9.-]+$", "description": "Your Adhese account name. If unknown, please contact your sales rep" }, "location": { diff --git a/static/bidder-params/adocean.json b/static/bidder-params/adocean.json new file mode 100644 index 0000000000..a3c5cbc95d --- /dev/null +++ b/static/bidder-params/adocean.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "AdOcean Adapter Params", + "description": "A schema which validates params accepted by the AdOcean adapter", + "type": "object", + "properties": { + "emiter": { + "type": "string", + "description": "Deprecated, use emitterPrefix instead. AdOcean emiter", + "pattern": ".+" + }, + "emitterPrefix": { + "type": "string", + "description": "AdOcean emitter prefix", + "pattern": "^[\\w\\-]+$" + }, + "masterId": { + "type": "string", + "description": "Master's id", + "pattern": "^[\\w.]+$" + }, + "slaveId": { + "type": "string", + "description": "Slave's id", + "pattern": "^adocean[\\w.]+$" + } + }, + "oneOf": [ + { "required": ["emiter", "masterId", "slaveId"] }, + { "required": ["emitterPrefix", "masterId", "slaveId"] } + ] +} diff --git a/static/bidder-params/elementaltv.json b/static/bidder-params/adoppler.json similarity index 66% rename from static/bidder-params/elementaltv.json rename to static/bidder-params/adoppler.json index fbe36a9606..508eef478c 100644 --- a/static/bidder-params/elementaltv.json +++ b/static/bidder-params/adoppler.json @@ -1,12 +1,16 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "ElementalTV Adapter Params", - "description": "A schema which validates params accepted by the ElementalTV adapter", + "title": "Adoppler Adapter Params", + "description": "A schema which validates params accepted by the Adoppler adapter", "type": "object", "properties": { "adunit": { "type": "string", "description": "AdUnit to bid against to." + }, + "client": { + "type": "string", + "description": "Client name." } }, "required": ["adunit"] diff --git a/static/bidder-params/adot.json b/static/bidder-params/adot.json index 45caca4da8..e82b17be8d 100644 --- a/static/bidder-params/adot.json +++ b/static/bidder-params/adot.json @@ -14,8 +14,7 @@ }, "publisherPath": { "type": "string", - "enum": ["/hubvisor", "/spotx"], - "description": "An optional path used in the bid endpoint. Only '/hubvisor' and '/spotx' are allowed." + "description": "An optional path used in the bid endpoint" } }, "required": [] diff --git a/static/bidder-params/ads_interactive.json b/static/bidder-params/ads_interactive.json new file mode 100644 index 0000000000..6a750b9c18 --- /dev/null +++ b/static/bidder-params/ads_interactive.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ads Interactive Adapter Params", + "description": "A schema which validates params accepted by the Ads Interactive adapter", + "type": "object", + "properties": { + "placementId": { + "type": "string", + "minLength": 1, + "description": "Placement ID" + }, + "endpointId": { + "type": "string", + "minLength": 1, + "description": "Endpoint ID" + } + }, + "oneOf": [ + { "required": ["placementId"] }, + { "required": ["endpointId"] } + ] +} \ No newline at end of file diff --git a/static/bidder-params/adsinteractive.json b/static/bidder-params/adsinteractive.json new file mode 100644 index 0000000000..662c7362ba --- /dev/null +++ b/static/bidder-params/adsinteractive.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Adsinteractive Adapter Params", + "description": "Adsinteractive Bidder Parameter Schema", + "type": "object", + "properties": { + "adUnit": { + "type": "string", + "description": "ad unit name" + } + }, + "required": ["adUnit"] +} diff --git a/static/bidder-params/alliance_gravity.json b/static/bidder-params/alliance_gravity.json deleted file mode 100644 index 71135195ba..0000000000 --- a/static/bidder-params/alliance_gravity.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Alliance Gravity Adapter Params", - "description": "A schema which validates params accepted by the Alliance Gravity adapter", - "type": "object", - "properties": { - "srid": { - "type": "string", - "description": "Stored request ID", - "minLength": 1 - } - }, - - "required": ["srid"] -} diff --git a/static/bidder-params/beop.json b/static/bidder-params/beop.json deleted file mode 100644 index 8b34ac91f7..0000000000 --- a/static/bidder-params/beop.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "BeOp Adapter Params", - "description": "A schema which validates params accepted by the BeOp adapter", - "type": "object", - "properties": { - "pid": { - "type": "string", - "description": "Beop publisher ID" - }, - "nid": { - "type": "string", - "description": "Beop Network ID" - }, - "ntpnid": { - "type": "string", - "description": "Network partner ID" - } - }, - "oneOf": [ - { - "required": [ - "pid" - ] - }, - { - "required": [ - "nid", - "ntpnid" - ] - } - ] -} diff --git a/static/bidder-params/bidmachine.json b/static/bidder-params/bidmachine.json index 752461589a..819dc9b7e2 100644 --- a/static/bidder-params/bidmachine.json +++ b/static/bidder-params/bidmachine.json @@ -1,29 +1,28 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Bidmachine Adapter Params", - "description": "A schema which validates params accepted by the Kidoz adapter", - "type": "object", - "properties": { - "host": { - "type": "string", - "minLength": 1, - "description": "Host", - "pattern": "^[a-zA-Z0-9.-]+(:[0-9]+)?$" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Bidmachine Adapter Params", + "description": "A schema which validates params accepted by the Kidoz adapter", + "type": "object", + "properties": { + "host": { + "type": "string", + "minLength": 1, + "description": "Host" + }, + "path": { + "type": "string", + "minLength": 1, + "description": "URL path" + }, + "seller_id": { + "type": "string", + "minLength": 1, + "description": "Seller Identifier" + } }, - "path": { - "type": "string", - "minLength": 1, - "description": "URL path" - }, - "seller_id": { - "type": "string", - "minLength": 1, - "description": "Seller Identifier" - } - }, - "required": [ - "host", - "path", - "seller_id" - ] + "required": [ + "host", + "path", + "seller_id" + ] } diff --git a/static/bidder-params/teal.json b/static/bidder-params/dxkulture.json similarity index 51% rename from static/bidder-params/teal.json rename to static/bidder-params/dxkulture.json index 217dd083d3..858eefd22e 100644 --- a/static/bidder-params/teal.json +++ b/static/bidder-params/dxkulture.json @@ -1,21 +1,20 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Teal Adapter Params", - "description": "A schema which validates params accepted by the Teal adapter", + "title": "DXKulture Adapter Params", + "description": "A schema which validates params accepted by the DXKulture adapter", "type": "object", "properties": { - "account": { + "publisherId": { "type": "string", - "minLength": 1, - "description": "Account ID" + "description": "The publisher id" }, - "placement": { + "placementId": { "type": "string", - "minLength": 1, - "description": "Placement ID or name (optional)" + "description": "The placement id" } }, "required": [ - "account" + "publisherId", + "placementId" ] } diff --git a/static/bidder-params/eskimi.json b/static/bidder-params/eskimi.json deleted file mode 100644 index a69a8da81e..0000000000 --- a/static/bidder-params/eskimi.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Eskimi Adapter Params", - "description": "A schema which validates params accepted by the Eskimi adapter", - "type": "object", - "additionalProperties": false, - "properties": { - "placementId": { - "type": "integer", - "minimum": 1, - "description": "The Eskimi placement ID" - }, - "bidFloor": { - "type": "number", - "minimum": 0, - "description": "The minimum bid floor (USD unless bidFloorCur is set)" - }, - "bidFloorCur": { - "type": "string", - "description": "The currency of the bid floor" - }, - "bcat": { - "type": "array", - "items": { "type": "string" }, - "description": "Blocked IAB advertiser categories" - }, - "badv": { - "type": "array", - "items": { "type": "string" }, - "description": "Blocked advertiser domains" - }, - "bapp": { - "type": "array", - "items": { "type": "string" }, - "description": "Blocked app bundles" - }, - "battr": { - "type": "array", - "items": { "type": "integer", "minimum": 1, "maximum": 17 }, - "description": "Blocked creative attributes (OpenRTB List 5.3)" - } - }, - "required": ["placementId"] -} diff --git a/static/bidder-params/ezoic.json b/static/bidder-params/ezoic.json deleted file mode 100644 index ecd916a461..0000000000 --- a/static/bidder-params/ezoic.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ezoic Adapter Params", - "description": "A schema which validates params accepted by the Ezoic adapter", - "type": "object", - "properties": { - "placementId": { - "type": "string", - "description": "Optional placement identifier assigned during Ezoic onboarding" - } - }, - "required": [] -} diff --git a/static/bidder-params/intenze.json b/static/bidder-params/gothamads.json similarity index 84% rename from static/bidder-params/intenze.json rename to static/bidder-params/gothamads.json index 1d42a6535f..030d43eb31 100644 --- a/static/bidder-params/intenze.json +++ b/static/bidder-params/gothamads.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Intenze Adapter Params", - "description": "A schema which validates params accepted by the Intenze adapter", + "title": "Gothamads Adapter Params", + "description": "A schema which validates params accepted by the Gothamads adapter", "type": "object", "properties": { "accountId": { diff --git a/static/bidder-params/insticator.json b/static/bidder-params/insticator.json index 7e6f8d635d..358ec37f57 100644 --- a/static/bidder-params/insticator.json +++ b/static/bidder-params/insticator.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Insticator Adapter Params", "description": "A schema which validates params accepted by Insticator", - + "type": "object", "properties": { "adUnitId": { diff --git a/static/bidder-params/intertech.json b/static/bidder-params/intertech.json new file mode 100644 index 0000000000..8b1e3daa6c --- /dev/null +++ b/static/bidder-params/intertech.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Intertech Adapter Params", + "description": "A schema which validates params accepted by the Intertech adapter", + "type": "object", + "properties": { + "page_id": { + "type": "integer", + "minLength": 1, + "description": "Special Page Id provided by Intertech Manager" + }, + "imp_id": { + "type": "integer", + "minLength": 1, + "description": "Special identifier provided by Intertech Manager" + } + }, + "required": + ["page_id", + "imp_id"] +} \ No newline at end of file diff --git a/static/bidder-params/kayzen.json b/static/bidder-params/kayzen.json index 8383fac679..f2256c6b02 100644 --- a/static/bidder-params/kayzen.json +++ b/static/bidder-params/kayzen.json @@ -8,7 +8,6 @@ "zone": { "type": "string", "minLength": 1, - "pattern": "^[a-zA-Z0-9.-]+$", "description": "Zone ID" }, "exchange": { diff --git a/static/bidder-params/missena.json b/static/bidder-params/missena.json index 9e17a07f08..f06b9cf466 100644 --- a/static/bidder-params/missena.json +++ b/static/bidder-params/missena.json @@ -13,9 +13,9 @@ "type": "string", "description": "Placement Type (Sticky, Header, ...)" }, - "sample": { + "test": { "type": "string", - "description": "Sample" + "description": "Test Mode" }, "formats": { "type": "array", diff --git a/static/bidder-params/nativo.json b/static/bidder-params/nativo.json index fbe4685b55..0a8139a083 100644 --- a/static/bidder-params/nativo.json +++ b/static/bidder-params/nativo.json @@ -3,10 +3,5 @@ "title": "Nativo Adapter Params", "description": "A schema which validates params accepted by the Nativo adapter", "type": "object", - "properties": { - "placementId": { - "type": ["integer", "string"], - "description": "Placement ID" - } - } + "properties": {} } \ No newline at end of file diff --git a/static/bidder-params/pixfuture.json b/static/bidder-params/pixfuture.json deleted file mode 100644 index ffff62099a..0000000000 --- a/static/bidder-params/pixfuture.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "PixFuture Adapter Params", - "description": "A schema which validates params accepted by the PixFuture adapter", - "type": "object", - "properties": { - "pix_id": { - "type": "string", - "description": "PixFuture placement ID", - "minLength": 1 - } - }, - "required": [ - "pix_id" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/static/bidder-params/proxistore.json b/static/bidder-params/proxistore.json deleted file mode 100644 index d9360a49ce..0000000000 --- a/static/bidder-params/proxistore.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Proxistore Adapter Params", - "description": "A schema which validates params accepted by the Proxistore adapter", - "type": "object", - "properties": { - "website": { - "type": "string", - "minLength": 1, - "description": "Publisher website identifier" - }, - "language": { - "type": "string", - "minLength": 1, - "description": "Language code (e.g., 'fr', 'en')" - } - }, - "required": ["website", "language"] -} \ No newline at end of file diff --git a/static/bidder-params/rediads.json b/static/bidder-params/rediads.json index dbca954bba..85c9e545a2 100644 --- a/static/bidder-params/rediads.json +++ b/static/bidder-params/rediads.json @@ -11,8 +11,7 @@ "type": "string" }, "endpoint": { - "type": "string", - "pattern": "^[a-zA-Z0-9.-]+$" + "type": "string" } }, "required": ["account_id"] diff --git a/static/bidder-params/relevantdigital.json b/static/bidder-params/relevantdigital.json index 6c6cdca051..5f88d85fe5 100644 --- a/static/bidder-params/relevantdigital.json +++ b/static/bidder-params/relevantdigital.json @@ -1,34 +1,29 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Relevant Digital Adapter Params", - "description": "A schema which validates params accepted by the Relevant Digital adapter", - "type": "object", - "properties": { - "accountId": { - "type": "string", - "description": "An ID which identifies the Relevant Digital account ID" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Relevant Digital Adapter Params", + "description": "A schema which validates params accepted by the Relevant Digital adapter", + "type": "object", + "properties": { + "accountId": { + "type": "string", + "description": "An ID which identifies the Relevant Digital account ID" + }, + "placementId": { + "type": "string", + "description": "An ID which identifies the Relevant Digital placement ID" + }, + "pbsHost": { + "type": "string", + "description": "Prebid Server Host supplied by Relevant Digital" + }, + "pbsBufferMs": { + "type": "number", + "description": "TMax buffer, default is 250" + } }, - "placementId": { - "type": "string", - "description": "An ID which identifies the Relevant Digital placement ID" - }, - "pbsHost": { - "type": "string", - "description": "Prebid Server Host supplied by Relevant Digital", - "pattern": "^(https?://)?[a-zA-Z0-9.-]+(:[0-9]+)?$" - }, - "pbsBufferMs": { - "type": "number", - "description": "TMax buffer, default is 250" - }, - "useSourceBidderCode": { - "type": "boolean", - "description": "Use the bidder code of the actual server-side bidder in bid responses" - } - }, - "required": [ - "accountId", - "placementId", - "pbsHost" - ] + "required": [ + "accountId", + "placementId", + "pbsHost" + ] } diff --git a/static/bidder-params/resetdigital.json b/static/bidder-params/resetdigital.json index dc79816ce6..4d0538893f 100644 --- a/static/bidder-params/resetdigital.json +++ b/static/bidder-params/resetdigital.json @@ -1,15 +1,13 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "ResetDigital Adapter Params", - "description": "A schema which validates params accepted by the ResetDigital adapter", - "type": "object", - "properties": { - "placement_id": { - "type": "string", - "description": "Placement ID provided by ResetDigital", - "minLength": 1 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Reset Digital Adapter Params", + "description": "A schema which validates params accepted by the Reset Digital adapter", + "type": "object", + "properties": { + "placement_id": { + "type": "string", + "minLength": 1, + "description": "Placement ID for the Reset Digital ad unit. This is the identifier for the ad unit on the Reset Digital platform, and its optional" + } } - }, - "required": ["placement_id"], - "additionalProperties": false } diff --git a/static/bidder-params/rtbstack.json b/static/bidder-params/rtbstack.json deleted file mode 100644 index b5b90aefd0..0000000000 --- a/static/bidder-params/rtbstack.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "RTBStack Adapter Params", - "description": "A schema which validates params accepted by the RTBStack adapter", - - "type": "object", - "properties": { - "route": { - "type": "string", - "minLength": 1, - "description": "Full route URL used to derive RTBStack endpoint (contains region, client, endpoint, ssp)." - }, - "tagId": { - "type": "string", - "description": "AdUnit tag id." - }, - "customParams": { - "type": "object", - "description": "Custom values for targeting." - } - }, - - "required": ["route", "tagId"] -} \ No newline at end of file diff --git a/static/bidder-params/scalibur.json b/static/bidder-params/scalibur.json deleted file mode 100644 index 05a12e99f2..0000000000 --- a/static/bidder-params/scalibur.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Scalibur Adapter Params", - "description": "A valid BidderParams object for the Scalibur adapter", - "type": "object", - "properties": { - "placementId": { - "type": "string", - "minLength": 1 - }, - "bidfloor": { - "type": "number", - "minimum": 0 - }, - "bidfloorcur": { - "type": "string" - } - }, - "required": [ - "placementId" - ] -} diff --git a/static/bidder-params/screencore.json b/static/bidder-params/screencore.json new file mode 100644 index 0000000000..0a181b20f1 --- /dev/null +++ b/static/bidder-params/screencore.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Screencore Adapter Params", + "description": "A schema which validates params accepted by the Screencore adapter", + "type": "object", + "properties": { + "accountId": { + "type": "string", + "description": "Account id", + "minLength": 1 + }, + "placementId": { + "type": "string", + "description": "Placement id", + "minLength": 1 + } + }, + "required": [ + "accountId", + "placementId" + ] +} \ No newline at end of file diff --git a/static/bidder-params/seedtag.json b/static/bidder-params/seedtag.json index 677fb9fba2..7f361c44f9 100644 --- a/static/bidder-params/seedtag.json +++ b/static/bidder-params/seedtag.json @@ -6,26 +6,11 @@ "properties": { "adUnitId": { "type": "string", - "description": "Ad Unit ID for the placement", + "description": "Ad Unit ID", "minLength": 1 - }, - "publisherId": { - "type": "string", - "description": "Publisher group ID for RON integration", - "minLength": 1 - }, - "integrationType": { - "type": "string", - "description": "Integration type. Use 'ronId' when integrating via publisherToken", - "enum": ["ronId"] } }, - "oneOf": [ - { - "required": ["adUnitId"] - }, - { - "required": ["publisherId", "integrationType"] - } + "required": [ + "adUnitId" ] -} +} \ No newline at end of file diff --git a/static/bidder-params/smartyads.json b/static/bidder-params/smartyads.json index 7a6518b263..629fdde326 100644 --- a/static/bidder-params/smartyads.json +++ b/static/bidder-params/smartyads.json @@ -6,8 +6,7 @@ "properties": { "host": { "type": "string", - "description": "Network host to send request", - "pattern": "^[a-zA-Z0-9.-]+(:[0-9]+)?$" + "description": "Network host to send request" }, "sourceid": { "type": "string", @@ -18,9 +17,5 @@ "description": "Account id" } }, - "required": [ - "host", - "sourceid", - "accountid" - ] -} + "required": ["host", "sourceid", "accountid"] +} \ No newline at end of file diff --git a/static/bidder-params/stackadapt.json b/static/bidder-params/stackadapt.json deleted file mode 100644 index 68586ce451..0000000000 --- a/static/bidder-params/stackadapt.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "StackAdapt Adapter Params", - "description": "A schema which validates params accepted by the StackAdapt adapter", - "type": "object", - "properties": { - "publisherId": { - "type": "string", - "minLength": 1, - "description": "An ID which identifies the publisher, provided by StackAdapt" - }, - "supplyId": { - "type": "string", - "minLength": 1, - "description": "An ID which identifies the supply source, provided by StackAdapt" - }, - "placementId": { - "type": "string", - "minLength": 1, - "description": "An ID which identifies the placement" - }, - "banner": { - "type": "object", - "description": "Banner-specific parameters", - "properties": { - "expdir": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Expandable ad directions (1=left, 2=right, 3=up, 4=down, 5=fullscreen)" - } - } - }, - "bidfloor": { - "type": "number", - "minimum": 0, - "description": "Bid floor price in USD" - } - }, - "required": ["publisherId", "supplyId"] -} \ No newline at end of file diff --git a/static/bidder-params/synapseHX.json b/static/bidder-params/synapseHX.json deleted file mode 100644 index 167a0b8f07..0000000000 --- a/static/bidder-params/synapseHX.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Synapse HX Adapter Params", - "description": "A schema which validates params accepted by the Synapse HX adapter", - "type": "object", - "properties": { - "tenantId": { - "type": "string", - "description": "Synapse HX tenant identifier", - "minLength": 1 - } - }, - "required": ["tenantId"] -} diff --git a/static/bidder-params/tadvertising_blis.json b/static/bidder-params/tadvertising_blis.json deleted file mode 100644 index 1c1d893cf3..0000000000 --- a/static/bidder-params/tadvertising_blis.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "T-Advertising-Blis Adapter Params", - "description": "A schema which validates params accepted by the T-Advertising-Blis adapter", - "type": "object", - - "properties": { - "publisherId": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "description": "Unique ID of the publisher/supply partner provided by T-Advertising" - } - }, - - "required": ["publisherId"] -} \ No newline at end of file diff --git a/static/bidder-params/tappx.json b/static/bidder-params/tappx.json index f2dfe52c90..77eb4eea93 100644 --- a/static/bidder-params/tappx.json +++ b/static/bidder-params/tappx.json @@ -1,47 +1,43 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Tappx Adapter Params", - "description": "A schema which validates params accepted by the Tappx adapter", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "Tappx host (DEPRECATED - unused)" - }, - "tappxkey": { - "type": "string", - "description": "An ID which identifies the adunit" - }, - "mktag": { - "type": "string", - "description": "Minimum bid for this impression expressed in CPM (USD)" - }, - "endpoint": { - "type": "string", - "minLength": 1, - "description": "Endpoint provided to publisher" - }, - "bidfloor": { - "type": "number", - "description": "Minimum bid for this impression expressed in CPM (USD)" - }, - "bcid": { - "type": "array", - "description": "Block list of CID", - "items": { - "type": "string" - } - }, - "bcrid": { - "type": "array", - "description": "Block list of CRID", - "items": { - "type": "string" - } - } - }, - "required": [ - "tappxkey", - "endpoint" - ] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Tappx Adapter Params", + "description": "A schema which validates params accepted by the Tappx adapter", + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "Tappx host" + }, + "tappxkey": { + "type": "string", + "description": "An ID which identifies the adunit" + }, + "mktag": { + "type": "string", + "description": "Minimum bid for this impression expressed in CPM (USD)" + }, + "endpoint": { + "type": "string", + "description": "Endpoint provided to publisher" + }, + "bidfloor": { + "type": "number", + "description": "Minimum bid for this impression expressed in CPM (USD)" + }, + "bcid": { + "type": "array", + "description": "Block list of CID", + "items": { + "type": "string" + } + }, + "bcrid": { + "type": "array", + "description": "Block list of CRID", + "items": { + "type": "string" + } + } + }, + "required": ["tappxkey","endpoint"] } diff --git a/static/bidder-params/targetVideo.json b/static/bidder-params/targetVideo.json deleted file mode 100644 index 86c73b4bb7..0000000000 --- a/static/bidder-params/targetVideo.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "TargetVideo Adapter Params", - "description": "A schema which validates params accepted by the TargetVideo adapter", - "type": "object", - "properties": { - "placementId": { - "type": ["integer", "string"], - "pattern": "^\\d+$", - "description": "An ID which identifies this placement of the impression" - } - }, - "required": ["placementId"] -} diff --git a/static/bidder-params/tradplus.json b/static/bidder-params/tradplus.json index d463aa3f01..2f568bad07 100644 --- a/static/bidder-params/tradplus.json +++ b/static/bidder-params/tradplus.json @@ -11,8 +11,7 @@ }, "zoneId": { "type": "string", - "description": "Zone ID", - "pattern": "^[a-zA-Z0-9.-]*$" + "description": "Zone ID" } }, "required": [ diff --git a/static/bidder-params/trafficgate.json b/static/bidder-params/trafficgate.json index e6d8e7b793..8b7ff3bee3 100644 --- a/static/bidder-params/trafficgate.json +++ b/static/bidder-params/trafficgate.json @@ -12,16 +12,12 @@ "host": { "type": "string", "minLength": 1, - "description": "An ID which identifies the TrafficGate host", - "pattern": "^[a-zA-Z0-9.-]+(:[0-9]+)?$" + "description": "An ID which identifies the TrafficGate host" }, "customParams": { "type": "object", "description": "User-defined targeting key-value pairs." } }, - "required": [ - "placementId", - "host" - ] + "required" : [ "placementId", "host" ] } diff --git a/static/bidder-params/trustx.json b/static/bidder-params/trustx.json deleted file mode 100644 index 7560642aae..0000000000 --- a/static/bidder-params/trustx.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "TRUSTX Adapter Params", - "description": "A schema which validates params accepted by the TRUSTX adapter", - "type": "object", - "properties": { - "uid": { - "type": "integer", - "description": "The ad slot id" - }, - "keywords": { - "type": "object", - "description": "Keywords" - } - } -} diff --git a/static/bidder-params/zeroclickfraud.json b/static/bidder-params/zeroclickfraud.json index 5a306bad3e..1c5e3c633b 100644 --- a/static/bidder-params/zeroclickfraud.json +++ b/static/bidder-params/zeroclickfraud.json @@ -2,21 +2,18 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "ZeroClickFraud Adapter Params", "description": "A schema which validates params accepted by the ZeroClickFraud adapter", + "type": "object", "properties": { - "sourceId": { - "type": "integer", - "minimum": 1, - "description": "Website Source Id" - }, - "host": { - "type": "string", - "description": "Network Host to request from", - "pattern": "^[a-zA-Z0-9.-]+(:[0-9]+)?$" - } + "sourceId": { + "type": "integer", + "minimum": 1, + "description": "Website Source Id" + }, + "host": { + "type": "string", + "description": "Network Host to request from" + } }, - "required": [ - "host", - "sourceId" - ] + "required": ["host", "sourceId"] } diff --git a/stored_requests/backends/db_fetcher/fetcher.go b/stored_requests/backends/db_fetcher/fetcher.go index 13c5cb00b9..fc16ca490b 100644 --- a/stored_requests/backends/db_fetcher/fetcher.go +++ b/stored_requests/backends/db_fetcher/fetcher.go @@ -5,9 +5,9 @@ import ( "encoding/json" "github.com/lib/pq" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" ) func NewFetcher( diff --git a/stored_requests/backends/db_fetcher/fetcher_test.go b/stored_requests/backends/db_fetcher/fetcher_test.go index 1f4464bcb8..6da09abf7b 100644 --- a/stored_requests/backends/db_fetcher/fetcher_test.go +++ b/stored_requests/backends/db_fetcher/fetcher_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/DATA-DOG/go-sqlmock" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" "github.com/stretchr/testify/assert" ) diff --git a/stored_requests/backends/db_provider/db_provider.go b/stored_requests/backends/db_provider/db_provider.go index cffdee24d9..be460bc351 100644 --- a/stored_requests/backends/db_provider/db_provider.go +++ b/stored_requests/backends/db_provider/db_provider.go @@ -4,8 +4,8 @@ import ( "context" "database/sql" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" ) type DbProvider interface { diff --git a/stored_requests/backends/db_provider/db_provider_mock.go b/stored_requests/backends/db_provider/db_provider_mock.go index 37dd33f362..1b1c1ff601 100644 --- a/stored_requests/backends/db_provider/db_provider_mock.go +++ b/stored_requests/backends/db_provider/db_provider_mock.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/DATA-DOG/go-sqlmock" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) func NewDbProviderMock() (*DbProviderMock, sqlmock.Sqlmock, error) { diff --git a/stored_requests/backends/db_provider/mysql_dbprovider.go b/stored_requests/backends/db_provider/mysql_dbprovider.go index 5071156f2f..bdcfacbae8 100644 --- a/stored_requests/backends/db_provider/mysql_dbprovider.go +++ b/stored_requests/backends/db_provider/mysql_dbprovider.go @@ -15,7 +15,7 @@ import ( "strings" "github.com/go-sql-driver/mysql" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) const customTLSKey = "prebid-tls" diff --git a/stored_requests/backends/db_provider/mysql_dbprovider_test.go b/stored_requests/backends/db_provider/mysql_dbprovider_test.go index 474c36e4ef..c12d7f5abc 100644 --- a/stored_requests/backends/db_provider/mysql_dbprovider_test.go +++ b/stored_requests/backends/db_provider/mysql_dbprovider_test.go @@ -6,7 +6,7 @@ import ( "runtime" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/stored_requests/backends/db_provider/postgres_dbprovider.go b/stored_requests/backends/db_provider/postgres_dbprovider.go index e58b336e48..c94632a0f3 100644 --- a/stored_requests/backends/db_provider/postgres_dbprovider.go +++ b/stored_requests/backends/db_provider/postgres_dbprovider.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) type PostgresDbProvider struct { diff --git a/stored_requests/backends/db_provider/postgres_dbprovider_test.go b/stored_requests/backends/db_provider/postgres_dbprovider_test.go index 8fed6b87a3..1be77d0d28 100644 --- a/stored_requests/backends/db_provider/postgres_dbprovider_test.go +++ b/stored_requests/backends/db_provider/postgres_dbprovider_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" "github.com/stretchr/testify/assert" ) diff --git a/stored_requests/backends/empty_fetcher/fetcher.go b/stored_requests/backends/empty_fetcher/fetcher.go index 79de895ab6..405903e533 100644 --- a/stored_requests/backends/empty_fetcher/fetcher.go +++ b/stored_requests/backends/empty_fetcher/fetcher.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests" ) // EmptyFetcher is a nil-object which has no Stored Requests. diff --git a/stored_requests/backends/file_fetcher/fetcher.go b/stored_requests/backends/file_fetcher/fetcher.go index 615135f2db..6bb8bc1447 100644 --- a/stored_requests/backends/file_fetcher/fetcher.go +++ b/stored_requests/backends/file_fetcher/fetcher.go @@ -8,8 +8,8 @@ import ( "os" "strings" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/jsonutil" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) diff --git a/stored_requests/backends/file_fetcher/fetcher_test.go b/stored_requests/backends/file_fetcher/fetcher_test.go index 8ca38aa873..735045dd9f 100644 --- a/stored_requests/backends/file_fetcher/fetcher_test.go +++ b/stored_requests/backends/file_fetcher/fetcher_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/stored_requests/backends/http_fetcher/fetcher.go b/stored_requests/backends/http_fetcher/fetcher.go index a0e6daba5a..c28d782e01 100644 --- a/stored_requests/backends/http_fetcher/fetcher.go +++ b/stored_requests/backends/http_fetcher/fetcher.go @@ -9,9 +9,9 @@ import ( "net/url" "strings" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/util/jsonutil" "golang.org/x/net/context/ctxhttp" jsonpatch "gopkg.in/evanphx/json-patch.v5" ) @@ -119,7 +119,7 @@ func (fetcher *HttpFetcher) FetchAccounts(ctx context.Context, accountIDs []stri if len(accountIDs) == 0 { return nil, nil } - u := *fetcher.EndpointURL + u := fetcher.EndpointURL q := u.Query() if !fetcher.UseRfcCompliantBuilder { q.Set("account-ids", `["`+strings.Join(accountIDs, `","`)+`"]`) diff --git a/stored_requests/backends/http_fetcher/fetcher_test.go b/stored_requests/backends/http_fetcher/fetcher_test.go index e98032480c..9d014eaf5a 100644 --- a/stored_requests/backends/http_fetcher/fetcher_test.go +++ b/stored_requests/backends/http_fetcher/fetcher_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) @@ -241,64 +241,6 @@ func TestFetchAccountRfcCompliant(t *testing.T) { assert.JSONEq(t, `{"disabled": true, "id":"acc-1"}`, string(account), "Unexpected account data fetching existing account") } -func TestFetchAccountsDoesNotAccumulateQueryParams(t *testing.T) { - var seen [][]string - - handler := func(w http.ResponseWriter, r *http.Request) { - got := richSplit(r.URL.Query().Get("account-ids")) - seen = append(seen, got) - - // Validate and respond using existing helper - newAccountHandler(t, got, false)(w, r) - } - - server := httptest.NewServer(http.HandlerFunc(handler)) - defer server.Close() - - fetcher := NewFetcher(server.Client(), server.URL, false) - - // first fetcher call - _, errs := fetcher.FetchAccounts(context.Background(), []string{"acc-1"}) - assert.Empty(t, errs) - - // second fetcher call with different account ID - _, errs = fetcher.FetchAccounts(context.Background(), []string{"acc-2"}) - assert.Empty(t, errs) - - assert.Equal(t, 2, len(seen)) - assert.Equal(t, []string{"acc-1"}, seen[0]) - assert.Equal(t, []string{"acc-2"}, seen[1]) -} - -func TestFetchAccountsDoesNotAccumulateQueryParamsRfcCompliant(t *testing.T) { - var seen [][]string - - handler := func(w http.ResponseWriter, r *http.Request) { - got := r.URL.Query()["account-id"] - seen = append(seen, got) - - // true flag for RFC compliant - newAccountHandler(t, got, true)(w, r) - } - - server := httptest.NewServer(http.HandlerFunc(handler)) - defer server.Close() - - fetcher := NewFetcher(server.Client(), server.URL, true) - - // first fetcher call - _, errs := fetcher.FetchAccounts(context.Background(), []string{"acc-1"}) - assert.Empty(t, errs) - - // second fetcher call with different account ID - _, errs = fetcher.FetchAccounts(context.Background(), []string{"acc-2"}) - assert.Empty(t, errs) - - assert.Equal(t, 2, len(seen)) - assert.Equal(t, []string{"acc-1"}, seen[0]) - assert.Equal(t, []string{"acc-2"}, seen[1]) -} - func TestFetchAccount(t *testing.T) { fetcher, close := newTestAccountFetcher(t, []string{"acc-1"}, false) defer close() diff --git a/stored_requests/caches/cachestest/reliable.go b/stored_requests/caches/cachestest/reliable.go index abea2dbff8..f4042e28c4 100644 --- a/stored_requests/caches/cachestest/reliable.go +++ b/stored_requests/caches/cachestest/reliable.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests" ) const ( diff --git a/stored_requests/caches/memory/cache.go b/stored_requests/caches/memory/cache.go index 42d26e3e8e..bae7a7ddcf 100644 --- a/stored_requests/caches/memory/cache.go +++ b/stored_requests/caches/memory/cache.go @@ -6,8 +6,8 @@ import ( "sync" "github.com/coocood/freecache" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/stored_requests" ) // NewCache returns an in-memory Cache which evicts items if: diff --git a/stored_requests/caches/memory/cache_test.go b/stored_requests/caches/memory/cache_test.go index 26eab878e1..91548e4693 100644 --- a/stored_requests/caches/memory/cache_test.go +++ b/stored_requests/caches/memory/cache_test.go @@ -7,8 +7,8 @@ import ( "strconv" "testing" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/caches/cachestest" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/caches/cachestest" ) func TestLRURobustness(t *testing.T) { diff --git a/stored_requests/caches/memory/maps.go b/stored_requests/caches/memory/maps.go index 501dc5ccbe..adf5b2a90d 100644 --- a/stored_requests/caches/memory/maps.go +++ b/stored_requests/caches/memory/maps.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/coocood/freecache" - "github.com/prebid/prebid-server/v4/logger" + "github.com/prebid/prebid-server/v3/logger" ) // This file contains an interface and some wrapper types for various types of "map-like" structures diff --git a/stored_requests/config/config.go b/stored_requests/config/config.go index 87802589eb..5ff729cdd3 100644 --- a/stored_requests/config/config.go +++ b/stored_requests/config/config.go @@ -6,22 +6,22 @@ import ( "time" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/backends/file_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/backends/http_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/caches/memory" - "github.com/prebid/prebid-server/v4/stored_requests/caches/nil_cache" - "github.com/prebid/prebid-server/v4/stored_requests/events" - apiEvents "github.com/prebid/prebid-server/v4/stored_requests/events/api" - databaseEvents "github.com/prebid/prebid-server/v4/stored_requests/events/database" - httpEvents "github.com/prebid/prebid-server/v4/stored_requests/events/http" - "github.com/prebid/prebid-server/v4/util/task" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/backends/file_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/backends/http_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/caches/memory" + "github.com/prebid/prebid-server/v3/stored_requests/caches/nil_cache" + "github.com/prebid/prebid-server/v3/stored_requests/events" + apiEvents "github.com/prebid/prebid-server/v3/stored_requests/events/api" + databaseEvents "github.com/prebid/prebid-server/v3/stored_requests/events/database" + httpEvents "github.com/prebid/prebid-server/v3/stored_requests/events/http" + "github.com/prebid/prebid-server/v3/util/task" ) // CreateStoredRequests returns three things: diff --git a/stored_requests/config/config_test.go b/stored_requests/config/config_test.go index 913f8c3959..87b396c926 100644 --- a/stored_requests/config/config_test.go +++ b/stored_requests/config/config_test.go @@ -13,14 +13,14 @@ import ( sqlmock "github.com/DATA-DOG/go-sqlmock" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" - "github.com/prebid/prebid-server/v4/stored_requests/backends/empty_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/backends/http_fetcher" - "github.com/prebid/prebid-server/v4/stored_requests/events" - httpEvents "github.com/prebid/prebid-server/v4/stored_requests/events/http" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/stored_requests/backends/empty_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/backends/http_fetcher" + "github.com/prebid/prebid-server/v3/stored_requests/events" + httpEvents "github.com/prebid/prebid-server/v3/stored_requests/events/http" "github.com/stretchr/testify/mock" ) diff --git a/stored_requests/events/api/api.go b/stored_requests/events/api/api.go index 652399717e..c9f87e0ae7 100644 --- a/stored_requests/events/api/api.go +++ b/stored_requests/events/api/api.go @@ -5,8 +5,8 @@ import ( "net/http" "github.com/julienschmidt/httprouter" - "github.com/prebid/prebid-server/v4/stored_requests/events" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/stored_requests/events" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type eventsAPI struct { diff --git a/stored_requests/events/api/api_test.go b/stored_requests/events/api/api_test.go index 87a516f792..c5d67a9b86 100644 --- a/stored_requests/events/api/api_test.go +++ b/stored_requests/events/api/api_test.go @@ -9,9 +9,9 @@ import ( "strings" "testing" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/caches/memory" - "github.com/prebid/prebid-server/v4/stored_requests/events" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/caches/memory" + "github.com/prebid/prebid-server/v3/stored_requests/events" ) func TestGoodRequests(t *testing.T) { diff --git a/stored_requests/events/database/database.go b/stored_requests/events/database/database.go index c29bc4a855..1ab768c97c 100644 --- a/stored_requests/events/database/database.go +++ b/stored_requests/events/database/database.go @@ -8,12 +8,12 @@ import ( "net" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" - "github.com/prebid/prebid-server/v4/stored_requests/events" - "github.com/prebid/prebid-server/v4/util/timeutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/stored_requests/events" + "github.com/prebid/prebid-server/v3/util/timeutil" ) func bytesNull() []byte { diff --git a/stored_requests/events/database/database_test.go b/stored_requests/events/database/database_test.go index 0c09f376dd..ffe02851ca 100644 --- a/stored_requests/events/database/database_test.go +++ b/stored_requests/events/database/database_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests/backends/db_provider" - "github.com/prebid/prebid-server/v4/stored_requests/events" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests/backends/db_provider" + "github.com/prebid/prebid-server/v3/stored_requests/events" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/stored_requests/events/events.go b/stored_requests/events/events.go index f0d30878c9..e96692826b 100644 --- a/stored_requests/events/events.go +++ b/stored_requests/events/events.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests" ) // Save represents a bulk save diff --git a/stored_requests/events/events_test.go b/stored_requests/events/events_test.go index 9f977c8e9f..4520a33255 100644 --- a/stored_requests/events/events_test.go +++ b/stored_requests/events/events_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - "github.com/prebid/prebid-server/v4/stored_requests" - "github.com/prebid/prebid-server/v4/stored_requests/caches/memory" + "github.com/prebid/prebid-server/v3/stored_requests" + "github.com/prebid/prebid-server/v3/stored_requests/caches/memory" ) func TestListen(t *testing.T) { diff --git a/stored_requests/events/http/http.go b/stored_requests/events/http/http.go index 2765cb4aae..f987afb658 100644 --- a/stored_requests/events/http/http.go +++ b/stored_requests/events/http/http.go @@ -10,9 +10,9 @@ import ( "time" "github.com/buger/jsonparser" - "github.com/prebid/prebid-server/v4/logger" - "github.com/prebid/prebid-server/v4/stored_requests/events" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/logger" + "github.com/prebid/prebid-server/v3/stored_requests/events" + "github.com/prebid/prebid-server/v3/util/jsonutil" "golang.org/x/net/context/ctxhttp" ) diff --git a/stored_requests/events/http/http_test.go b/stored_requests/events/http/http_test.go index 9254484688..90fd61371c 100644 --- a/stored_requests/events/http/http_test.go +++ b/stored_requests/events/http/http_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" "github.com/stretchr/testify/assert" ) diff --git a/stored_requests/fetcher.go b/stored_requests/fetcher.go index 2abfb33052..343e1f82d5 100644 --- a/stored_requests/fetcher.go +++ b/stored_requests/fetcher.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/prebid/prebid-server/v4/metrics" + "github.com/prebid/prebid-server/v3/metrics" ) // Fetcher knows how to fetch Stored Request data by id. diff --git a/stored_requests/fetcher_test.go b/stored_requests/fetcher_test.go index 4481600e9d..c97340cbdb 100644 --- a/stored_requests/fetcher_test.go +++ b/stored_requests/fetcher_test.go @@ -6,8 +6,8 @@ import ( "errors" "testing" - "github.com/prebid/prebid-server/v4/metrics" - "github.com/prebid/prebid-server/v4/stored_requests/caches/nil_cache" + "github.com/prebid/prebid-server/v3/metrics" + "github.com/prebid/prebid-server/v3/stored_requests/caches/nil_cache" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/stored_responses/stored_responses.go b/stored_responses/stored_responses.go index a7a3abc4f3..6c8d4ae5f6 100644 --- a/stored_responses/stored_responses.go +++ b/stored_responses/stored_responses.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/stored_requests" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/stored_requests" ) type ImpsWithAuctionResponseIDs map[string]string diff --git a/stored_responses/stored_responses_test.go b/stored_responses/stored_responses_test.go index 09bf429a9f..0dcd5e9a6d 100644 --- a/stored_responses/stored_responses_test.go +++ b/stored_responses/stored_responses_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) diff --git a/usersync/bidderchooser.go b/usersync/bidderchooser.go index 046d5c3a19..1b01e5116e 100644 --- a/usersync/bidderchooser.go +++ b/usersync/bidderchooser.go @@ -13,7 +13,7 @@ type standardBidderChooser struct { func (c standardBidderChooser) choose(requested, available []string, cooperative Cooperative) []string { if cooperative.Enabled { - return c.chooseCooperative(requested, available, cooperative) + return c.chooseCooperative(requested, available, cooperative.PriorityGroups) } if len(requested) == 0 { @@ -23,7 +23,7 @@ func (c standardBidderChooser) choose(requested, available []string, cooperative return c.shuffledCopy(requested) } -func (c standardBidderChooser) chooseCooperative(requested, available []string, cooperative Cooperative) []string { +func (c standardBidderChooser) chooseCooperative(requested, available []string, priorityGroups [][]string) []string { // allocate enough memory for the slice to try to avoid re-allocation. the 50% overhead is a guess // at a satisfactory value. since all available bidders are included in the slice, along with // requested and prioritized bidders, expect there to be be many duplicates. the duplicate are @@ -35,14 +35,12 @@ func (c standardBidderChooser) chooseCooperative(requested, available []string, bidders = c.shuffledAppend(bidders, requested) // priority groups - for _, group := range cooperative.PriorityGroups { + for _, group := range priorityGroups { bidders = c.shuffledAppend(bidders, group) } // available - if !cooperative.PriorityGroupsOnly { - bidders = c.shuffledAppend(bidders, available) - } + bidders = c.shuffledAppend(bidders, available) return bidders } diff --git a/usersync/bidderchooser_test.go b/usersync/bidderchooser_test.go index cdf007aa3c..fe7d296f1f 100644 --- a/usersync/bidderchooser_test.go +++ b/usersync/bidderchooser_test.go @@ -62,12 +62,6 @@ func TestBidderChooserChoose(t *testing.T) { givenCooperative: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}}, expected: []string{"r2", "r1", "pr1B", "pr1A", "pr2B", "pr2A", "a2", "a1"}, }, - { - description: "Coop - PriorityGroupsOnly", - givenRequested: []string{"r1", "r2"}, - givenCooperative: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}}, PriorityGroupsOnly: true}, - expected: []string{"r2", "r1", "pr1B", "pr1A"}, - }, } for _, test := range testCases { @@ -82,64 +76,55 @@ func TestBidderChooserCooperative(t *testing.T) { shuffler := reverseShuffler{} available := []string{"a1", "a2"} - testCases := map[string]struct { - givenRequested []string - givenCoop Cooperative - expected []string + testCases := []struct { + description string + givenRequested []string + givenPriorityGroups [][]string + expected []string }{ - "nil": { - givenRequested: nil, - givenCoop: Cooperative{Enabled: true}, - expected: []string{"a2", "a1"}, - }, - "empty": { - givenRequested: []string{}, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{}}, - expected: []string{"a2", "a1"}, - }, - "requested": { - givenRequested: []string{"r1", "r2"}, - givenCoop: Cooperative{Enabled: true}, - expected: []string{"r2", "r1", "a2", "a1"}, - }, - "priority_groups_one": { - givenRequested: nil, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}}}, - expected: []string{"pr1B", "pr1A", "a2", "a1"}, + { + description: "Nil", + givenRequested: nil, + givenPriorityGroups: nil, + expected: []string{"a2", "a1"}, }, - "priority_groups_many": { - givenRequested: nil, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}}, - expected: []string{"pr1B", "pr1A", "pr2B", "pr2A", "a2", "a1"}, + { + description: "Empty", + givenRequested: []string{}, + givenPriorityGroups: [][]string{}, + expected: []string{"a2", "a1"}, }, - "requested_and_priority_groups": { - givenRequested: []string{"r1", "r2"}, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}}, - expected: []string{"r2", "r1", "pr1B", "pr1A", "pr2B", "pr2A", "a2", "a1"}, + { + description: "Requested", + givenRequested: []string{"r1", "r2"}, + givenPriorityGroups: nil, + expected: []string{"r2", "r1", "a2", "a1"}, }, - "priority_groups_only_no_remaining": { - givenRequested: []string{"r1", "r2"}, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}}, PriorityGroupsOnly: true}, - expected: []string{"r2", "r1", "pr1B", "pr1A"}, + { + description: "Priority Groups - One", + givenRequested: nil, + givenPriorityGroups: [][]string{{"pr1A", "pr1B"}}, + expected: []string{"pr1B", "pr1A", "a2", "a1"}, }, - "priority_groups_only_no_requested": { - givenRequested: nil, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}, PriorityGroupsOnly: true}, - expected: []string{"pr1B", "pr1A", "pr2B", "pr2A"}, + { + description: "Priority Groups - Many", + givenRequested: nil, + givenPriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}, + expected: []string{"pr1B", "pr1A", "pr2B", "pr2A", "a2", "a1"}, }, - "priority_groups_only_empty_groups": { - givenRequested: []string{"r1", "r2"}, - givenCoop: Cooperative{Enabled: true, PriorityGroups: [][]string{}, PriorityGroupsOnly: true}, - expected: []string{"r2", "r1"}, + { + description: "Requested + Priority Groups", + givenRequested: []string{"r1", "r2"}, + givenPriorityGroups: [][]string{{"pr1A", "pr1B"}, {"pr2A", "pr2B"}}, + expected: []string{"r2", "r1", "pr1B", "pr1A", "pr2B", "pr2A", "a2", "a1"}, }, } - for name, test := range testCases { - t.Run(name, func(t *testing.T) { - chooser := standardBidderChooser{shuffler: shuffler} - result := chooser.chooseCooperative(test.givenRequested, available, test.givenCoop) - assert.Equal(t, test.expected, result) - }) + for _, test := range testCases { + chooser := standardBidderChooser{shuffler: shuffler} + result := chooser.chooseCooperative(test.givenRequested, available, test.givenPriorityGroups) + + assert.Equal(t, test.expected, result, test.description) } } diff --git a/usersync/bidderfilter.go b/usersync/bidderfilter.go index 47a7fca646..2e4df476f2 100644 --- a/usersync/bidderfilter.go +++ b/usersync/bidderfilter.go @@ -64,21 +64,3 @@ func (f UniformBidderFilter) Allowed(bidder string) bool { func NewUniformBidderFilter(mode BidderFilterMode) BidderFilter { return UniformBidderFilter{mode: mode} } - -type CompositeFilter struct { - RequestFilter BidderFilter - AccountFilter BidderFilter -} - -func (f CompositeFilter) Allowed(bidder string) bool { - if f.RequestFilter == nil && f.AccountFilter == nil { - return true - } - if f.RequestFilter == nil { - return f.AccountFilter.Allowed(bidder) - } - if f.AccountFilter == nil { - return f.RequestFilter.Allowed(bidder) - } - return f.RequestFilter.Allowed(bidder) && f.AccountFilter.Allowed(bidder) -} diff --git a/usersync/chooser.go b/usersync/chooser.go index 88913a76cc..31a14a4d43 100644 --- a/usersync/chooser.go +++ b/usersync/chooser.go @@ -3,8 +3,8 @@ package usersync import ( "strings" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) // Chooser determines which syncers are eligible for a given request. @@ -46,9 +46,8 @@ type Request struct { // Cooperative specifies the settings for cooperative syncing for a given request, where bidders // other than those used by the publisher are considered for syncing. type Cooperative struct { - Enabled bool - PriorityGroups [][]string - PriorityGroupsOnly bool + Enabled bool + PriorityGroups [][]string } // Result specifies which bidders were included in the evaluation and which syncers were chosen. diff --git a/usersync/chooser_test.go b/usersync/chooser_test.go index 569dd0ea11..2674330c30 100644 --- a/usersync/chooser_test.go +++ b/usersync/chooser_test.go @@ -4,13 +4,13 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/prebid/prebid-server/v4/macros" + "github.com/prebid/prebid-server/v3/macros" ) func TestNewChooser(t *testing.T) { diff --git a/usersync/cookie.go b/usersync/cookie.go index deefccced1..dce5b02095 100644 --- a/usersync/cookie.go +++ b/usersync/cookie.go @@ -5,9 +5,9 @@ import ( "net/http" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) const uidCookieName = "uids" @@ -61,7 +61,7 @@ func (cookie *Cookie) PrepareCookieForWrite(cfg *config.HostCookie, encoder Enco for len(cookie.uids) > 0 { encodedCookie, err := encoder.Encode(cookie) if err != nil { - return encodedCookie, err + return encodedCookie, nil } // Convert to HTTP Cookie to Get Size diff --git a/usersync/cookie_test.go b/usersync/cookie_test.go index 07db4a8763..79193d92a6 100644 --- a/usersync/cookie_test.go +++ b/usersync/cookie_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/stretchr/testify/assert" ) @@ -533,23 +533,6 @@ func TestPrepareCookieForWrite(t *testing.T) { } } -type failingEncoder struct{} - -func (failingEncoder) Encode(*Cookie) (string, error) { - return "", errors.New("encode failed") -} - -func TestPrepareCookieForWriteEncoderError(t *testing.T) { - cookie := &Cookie{ - uids: map[string]UIDEntry{ - "adnxs": newTempId("UID", 1), - }, - } - - _, err := cookie.PrepareCookieForWrite(&config.HostCookie{}, failingEncoder{}, nil) - assert.Error(t, err) -} - func TestSyncHostCookie(t *testing.T) { testCases := []struct { name string diff --git a/usersync/decoder.go b/usersync/decoder.go index 30a0c5ceb6..d77c8d426b 100644 --- a/usersync/decoder.go +++ b/usersync/decoder.go @@ -3,7 +3,7 @@ package usersync import ( "encoding/base64" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type Decoder interface { diff --git a/usersync/encoder.go b/usersync/encoder.go index 14c71ed3b4..6a7db1fe51 100644 --- a/usersync/encoder.go +++ b/usersync/encoder.go @@ -3,7 +3,7 @@ package usersync import ( "encoding/base64" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) type Encoder interface { diff --git a/usersync/syncer.go b/usersync/syncer.go index 10ec089abb..b2fec61610 100644 --- a/usersync/syncer.go +++ b/usersync/syncer.go @@ -9,8 +9,8 @@ import ( "text/template" validator "github.com/asaskevich/govalidator" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" ) var ( @@ -39,8 +39,9 @@ type Syncer interface { // Sync represents a user sync to be performed by the user's device. type Sync struct { - URL string - Type SyncType + URL string + Type SyncType + SupportCORS bool } type standardSyncer struct { @@ -48,6 +49,7 @@ type standardSyncer struct { defaultSyncType SyncType iframe *template.Template redirect *template.Template + supportCORS bool formatOverride string } @@ -65,6 +67,7 @@ func NewSyncer(hostConfig config.UserSync, syncerConfig config.Syncer, bidder st syncer := standardSyncer{ key: syncerConfig.Key, defaultSyncType: resolveDefaultSyncType(syncerConfig), + supportCORS: syncerConfig.SupportCORS != nil && *syncerConfig.SupportCORS, formatOverride: syncerConfig.FormatOverride, } @@ -234,8 +237,9 @@ func (s standardSyncer) GetSync(syncTypes []SyncType, userSyncMacros macros.User } sync := Sync{ - URL: url, - Type: syncType, + URL: url, + Type: syncType, + SupportCORS: s.supportCORS, } return sync, nil } diff --git a/usersync/syncer_test.go b/usersync/syncer_test.go index 827dee4628..020fb26df6 100644 --- a/usersync/syncer_test.go +++ b/usersync/syncer_test.go @@ -4,13 +4,14 @@ import ( "testing" "text/template" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" "github.com/stretchr/testify/assert" ) func TestNewSyncer(t *testing.T) { var ( + supportCORS = true hostConfig = config.UserSync{ExternalURL: "http://host.com", RedirectURL: "{{.ExternalURL}}/host"} macroValues = macros.UserSyncPrivacy{GDPR: "A", GDPRConsent: "B", USPrivacy: "C"} iframeConfig = &config.SyncerEndpoint{URL: "https://bidder.com/iframe?redirect={{.RedirectURL}}"} @@ -106,6 +107,7 @@ func TestNewSyncer(t *testing.T) { for _, test := range testCases { syncerConfig := config.Syncer{ Key: test.givenKey, + SupportCORS: &supportCORS, IFrame: test.givenIFrameConfig, Redirect: test.givenRedirectConfig, ExternalURL: test.givenExternalURL, @@ -118,6 +120,7 @@ func TestNewSyncer(t *testing.T) { if assert.IsType(t, standardSyncer{}, result, test.description+":result_type") { result := result.(standardSyncer) assert.Equal(t, test.givenKey, result.key, test.description+":key") + assert.Equal(t, supportCORS, result.supportCORS, test.description+":cors") assert.Equal(t, test.expectedDefault, result.defaultSyncType, test.description+":default_sync") if test.expectedIFrame == "" { @@ -679,14 +682,14 @@ func TestSyncerGetSync(t *testing.T) { givenSyncer: standardSyncer{iframe: iframeTemplate, redirect: redirectTemplate}, givenSyncTypes: []SyncType{SyncTypeIFrame}, givenMacros: macros.UserSyncPrivacy{GDPR: "A", GDPRConsent: "B", USPrivacy: "C"}, - expectedSync: Sync{URL: "iframe,gdpr:A,gdprconsent:B,ccpa:C", Type: SyncTypeIFrame}, + expectedSync: Sync{URL: "iframe,gdpr:A,gdprconsent:B,ccpa:C", Type: SyncTypeIFrame, SupportCORS: false}, }, { description: "Redirect", givenSyncer: standardSyncer{iframe: iframeTemplate, redirect: redirectTemplate}, givenSyncTypes: []SyncType{SyncTypeRedirect}, givenMacros: macros.UserSyncPrivacy{GDPR: "A", GDPRConsent: "B", USPrivacy: "C"}, - expectedSync: Sync{URL: "redirect,gdpr:A,gdprconsent:B,ccpa:C", Type: SyncTypeRedirect}, + expectedSync: Sync{URL: "redirect,gdpr:A,gdprconsent:B,ccpa:C", Type: SyncTypeRedirect, SupportCORS: false}, }, { description: "Macro Error", diff --git a/usersync/syncersbuilder.go b/usersync/syncersbuilder.go index b8a11e66dd..2868a1da7d 100644 --- a/usersync/syncersbuilder.go +++ b/usersync/syncersbuilder.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v3/config" ) type namedSyncerConfig struct { diff --git a/usersync/syncersbuilder_test.go b/usersync/syncersbuilder_test.go index b32b741b7c..a08df08172 100644 --- a/usersync/syncersbuilder_test.go +++ b/usersync/syncersbuilder_test.go @@ -4,8 +4,8 @@ import ( "errors" "testing" - "github.com/prebid/prebid-server/v4/config" - "github.com/prebid/prebid-server/v4/macros" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/macros" "github.com/stretchr/testify/assert" ) @@ -192,6 +192,7 @@ func TestShouldCreateSyncer(t *testing.T) { var ( anySupports = []string{"iframe"} anyEndpoint = &config.SyncerEndpoint{} + anyCORS = true ) testCases := []struct { @@ -211,7 +212,7 @@ func TestShouldCreateSyncer(t *testing.T) { }, { description: "Enabled, Syncer - Fully Loaded", - given: config.BidderInfo{Disabled: false, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint}}, + given: config.BidderInfo{Disabled: false, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint, SupportCORS: &anyCORS}}, expected: true, }, { @@ -234,6 +235,11 @@ func TestShouldCreateSyncer(t *testing.T) { given: config.BidderInfo{Disabled: false, Syncer: &config.Syncer{Redirect: anyEndpoint}}, expected: true, }, + { + description: "Enabled, Syncer - Only SupportCORS", + given: config.BidderInfo{Disabled: false, Syncer: &config.Syncer{SupportCORS: &anyCORS}}, + expected: true, + }, { description: "Disabled, No Syncer", given: config.BidderInfo{Disabled: true, Syncer: nil}, @@ -246,7 +252,7 @@ func TestShouldCreateSyncer(t *testing.T) { }, { description: "Disabled, Syncer - Fully Loaded", - given: config.BidderInfo{Disabled: true, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint}}, + given: config.BidderInfo{Disabled: true, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint, SupportCORS: &anyCORS}}, expected: false, }, { @@ -269,6 +275,11 @@ func TestShouldCreateSyncer(t *testing.T) { given: config.BidderInfo{Disabled: true, Syncer: &config.Syncer{Redirect: anyEndpoint}}, expected: false, }, + { + description: "Disabled, Syncer - Only SupportCORS", + given: config.BidderInfo{Disabled: true, Syncer: &config.Syncer{SupportCORS: &anyCORS}}, + expected: false, + }, { description: "WhiteLabelOnly, No Syncer", given: config.BidderInfo{WhiteLabelOnly: true, Syncer: nil}, @@ -281,7 +292,7 @@ func TestShouldCreateSyncer(t *testing.T) { }, { description: "WhiteLabelOnly, Syncer - Fully Loaded", - given: config.BidderInfo{WhiteLabelOnly: true, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint}}, + given: config.BidderInfo{WhiteLabelOnly: true, Syncer: &config.Syncer{Key: "anyKey", Supports: anySupports, IFrame: anyEndpoint, Redirect: anyEndpoint, SupportCORS: &anyCORS}}, expected: false, }, } diff --git a/util/httputil/httputil.go b/util/httputil/httputil.go index 3cf80b8c77..dd09cdadf4 100644 --- a/util/httputil/httputil.go +++ b/util/httputil/httputil.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/util/iputil" ) var ( diff --git a/util/httputil/httputil_test.go b/util/httputil/httputil_test.go index f8b9ba5440..2b2f52e5c5 100644 --- a/util/httputil/httputil_test.go +++ b/util/httputil/httputil_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/prebid/prebid-server/v4/util/iputil" + "github.com/prebid/prebid-server/v3/util/iputil" "github.com/stretchr/testify/assert" ) diff --git a/util/jsonutil/forcestring.go b/util/jsonutil/forcestring.go index e16d85683d..64ce2a6795 100644 --- a/util/jsonutil/forcestring.go +++ b/util/jsonutil/forcestring.go @@ -3,7 +3,7 @@ package jsonutil import ( "errors" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/tidwall/gjson" ) diff --git a/util/jsonutil/forcestring_test.go b/util/jsonutil/forcestring_test.go index 3fc1cb6803..60f87fafa4 100644 --- a/util/jsonutil/forcestring_test.go +++ b/util/jsonutil/forcestring_test.go @@ -3,7 +3,7 @@ package jsonutil import ( "testing" - "github.com/prebid/prebid-server/v4/util/ptrutil" + "github.com/prebid/prebid-server/v3/util/ptrutil" "github.com/stretchr/testify/assert" ) diff --git a/util/jsonutil/jsonutil.go b/util/jsonutil/jsonutil.go index da9027c1df..2598044ff7 100644 --- a/util/jsonutil/jsonutil.go +++ b/util/jsonutil/jsonutil.go @@ -9,7 +9,7 @@ import ( jsoniter "github.com/json-iterator/go" "github.com/modern-go/reflect2" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) const ( diff --git a/util/jsonutil/merge.go b/util/jsonutil/merge.go index 9e530a5464..6dff8afca6 100644 --- a/util/jsonutil/merge.go +++ b/util/jsonutil/merge.go @@ -10,7 +10,7 @@ import ( "github.com/modern-go/reflect2" jsonpatch "gopkg.in/evanphx/json-patch.v5" - "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v3/errortypes" ) // jsonConfigMergeClone uses the same configuration as the `ConfigCompatibleWithStandardLibrary` profile diff --git a/util/task/ticker_task_test.go b/util/task/ticker_task_test.go index 774febd6c8..b1acb35ffa 100644 --- a/util/task/ticker_task_test.go +++ b/util/task/ticker_task_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/prebid/prebid-server/v4/util/task" + "github.com/prebid/prebid-server/v3/util/task" "github.com/stretchr/testify/assert" ) diff --git a/util/urlutil/security.go b/util/urlutil/security.go deleted file mode 100644 index 51b9b5a6b9..0000000000 --- a/util/urlutil/security.go +++ /dev/null @@ -1,12 +0,0 @@ -package urlutil - -import "regexp" - -var safeHostPattern = regexp.MustCompile(`^[a-zA-Z0-9.-]+(:[0-9]+)?$`) - -// IsSafeHost returns true for bare hostnames with an optional port. -// It intentionally rejects URL control characters such as '/', '?', '#', and '@' -// so user-supplied host values cannot rewrite the outbound request URL. -func IsSafeHost(host string) bool { - return safeHostPattern.MatchString(host) -} diff --git a/util/urlutil/security_test.go b/util/urlutil/security_test.go deleted file mode 100644 index d974f7cfa2..0000000000 --- a/util/urlutil/security_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package urlutil - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestIsSafeHost(t *testing.T) { - testCases := []struct { - name string - host string - want bool - }{ - { - name: "hostname", - host: "example.com", - want: true, - }, - { - name: "subdomain", - host: "api-us", - want: true, - }, - { - name: "hostname with port", - host: "example.com:8080", - want: true, - }, - { - name: "empty", - host: "", - want: false, - }, - { - name: "path injection", - host: "127.0.0.1:6060/debug/pprof", - want: false, - }, - { - name: "fragment injection", - host: "127.0.0.1:6060#", - want: false, - }, - { - name: "query injection", - host: "example.com?x=1", - want: false, - }, - { - name: "userinfo injection", - host: "example.com@127.0.0.1", - want: false, - }, - { - name: "scheme injection", - host: "http://127.0.0.1", - want: false, - }, - } - - for _, test := range testCases { - t.Run(test.name, func(t *testing.T) { - result := IsSafeHost(test.host) - assert.Equal(t, test.want, result) - }) - } -} diff --git a/version/xprebidheader.go b/version/xprebidheader.go index 056246474c..7e31aa4b11 100644 --- a/version/xprebidheader.go +++ b/version/xprebidheader.go @@ -5,7 +5,7 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v3/openrtb_ext" ) const xPrebidHeaderVersionPrefix = "pbs-go" diff --git a/version/xprebidheader_test.go b/version/xprebidheader_test.go index 0e74584c7e..15a73fe98f 100644 --- a/version/xprebidheader_test.go +++ b/version/xprebidheader_test.go @@ -6,8 +6,8 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/stretchr/testify/assert" - "github.com/prebid/prebid-server/v4/openrtb_ext" - "github.com/prebid/prebid-server/v4/util/jsonutil" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" ) func TestBuildXPrebidHeader(t *testing.T) {