ring-swagger

ring-swagger & compojure-api
sammikko 2017-09-29T06:38:35.000168Z

if I have a simple flat schema, is there easy way to get just the schema keys (keywords) as sequence/collection, even the optional ones defined like (s/optional :key) ?

sammikko 2017-09-29T07:37:15.000085Z

this seems to work (map (fn [[k _]] (s/explicit-schema-key k)) schema)

2017-09-29T21:36:21.000164Z

nice. not sure what explicit-schema-key does exactly but since the schema is just a map, you can (map explicit-schema-key (keys my-schema))

1👍
sammikko 2017-09-29T07:37:15.000085Z

this seems to work (map (fn [[k _]] (s/explicit-schema-key k)) schema)

2017-09-29T21:36:21.000164Z

nice. not sure what explicit-schema-key does exactly but since the schema is just a map, you can (map explicit-schema-key (keys my-schema))

1👍