@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.
alrighty, thanks for the explanation!
blast from the past: https://github.com/OAI/OpenAPI-Specification/issues/57
@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
@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.
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
So inserting it with postwalk solves that as well
there is also a ticket for a new (and simple) reverse-routing that might be relevant: https://github.com/metosin/reitit/issues/227
That would be very useful for the client routing, but so far not able to see what the connection to coercion is.
you could add requests & responses too there. kinda like swagger-spec but just what is needed for your own client.
user-space as in post-walk the routes and swap the impl. or just strip the key and assume it’s all #malli schemas ;)
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.
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
Hi, I have seen it and it looks very interesting.
anyone have experience building Clojure containers using Jib for GCP https://cloud.google.com/java/getting-started/jib ?