-
-
Couldn't load subscription status.
- Fork 126
merge dev to main (v2.7.2) #1793
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
Conversation
📝 WalkthroughWalkthroughThis pull request includes updates to several files across the project. The Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
packages/schema/src/language-server/validator/datamodel-validator.ts (1)
301-304: Clarify the error message for missing relation attributesThe error message in the
acceptcall could be more precise to help developers understand the requirement. Consider rephrasing it for clarity.Suggested change:
- 'Field for one side of relation must carry @relation attribute with both "fields" and "references"' + 'One side of the relation must define a @relation attribute with both "fields" and "references" specified'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (13)
package.jsonis excluded by!**/*.jsonpackages/ide/jetbrains/package.jsonis excluded by!**/*.jsonpackages/language/package.jsonis excluded by!**/*.jsonpackages/misc/redwood/package.jsonis excluded by!**/*.jsonpackages/plugins/openapi/package.jsonis excluded by!**/*.jsonpackages/plugins/swr/package.jsonis excluded by!**/*.jsonpackages/plugins/tanstack-query/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/package.jsonis excluded by!**/*.jsonpackages/runtime/package.jsonis excluded by!**/*.jsonpackages/schema/package.jsonis excluded by!**/*.jsonpackages/sdk/package.jsonis excluded by!**/*.jsonpackages/server/package.jsonis excluded by!**/*.jsonpackages/testtools/package.jsonis excluded by!**/*.json
📒 Files selected for processing (4)
- packages/ide/jetbrains/build.gradle.kts (1 hunks)
- packages/schema/src/language-server/validator/datamodel-validator.ts (4 hunks)
- packages/schema/tests/schema/validation/datamodel-validation.test.ts (2 hunks)
- packages/server/src/api/rest/index.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/ide/jetbrains/build.gradle.kts
🧰 Additional context used
🔇 Additional comments (5)
packages/server/src/api/rest/index.ts (1)
1234-1243: Improved handling of URL-encoded characters in resource IDs.The changes to
makePrismaIdFiltermethod now properly decode theresourceIdusingdecodeURIComponent. This enhancement ensures correct handling of special characters in both single and compound IDs, aligning with best practices for URL parameter processing.packages/schema/src/language-server/validator/datamodel-validator.ts (2)
10-10: Import necessary utilities from '@zenstackhq/sdk'The added import statement correctly brings in the required functions for data model validation.
200-201: SimplifyisSelfRelationmethod for clarityThe
isSelfRelationmethod has been simplified to check if the field's type reference matches its containing model. This enhances readability and maintains correct logic for identifying self-relations.packages/schema/tests/schema/validation/datamodel-validation.test.ts (2)
454-454: Test correctly checks for missing "fields" and "references".The test case appropriately validates that an error is thrown when either "fields" or "references" is missing in a relation definition, ensuring both are provided together.
544-544: Test accurately verifies missing @relation attribute details.The test effectively checks that an error is raised when a relation field lacks a
@relationattribute with both "fields" and "references" specified on one side of the relation.
No description provided.