Version the schema of a PDF result event
2 November 2026
A receiver expects resultUrl to be one string. Replacing its value with a list will break that contract, even if the new list contains exactly one URL. Keep the existing field and its meaning for legacy subscribers. Add a separately named outputs field for a receiver that can handle multiple results.
Define what the old field still represents
If there is a genuine primary PDF—for example, the completed report, with thumbnails as ancillary outputs—specify that resultUrl still points to that primary PDF. The new list can represent all outputs with distinct identifiers and roles. If all files are independently required and there is no meaningful primary, do not quietly put the first file into the old field and report full success. Offer an agreed bundle or deliver the new event only to capable subscribers.
Give the new contract an explicit version. A JSON string and an array are different value types. The JSON format does not promise that any particular receiver will tolerate unknown fields or version numbers. IETF JSON specification
Run the compatibility matrix before choosing a migration date
| Fixture | Expected legacy behaviour | Expected upgraded behaviour |
|---|---|---|
Existing version, scalar resultUrl | Processes the existing primary output. | Handles the legacy case as documented. |
Supported new version, scalar plus optional outputs | Receives the old event through a compatibility route if it rejects the new version. | Reads all outputs and identifies the primary without delivering it twice. |
| Known version plus an unknown optional field | Test whether the actual receiver ignores or rejects it. | Ignores only fields the agreed contract marks safe to ignore. |
| Unknown major version or wrong type for a required field | Does not silently reinterpret the data. | Holds the event with a safe diagnostic and an authorised replay route. |
The separate proposed event fixture illustrates a version field, but does not define resultUrl or the proposed multi-output behaviour in this worked example.
Write the cutover into the contract
For a sample plan, choose 15 December as a proposed switch date, name the migration owner and list which subscribers have passed both versions. Publish the actual date and versions to the participating teams. Keep legacy delivery available until the agreed compatibility period and tests are complete. When replaying a previously recorded event, retain its original schema version and ensure replay does not duplicate recipient-visible outputs.
Part of the Test duplicate and out-of-order PDF webhook events guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
