Dynadoc icon indicating copy to clipboard operation
Dynadoc copied to clipboard

consider using spec fdef to autogenerate examples

Open carocad opened this issue 7 years ago • 0 comments

Hey Zach,

to be honest I have never used your project but I came here since it was mentioned in an expound issue.

I checked your docs generation and they seem really nice, which made me wonder if you have considered creating examples automatically.

You are already creating docs automatically so why not the examples? 😄

With the introduction of clojure spec it is possible to "instrument" functions and through that both arguments and return values can be determined.

Since it is (generally) possible to get a generator for a clojure spec I think it should be possible to generate an example based on an instrumented function

Hope it helps

carocad avatar Jul 21 '18 20:07 carocad