File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 257
257
(defn properties
258
258
" Take a map schema and turn them into json-schema properties.
259
259
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
261
261
if no properties are found."
262
262
[schema]
263
263
{:pre [(common/plain-map? schema)]}
264
264
(let [props (into (empty schema)
265
265
(for [[k v] schema
266
266
:when (s/specific-key? k)
267
267
: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)]]
270
270
(and v [k v])))]
271
- (if (seq props)
272
- props)))
271
+ (not-empty props)))
273
272
274
273
(defn additional-properties
275
274
" Generates json-schema additional properties from a plain map
You can’t perform that action at this time.
0 commit comments