deercreeklabs / lancaster

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

Update the namespaced names to handle enclosing namespaces #9

Closed yanatan16 closed 3 years ago

yanatan16 commented 3 years ago

This is a follow-up to #7/#8 to handle enclosing namespaces. I reuse the **enclosing-namespace** dynamic variable to pass down enclosing namespaces from records and arrays to the eventual use in swap-named-value!. This happens from get-schemas! and make-serializer.

I also updated the test to check this case. Notice how SubFooRecord has no namespace, but should be annotated with com.company because it is within com.company/FooRecord in test/namespaced_records.json.

chadharrington commented 3 years ago

@yanatan16 I just pushed an updated version to Clojars. Thanks again for your efforts.