Skip to content
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

Imp FPD: Skip bidder params and native validation #3720

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

bsardo
Copy link
Collaborator

@bsardo bsardo commented Jun 4, 2024

This PR is part of #2335. It allows the imp validation logic used to both validate an incoming request and revalidate imps after merging FPD to be executed while skipping the expensive bidder params and native string validation.

Note that it does not make sense to defined bidder params as imp first party data since any param that you can define there can and should instead be defined in imp[n].ext.prebid.bidder.BIDDERNAME.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test has the required bidder param placementId for appnexus but it is an invalid type. It also has an empty native string which is invalid. Neither of these cause an error because the corresponding validation rules are skipped when running the after imp FPD merge validations.

@@ -0,0 +1,38 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test verifies that when the validation logic is run on a parsed incoming request, the bidder param validation rules are correctly being run since this test shows that an invalid bidder param results in a 400.

Note that we already have ./endpoints/openrtb2/sample-requests/invalid-whole/native-empty.json which verifies the native validation rules are correctly run since that test shows that an invalid empty native string results in a 400.

Copy link
Collaborator

@hhhjort hhhjort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bsardo bsardo merged commit 32fdbc4 into prebid:master Jun 5, 2024
3 checks passed
mefjush pushed a commit to adhese/prebid-server that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants