ring-swagger

ring-swagger & compojure-api
2019-04-18T13:36:08.003400Z

Hi, I’ve got two specs defined as follow: (s/def :test/a (into #{} [:a :c])) (s/def :test/b #{:a :c}) with (spec-tools.swagger.core/transform :test/b) i can get correct enum and type info, for the first one, it just transform to empty map. Is this a bug with spec-tools? Thanks

metametadata 2019-04-18T16:50:54.007Z

transform is based on parsing the spec form. The form for a here is (clojure.core/into #{} [:a :c]). And most likely there's no "codepath" (they are defined by defmethod st-visitor/visit-spec extensions) which is triggered for into .... So I guess it's just a limitation of the algorithm.