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
I find that surprising because I would expect either the Plain or final Composite types to have and $id that is set to the prisma model name. Is this intentional? My suggestion would be for each model to have an $id that matches the generated typebox name (e.g. Model, ModelPlain, ModelWhere, ModelInputCreate, etc)
FYI - I have a post processing pass I'm using after prismabox runs, so I have a way to workaround the issues I'm opening (ranging from AST transforms to plain regex manipulation). I figure it's helpful to contribute some of that back to this repo where it makes sense, but I also don't want to be burdensome. I appreciate that this repo exists!
The text was updated successfully, but these errors were encountered:
Prismabox doesn't add
$id
to schemas, except confusingly in the case ofWhere
andWhereUnique
.https://github.com/m1212e/prismabox/blob/main/src/generators/where.ts#L272
https://github.com/m1212e/prismabox/blob/main/src/generators/where.ts#L87
I find that surprising because I would expect either the
Plain
or finalComposite
types to have and$id
that is set to the prisma model name. Is this intentional? My suggestion would be for each model to have an$id
that matches the generated typebox name (e.g. Model, ModelPlain, ModelWhere, ModelInputCreate, etc)FYI - I have a post processing pass I'm using after prismabox runs, so I have a way to workaround the issues I'm opening (ranging from AST transforms to plain regex manipulation). I figure it's helpful to contribute some of that back to this repo where it makes sense, but I also don't want to be burdensome. I appreciate that this repo exists!
The text was updated successfully, but these errors were encountered: