ring-swagger 2016-11-22

I wonder if I found an oddity from compojure-api (or ring-swagger). When using a prismatic schema predicate as a type for member of array, the swagger UI crashes 😕 I wonder what we do wrong. Indeed the resulting $ref in swagger.json is null. Though, s/Any for example is shown as Array[Inline Model 1].

Hi! One cant determine type of s/pred. You could try (s/constrained s/Str seq 'not-empty). pred could give better error thou...

hiya! ha! thought we did something we weren't supposed to 🙂

and it's the same with (s/maybe) etc too, should not be used I recon.

ah, thank yoouse. One of these days I learn to read documentation properly.

though, the problem seems to be with Arrays. otherwise things work fine indeed.

ah, the primitive-array support is kinda new, please write issues &/ fix 'em with PRs ;)

ha, thought about something like that. was one of the reasons I asked if something like that should work for now. Will investigate and would gladly contribute 🙂

👍 1

ha, now I got it, the s/constrained works beautifully in schema for arrays, gives nice documentation too.