prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
403 stars 700 forks source link

Move imp validation into ortb package #3685

Closed bsardo closed 1 month ago

bsardo commented 1 month ago

This PR begins the process of moving all of the validation logic out of the endpoints/openrtb2 package and into the ortb package. A request validator object is instantiated in the router and then injected into the auction, video and amp endpoints where it is available for use to validate imps initially.

The driver of this change is that we want to be able to leverage the existing imp validation logic after we have merged imp first party data. In this case, validation needs to be re-run on impressions only.

As part of this process, additional unit tests were added for imp banner, video, audio and pmp, though native and ext are not complete. We do have code coverage for these though through our E2E endpoint tests.