OpenProposal 3.0 JSON Schema Unofficial

Decision records · Value formats

D-019 What is the option type of each selectable or settable field whose options the specification describes only in prose?

Gap Decision 9 on the supporting page of #121. Cited on main and with the open PRs.

What the schemas do

- A format ID is written <channel>/<format>, as the row namespaces it by channel, with neither part empty. - Geo codes and device categories are codes that other lists define, carried as written. Each field's description names its list. - A daypart option is a time window { days[], start, end }, as Google Ad Manager writes a day part. - Cancellation rights and exclusivity terms are open objects. - production's inline object is its option. - shortfall_remedy takes its listed remedies.

Options

  • as-listed Chosen

    - A format ID is written <channel>/<format>, as the row namespaces it by channel, with neither part empty. - Geo codes and device categories are codes that other lists define, carried as written. Each field's description names its list. - A daypart option is a time window { days[], start, end }, as Google Ad Manager writes a day part. - Cancellation rights and exclusivity terms are open objects. - production's inline object is its option. - shortfall_remedy takes its listed remedies.

  • ids

    Format IDs, geo codes, and device categories are opaque IDs, and daypart time windows are open objects.

  • open-options

    Every such option is an open object.

Why

Selectable and Settable can't be copied without their option type. The row states a format ID's form: "registry format ids namespaced by channel", written display/300x250 and audio/host-read-30s. A namespace is a prefix, so a format ID holds a channel and a format, joined by the / the row writes, and 300x250 alone isn't one. That constraint comes from the row's text, not from the example files, and it validates differently from any other ID, so a format ID is a FormatId, with the pattern <channel>/<format>. The text says nothing about what each part holds, so the schema takes the least it can: neither part is empty or holds a /, a space, or a control character. Every format ID the text or an example writes has that form: available[], a property's supported_formats, and an asset's format_ref. Geo codes and device categories are codes from lists that other systems keep, and a receiver compares each as written, the way it compares any ID another system defines, so each is an ExternalId, and the field's description says which list it comes from. They come from lists the specification doesn't name: the examples write ISO 3166-1 alpha-3 codes and ISO 3166-2 codes for geo, so no one code list fits, and the text states no form for either. A geo bound and a device bound are then copies of one application, Settable<ExternalId>, each named after its field. A daypart option is a time window, which follows the ad server convention (D-004). Cancellation rights and exclusivity terms have no members anywhere in the specification, so each is an open object (D-016), named as type rules § 7 names an option: CancellationPolicyOption and ExclusivityOption. production's object { custom_unit, build_owner, lead_time, cost } follows "available[] of build options", so it is the option, named ProductionOption. shortfall_remedy takes makegood, credit, and none; the prose adds remedy_terms beside them, which has no type and no place in the selectable structure, so the model leaves it out.

What we ask the specification to state

Give each selectable and settable field its option type:

  • The formats row namespaces a format ID by channel, as display/300x250. State that grammar as <channel>/<format>, and say what a channel and a format may hold. Then 300x250 alone is rejected everywhere a format ID appears: formats, a property's supported_formats, and an asset's format_ref.
  • Name the code lists for geo and device, and define a cancellation right and an exclusivity term.
  • Say where remedy_terms goes and what it holds.

The specification lines it rests on

Each line is quoted as the record pins it. Expand an item to read the quote.

main

  • § 5.4, the formats row L242 at 44dfaaf
    formats | Object | selectable | available[] of registry format ids namespaced by channel (display/300x250, audio/host-read-30s), included[], pricing, max_select
  • § 5.4, the production row L249 at 44dfaaf
    production | Object | selectable | Custom units. available[] of build options with pricing and lead_time; { custom_unit, build_owner, lead_time, cost }
  • § 5.5, the geo row L258 at 44dfaaf
    geo | Object | settable | allowed[] of geo codes the buyer may select within
  • § 5.5, the device row L259 at 44dfaaf
    device | Object | settable | allowed[] of device categories
  • § 5.5, the daypart row L260 at 44dfaaf
    daypart | Object | settable | allowed[] of time windows
  • § 5.6, the cancellation_policy row L280 at 44dfaaf
    cancellation_policy | Object | selectable | available[] of cancellation rights with pricing per option
  • § 5.6, the exclusivity row L281 at 44dfaaf
    exclusivity | Object | selectable | available[] of exclusivity terms with pricing
  • § 5.7, the shortfall_remedy row L322 at 44dfaaf
    shortfall_remedy | Object | selectable | available[] from makegood | credit | none, plus remedy_terms
  • § 5.4, the production row's description: the inline object L249 at 44dfaaf
    { custom_unit, build_owner, lead_time, cost }

With the open PRs

  • § 5.4, the formats row L235 on main at 981a74e
    formats | Object | selectable | available[] of registry format ids namespaced by channel (display/300x250, audio/host-read-30s), included[], pricing, max_select
  • § 5.4, the production row L242 on main at 981a74e
    production | Object | selectable | Custom units. available[] of build options with pricing and lead_time; { custom_unit, build_owner, lead_time, cost }
  • § 5.5, the geo row L260 in #72
    geo | Object | selectable | available[] of geo codes with included[], pricing deltas and max_select (§ 3.1), for a line item priced by market. A geo that declares only allowed[] is settable. See below
  • § 5.5, the device row L252 on main at 981a74e
    device | Object | settable | allowed[] of device categories
  • § 5.6, the cancellation_policy row L273 on main at 981a74e
    cancellation_policy | Object | selectable | available[] of cancellation rights with pricing per option
  • § 5.6, the exclusivity row L274 on main at 981a74e
    exclusivity | Object | selectable | available[] of exclusivity terms with pricing
  • § 5.7, the shortfall_remedy row L315 on main at 981a74e
    shortfall_remedy | Object | selectable | available[] from makegood | credit | none, plus remedy_terms
  • § 5.4, the production row's description: the inline object L242 on main at 981a74e
    { custom_unit, build_owner, lead_time, cost }

What it shapes

main: CancellationPolicyOption, ExclusivityOption, FormatId, ProductionOption, LineItem.cancellation_policy, LineItem.daypart, LineItem.device, LineItem.exclusivity, LineItem.formats, LineItem.geo, LineItem.production, LineItem.shortfall_remedy, ProductionOption.build_owner, ProductionOption.cost, ProductionOption.custom_unit, ProductionOption.lead_time

With the open PRs: CancellationPolicyOption, ExclusivityOption, FormatId, Geo, ProductionOption, LineItem.cancellation_policy, LineItem.device, LineItem.exclusivity, LineItem.formats, LineItem.geo, LineItem.production, LineItem.shortfall_remedy, ProductionOption.build_owner, ProductionOption.cost, ProductionOption.custom_unit, ProductionOption.lead_time

The record's YAML file