Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow insertion of documentation in the generated model files #113

Open
aiji42 opened this issue Apr 26, 2022 · 0 comments · May be fixed by #115
Open

Allow insertion of documentation in the generated model files #113

aiji42 opened this issue Apr 26, 2022 · 0 comments · May be fixed by #115

Comments

@aiji42
Copy link

aiji42 commented Apr 26, 2022

I have a need to add documentation to the beginning of model files.

For example, if I have a model that specifies imports but does not use custom validation, I want to add // @ts-nocheck to the top of the file because typescript will respond to an unused import clause and display an error.

スクリーンショット 2022-04-26 午後6 42 16

Just delete import * as imports from ". /customs", the error does not occur, but it comes back every time I run prisma generate.

Proposal

How about adopting these config value?

generator zod {
  provider              = "zod-prisma"
  output                = "../app/zod"
  imports               = "../app/zod/customs"
  relationModel         = true
  modelCase             = "PascalCase"
  modelSuffix           = "Model"
  useDecimalJs          = true
  prismaJsonNullability = true
  additionalDoc         = "// @ts-nocheck"  <--
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant