Skip to content

Add note about prisma-json-types-generator in docs #1617

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

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/config/config-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export default defineConfig({
});
```

If you have multiple `generator` statements defined in your schema file, you can pass in the `clientGenerator` option to specify the `prisma-client-js` generator, which will prevent other generators from being generated:
If you have multiple `generator` statements defined in your schema file, you can pass in the `clientGenerator` option to specify the `prisma-client-js` generator, which will prevent other generators from being generated. Some examples where you may need to do this include when using the `prisma-kysely` or `prisma-json-types-generator` generators.

<CodeGroup>

Expand All @@ -468,6 +468,10 @@ generator kysely {
enumFileName = "enums.ts"
fileName = "types.ts"
}

generator json {
provider = "prisma-json-types-generator"
}
Comment on lines +472 to +474
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add explanation for prisma-json-types-generator.

The example introduces prisma-json-types-generator without context about its purpose or benefits.

 generator json {
+  // Generates TypeScript types for JSON fields in your schema
   provider = "prisma-json-types-generator"
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
generator json {
provider = "prisma-json-types-generator"
}
generator json {
// Generates TypeScript types for JSON fields in your schema
provider = "prisma-json-types-generator"
}

```

```ts trigger.config.ts
Expand Down