Skip to content

Commit

Permalink
Apply cljstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
gmsvalente committed Nov 22, 2023
1 parent 4179057 commit 98e206d
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions src/xiana/swagger.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,34 @@
[reitit.trie :as trie]
[ring.util.response]))

;; "xiana-route->reitit-route is taking route entry of our custom shape of routes
;; and transforms it into proper reitit route entry that is valid on the Swagger
;; implemention of reitit.

;; "xiana-route->reitit-route is taking route entry of our custom shape of routes
;; and transforms it into proper reitit route entry that is valid on the Swagger
;; implemention of reitit.

;; (xiana-route->reitit-route [\"/swagger-ui\" {:action :swagger-ui
;; :some-values true}])
;; ;; => [\"/swagger-ui\"
;; {:get
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :patch
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :trace
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :connect
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :delete
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :head
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :post
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :action :swagger-ui,
;; :options
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :put
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :some-values true}]
;; "
;; (xiana-route->reitit-route [\"/swagger-ui\" {:action :swagger-ui
;; :some-values true}])
;; ;; => [\"/swagger-ui\"
;; {:get
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :patch
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :trace
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :connect
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :delete
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :head
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :post
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :action :swagger-ui,
;; :options
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :put
;; {:handler #function[clojure.core/identity], :action :swagger-ui},
;; :some-values true}]
;; "

(def all-methods
[:get :patch :trace :connect :delete :head :post :options :put])
Expand Down Expand Up @@ -70,7 +69,6 @@
(assoc-in [:get :action] (:action opt-map)))
(reduce-opt-map opt-map all-methods)))


(defn xiana-route->reitit-route
[[url opt-map & nested-routes :as route] all-methods]
(when-not (-> route meta :no-doc)
Expand Down

0 comments on commit 98e206d

Please sign in to comment.