Skip to content

Are the infinite loop detection tests a suggestion rather than real tests? #729

Answered by awwright
elcapo asked this question in Q&A
Discussion options

You must be logged in to vote

How are implementations handling this?

The most reasonable validator behavior is to apply both schemas, not following references to schemas that have already been visited. In this example, apply "a" without following the reference to "b", and also apply "b" without following the reference to "a".

Now, some validators (presumably) do something else, and the behavior is undefined perhaps because changing one behavior to conform to the other would cause more problems than it solves. (This could be revisited, there's probably very few people who depend on a validator erroring for schemas like this.)

I guess an error rejecting to validate a schema with such a loop is the correct way, as the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by elcapo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants