feat(schema): add object-form timing union to start_time/end_time (create_media_buy / update_media_buy)#4403
Draft
bokelley wants to merge 2 commits into
Draft
feat(schema): add object-form timing union to start_time/end_time (create_media_buy / update_media_buy)#4403bokelley wants to merge 2 commits into
bokelley wants to merge 2 commits into
Conversation
…create_media_buy and update_media_buy
Production (v3.2.4) already accepts {"type":"asap"} and {"type":"scheduled","time":"..."} object forms
alongside legacy ISO 8601 strings for start_time (since Wave 23.9) and end_time (since Wave 23.20).
The JSON schemas were not updated. This commit brings schemas in sync.
- core/start-timing.json: extended from 2 string variants to 4 (adds asap and scheduled object forms)
- core/end-timing.json (new): ISO 8601 string + scheduled object form; asap variant intentionally absent
- create-media-buy-request.json, update-media-buy-request.json: end_time changed from inline string to $ref end-timing.json
- index.json: register end-timing.json; update start-timing description
Normalization contract: sellers MUST resolve object-form timing to ISO 8601 before storing;
get_media_buys responses return the resolved string form.
Non-breaking: all previously-valid string values continue to validate (additive only).
Refs #4400
https://claude.ai/code/session_01Ku28c7vQReEY8FY2iHFcCW
Updates the `visibility: "public"` requirement description from `primary_brand_domain` to "verified primary domain on the organization (set via the Linked Domains UI)" to match the current UI flow. https://claude.ai/code/session_01Ku28c7vQReEY8FY2iHFcCW
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 free
to 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.
Refs #4400
Production (v3.2.4, master de58207) already accepts
{"type":"asap"}and{"type":"scheduled","time":"..."}object forms alongside legacy ISO 8601 strings forstart_time(since Wave 23.9) andend_time(since Wave 23.20). The JSON schemas were not updated at the time. This PR brings the schemas in sync with production behavior so seller implementers reading the spec don't hit the same asymmetry the reporter did.Changes:
core/start-timing.json— extended from 2 string variants to 4: adds{"type":"asap"}and{"type":"scheduled","time":"..."}object forms alongside the existing"asap"string and ISO 8601 string (legacy forms preserved).core/end-timing.json(new) — two variants: ISO 8601 string (legacy) +{"type":"scheduled","time":"..."}object form. Theasapvariant is intentionally absent — end_time must be a determinate future point for billing and pacing to close correctly (per protocol-expert and product-expert review; "asap" end has no defined semantics in any major ad platform).create-media-buy-request.json,update-media-buy-request.json—end_timechanged from inlinetype:stringto$ref: /schemas/core/end-timing.json.index.json—end-timing.jsonregistered;start-timingdescription updated.Normalization contract: Sellers MUST resolve object-form timing to an ISO 8601 datetime before storing.
get_media_buysresponses return the resolved string form (response schemas unchanged — this is an input-only widening).Non-breaking justification: All previously-valid string values continue to validate under both updated schemas. The change is purely additive (new accepted
oneOfbranches; no existing branch removed, renamed, or tightened). Changeset:minor.Known follow-on (out of scope for this PR): Package-level
start_time/end_timeinpackage-request.jsonandpackage-update.jsoncarry the same schema gap (plaintype:string). If production also accepts object-form timing at the package level, a follow-up PR should extend those schemas consistently. Filed as a nit in the pre-PR review.Pre-PR review:
additionalProperties: falseper variant is correct; asap exclusion from end-timing is correct per GAM/TTD/DV360 precedent; index registration blocker fixed; minor changeset classification confirmed correctSession: https://claude.ai/code/session_01Ku28c7vQReEY8FY2iHFcCW
Generated by Claude Code