Skip to content

Possible issue in resolving recursive references #64

@azambon

Description

@azambon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions