Skip to content
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

Better documentation for when external interfaces are not found #384

Closed
dgreene1 opened this issue Aug 5, 2019 · 0 comments · Fixed by #386
Closed

Better documentation for when external interfaces are not found #384

dgreene1 opened this issue Aug 5, 2019 · 0 comments · Fixed by #386

Comments

@dgreene1
Copy link
Collaborator

dgreene1 commented Aug 5, 2019

Proposal:
Add a more clear message when tsoa can not find the interface that you're using.

Specifically, I'd like to recommend we change this:

throw new GenerateMetadataError(`No matching model found for referenced type ${typeName}.`);

to be:

throw new GenerateMetadataError(`No matching model found for referenced type ${typeName}. If ${typeName} comes from a dependency, please create an interface in your own code that has the same structure. Tsoa can not utilize interfaces from external dependencies.`);

Context:
It seems like a common challenge of adopting tsoa is the idea that the interfaces that you expose to your consumers should not change. Therefore tsoa does not allow you to use interfaces that are defined in dependencies. This has caused problems for a few users ( #340, #377, #334, and #205)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant