SR011

Severity: error

Summary: non-enum field declares values list

What this means

A field that is not type: enum has a values: list. The values attribute is only meaningful on enum fields. Having it on a string, integer, or other type is a misconfiguration that Shaperail rejects to keep schemas unambiguous.

Example that triggers this

resource: items
version: 1
schema:
  id:   { type: uuid, primary: true, generated: true }
  name: { type: string, required: true, values: ["a", "b"] }

How to fix it

Either change the field type to enum, or remove the values attribute from the field.


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.