Skip to main content

discriminator

Category: Keyword — presence of a specific JSON Schema keyword triggers this rule

Error Codes​

ProfileCodeSeverity
openai.so.2026-04-30OAI-K-discriminatorWarn
anthropic.so.2026-04-30ANT-K-discriminatorForbid

Description​

Flag usage of the 'discriminator' keyword according to the active provider profile.

Provider Evidence​

ProfileStatusSourceBasis
anthropic.so.2026-04-30unknown—Anthropic does not document this OpenAPI keyword for Structured Outputs.
openai.so.2026-04-30inferredOpenAI supported schemasOpenAPI-only keyword absent from OpenAI's supported JSON Schema subset.

Rationale​

Provider profiles may enforce different behavior and severity for this rule; use the table below for the selected profile.

Bad Example​

{ "type": "object", "discriminator": true, "properties": {} }

Good Example​

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