Closed mann1996 closed 1 month ago
Hi @mann1996
Try to use showRoutes
for debugging:
showRoutes(app)
According to this, the endpoint path is not correct.
GET /api/docs
GET /api/doc.json
GET /api/direct
GET /api/api/openapi
I will try it
For now I have removed base path from app.basePath
Summary
I am writing Unit tests for my API and I am getting error 404 for the routes that are defined using @hono/zod-openapi createRoute method. Routes that are defined using app.get or app.post are working fine. This issue is only in Tests and not when using browser or postman.
Screenshot
Environment
OS: MacOS 14.5 (Apple Silicon) Testing Library: Vitest Runtime: Cloudflare Workers
Reproduction Code: https://github.com/jaspreet-singh-96/worker-test