Closed crummy closed 8 months ago
This can be done, but probably requires the amount of maximum middlewares to be set to some reasonable single digit number with the current implementation.
An update on this: v4.2.0
adds support for chaining up to three middlewares together and sharing data between the middlewares in the way described in your example.
Thanks so much!
Hi - thanks for the great project! I'm looking at migrating from
express-zod-api
which lets us share data across middlewares, by returning values from the middleware. Here's how I imagine it looking innext-rest-framework
:Here's express-zod-api's documentation on it: https://github.com/RobinTail/express-zod-api?tab=readme-ov-file#middlewares
Perhaps it's already possible to do this with next-rest-framework and I'm missing something?