Update docs to reflect that native asset's ID field is optional #2449
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses prebid/prebid-server#1517
Currently the documentation says that native asset object's ID is not to be defined in the request. However, both Prebid Server Go and Prebid Server Java treat this as an optional field such that if the asset's ID isn't provided in the request, it assigns it based on the asset's index value in the array of assets. This behavior makes sense because if the request is requesting two types of data assets such as
sponsored
(type:1
) anddesc
(type:2
), and if the assets in the response don't have the types set (Based on the openrtb native spec thetype
field in the data asset response object is optional) then there's no way for the Publisher to know which data asset is of which type. Therefore, updating the documentation to reflect this behavior.Ref to Prebid Server Go: https://github.com/prebid/prebid-server/blob/7b50f96df28dfcecfdfce97f62b13b79596a40ea/endpoints/openrtb2/auction.go#L575-L588
Ref to Prebid Server Java: https://github.com/rubicon-project/prebid-server-java/blob/05a5b119ede5ed404289794d50b201706cd8b45a/src/main/java/org/prebid/server/validation/RequestValidator.java#L577