Skip to main content

external-refs

Category: Structural — overall schema structure triggers this rule

Error Codes

ProfileCode
openai.so.2026-04-30OAI-S-external-refs
anthropic.so.2026-04-30ANT-S-external-refs

Description

External $ref values are not supported

Rationale

Providers require references to be internal to the submitted schema.

Bad Example

{ "type": "object", "properties": { "address": { "$ref": "https://example.com/address.json" } } }

Good Example

{ "type": "object", "$defs": { "Address": { "type": "object" } }, "properties": { "address": { "$ref": "#/$defs/Address" } } }