ring-swagger 2019-02-08

@ikitommi quick question, shouldn't this coerce to keyword? (it doesn't)

(st/coerce 
  (st/spec
    {:spec #{:foo/bar}
     :decode/string keyword})
  "foo/bar"
  st/json-transformer)
=> "foo/bar"

If I change the spec to keyword? then it works fine. But when I want to limit the possible keywords that's not an acceptable solution

This is an annoying problem 😕

OK. Found a way to fix it

(s/and keyword? #{:foo/bar})

Now coercion works

👍 1