OpenProposal 3.0 JSON Schema Unofficial

Decision records · Where each statement is checked

D-023 Which schema type expresses each § 2.2 and § 3 element that more than one schema type rests on, or that none does?

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

What the schemas do

The schema that states what the element says: - the selectable structure of § 3.1, for the available[] key and the price-delta sentence - the price delta of each pricing entry, for the delta object - the reference grammar of catalog_ref, for the grammar - the choice of an inline value or a catalog_ref, for "never both" - the settable bounds with a min / max range, for the bounds sentence - the settable bounds, for their bare-value fallback

Options

  • defining-type Chosen

    The schema that states what the element says: - the selectable structure of § 3.1, for the available[] key and the price-delta sentence - the price delta of each pricing entry, for the delta object - the reference grammar of catalog_ref, for the grammar - the choice of an inline value or a catalog_ref, for "never both" - the settable bounds with a min / max range, for the bounds sentence - the settable bounds, for their bare-value fallback

  • first-citer

    The first schema type that rests on the element.

Why

The mapping rule kernel-source maps an element in the kernel's sections to the one constructor or part that cites it. These elements are cited by several: List also cites available[], Map also cites the delta object, and the catalog grammar is cited by the primitive, the part, and the constructor. Each is mapped to the type whose shell or pattern states what the element says. available[] is a key of the selectable structure. The delta object is the value of each pricing entry. The grammar is the pattern of CatalogRef (D-009). "Never both" is the union CatalogRefOr builds. The bounds sentence is mapped to Range, the min / max form a settable field's bounds take where they are a range, in frequency_cap's max; no settable field states the range at the field, so no template allows both forms. The bare-value sentence is now the fallback of Settable alone, so the rule kernel-source maps it. "Each option MAY carry a price delta" is the optional pricing of Selectable.

The specification lines it rests on

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

main

  • § 3.1, the available[] key row L144 at 44dfaaf
    available[] | REQUIRED | The options the seller offers
  • § 3.1, the pricing key row's meaning: the inline object L146 at 44dfaaf
    { option_id: { delta_cpm | delta_flat | delta_pct } }
  • § 2.2, a requirement L102 at 44dfaaf
    A field MUST carry either an inline value or a catalog_ref, never both.
  • § 3, a requirement L123 at 44dfaaf
    Each option MAY carry a price delta.
  • § 3.2, a requirement L158 at 44dfaaf
    Every field marked settable MUST declare its bounds: either allowed[] (an enumerated set) or min / max (a numeric or date range).
  • § 3.2, a requirement L161 at 44dfaaf
    A field marked settable that carries a bare value and no bounds MUST be treated as seller-set.
  • § 2.2, code block 1 L97-L100 at 44dfaaf
    catalog_ref: "<seller_namespace>/<collection>/<entry_id>@<version>" example: "examplepub/audiences/smb-decision-makers@3"

With the open PRs

What it shapes

main: LineItemSummaryPropertiesSelection.available

With the open PRs: LineItemSummaryEnvironmentsSelection.available, LineItemSummaryPropertiesSelection.available

The record's YAML file