honojs / middleware

monorepo for Hono third-party middleware/helpers/wrappers
https://hono.dev
473 stars 169 forks source link

fix(zod-openapi): infer env type parameter from middleware #828

Closed daniel-pedersen closed 1 week ago

daniel-pedersen commented 1 week ago

807 introduced inference of env based on middleware. However, this was not extended to some of the abstract types themselves - this PR fixes this.

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: af7be31bb3df1edb2aa127b3fef3bad3c4af6b6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @hono/zod-openapi | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

yusukebe commented 1 week ago

Hi @daniel-pedersen

Thank you for the PR. Can you add tests? We can't understand what this change will do without tests.

daniel-pedersen commented 1 week ago

Hello @yusukebe

No problem, I've added the test case now.

yusukebe commented 1 week ago

@daniel-pedersen

Thanks! I've confirmed it and it looks good. I'll merge and release a new version now.