Skip to content

Document device field on sponsored listings auction - #204

Merged
jilanglois merged 1 commit into
mainfrom
docs/device-on-listings
Aug 13, 2026
Merged

Document device field on sponsored listings auction#204
jilanglois merged 1 commit into
mainfrom
docs/device-on-listings

Conversation

@jilanglois

Copy link
Copy Markdown
Contributor

What

device was only documented on BannersAuction, but the /v2/auctions handler parses it for every auction type in the batch — it unmarshals all requests into one shared struct and handles device with no gating on type (api_auctions.go:250-260): validates against desktop|mobile, rejects anything else with InvalidDevice, and defaults empty to ts.DeviceDefault (desktop), matching the existing default: desktop on the Device schema.

So listings callers can already send device and have it honored — the spec just didn't say so. This adds the existing Device$ref to SponsoredListingsAuction, positioned before geoTargeting to mirror BannersAuction. Optional, no new schema, no behavior change.

Not included: sponsored brand./v2/auctions/sponsored-brand is a separate handler and SingleSponsoredBrandAuctionRequest has no Device field 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 — clean
  • redocly lint --extends recommended-strict — valid
  • yamllint — clean
  • typos — clean
  • vacuum lint -d -e -b — 95/100 [A], 0 errors; byte-identical to the main baseline (8 warnings / 23 informs before and after)

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>
@jilanglois
jilanglois requested a review from a team as a code ownerAugust 13, 2026 14:49
@jilanglois
jilanglois requested a review from celzoAugust 13, 2026 14:52
@jilanglois
jilanglois enabled auto-merge (squash) August 13, 2026 14:52
@jilanglois
jilanglois merged commit 9916259 into mainAug 13, 2026
7 checks passed
@jilanglois
jilanglois deleted the docs/device-on-listings branch August 13, 2026 15:20
Sign up for freeto 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.

2 participants

@jilanglois@elprimoa