Skip to content

UOE-12550 Adding placementid support for Nativo #1102

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

Closed
wants to merge 2 commits into from
Closed

Conversation

pm-isha-bharti
Copy link
Collaborator

@pm-isha-bharti pm-isha-bharti commented Jun 17, 2025

No description provided.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, cc876eb

nativo

Refer here for heat map coverage report

github.com/PubMatic-OpenWrap/prebid-server/v3/adapters/nativo/nativo.go:27:	Builder			100.0%
github.com/PubMatic-OpenWrap/prebid-server/v3/adapters/nativo/nativo.go:34:	MakeRequests		83.3%
github.com/PubMatic-OpenWrap/prebid-server/v3/adapters/nativo/nativo.go:80:	MakeBids		94.4%
github.com/PubMatic-OpenWrap/prebid-server/v3/adapters/nativo/nativo.go:117:	getMediaTypeForImp	100.0%
total:										(statements)		91.5%

}

if ext.Bidder.PlacementId != "" {
impExt := impExtNativo{
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pm-isha-bharti I think no need to redefine impExt in each loop unless you're adding multiple fields conditionally.
we can update to :

if ext.Bidder.PlacementId == "" {
continue
}

impExtJSON, err := json.Marshal(impExtNativo{
	Nativo: openrtb_ext.ImpExtNativo{
		PlacementId: ext.Bidder.PlacementId,
	},
})
if err != nil {
	return nil, []error{err}
}

imp.Ext = impExtJSON

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