Skip to content
Snippets Groups Projects
Unverified Commit f7e688b6 authored by bryan's avatar bryan Committed by GitHub
Browse files

Remove useless warnings from defendpoint missing a malli schema (#38157)

* Remove useless warnings from defendpoint missing a malli schema

we knowingly call umd/describe on a possibly-nil value (`nil` is not a
malli schema). That's ok in this instance, so don't warn about it.

* Actually use the output of umd/describe
parent 0c0e84ce
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,10 @@
(defn- dox-for-schema
"Generate the docstring for `schema` for use in auto-generated API documentation."
[schema route-str]
(try (umd/describe schema)
(try
;; we can ignore the warning printed by umd/describe when schema is `nil`.
(binding [*out* (new java.io.StringWriter)]
(umd/describe schema))
(catch Exception _
(ex-data
(when (and schema config/is-dev?) ;; schema is nil for any var without a schema. That's ok!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment