lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.48k stars 498 forks source link

Multiple runtime dependencies for backend frameworks. #1626

Closed JimmyBjorklund closed 3 months ago

JimmyBjorklund commented 4 months ago

The template file in the runtime library drags in all tre web backends and all their dependencies, is there a way to have this generated during code generation instead of having this input file?

packages/runtime/src/routeGeneration/templates

export * from "./templateService";
export * from "./express/expressTemplateService";
export * from "./hapi/hapiTemplateService";
export * from "./koa/koaTemplateService";

Seems strange to have to depend on all if you only are needing one at the time.

  "dependencies": {
    "@hapi/boom": "^10.0.1",
    "@hapi/hapi": "^21.3.3",
    "@types/koa": "^2.15.0",
    "@types/multer": "^1.4.11",
    "express": "^4.18.3",

Have the end user add the relevant runtime dependency in the packet.json file instead of pulling in all three for them. /J

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days