Skip to content

Behavior around failed $ref resolution is not defined #1276

Closed
@gregsdennis

Description

@gregsdennis

(By "is not defined" I don't mean that it's considered and left as "undefined" behavior; I mean it's not addressed at all.)

In Slack, we had a short discussion around the behavior of this schema:

{
  "anyOf": [
    { "$ref": "https://unresolvable.uri/schema" },
    true
  ]
}

An implementation could handle this in one of two ways:

  1. Produce a validation error, meaning that /anyOf/0 merely fails validation and the implementation continues to /anyOf/1, ultimately passing an instance.
  2. Produce a runtime error, meaning that the implementation halts evaluation and no validation result is given either way.

The discussion landed on the latter: produce a runtime error, halting evaluation.

We need to add language to spec to properly prescribe this behavior.

For reference:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions