SR014

Severity: error

Summary: array field has no items type declared

What this means

A field is declared with type: array but has no items: attribute. Shaperail needs the element type to generate the correct Rust Vec<T> type, the SQL column type, and the OpenAPI schema.

Example that triggers this

resource: items
version: 1
schema:
  id:   { type: uuid, primary: true, generated: true }
  tags: { type: array }

How to fix it

Add items: <element_type> to the array field:

tags: { type: array, items: string }

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.