reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
ikitommi 2020-10-06T05:14:05.062500Z

@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.

skuro 2020-10-06T07:31:33.067200Z

alrighty, thanks for the explanation!

ikitommi 2020-10-06T05:16:59.063800Z

blast from the past: https://github.com/OAI/OpenAPI-Specification/issues/57

ikitommi 2020-10-06T05:19:00.065500Z

@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

ingesol 2020-10-06T07:07:05.066100Z

@ikitommi 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.

ingesol 2020-10-06T07:09:31.066300Z

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

ingesol 2020-10-06T07:09:52.066500Z

So inserting it with postwalk solves that as well

ikitommi 2020-10-06T07:19:04.066700Z

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

ingesol 2020-10-06T07:23:49.067Z

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

ikitommi 2020-10-06T11:00:49.068700Z

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

ikitommi 2020-10-06T05:20:44.065800Z

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

thomas 2020-10-06T10:05:22.068600Z

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 Mariano 2020-10-06T11:24:30.068900Z

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

thomas 2020-10-06T12:14:46.069200Z

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

👍 1
subsaharancoder 2020-10-06T21:44:46.070100Z

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