Open foyarash opened 5 days ago
Really like this idea! If the DMMF is eventually deprecated, this can allow in the future to support different ORMs, for example Drizzle 👀
Really like this idea! If the DMMF is eventually deprecated, this can allow in the future to support different ORMs, for example Drizzle 👀
Exactly, this is the ultimate goal of the lib, to be able to support every kind of ORM ! 😄
Summary
Currently, generating we are using
prisma-json-schema-generator
to generate a JSON schema that we then have to import and pass intogetNextAdminProps
. This requires an extra dependency installation and an extra import of something that the user should not really care about.The custom generator would allow us to add
prisma-json-schema-generator
as a dependency of next-admin, and to output the JSON schema directly in the node_modules (for examplenode_modules/.next-admin/json-schema.json
). it would also allow us, in the future, to add some more customization to the JSON schema that would make the DMMF obsolete, since we could add all the DMMF information into the JSON schema.Basic Example
Drawbacks
No response
Unresolved questions
No response