WorksHub / leona

spec -> lacinia schema
Eclipse Public License 1.0
36 stars 17 forks source link

Leona will attempt to resolve enums/sets from symbols #28

Closed acron0 closed 5 years ago

acron0 commented 5 years ago

Previously, the following code would not transform:

(def my-set #{:foo :bar :baz})
(s/def ::a my-set)
(s/def ::test (s/keys :req-un [::a]))
(schema/transform ::test)

It would complain about ::a not being transformable, and this is because as spec-tools walked the specs it didn't know what to do with this symbol. This is pretty unfortunate because this is a common pattern. This PR resolves this shortcoming.