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.
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 theedn-schema-at-path
recursion. But inside:b
you have a:z
that needs expanding butedn-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 afteredn-schema-at-path
.