ring-swagger & compojure-api
Bao 2019-01-07T13:12:35.001900Z

Hi everyone, I'm trying to include this custom type Foo (def Foo (s/named (s/pred (partial re-find #"100-\d+")) 'Foo)) into a schema:

(s/defschema Bar
  {:foo   [Foo]}) ; this does not work

(s/defschema Bar
  {:foo   Foo})   ; this works, but how do I make it an array?
Swagger shows error "Uncaught TypeError: Cannot read property '$ref' of null" for the first example. Would really appreciate any help!

ikitommi 2019-01-07T14:36:59.006100Z

@baonguyen1201 would (s/defschema Foo #"100-\d") work?