-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Required some size to exist on banner requests (#646)
* Required some size to exist on banner requests. * Added more tests. Fixed the code a bit.
- Loading branch information
Showing
6 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
endpoints/openrtb2/sample-requests/invalid-whole/banner-h-only.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"message": "Invalid request: request.imp[0].banner has no sizes. Define \"w\" and \"h\", or include \"format\" elements.\n", | ||
"requestPayload": { | ||
"id":"req-id", | ||
"site": { | ||
"id": "some-site" | ||
}, | ||
"imp": [ | ||
{ | ||
"id":"imp-id", | ||
"banner":{ | ||
"h": 300 | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
endpoints/openrtb2/sample-requests/invalid-whole/banner-h-zero.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"message": "Invalid request: request.imp[0].banner has no sizes. Define \"w\" and \"h\", or include \"format\" elements.\n", | ||
"requestPayload": { | ||
"id":"req-id", | ||
"site": { | ||
"id": "some-site" | ||
}, | ||
"imp": [ | ||
{ | ||
"id":"imp-id", | ||
"banner":{ | ||
"h": 0, | ||
"w": 250 | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
endpoints/openrtb2/sample-requests/invalid-whole/banner-w-only.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"message": "Invalid request: request.imp[0].banner has no sizes. Define \"w\" and \"h\", or include \"format\" elements.\n", | ||
"requestPayload": { | ||
"id":"req-id", | ||
"site": { | ||
"id": "some-site" | ||
}, | ||
"imp": [ | ||
{ | ||
"id":"imp-id", | ||
"banner":{ | ||
"w": 50 | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
endpoints/openrtb2/sample-requests/invalid-whole/banner-w-zero.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"message": "Invalid request: request.imp[0].banner has no sizes. Define \"w\" and \"h\", or include \"format\" elements.\n", | ||
"requestPayload": { | ||
"id":"req-id", | ||
"site": { | ||
"id": "some-site" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "imp-id", | ||
"banner": { | ||
"h": 300, | ||
"w": 0 | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 10433394 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
16 changes: 12 additions & 4 deletions
16
endpoints/openrtb2/sample-requests/invalid-whole/format-empty-array.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters