Fork me on GitHub
#reitit
<
2018-11-07
>
ikitommi06:11:50

@shaun-mahood pushed my initial mw-diff-printer & wrote some ideas to https://github.com/metosin/reitit/pull/165. The mw & interceptor versions should work ~ the same way. Ideas & help on configuration & implementation most welcome.

ikitommi06:11:06

wrote also issues about the debugging dashboard, thought they existed already…

shaun-mahood07:11:01

Looks like a good start - I built (and then broke) a poor version that kind of worked with interceptors this morning, but it was very focused on a couple of things. If you look in the #kaocha channel Arne posted a sample of a change only diff, which was pretty nice to use. The big things I realized were missing from my quick and dirty version were configurability and logging - it only took until I wanted to see what the third interceptor was doing before I wanted those :)

ikitommi07:11:25

I think this would be awesome: a logging blocks which would have a list of all the mw/interceptors in the chain, the one logged highlighted, timing info + the minimal diff (or full diff if configured). as the mw/interceptors are data, info about those could be printed too, things like name, description, other keys.

ikitommi07:11:21

and also the :spec! not sure if someone is using those, but mw/interceptor can define a spec for the route data it’s mounted to. There could be :request-spec too….

ikitommi09:11:36

would be great to separate per now the step inspection data model from the rendering. One set of functions to collect the data, one formatter for the stdout, another for the ws/web-console over transit.

socksy19:11:55

what's the deal with spec coercions? I've had to enable them to get the swagger to have enough information to make the swagger-ui usable with parameters. And now it looks like I need to use spec-tools to get a description to be associated with them. I'm a little confused why this code is in the coercer bit, is it necessary to get the parameters to work in some way that I haven't quite grokked yet? Or is it just a by-product of the code already existing there?