mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
refactor: use update-vals
This commit is contained in:
parent
df5f75eb89
commit
497da675b9
1 changed files with 2 additions and 5 deletions
|
|
@ -131,11 +131,8 @@
|
|||
(for [[_path path-data] paths
|
||||
[_method data] path-data]
|
||||
(:definitions data)))
|
||||
paths-without-definitions (into {}
|
||||
(for [[path path-data] paths]
|
||||
[path (into {}
|
||||
(for [[method data] path-data]
|
||||
[method (dissoc data :definitions)]))]))]
|
||||
paths-without-definitions (update-vals paths (fn [methods]
|
||||
(update-vals methods #(dissoc % :definitions))))]
|
||||
{:status 200
|
||||
:body (meta-merge swagger {:paths paths-without-definitions :definitions definitions})}))
|
||||
([req res raise]
|
||||
|
|
|
|||
Loading…
Reference in a new issue