Skip to content

Commit

Permalink
add back (but deprecated) defapi
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Apr 22, 2024
1 parent 5420de5 commit ca7ab61
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/compojure/api/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,19 @@
{::request/paths paths
::request/lookup lookup}))]
(assoc partial-api-route :handler api-handler)))

(defmacro
^{:superseded-by "api"
:deprecated "2.0.0"
:doc (str
"Deprecated: please use (def name (api ...body..))
Defines an api.
API middleware options:
" (:doc (meta #'compojure.api.middleware/api-middleware)))}
defapi
[name & body]
{:style/indent 1}
`(def ~name (api ~@body)))

0 comments on commit ca7ab61

Please sign in to comment.