Skip to main content

object-root

Category: Structural — overall schema structure triggers this rule

Error Codes

ProfileCode
openai.so.2026-04-30OAI-S-object-root

Description

The root schema must be of type object

Rationale

Structured-output providers require the top-level schema to be an object.

Bad Example

{
"type": "array",
"items": { "type": "string" }
}

Good Example

{
"type": "object",
"properties": { "name": { "type": "string" } }
}