Custom middleware #145
Replies: 3 comments
-
@rorik302 i might need some examples here? A middleware itself it shouldn’t do any of that. Depends of the logic you add. How did you add? What is the setup? Also, by docs do you mean OpenAPI docs? If it’s just that, does the API still work? A full example and if you could answer these questions would be appreciated 👍🏼 The OpenAPI was recently rewritten and might need some readjustments |
Beta Was this translation helpful? Give feedback.
-
@rorik302 I was able to replicate the issue. There is a regression in the OpenAPI and a fix should be out soon. The API and middleware still work but the OpenAPI is afffected by it indeed. |
Beta Was this translation helpful? Give feedback.
-
@rorik302 the regression fix is now deployed with Esmerald>=2.0.5 👍🏼 Thank you for spotting that on. This happened when Starlette added middlewares to their internal mounts and since the OpenAPI was rewritten from the scratch, there were some cases where this could happen. This release 2.0.5 comes now before the release 2.1.0 where some async permission validations will kick in :) |
Beta Was this translation helpful? Give feedback.
-
Trying to use Esmerald and found that my custom middleware disables endpoint. If I connect middleware to Esmerald instance it works fine, but if I connect it to Gateway or method(@post in my case) no endpoint in docs
Beta Was this translation helpful? Give feedback.
All reactions