Schemas grow; reuse keeps them sane
$defs — local definitions
$defs is a top-level dictionary of named sub-schemas. Define a shape once; reference it from anywhere in the same document with $ref. Replaces the older definitions keyword (Draft-07).
$ref — pointer to a schema
$ref takes a URI Reference. Same-document refs use a JSON Pointer fragment: #/$defs/Address. External-document refs use a full URL: https://example.com/address.schema.json. Most validators resolve external refs via HTTP fetch + cache, or via a 'load these schemas locally first' API.
$id — schemas that reference each other
Each schema document gets a stable $id URL. Other schemas reference it. The validator's job is to resolve $ids consistently — load all schemas you'll need into the validator before validating, and cross-references work transparently.
$defs, name them well, reuse via $ref. The 50-line schema with three address objects copy-pasted is a refactor smell.