Fork me on GitHub
#ring-swagger
<
2018-11-28
>
Daouda02:11:05

hey guys 🙂

Daouda02:11:53

how can i achive this: :space [[s/int or s/Str]]

Daouda02:11:21

I think i should use oneOf, but i have no idea how to do it in a compojure-api project

Daouda08:11:39

thank you @ikitommi 🙂

Daouda09:11:31

hey guys, maybe i am wrong, but look like s/if or s/cond-pre are used for specifiying if you datatype will be a map or vector or whatever. What i am looking for is a way to say that something will be a vector of vector and it could have inside it schema A or schema B or nil or or even three of them at the same time. Something like (s/defschema schema-name {:name s/Str :space s/if [[A B nil]] [[A nil]] [[B nil]] [[nil]]})

Daouda09:11:37

can anyone show me a way to achieve that with an example please?

ikitommi12:11:33

@quieterkali there is #schema too for purely schema-related questions.

Daouda12:11:26

thanks @ikitommi 🙂