Skip to main content

allof-with-ref

Category: Structural — overall schema structure triggers this rule

Error Codes

ProfileCode
anthropic.so.2026-04-30ANT-S-allof-with-ref

Description

allOf combined with $ref is not supported by Anthropic

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" } } }