PrismaP
Prisma11mo ago
Ethan

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

/**
 * Model User
 * 
 */
export type User = runtime.Types.DefaultSelection<UserPayload>


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?
Was this page helpful?