SR078

Severity: error

Summary: array items.format is only valid when items.type is string

What this means

An array field’s items spec has a format: attribute but the items type is not string. The format attribute only applies to string items (e.g., format: email). Using it on integer, uuid, or other types is invalid.

Example that triggers this

schema:
  counts: { type: array, items: { type: integer, format: email } }

How to fix it

Remove items.format, or change items.type to string:

emails: { type: array, items: { type: string, format: email } }

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.