Skip to content

Commit 6126853

Browse files
committed
style + fix doc
1 parent d3f11cc commit 6126853

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/ring/swagger/json_schema.clj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,19 +257,18 @@
257257
(defn properties
258258
"Take a map schema and turn them into json-schema properties.
259259
The result is put into collection of same type as input schema.
260-
Thus linked/map should keep the order of items. Returnes nil
260+
Thus linked/map should keep the order of items. Returns nil
261261
if no properties are found."
262262
[schema]
263263
{:pre [(common/plain-map? schema)]}
264264
(let [props (into (empty schema)
265265
(for [[k v] schema
266266
:when (s/specific-key? k)
267267
:let [key-meta (meta k)
268-
k (s/explicit-schema-key k)]
269-
:let [v (try->swagger v k key-meta)]]
268+
k (s/explicit-schema-key k)
269+
v (try->swagger v k key-meta)]]
270270
(and v [k v])))]
271-
(if (seq props)
272-
props)))
271+
(not-empty props)))
273272

274273
(defn additional-properties
275274
"Generates json-schema additional properties from a plain map

0 commit comments

Comments
 (0)