Open RomainGueffier opened 1 month ago
Hello there RomainGueffier 👋
Thank you for opening your very first issue in this project.
We will try to get back to you as soon as we can.👀
The error
.tsoa/routes.ts:2638:56 - error TS2353: Object literal may only specify known properties, and '"multiple"' does not exist in type 'Field'.
upload.fields([{"name":"file","maxCount":1,"multiple":false}]),
is something I came across and filed a bug for https://github.com/lukeautry/tsoa/issues/1642. Unfortunately it has been closed without a fix. I have recently done some more digging and think the issue is slightly more complicated than I originally thought. This stems from a change in https://github.com/lukeautry/tsoa/pull/1620 which introduced the property multiple
onto a datatype being passed to multer
. Unfortunately the type of the fields
method doesn't expect this property. Originally I thought this was just something that can be removed but the property is being used in the hapi template https://github.com/lukeautry/tsoa/blob/d573d6fa4303b5c4236e06fac722bf3934b85359/packages/cli/src/routeGeneration/templates/hapi.hbs#L74.
I think there are two choices:
multiple
property and implement the logic for multiple based on the presence of the maxCount
propertymultiple
property from being rendered in the express and koa templates. These are currently just using a hleper json
If one of the maintainers can comment I'm more than happy to contribute a fix to this part of the issue
Hi,
Tsoa 6 CLI
spec-and-routes
is still crashing after multiple attempts to upgrade on each minor version since version 6. Some issues about this seems similar but have been closed as completed, however I still encounter those issues. All is working correctly in Tsoa 5Prisma errors:
Multer errors:
Other errors:
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
tsoa spec-and-routes
to complete without typescript errors.Ideally:
Current Behavior
To bypass typescript errors, I had to write:
Possible Solution
--
Steps to Reproduce
Run tsoa spec and routes
Context (Environment)
Version of the library: 6.x.x, in example 6.4.0 Version of NodeJS: 18-22 Version of Typescript: 5.5.3
Detailed Description
--
Breaking change?
--