SR079

Severity: error

Summary: array items.ref requires items.type to be uuid

What this means

An array field’s items spec declares a ref: attribute but the items type is not uuid. Foreign key references in array items must be UUIDs, the same constraint that applies to top-level ref fields.

Example that triggers this

schema:
  org_ids: { type: array, items: { type: string, ref: organizations.id } }

How to fix it

Change items.type to uuid, or remove items.ref:

org_ids: { type: array, items: { type: uuid, ref: organizations.id } }

Back to top

Shaperail documentation lives in the same repository as the framework so every release has versioned instructions. See the latest release for the most recent version.

This site uses Just the Docs, a documentation theme for Jekyll.