-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent circular validation #102
Labels
Comments
fge
added a commit
that referenced
this issue
May 24, 2014
Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 24, 2014
Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 24, 2014
The existing ValidationProcessor is not easily modifiable to fulfill the needs highlighted by issue #102. A ThreadLocal may be used, but that would make the code rather convoluted. Instead, create a new InstanceValidator class with the same signature; the ValidationProcessor (which is unique per JsonSchemaFactory) will then create an instance of that class for each attempted schema/instance validation pair. This means the InstanceValidator instance will be what keyword validators will use, instead of the ValidationProcessor. Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 24, 2014
As planned; create an instance of InstanceValidator for each schema/instance validation pair and act on that. Signed-off-by: Francis Galiegue <[email protected]>
Issue is now fixed on branch v2.2. |
fge
added a commit
that referenced
this issue
May 24, 2014
Essential to solve bug #102 Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 25, 2014
Francis Galiegue (22): Bump version number Depend on local -SNAPSHOT Make test to reproduce issue #102 SchemaContextEquivalence: remove reference to SchemaTreeEquivalence ValidationChain: drop use of SchemaTreeEquivalence Modify tests; add a message for validation loops ValidationProcessor: don't cache {Array,Object}SchemaSelector results anymore Deprecate a constructor of FullData New class InstanceValidator ValidationProcessor: receive the cached processor directly from the factory Fix issue #102 Improve error message InstanceValidator: improve test, documentation, error message More documentation One more message change Depend on -core 1.2.4 Remove obsolete API usages Remove deprecated API usage Fuse *.gradle files build.gradle: include Main-Class in jar Fill release notes 2.2.5 Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 25, 2014
Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 25, 2014
The existing ValidationProcessor is not easily modifiable to fulfill the needs highlighted by issue #102. A ThreadLocal may be used, but that would make the code rather convoluted. Instead, create a new InstanceValidator class with the same signature; the ValidationProcessor (which is unique per JsonSchemaFactory) will then create an instance of that class for each attempted schema/instance validation pair. This means the InstanceValidator instance will be what keyword validators will use, instead of the ValidationProcessor. Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 25, 2014
As planned; create an instance of InstanceValidator for each schema/instance validation pair and act on that. Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
May 25, 2014
Essential to solve bug #102 Signed-off-by: Francis Galiegue <[email protected]>
fge
added a commit
that referenced
this issue
Oct 28, 2014
Existing code to solve issue #102 was incomplete; it failed to account for the fact that a same instance pointer/schema URI pair may be used in a legal manner more than once. At the moment, yours truly only knows that the problem exists and how to solve it, yet I fail to explain it correctly... Signed-off-by: Francis Galiegue <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial report by mail.
This schema causes problems during validation:
No problem with references here, there is no reference loop; however, during validation, for any JSON value, the path is:
This is currently not detected.
The text was updated successfully, but these errors were encountered: