-
Notifications
You must be signed in to change notification settings - Fork 521
No matching model found for referenced type ... 77 more .... #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've encountered a similar kind of issue and used a parentNode: NodeObject {
pos: -1,
end: -1,
flags: 8,
modifierFlagsCache: 0,
transformFlags: 0,
parent: undefined,
kind: 158,
modifiers: undefined,
name: IdentifierObject {
pos: -1,
end: -1,
flags: 8,
modifierFlagsCache: 0,
transformFlags: 0,
parent: undefined,
kind: 75,
escapedText: '... 4 more ...',
originalKeywordKind: undefined,
autoGenerateFlags: 0,
autoGenerateId: 0
},
questionToken: undefined,
type: undefined,
initializer: undefined
}
Generate swagger error.
TypeError: Cannot read property 'kind' of undefined
at TypeResolver.getPrimitiveType (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:349:72)
at TypeResolver.resolve (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:92:34)
at /Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:147:118
at Array.reduce (<anonymous>)
at TypeResolver.resolve (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:146:18)
at /Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:147:118
at Array.reduce (<anonymous>)
at TypeResolver.resolve (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:146:18)
at TypeResolver.resolve (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/typeResolver.js:308:118)
at MethodGenerator.Generate (/Users/jokroj/__Cellular__/bitburger-one-cds/node_modules/tsoa/dist/metadataGeneration/methodGenerator.js:52:76) If I decrease the size of an object I am returning in one of my functions this error is omitted. And by size I mean that using a different length of a field name e.g. demo instead of longdemo makes the difference if tsoa runs or fails. I'll try to reduce this down into a neat example, but since this may take a while, I'll leave this comment to support further investigation of this bug. |
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 |
not stale. Maybe I will have time to look more into this. I see these in the VS Code type hints as well for large types. I found this: https://stackoverflow.com/questions/53113031/how-to-see-a-fully-expanded-typescript-type-without-n-more-and maybe setting this will help. |
Also this: microsoft/TypeScript#26238 |
I'd hope there is a way to access the properties without truncation regardless of the project config using the compiler/tc api |
It seems like the action bot decided to not respect commenting in order to remove the stale label Anyways, I was able to make some progress. I was able to get past this error by doing something similar to what is described here: microsoft/TypeScript#26238 (comment) In the built typescript files, there were many copies of the mentioned line: I also found mention of a method to set this value here: by doing like however, I've been unable to get this to have an affect by setting the value from inside TSOA. |
Thanks to @fantapop and microsoft/TypeScript#26238 (comment) I was able to solve this with I've created a fork and a patch-branch here: However, I am lost in providing a test for that. All tests run trough - with and without the patch. I've tried to edit the So a patch is available, a test ist missing. |
@jookshub Your fix is working for me as well. Thanks for figuring that out! |
I'm running into a weird one. I'm unable to build. The error is:
I've got a local copy of tsoa running so I was trying to debug a bit. That area of the code was catching an error but not logging it. When I log it out I get:
My best guess here is that there are too many classes and typescript isn't giving all the info so at some point, it gives back "77 more" expecting to display that in a gui.
Here is some more info:
getModelTypeDeclaration is being called with this type:
I'm submitting a ...
I confirm that I
Possible Solution
I'm not sure what else to try here. I'm open to debugging some more with some instruction.
Context (Environment)
Version of the library: 3.2.1
Version of NodeJS: I'm running tsoa using ts-node
The text was updated successfully, but these errors were encountered: