Skip to content
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

Possible issue in resolving recursive references #64

Open
azambon opened this issue Jun 13, 2022 · 0 comments
Open

Possible issue in resolving recursive references #64

azambon opened this issue Jun 13, 2022 · 0 comments

Comments

@azambon
Copy link

azambon commented Jun 13, 2022

I think I found an issue with the way references are resolved by the SchemaManager::fromUri() method.
If I use a call to SchemaManager::fromUri() to initialize the SchemaManager and then use that manager to validate a response whose schema involves recursive references, the validation goes off into an infinite loop.
However, if I use the SchemaStorage to import the json schema first (thereby pre-resolving all references) and then create the SchemaManager manually from the resolved schema, everything works fine.

Attached is a test case that I built starting from the example reported by @MaikWagner in #53 . Depending on which way the SchemaManager is instanciated (the test includes both ways, one comment and the other not), the test either is green or goes into an infinite loop.

test.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant