OpenProposal 3.0 JSON Schema Unofficial

Decision records · Selectable and settable fields

D-008 What is the bare value that a selectable or settable field may carry in place of its full form?

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

What the schemas do

A selectable or settable field that takes a bare value accepts it in place of its full form, typed as that field's value. A field that takes none accepts only the full form.

Options

  • one-option

    A single value of the option type T, as the initial design proposed.

  • option-list

    A list of values of the option type T.

  • per-use Chosen

    A selectable or settable field that takes a bare value accepts it in place of its full form, typed as that field's value. A field that takes none accepts only the full form.

Why

The specification never says what a bare value is, and it types every selectable and settable field as Object. A single option can't state a seller-set geo of several codes, and a list doesn't fit a single cancellation right. frequency_cap is settable, but its bounds sit inside max, so a bare value there would replace max, not the field. One type for every field would be a guess that's wrong for some of them. With a parameter, the template guesses nothing, and each use records its choice against its own rows. Without B, the copy is the full form only.

What we ask the specification to state

State the type of the bare value for each selectable and settable field, or drop the fallback. Without it, a seller-set value is the full form, with one option in available[] and the same option in included[]. Then no schema needs an [untagged union](#untagged-unions) of the two forms. Also name the keys for the buyer's choice of a selectable or settable field, and for an unset settable field's explicit default. § 3 requires both, but § 3.1 and § 3.2 don't declare them.

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, a requirement L149 at 44dfaaf
    A field marked selectable that carries a bare value and no available[] MUST be treated as seller-set.
  • § 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.
  • § 3, a requirement L134 at 44dfaaf
    An unset selectable or settable field takes its declared included[] or default, and that default MUST be explicit in the proposal.

With the open PRs

  • § 3.1, a requirement L142 on main at 981a74e
    A field marked selectable that carries a bare value and no available[] MUST be treated as seller-set.
  • § 3.2, a requirement L154 on main at 981a74e
    A field marked settable that carries a bare value and no bounds MUST be treated as seller-set.
  • § 3, a requirement L127 on main at 981a74e
    An unset selectable or settable field takes its declared included[] or default, and that default MUST be explicit in the proposal.

What it shapes

main: Selectable, Settable

With the open PRs: Selectable, Settable

The record's YAML file