SR010

Severity: error

Summary: field is type enum but declares no values

What this means

A field is declared with type: enum but the required values: list is missing. Without values, Shaperail cannot generate the Rust enum type, the SQL CHECK constraint, or the OpenAPI schema for this field.

Example that triggers this

resource: items
version: 1
schema:
  id:     { type: uuid, primary: true, generated: true }
  status: { type: enum, required: true }

How to fix it

Add values: [value1, value2] to the enum field:

status: { type: enum, values: [option_a, option_b] }

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.