{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://designsystemdocspec.org/v0.15.2/common/entity-ref.schema.json", "title": "Entity reference definitions", "description": "References to other entities. `entityRef` is the standalone reference object; the `entityIdentifier` and `entityRole` defs are shared by `relationship`, use-case alternatives, and token overrides. Every identifier MUST match a documented entity. (Links, by contrast, address external resources by URL.)", "$defs": { "entityIdentifier": { "type": "string", "description": "Identifier of a documented DSDS entity (ex: 'button', 'color-text-primary'). MUST match that entity's `identifier`. Tools SHOULD resolve it to build cross-references.", "minLength": 1 }, "entityRole": { "type": "string", "description": "What the referenced entity does here (ex: 'Displays the inline error'). The association is generic when `entityRole` isn't defined." }, "entityRef": { "type": "object", "description": "A reference to another entity by `identifier`, with an optional `role`. Use when a field in the schema points to a DSDS entity. Use `link` for external URLs.", "required": [ "identifier" ], "properties": { "identifier": { "$ref": "#/$defs/entityIdentifier" }, "role": { "$ref": "#/$defs/entityRole" } }, "additionalProperties": false } } } Identifier of a documented DSDS entity (ex: 'button', 'color-text-primary'). MUST match that entity's identifier. Tools SHOULD resolve it to build cross-references. What the referenced entity does here (ex: 'Displays the inline error'). The association is generic when entityRole isn't defined. References: entityIdentifier, entityRole [ { "identifier": "text-input", "role": "Carries the inline error" }, { "identifier": "button" } ]