Deals API 1.0 JSON Schema Unofficial

Decision records ·

D-006 Must a deal that sends dealfloor or totalcost also send cur, when cur defaults to "USD"?

Gap Cited on main and at the tag 1.0-202602.

What the schemas do

No: cur absent is "USD", so the money always has a currency; the schema states the default and requires nothing more.

Options

  • default-satisfies Chosen

    No: cur absent is "USD", so the money always has a currency; the schema states the default and requires nothing more.

  • require

    Yes: every money value carries its currency beside it, so cur is required with dealfloor or totalcost, and its default is never used.

Why

The text gives cur a default, so a deal that leaves it out is in US dollars, and its money is never without a currency. Requiring cur anyway would reject deals the text allows. The schema writes default: "USD", which a receiver reads when cur is absent.

What we ask the specification to state

None needed: the default settles it. A receiver must apply "USD" when cur is absent, so the text could say so beside the default.

The specification lines it rests on

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

main

  • Object: Terms, the cur row L112 at 3028ddc
    cur | string; default "USD" | Bid currency using ISO-4217 alpha codes.

Tag 1.0-202602

  • Object: Terms, the cur row L112 at 938a5d1
    cur | string; default "USD" | Bid currency using ISO-4217 alpha codes.

What it shapes

main: Terms.cur

Tag 1.0-202602: Terms.cur

The record's YAML file