SR062
Severity: error
Summary: relation key field not found in schema
What this means
A relation’s key: value names a field that does not exist in this resource’s schema. The key field must be declared in the schema before it can be referenced by a relation.
Example that triggers this
relations:
org: { resource: organizations, type: belongs_to, key: missing_fk }
(without missing_fk in schema:)
How to fix it
Add the missing foreign key field to the schema:
missing_fk: { type: uuid, ref: organizations.id, required: true }