Skip to content

Commit 5a2879f

Browse files
committed
use org.tobereplaced/lettercase for camel-casing
1 parent 964ee63 commit 5a2879f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

project.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
[compojure "1.2.1"]
1313
[prismatic/schema "0.3.2"]
1414
[metosin/ring-http-response "0.5.1"]
15-
[metosin/ring-swagger "0.14.0"]
15+
[metosin/ring-swagger "0.14.1"]
16+
[org.tobereplaced/lettercase "1.0.0"]
1617
[ring-middleware-format "0.4.0"]]
1718
:profiles {:thingie {:ring {:handler examples.thingie/app
1819
:reload-paths ["src" "examples/src"]}

src/compojure/api/swagger.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[compojure.core :refer :all]
88
[plumbing.core :refer [fn->]]
99
[potemkin :refer [import-vars]]
10+
[org.tobereplaced.lettercase :as lc]
1011
[ring.swagger.common :refer :all]
1112
[ring.swagger.core :as swagger]
1213
[ring.swagger.impl :as swagger-impl]
@@ -122,7 +123,6 @@
122123
(assoc-in route-with-meta [:metadata :parameters] new-parameters))
123124
route-with-meta))
124125

125-
126126
(defn ensure-parameter-schema-names [route-with-meta]
127127
(if-let [all-parameters (get-in route-with-meta [:metadata :parameters])]
128128
(->> all-parameters
@@ -131,7 +131,7 @@
131131
(update-in parameter [:model]
132132
swagger-impl/update-schema
133133
(fn-> (s/schema-with-name
134-
(gensym (->CamelCase (name type))))))
134+
(gensym (lc/mixed (name type))))))
135135
parameter)))
136136
(assoc-in route-with-meta [:metadata :parameters]))
137137
route-with-meta))
@@ -143,7 +143,7 @@
143143
(update-in route-with-meta [:metadata :return]
144144
swagger-impl/update-schema
145145
(fn-> (s/schema-with-name
146-
(gensym (->CamelCase "return")))))
146+
(gensym (lc/mixed "return")))))
147147
route-with-meta)
148148
route-with-meta))
149149

0 commit comments

Comments
 (0)