Ethan
Explore posts from serversPPrisma
•Created by Ethan on 1/29/2025 in #help-and-questions
TSOA generating from @prisma/client
This is my current workflow, i run tsoa spec-and-routes with OpenAPI to generate a swagger.json of my controllers. In my controllers, i use models from @prisma/client generated from schema.prisma. I fairly sure this is how it works.
The issue is when i go into, for example, import {User} from @prisma/client, this is the definition... and i think TSOA does not understand this type
This was working before until recently.
How can I maintain type safety without have to recreated this type? Or what is your approach to auto generating an 'api-client' for use on the client side?
10 replies