RobinTail / express-zod-api

A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
https://ez.robintail.cz
MIT License
619 stars 30 forks source link

`testMiddleware` not exported #2101

Closed Tomtec331 closed 5 days ago

Tomtec331 commented 5 days ago

Description

I tried to use testMiddleware which is mentioned in the documentation but it cannot be imported. Looking at index.ts, I found that only testEndpoint is currently exported.

See: https://github.com/RobinTail/express-zod-api/blob/388cc941ef854e08a886e7832fc253bf822c4be6/src/index.ts#L32

Expected

The testMiddleware function should be exported.

Reproduction

Just try to import testMiddleware and it will fail.

image

Context

RobinTail commented 5 days ago

Yeah, that's true. Sorry for that, and thank you for informing me. Will fix ASAP, @Tomtec331

RobinTail commented 5 days ago

🚀 Fixed in v20.14.3, @Tomtec331 Thank you for the contribution!