Fork me on GitHub
#reitit
<
2020-10-06
>
ikitommi05:10:05

@skuro regex specs as in the sequence specs or the string regex specs? Spec doesn’t support meta-data, but you can add that with (spec-tools.core/spec {:spec …spec-goes-here…, :swagger {:type "string", :pattern "whatever"}}) for arbitrary swagger definitions. For swagger in general, the 2.0 doesn’t support anyOf or oneOf . 3.0 would support that, the openapi3 PR is not merged yet.

skuro07:10:33

alrighty, thanks for the explanation!

ikitommi05:10:00

@ingesol compojure-api had a built-in multimethod for that, you could say :coercion :spec. Reitit doesn’t have that. You can do that in the user-space, or there could be a edn tags for those things. ideas welcome

ikitommi05:10:44

user-space as in post-walk the routes and swap the impl. or just strip the key and assume it’s all #malli schemas ;)

ingesol07:10:05

@U055NJ5CC Thank you! That is of course a pretty good solution, just modify the route data structure by inserting coercion impl details before creating the router on the frontend.

ingesol07:10:31

If I want coercion on lots of routes, it’s pretty verbose anyway to have to repeat this for every single one

:coercion   reitit.coercion.spec/coercion

ingesol07:10:52

So inserting it with postwalk solves that as well

ikitommi07:10:04

there is also a ticket for a new (and simple) reverse-routing that might be relevant: https://github.com/metosin/reitit/issues/227

ingesol07:10:49

That would be very useful for the client routing, but so far not able to see what the connection to coercion is.

ikitommi11:10:49

you could add requests & responses too there. kinda like swagger-spec but just what is needed for your own client.

thomas10:10:22

Hi, I remember seeing a page about reitit and Oauth login stuff. But my google foo is letting me down. Any ideas where I can find information on this? I would like to use a existing JS lib for the Oauth stuff.

Martin Mariano11:10:30

Not sure if it is what you want, but Jacek Schae has a incoming series of tutorials on reitit, and it uses auth0 for oauth delegation https://www.learnreitit.com, still on early access though

thomas12:10:46

Hi, I have seen it and it looks very interesting.

👍 3
subsaharancoder21:10:46

anyone have experience building Clojure containers using Jib for GCP https://cloud.google.com/java/getting-started/jib ?