lukeautry / tsoa

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

v6.1.0 breaking change on Authentication middleware #1575

Closed sl33kr closed 4 months ago

sl33kr commented 4 months ago

Upon upgrading from v6.0.1 to v6.1.0 our project started getting build errors on our generated routes.ts attempting to invoke our authentication middleware.

src/routes/routes.ts:1703:83 - error TS2554: Expected 2-3 arguments, but got 4.
expressAuthentication(request, name, secMethod[name], response)

Sorting

Expected Behavior

Build does not fail in minor version upgrade

Current Behavior

Build fails due to authentication method signature change.

Possible Solution

This possibly only affects projects with strict: true in the compiler options. It appears the breaking change occurred in https://github.com/lukeautry/tsoa/pull/1557.

Context (Environment)

Version of the library: 6.1.0 Version of NodeJS: 18.19.1 Version of Typescript: 5.1.3

Detailed Description

Breaking change?

github-actions[bot] commented 4 months ago

Hello there sl33kr šŸ‘‹

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.šŸ‘€