Skip to main content

root-enum

Category: Structural — overall schema structure triggers this rule

Error Codes​

ProfileCodeSeverity
openai.so.2026-04-30OAI-S-root-enumForbid

Description​

The root schema must not use enum

Provider Evidence​

ProfileStatusSourceBasis
openai.so.2026-04-30inferredOpenAI root objectThe root schema is documented as an object; a root enum is therefore outside the subset.

Rationale​

openai.so.2026-04-30 requires a plain object root and rejects enum at the top level.

Bad Example​

{ "type": "string", "enum": ["yes", "no"] }

Good Example​

{ "type": "object", "properties": { "answer": { "type": "string", "enum": ["yes", "no"] } }, "required": ["answer"], "additionalProperties": false }