brandur / json_schema

A JSON Schema V4 and Hyperschema V4 parser and validator.
MIT License
230 stars 45 forks source link

Prevent infinite loop on external ref to global schema #116

Closed kytrinyx closed 5 years ago

kytrinyx commented 5 years ago

We manually construct a URI for the subschema's reference using the parent ref. However, if the parent ref is the same as ref schema's ref, then we've reached the end of the road and should not further dereference the subschema's children.

Fixes https://github.com/brandur/json_schema/issues/115

brandur commented 5 years ago

Amazing. Thank you!

brandur commented 5 years ago

Released as 0.20.7.

jessieay commented 5 years ago

I just updated to 0.20.7 in my project locally and my prmd command no longer returns an error. 🎉 🎉 🎉 🎉 🎉

Thanks so much for fixing this (twice!) @kytrinyx and also thanks to @brandur for the reviews and releases of her fixes. 🥇

brandur commented 5 years ago

Awesome to hear @jessieay! Seriously though, all credit to @kytrinyx — I'm just typing the occasional release command, hah. Thanks Katrina!