jimblackler / jsonschemafriend

A JSON Schema loader and validator, delivered as a Java library.
Apache License 2.0
49 stars 23 forks source link

Avoid duplicated fetch of same documents with different fragments #44

Closed kool79 closed 7 months ago

kool79 commented 9 months ago

Bug fixed: When the $ref contains a wrong uri then such uri is not present in local cache (canonicalUriToObject). This cause to fetch the base document again and again when try to resolve such $ref. It is especially critical for 'same-document' (#fragment) refs where we can track such situation. We should not fetch the document if corresponding absolute uri (without #fragment) already exists in the 'canonicalUriToObject' cache.