Skip to content

Commit

Permalink
style + fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Jul 8, 2024
1 parent d3f11cc commit 6126853
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ring/swagger/json_schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,18 @@
(defn properties
"Take a map schema and turn them into json-schema properties.
The result is put into collection of same type as input schema.
Thus linked/map should keep the order of items. Returnes nil
Thus linked/map should keep the order of items. Returns nil
if no properties are found."
[schema]
{:pre [(common/plain-map? schema)]}
(let [props (into (empty schema)
(for [[k v] schema
:when (s/specific-key? k)
:let [key-meta (meta k)
k (s/explicit-schema-key k)]
:let [v (try->swagger v k key-meta)]]
k (s/explicit-schema-key k)
v (try->swagger v k key-meta)]]
(and v [k v])))]
(if (seq props)
props)))
(not-empty props)))

(defn additional-properties
"Generates json-schema additional properties from a plain map
Expand Down

0 comments on commit 6126853

Please sign in to comment.