json-schema-org / referencing

Proposals for a possible specification encompassing the varying uses of "$ref"
MIT License
6 stars 1 forks source link

Clarify processing rules restrictions related to infinite recursion from reference cycles #8

Open DavidBiesack opened 2 years ago

DavidBiesack commented 2 years ago

The proposal in the handrews:jri PR contains:

## Guarding Against Infinite Recursion {#infinite}

An implementation MUST guard against infinite reference loops.

Processing rules for context specifications MAY make it safe to have cyclic references by creating conditions under which a reference will or will not be followed.

It seems problematic that and implementation MUST guard agains infinite reference loops (cycles), but processing rules do not also have MUST make it safe. I think this needs more consideration.

If left as is, I suppose a rule could leave it unsafe (i.e. always follow references) and fall back on the implementation to guard against infinite recursion. If that is the intent, perhaps state that more explicitly.