A report schema is easy to approve when all its rows are present and tidy. Approval is more useful when a reviewer can predict which of four nearly identical rows will be allowed, and what each surviving row means. The point of a payroll reporting schema contract is not just to keep a parser from crashing. It is to make the report’s vocabulary and omissions explicit enough that publisher and reader can disagree before a new version ships.

Start with the question each field answers

Give every field a business definition and distinguish display text from machine-readable values. In a fictional reporting feed, label edition_state as the state of the report edition, not the status of wages, card provisioning, or individual records. If your downstream reader sees a short token, document each token and what counts as unknown. Choose definitions the people who use the report can repeat without guessing. Map no value to an action that the read-only report does not authorize.

A column glossary should identify the kind of thing a row represents and show one fully invented example. A row could represent a program and week, a batch label used only for internal reports, or a category of records. If it is one row per program-week, a second revision of that week is not another week. Tell consumers how editions are distinguished. Mark display-only summaries so a spreadsheet user does not mistake them for category rows and count the same measure twice.

Missing, null and zero are not interchangeable

If the report measures a count, a zero can be a positive assertion that an eligible set was reviewed and had no matches. A missing field might mean the export revision does not supply it, and a null might mean the information is deliberately unknown for that row. Those meanings are design decisions. Agree on the vocabulary rather than assigning it by accident after a consumer asks why last week’s figure changed.

The JSON Schema validation specification defines separate tools for value constraints and required properties. A property listed as required must appear under the relevant object constraints, but a permitted null value remains a value. Read the specification for mechanics, not for business definitions: the standard will not tell you which meaning a report user should assign to zero. Include fixtures that prove readers see the agreed interpretation.

Define what a version actually promises

Imagine a candidate adds a new field to an internal export. A permissive reader may ignore it. A reader that uses strict structural checks might reject the whole report. A spreadsheet template might display the extra column in the wrong place if it uses positions. A schema change is not safe merely because it is additive. Map actual readers and ask them whether unknown fields are ignored, rejected, or displayed. Define compatibility on evidence from those readers, not on what an exporter assumes.

For a planned change, include old and new example rows, identify the consumers that were checked, and say when the prior version will stop receiving updates. Avoid reusing a short token for a new concept. If a revision has to alter behavior, have the publisher tell readers exactly which date or edition first uses the new interpretation. Include the report’s timestamp contract when rounding or period selection changes, since silent date reinterpretation often looks like an ordinary data fluctuation.

Test the refusal paths

Define examples that must be rejected distinctly from examples the reader can accept with an explicit unknown. For a synthetic export, a missing publication date might block a reader from treating the result as current. An unknown category could still be displayed as unknown if the report makes no statement about that category’s meaning. Tell the review team not just that the validator returns false, but also what message or status a consumer sees when it happens.

One useful review asks two people to independently sort a handful of candidates into three stacks: accept, accept with condition, and refuse. An example can reveal a disagreement that broad language hides. If one person counts a blank field as no records and another counts it as not reported, refine the definition and add that example to the synthetic fixture set. Store the accepted answer in a test rather than burying it in chat.

Sign for one accountable scope

Publish the contract alongside its revision, who owns the dictionary, and where questions go. Record who acknowledged it for each dependency and which reading surface they checked. If a team only tested a machine endpoint, say so rather than implying the spreadsheet export has been checked too. The release gate calls out that difference so the team does not confuse structural acceptance with a release decision.

A technical spec can be brief and still effective. Start with a small core of validated fields and well-described exceptions, then grow it where actual consumers encounter ambiguity. The successful handoff is not that everyone can recite a schema file. It is that two readers given the same edition and the same example reach the same conclusion without access to worker data, undocumented rules, or the author’s memory.