SR015

Severity: error

Summary: format attribute used on non-string field

What this means

A field has a format: attribute (e.g., format: email) but its type is not string. The format attribute is only meaningful on string fields and controls validation and OpenAPI schema output.

Example that triggers this

resource: items
version: 1
schema:
  id:  { type: uuid, primary: true, generated: true }
  age: { type: integer, required: true, format: email }

How to fix it

Change the field type to string, or remove the format 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.