deercreeklabs / lancaster

Apache Avro library for Clojure and ClojureScript
Other
60 stars 5 forks source link

Bug #14

Closed burbma closed 2 years ago

burbma commented 2 years ago

The recursion in schema-at-path is only as deep as the path you pass in. In the test case the path is [:c] but the name expansion that needs to happen is actually 2 levels deep since at [:c] you have a :b (which gets expanded during the edn-schema-at-path recursion. But inside :b you have a :z that needs expanding but edn-schema-at-path exits recursion when (>= i (count path)). So we are left needing, in this case, one more call to expand names. This PR adds another recursive call to expanding names after edn-schema-at-path.