You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm using Prisma client in a FastAPI application and would like to expose the creation schema to the API but hiding the ID (since it will be generated dynamically). Is there a specific type in prisma.types that gives me this Pydantic model?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I'm using Prisma client in a FastAPI application and would like to expose the creation schema to the API but hiding the ID (since it will be generated dynamically). Is there a specific type in
prisma.types
that gives me this Pydantic model?The prisma config:
The app endpoint:
And here's the request body schema:
For now, what I'm doing to solve it is creating a partial excluding the
id
, i.e:But I would like to know if there's any built-in schema for it.
Beta Was this translation helpful? Give feedback.
All reactions