Fork me on GitHub
#duct
<
2019-05-08
>
javi09:05:58

@jahson done!! thanks for the pointers. I was nearly there but didn't know where to apply the middleware. :duct.handler/root was the place. Looking at merge-configs now to better understand the merging sequence of configs.

👍 4
javi10:05:19

another question, so ... at a high level...to integrate ring-swagger, I would have to add schema to the routes and then create a module that process the config before the system is initiated and generate the swagger json from the handlers in the config. is that the process? thanks

jeffmad16:05:59

@fj.abanses if you figure out ring-swagger I would love to see how you did it.

javi16:05:43

@jeffmad will do! As a bit of an experiment i figured that as we already have the routes in the config, getting those and rendering them and adding some buttons to make rest calls is quite easy.

jeffmad16:05:29

I like what metosin did here with pedestal - swagger, but i’d like to get it all working with integrant, just have not had the slack time to really start tinkering https://github.com/metosin/reitit/tree/master/examples/pedestal-swagger

javi16:05:38

i am using the swagger-ui that comes with luminus/compojure-api, but i am extending it for an editor i am creating to auto generate views/reagent components and i ll be integrating some form of generative testing with the route specs... I want to figure out the swagger stuff but something tells me that using the config as the source of info i could do so much more...

ikitommi18:05:40

hi (from metosin), there is also a ring example with reitit + swagger. We are using reitit with integrant in most of the projects - I guess there isn’t a public sample project out there, but the ring version of the swagger-app should just work https://github.com/metosin/reitit/tree/master/examples/ring-swagger.

👍 12
ikitommi18:05:49

also, the closed-spec validation works nicely with intgrant spec validation - you catch extra & misspelled keys..