Welcome! Please see the About page for a little more info on how this works.

+6 votes
in Spec by

Like clojure.core/def clojure.spec/def should support an optional doc string because one usually likes to describe specs in more detail as one could through keyword naming.

5 Answers

0 votes
by

Comment made by: dergutemoritz

Building on this idea, I suggest to add first-class metadata support to registered specs and implement doc strings in terms of that (i.e. the same way as with vars).

0 votes
by

Comment made by: emergent-behavior

Hi! Was just discussing the potential for a feature like this with a colleague. What's the current status? Was thinking of potentially working on it but wanted to get feedback and guidance from the community first.

0 votes
by

Comment made by: alexmiller

We don't have a recommended approach to this yet so not looking for a patch at this time.

0 votes
by

Comment made by: floybix

If you're prioritising this, please also remember the need for source (file + line) metadata on specs. This would enable us to use specs in auto generated documentation which is really nice, especially when you can hyperlink to nested specs. See CLJ-2037 https://dev.clojure.org/jira/browse/CLJ-2037

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-1965 (reported by akiel)
...