Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 4, 2025

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

📝 Walkthrough

Walkthrough

The PR includes a plugin version bump (2.22.0→2.22.1), modifies OpenAPI schema generation for Json fields with TypeDef arrays to use AST-based detection instead of DMMF, adds a corresponding test case, and hardcodes Prisma version support to "6" in the init action.

Changes

Cohort / File(s) Summary
Plugin Version
packages/ide/jetbrains/build.gradle.kts
Version bump from 2.22.0 to 2.22.1
OpenAPI Schema Generation
packages/plugins/openapi/src/rpc-generator.ts, packages/plugins/openapi/tests/openapi-rpc.test.ts
Fixed array detection for Json fields referencing TypeDef to use AST field.type.array instead of DMMF def.isList; added test case covering arrays of TypeDef with enum across OpenAPI spec versions 3.0.0 and 3.1.0
Prisma Version Support
packages/schema/src/cli/actions/init.ts
Removed dynamic Prisma version parsing from package.json peerDependencies; hardcoded getLatestSupportedPrismaVersion() to return '6'

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • The OpenAPI rpc-generator fix requires understanding the distinction between DMMF and AST representations for Json TypeDef fields to validate correctness
  • Version bump and Prisma hardcoding are straightforward changes with minimal logic impact

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether the description relates to the changeset. Add a description explaining the purpose of this release merge, key changes included, or testing performed to help reviewers understand the context.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'merge dev to main (v2.22.1)' accurately describes the primary objective of the pull request, which is a merge of the dev branch to main with version bump to 2.22.1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b53b1cb and 961603a.

⛔ Files ignored due to path filters (13)
  • package.json is excluded by !**/*.json
  • packages/ide/jetbrains/package.json is excluded by !**/*.json
  • packages/language/package.json is excluded by !**/*.json
  • packages/misc/redwood/package.json is excluded by !**/*.json
  • packages/plugins/openapi/package.json is excluded by !**/*.json
  • packages/plugins/swr/package.json is excluded by !**/*.json
  • packages/plugins/tanstack-query/package.json is excluded by !**/*.json
  • packages/plugins/trpc/package.json is excluded by !**/*.json
  • packages/runtime/package.json is excluded by !**/*.json
  • packages/schema/package.json is excluded by !**/*.json
  • packages/sdk/package.json is excluded by !**/*.json
  • packages/server/package.json is excluded by !**/*.json
  • packages/testtools/package.json is excluded by !**/*.json
📒 Files selected for processing (4)
  • packages/ide/jetbrains/build.gradle.kts (1 hunks)
  • packages/plugins/openapi/src/rpc-generator.ts (1 hunks)
  • packages/plugins/openapi/tests/openapi-rpc.test.ts (1 hunks)
  • packages/schema/src/cli/actions/init.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: dependency-review
  • GitHub Check: build-test (20.x)
  • GitHub Check: build-test (20.x)
  • GitHub Check: build-test (20.x)
🔇 Additional comments (3)
packages/ide/jetbrains/build.gradle.kts (1)

12-12: LGTM!

Version bump to 2.22.1 is consistent with the release.

packages/plugins/openapi/src/rpc-generator.ts (1)

782-796: LGTM!

Using the AST's field.type.array instead of DMMF's def.isList is the correct approach for Json fields referencing TypeDefs. Since Prisma treats these as plain Json in the DMMF, the ZModel AST is the source of truth for array information. The clarifying comment is helpful.

packages/plugins/openapi/tests/openapi-rpc.test.ts (1)

521-578: LGTM!

Excellent test coverage for arrays of TypeDefs with enums directly on model fields. The test validates the bug fix in rpc-generator.ts by ensuring that:

  • TypeDef and enum schemas are properly generated
  • Cross-schema references work correctly
  • Array semantics are preserved using AST-based detection

Testing across both OpenAPI 3.0.0 and 3.1.0 ensures compatibility.

@ymc9 ymc9 merged commit 57354f8 into main Dec 4, 2025
9 checks passed
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 this pull request may close these issues.

3 participants