Uh oh!
There was an error while loading. Please reload this page.
Document device field on sponsored listings auction - #204
Merged
Conversation
The /v2/auctions handler already parses, validates and defaults `device` for every auction type, but the spec only documented it on banners. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
elprimoa
approved these changes
Aug 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
devicewas only documented onBannersAuction, but the/v2/auctionshandler parses it for every auction type in the batch — it unmarshals all requests into one shared struct and handles device with no gating ontype(api_auctions.go:250-260): validates againstdesktop|mobile, rejects anything else withInvalidDevice, and defaults empty tots.DeviceDefault(desktop), matching the existingdefault: desktopon theDeviceschema.So listings callers can already send
deviceand have it honored — the spec just didn't say so. This adds the existingDevice$reftoSponsoredListingsAuction, positioned beforegeoTargetingto mirrorBannersAuction. Optional, no new schema, no behavior change.Not included: sponsored brand.
/v2/auctions/sponsored-brandis a separate handler andSingleSponsoredBrandAuctionRequesthas noDevicefield at all, so documenting it there would advertise a field the engine silently drops. That needs engine work first — happy to file an issue if useful.How to test
Spec-only change. Verified locally against every check in
.github/workflows/lint-tools.yml:prettier --check— cleanredocly lint --extends recommended-strict— validyamllint— cleantypos— cleanvacuum lint -d -e -b— 95/100 [A], 0 errors; byte-identical to themainbaseline (8 warnings / 23 informs before and after)