Skip to main content

maxLength

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

Error Codes​

ProfileCodeSeverity
openai.so.2026-04-30OAI-K-maxLengthWarn
anthropic.so.2026-04-30ANT-K-maxLengthForbid

Description​

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

Provider Evidence​

ProfileStatusSourceBasis
anthropic.so.2026-04-30documentedAnthropic JSON Schema limitations—
openai.so.2026-04-30inferredOpenAI type-specific keywordsAbsent from the documented supported string constraints.

Rationale​

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

Bad Example​

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

Good Example​

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