allof-with-ref
Category: Structural — overall schema structure triggers this rule
Error Codes
| Profile | Code | Severity |
|---|---|---|
| anthropic.so.2026-04-30 | ANT-S-allof-with-ref | Forbid |
Description
allOf combined with $ref is not supported by Anthropic
Provider Evidence
| Profile | Status | Source | Basis |
|---|---|---|---|
| anthropic.so.2026-04-30 | documented | Anthropic JSON Schema limitations | — |
Rationale
Anthropic rejects schemas that combine allOf with $ref references.
Bad Example
{ "type": "object", "allOf": [{ "$ref": "#/$defs/Base" }] }
Good Example
{ "type": "object", "properties": { "id": { "type": "string" } } }