Fork me on GitHub
#reitit
<
2023-02-21
>
ikitommi14:02:39

took some time, but now a clean slate to ship the OpenAPI3, Plugins & more.

👍 18
🎉 8
🚀 6
Ben Sless16:02:57

Wishlist for next version: Per method middleware Inline function call & allocation in async ring handler OpenAPI3

Ben Sless17:02:07

Damn, I had no idea! Can I add it during compile time?

Ben Sless17:02:01

And can I make sure it runs before/after other higher level middlewares?

ikitommi17:02:50

it's just data, reitit-ring :compile accumulates everything under methods, so those end up last in the middleware vector. Normal meta-merge rules and type-hints apply. You can inspect the routes with r/routes and r/compiled-routes

ikitommi17:02:31

... you can re-order the chain using (can't recall the name of the) another hook, if you need to move up the chain.