Skip to main content

object-root

Category: Structural — overall schema structure triggers this rule

Error Codes​

ProfileCodeSeverity
openai.so.2026-04-30OAI-S-object-rootForbid
anthropic.so.2026-04-30ANT-S-object-rootForbid

Description​

The root schema must be of type object

Provider Evidence​

ProfileStatusSourceBasis
anthropic.so.2026-04-30documentedAnthropic JSON Schema limitations—
openai.so.2026-04-30documentedOpenAI root 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" } }
}