-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PulsePoint: Marking cp/ct params to be either String or Int #3677
Changes from 4 commits
3730923
929b96b
e732c3f
4539af1
394b0da
0a2a52c
f4c20f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "request-id", | ||
"site": { | ||
"page": "http://publisher.com/index.html", | ||
"publisher": { | ||
"id": "123456789", | ||
"name": "publisher.com" | ||
} | ||
}, | ||
"imp": [{ | ||
"id": "banner-1", | ||
"banner": { | ||
"w": 320, | ||
"h": 50 | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cp": "1234", | ||
"ct": "1001" | ||
} | ||
} | ||
}] | ||
}, | ||
"httpCalls": [{ | ||
"expectedRequest": { | ||
"headers": { | ||
"Content-Type": [ | ||
"application/json;charset=utf-8" | ||
], | ||
"Accept": [ | ||
"application/json" | ||
] | ||
}, | ||
"uri": "http://bidder.pulsepoint.com", | ||
"body": { | ||
"id": "request-id", | ||
"site": { | ||
"page": "http://publisher.com/index.html", | ||
"publisher": { | ||
"id": "1234", | ||
"name": "publisher.com" | ||
} | ||
}, | ||
"imp": [{ | ||
"id": "banner-1", | ||
"tagid": "1001", | ||
"banner": { | ||
"w": 320, | ||
"h": 50 | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cp": "1234", | ||
"ct": "1001" | ||
} | ||
} | ||
}] | ||
}, | ||
"impIDs":["banner-1"] | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "response-id", | ||
"seatbid": [{ | ||
"bid": [{ | ||
"id": "banner-1-bid", | ||
"impid": "banner-1", | ||
"price": 3.5, | ||
"adm": "<div>Creative</div>", | ||
"adomain": [ | ||
"advertiser.com" | ||
], | ||
"crid": "20", | ||
"w": 300, | ||
"h": 250 | ||
}], | ||
"seat": "pulsepoint-seat" | ||
}], | ||
"cur": "USD" | ||
} | ||
} | ||
}], | ||
"expectedBidResponses": [{ | ||
"bids": [{ | ||
"bid": { | ||
"id": "banner-1-bid", | ||
"impid": "banner-1", | ||
"price": 3.5, | ||
"adm": "<div>Creative</div>", | ||
"adomain": [ | ||
"advertiser.com" | ||
], | ||
"crid": "20", | ||
"w": 300, | ||
"h": 250 | ||
}, | ||
"type": "banner" | ||
}] | ||
}] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "request-id", | ||
"site": { | ||
"page": "http://publisher.com/index.html", | ||
"publisher": { | ||
"id": "123456789", | ||
"name": "publisher.com" | ||
} | ||
}, | ||
"imp": [{ | ||
"id": "banner-1", | ||
"banner": { | ||
"w": 320, | ||
"h": 50 | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cp": "1234" | ||
} | ||
} | ||
}] | ||
}, | ||
"httpCalls": [], | ||
"expectedMakeRequestsErrors": [{ | ||
"value": "param not found - tagID", | ||
"comparison": "literal" | ||
}], | ||
"expectedBidResponses": [], | ||
"expectedMakeBidsErrors": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,17 @@ | |
"type": "object", | ||
"properties": { | ||
"cp": { | ||
"type": "integer", | ||
"type": [ | ||
"integer", | ||
"string" | ||
], | ||
"description": "An ID which identifies the publisher selling the impression" | ||
}, | ||
"ct": { | ||
"type": "integer", | ||
"type": [ | ||
"integer", | ||
"string" | ||
], | ||
Comment on lines
+8
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @anand-venkatraman could you add JSON test where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @anand-venkatraman requesting to address above comment ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry for the delay, i have added a few tests cases to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @anand-venkatraman thanks for adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addressed in commit 4539af1
onkarvhanumante marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": "An ID which identifies the ad slot being sold" | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PubID and TagID are expected to be int or string.
However
interface{}
will allow int, string and any other valuesShould use
StringInt
typeprebid-server/util/jsonutil/stringInt.go
Lines 1 to 29 in a1f48b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated params to use
StringInt
instead ofinterface{}