Regression(?) of @tsoaModel deduplication since #1498 #1650
Labels
bug
good first issue
This issue could be an easy PR for those looking to help contribute
help wanted
As far as i can tell seemingly since #1498,
@tsoaModel
has lost its meaning for dealing with duplicated model names, when using the js-doc annotation for respecifying types imported from libraries for TSOA.This seems to be a follow-up on #1516.
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
The following code has a duplicated type -
ULID
. Once imported fromulidx
, and once declared in an purpose-built file and annotated with@tsoaModel
. Since we have one and exactly one of the types with identical names with the annotation, we expect TSOA to use that annotation.MinimalController.ts
:apitypes.ts
:RealGeo.ts
:Last version where this works correctly* (or at least generates any routes): 6.0.0-rc.2
As-in the routes are still built. It is worth noting that in 6.0.0-rc.2, building the spec with above code does not actually produce any specification what-so-ever, but the command does not print any errors either and simply exits successfully.
Current Behavior
Now take that same code to the latest version of TSOA, and run a route generation to get a following error:
First version where it breaks: 6.0.0-rc.5
Note that still once again running the spec generation produces no spec, and nothing on the error output. This and the above are identical to the current version (6.3.1).
Context (Environment)
Version of NodeJS:
v22.4.0
(Reproduced in anode:22.4-alpine3.19
devcontainer)The text was updated successfully, but these errors were encountered: