Skip to content

Commit 669d7bd

Browse files
authored
VISX: Add string support to UID (#2501)
1 parent 82c03b0 commit 669d7bd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

adapters/visx/params_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package visx
22

33
import (
44
"encoding/json"
5-
"github.com/prebid/prebid-server/openrtb_ext"
65
"testing"
6+
7+
"github.com/prebid/prebid-server/openrtb_ext"
78
)
89

910
func TestValidParams(t *testing.T) {
@@ -34,6 +35,7 @@ func TestInvalidParams(t *testing.T) {
3435

3536
var validParams = []string{
3637
`{"uid":13245}`,
38+
`{"uid":"13245"}`,
3739
`{"uid":13245, "size": [10,5]}`,
3840
`{"uid":13245, "other_optional": true}`,
3941
}
@@ -47,7 +49,10 @@ var invalidParams = []string{
4749
`2`,
4850
`{"size":12345678}`,
4951
`{"size":""}`,
50-
`{"uid": "1"}`,
52+
`{"uid": "-1"}`,
53+
`{"uid": "232af"}`,
54+
`{"uid": "af213"}`,
55+
`{"uid": "af"}`,
5156
`{"size": true}`,
5257
`{"uid": true, "size":"1234567"}`,
5358
}

static/bidder-params/visx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"type": "object",
66
"properties": {
77
"uid": {
8-
"type": "integer",
8+
"type": ["integer", "string"],
9+
"pattern": "^\\d+$",
910
"description": "An ID which identifies this placement of the impression"
1011
},
1112
"size": {

0 commit comments

Comments
 (0)